booking_auth_dev
wanghaomei 2 years ago
commit 87d38a7b95

@ -272,13 +272,21 @@ namespace Myshipping.Application
{ {
throw Oops.Bah("主单不需要填写分单号"); throw Oops.Bah("主单不需要填写分单号");
} }
if (string.IsNullOrWhiteSpace(input.MBLNO))
{
throw Oops.Bah("请填写提单号!");
}
} }
else else
{ {
if (!string.IsNullOrWhiteSpace(input.MBLNO)) if (string.IsNullOrWhiteSpace(input.MBLNO))
{ {
throw Oops.Bah("请填写主提单号"); throw Oops.Bah("请填写主提单号");
} }
if (string.IsNullOrWhiteSpace(input.HBLNO))
{
throw Oops.Bah("请填写分提单号");
}
} }
@ -359,13 +367,21 @@ namespace Myshipping.Application
{ {
throw Oops.Bah("主单不需要填写分单号"); throw Oops.Bah("主单不需要填写分单号");
} }
if (string.IsNullOrWhiteSpace(input.MBLNO))
{
throw Oops.Bah("请填写提单号!");
}
} }
else else
{ {
if (!string.IsNullOrWhiteSpace(input.MBLNO)) if (string.IsNullOrWhiteSpace(input.MBLNO))
{ {
throw Oops.Bah("请填写主提单号"); throw Oops.Bah("请填写主提单号");
} }
if (string.IsNullOrWhiteSpace(input.HBLNO))
{
throw Oops.Bah("请填写分提单号");
}
} }
JsonUtil.PropToUpper(input, "ORDNO", "BSSTATUS", "YardContract", "YardContractTel", "YardContractEmail"); JsonUtil.PropToUpper(input, "ORDNO", "BSSTATUS", "YardContract", "YardContractTel", "YardContractEmail");
JsonUtil.TrimFields(input); JsonUtil.TrimFields(input);
@ -606,7 +622,8 @@ namespace Myshipping.Application
FilePath = fileRelaPath, FilePath = fileRelaPath,
TypeCode = dto.TypeCode, TypeCode = dto.TypeCode,
TypeName = dto.TypeName, TypeName = dto.TypeName,
BookingId = dto.BookingId BookingId = dto.BookingId,
}; };
await _bookingfile.InsertAsync(newFile); await _bookingfile.InsertAsync(newFile);
using (var stream = File.Create(fileAbsPath)) using (var stream = File.Create(fileAbsPath))
@ -1753,11 +1770,16 @@ namespace Myshipping.Application
primaryModel.KINDPKGS_EDI_CODE = ediPkgs.MapCode?.Trim(); primaryModel.KINDPKGS_EDI_CODE = ediPkgs.MapCode?.Trim();
//这里是订舱时,默认取SOREMARK赋值到EDIREMARK
if (model.sendType == "B")
primaryModel.EDIREMARK = order.SOREMARK;
//箱信息 //箱信息
var contaList = _repCtn.AsQueryable().Where(t => t.BILLID == order.Id).ToList(); var contaList = _repCtn.AsQueryable().Where(t => t.BILLID == order.Id).ToList();
primaryModel.CTNLIST = new List<MsOpSeaeCtnEDIBaseModel>(); primaryModel.CTNLIST = new List<MsOpSeaeCtnEDIBaseModel>();
//集装箱 //集装箱
foreach (var conta in contaList) foreach (var conta in contaList)
{ {
@ -1803,6 +1825,8 @@ namespace Myshipping.Application
primaryModel.CTNGOODSLIST.Add(cargoModel); primaryModel.CTNGOODSLIST.Add(cargoModel);
} }
//这里临时赋值,等明确对应的扩展表字段后赋值 //这里临时赋值,等明确对应的扩展表字段后赋值
#if DEBUG #if DEBUG
@ -1812,7 +1836,7 @@ namespace Myshipping.Application
primaryModel.SalesRepCode = "SALE1"; primaryModel.SalesRepCode = "SALE1";
primaryModel.ACIHBL = String.Empty; primaryModel.ACIHBL = String.Empty;
primaryModel.S0CC0C = String.Empty; primaryModel.S0CC0C = String.Empty;
primaryModel.EDIREMARK = String.Empty;
primaryModel.AMSCONSIGNEE = String.Empty; primaryModel.AMSCONSIGNEE = String.Empty;
primaryModel.AMSNOTIFYPARTY = String.Empty; primaryModel.AMSNOTIFYPARTY = String.Empty;
primaryModel.EDIATTN = "CEE1"; primaryModel.EDIATTN = "CEE1";

@ -24,7 +24,7 @@ namespace Myshipping.Application
.Map(dest => dest.VESSEL, src => src.VESSEL) .Map(dest => dest.VESSEL, src => src.VESSEL)
.Map(dest => dest.VOYNO, src => src.VOYNO) .Map(dest => dest.VOYNO, src => src.VOYNO)
.Map(dest => dest.ETD, src => src.ETD.HasValue? src.ETD.Value.ToString("yyyy-MM-dd"):"") .Map(dest => dest.ETD, src => src.ETD.HasValue? src.ETD.Value.ToString("yyyy-MM-dd"):"")
//.Map(dest => dest.EDIREMARK, src => src.EDIREMARK) //.Map(dest => dest.EDIREMARK, src => src.SOREMARK)
.Map(dest => dest.SIREMARK, src => src.SIREMARK) .Map(dest => dest.SIREMARK, src => src.SIREMARK)
.Map(dest => dest.SHIPPER, src => src.SHIPPER) .Map(dest => dest.SHIPPER, src => src.SHIPPER)
.Map(dest => dest.CONSIGNEE, src => src.CONSIGNEE) .Map(dest => dest.CONSIGNEE, src => src.CONSIGNEE)

Loading…
Cancel
Save