场站code映射

optimize
wet 1 year ago
parent 248fcc6583
commit 0afb96fc54

@ -1890,12 +1890,13 @@ namespace Myshipping.Application
{ {
throw Oops.Bah("订阅港前数据提单号或场站不能为空!"); throw Oops.Bah("订阅港前数据提单号或场站不能为空!");
} }
var YARDID = _cache.GetAllMappingYard().Result.Where(x => x.Module == "BillTrace" && x.Code == item.YardCode).Select(x => x.MapCode).FirstOrDefault();
billTraceList.Add(new BillTraceList billTraceList.Add(new BillTraceList
{ {
BusinessId = item.BusinessId, BusinessId = item.BusinessId,
MBLNO = item.MBLNO, MBLNO = item.MBLNO,
YARD = item.YARD == "" ? null : item.YARD, YARD = item.YARD == "" ? null : item.YARD,
YardCode = item.YardCode == "" ? null : item.YardCode, YardCode = YARDID == "" ? null : YARDID,
CARRIER = item.CARRIER == "" ? null : item.CARRIER, CARRIER = item.CARRIER == "" ? null : item.CARRIER,
CARRIERID = item.CARRIERID == "" ? null : item.CARRIERID, CARRIERID = item.CARRIERID == "" ? null : item.CARRIERID,
isBook = item.isBook isBook = item.isBook

@ -78,8 +78,10 @@ namespace Myshipping.Application
{ {
if (!string.IsNullOrEmpty(item.YARDID) && !string.IsNullOrEmpty(item.MBLNO)) if (!string.IsNullOrEmpty(item.YARDID) && !string.IsNullOrEmpty(item.MBLNO))
{ {
var YARDID= _cache.GetAllMappingYard().Result.Where(x => x.Module == "BillTrace" && x.Code == item.YARDID).Select(x => x.MapCode).FirstOrDefault();
JObject jobjczTemp = new JObject(); JObject jobjczTemp = new JObject();
jobjczTemp.Add("web_code", new JValue(item.YARDID)); jobjczTemp.Add("web_code", new JValue(YARDID));
jobjczTemp.Add("bno", new JValue(item.MBLNO.Trim())); jobjczTemp.Add("bno", new JValue(item.MBLNO.Trim()));
jarrCZTemos.Add(jobjczTemp); jarrCZTemos.Add(jobjczTemp);
} }

Loading…
Cancel
Save