|
|
|
@ -247,10 +247,20 @@ namespace Myshipping.Application
|
|
|
|
|
MDATA mDATA = new MDATA();
|
|
|
|
|
List<CTNDATAItem> CTNDATA = new List<CTNDATAItem>();
|
|
|
|
|
mDATA = order.Adapt<MDATA>();
|
|
|
|
|
if (string.IsNullOrEmpty(mDATA.FORWARDER)) {
|
|
|
|
|
throw Oops.Bah("船代不能为空");
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(mDATA.YARDID))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("场站不能为空");
|
|
|
|
|
}
|
|
|
|
|
var FORWARDER = mDATA.FORWARDER;
|
|
|
|
|
var YardCode = mDATA.YARDID;
|
|
|
|
|
mDATA.FORWARDER = _cache.GetAllMappingForwarder().Result.Where(x => x.Code == FORWARDER && x.Module == "cangdan").Select(x => x.MapCode).FirstOrDefault() == null ?
|
|
|
|
|
_cache.GetAllCodeForwarder().Result.Where(x => x.Name == FORWARDER).Select(x => x.Name).FirstOrDefault() :
|
|
|
|
|
_cache.GetAllMappingForwarder().Result.Where(x => x.Code == FORWARDER && x.Module == "cangdan").Select(x => x.MapCode).FirstOrDefault();
|
|
|
|
|
|
|
|
|
|
mDATA.YARDID = _cache.GetAllCodeYard().Result.Where(x => x.Code == YardCode).Select(x => x.ShowCode).FirstOrDefault();
|
|
|
|
|
CTNDATA = ctns.Adapt<List<CTNDATAItem>>();
|
|
|
|
|
custEDIDtos.Add(
|
|
|
|
|
new CustEDIDto
|
|
|
|
|