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