下货纸冻柜和危险品必填项校验

optimize
wanghaomei 1 year ago
parent 70f3173c9d
commit f6fca37cb4

@ -75,6 +75,17 @@ namespace Myshipping.Application.EDI
return new KeyValuePair<bool, string>(false, "海关航次不能为空"); return new KeyValuePair<bool, string>(false, "海关航次不能为空");
} }
//2023年7月12日下货纸为冻柜需填写温度和通风危险品需填写等级和编号
if (order.CARGOID == "R" && (string.IsNullOrEmpty(order.TEMPSET) || string.IsNullOrEmpty(order.REEFERF)))
{
return new KeyValuePair<bool, string>(false, "冻柜的温度和通风必须填写");
}
if (order.CARGOID == "D" && (string.IsNullOrEmpty(order.DUNNO) || string.IsNullOrEmpty(order.DCLASS)))
{
return new KeyValuePair<bool, string>(false, "危险品的等级和编号必须填写");
}
var fileOpt = App.GetOptions<BookingAttachOptions>(); var fileOpt = App.GetOptions<BookingAttachOptions>();
if (string.IsNullOrEmpty(fileOpt.basePath)) if (string.IsNullOrEmpty(fileOpt.basePath))
{ {
@ -412,7 +423,7 @@ namespace Myshipping.Application.EDI
repBookingFile.Insert(attFile); repBookingFile.Insert(attFile);
//发送邮件 //发送邮件
var sendResult = await MailSendHelper.SendMail(userMail, title, "", order.YARDCONTRACTEMAIL,new KeyValuePair<string, byte[]>(ediFileName, msResult.GetBuffer())); var sendResult = await MailSendHelper.SendMail(userMail, title, "", order.YARDCONTRACTEMAIL, new KeyValuePair<string, byte[]>(ediFileName, msResult.GetBuffer()));
if (!sendResult.Key) if (!sendResult.Key)
{ {
return new KeyValuePair<bool, string>(false, sendResult.Value); return new KeyValuePair<bool, string>(false, sendResult.Value);

Loading…
Cancel
Save