|
|
|
@ -577,7 +577,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
//2023-9-1,衣国豪:点击发送订舱时,最少得填写船公司,船期,目的地,品名,箱型,箱量,重量,如果以上信息没填,允许保存,但是发送订舱时给出提示: XXX不能为空,请补充后重新发送
|
|
|
|
|
var emptyCtn = ctnList.Where(x => string.IsNullOrEmpty(x.CTNALL) || !x.CTNNUM.HasValue).Select(x => x.BILLID).Distinct().ToList();
|
|
|
|
|
if (emptyKgs.Any())
|
|
|
|
|
if (emptyCtn.Any())
|
|
|
|
|
{
|
|
|
|
|
var emptyCtnOrd = orderList.Where(x => emptyCtn.Contains(x.Id)).Select(x => x.BOOKINGNO).ToList();
|
|
|
|
|
throw Oops.Bah($"箱型箱量不能为空:\r\n{string.Join("\r\n", emptyCtnOrd)}\r\n请补充后重新发送");
|
|
|
|
@ -1769,12 +1769,28 @@ namespace Myshipping.Application
|
|
|
|
|
2.条件字段1:若货物标识为冻柜,温度,通风,湿度必填。
|
|
|
|
|
3.条件字段2:若货物标识为危险品,危险品编号,危险品等级,联系人,电话,HSCODE必填。
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
必填字段:去掉 件数、包装、HSCODE,增加合约号,订舱账号,订舱密码
|
|
|
|
|
*/
|
|
|
|
|
if (string.IsNullOrEmpty(input.BSNO))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("未提供业务ID");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(input.CONTRACTNO))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("合约号不能为空");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//if (string.IsNullOrEmpty(input.BOOKINGACCOUNT))
|
|
|
|
|
//{
|
|
|
|
|
// throw Oops.Bah("订舱账号不能为空");
|
|
|
|
|
//}
|
|
|
|
|
//if (string.IsNullOrEmpty(input.BOOKINGPASSWORD))
|
|
|
|
|
//{
|
|
|
|
|
// throw Oops.Bah("订舱密码不能为空");
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(input.CARRIERID) || string.IsNullOrEmpty(input.CARRIER))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("船司代码和名称不能为空");
|
|
|
|
@ -1805,34 +1821,51 @@ namespace Myshipping.Application
|
|
|
|
|
throw Oops.Bah("付费方式不能为空");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!input.PKGS.HasValue)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("件数不能为空");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!input.KGS.HasValue)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("重量不能为空");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(input.KINDPKGS))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("包装不能为空");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(input.CARGOID))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("货物标识不能为空");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(input.DESCRIPTION))
|
|
|
|
|
if (input.CARGOID == "R")
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("品名不能为空");
|
|
|
|
|
if (string.IsNullOrEmpty(input.TEMPSET))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("货物标识为冻柜的情况下,温度不能为空");
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(input.REEFERF))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("货物标识为冻柜的情况下,通风度不能为空");
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(input.HUMIDITY))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("货物标识为冻柜的情况下,湿度不能为空");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (input.CARGOID == "D")
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(input.DCLASS))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("货物标识为危险品的情况下,危险品等级不能为空");
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(input.LINKMAN))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("货物标识为危险品的情况下,危险品联系人不能为空");
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(input.DTEL))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("货物标识为危险品的情况下,危险品联系电话不能为空");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(input.HSCODE))
|
|
|
|
|
if (string.IsNullOrEmpty(input.DESCRIPTION))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("HSCODE不能为空");
|
|
|
|
|
throw Oops.Bah("品名不能为空");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (input.CtnList == null || input.CtnList.Count == 0)
|
|
|
|
|