BC对比调整

usertest
zhangxiaofeng 3 months ago
parent 259b78867e
commit dbb07a2278

@ -1146,11 +1146,14 @@ namespace DS.WMS.Core.TaskPlat.Method
Id = x.Id, Id = x.Id,
MBLNO = x.MBLNO, MBLNO = x.MBLNO,
ContractNo = x.ContractNo, ContractNo = x.ContractNo,
ETD = x.ETD,
Vessel = x.Vessel, Vessel = x.Vessel,
Voyno = x.Voyno, Voyno = x.Voyno,
DischargePort = x.DischargePort, DischargePort = x.DischargePort,
Destination = x.Destination, LoadPort = x.LoadPort,
ETD = x.ETD,
ReeferQuantity = x.ReeferQuantity, ReeferQuantity = x.ReeferQuantity,
TemperatureMin = x.TemperatureMin, TemperatureMin = x.TemperatureMin,
TemperatureMax = x.TemperatureMax, TemperatureMax = x.TemperatureMax,
@ -1159,7 +1162,7 @@ namespace DS.WMS.Core.TaskPlat.Method
}).FirstAsync(); }).FirstAsync();
if (seaExport == null) if (seaExport == null)
{ {
throw new Exception($"根据提单号:{taskBcInfo.MBL_NO}未查询到海运出口订单信息"); return DataResult<CompareResultInfo>.Failed($"根据订单Id【{taskBcInfo.BOOKING_ORDER_ID}】未查询到海运出口订单信息");
} }
var seaExportCtnList = await tenantDb.Queryable<OpCtn>().Where(x => x.BSNO == seaExport.Id.ToString()).Select(x => new OpCtn() var seaExportCtnList = await tenantDb.Queryable<OpCtn>().Where(x => x.BSNO == seaExport.Id.ToString()).Select(x => new OpCtn()
{ {
@ -1200,12 +1203,14 @@ namespace DS.WMS.Core.TaskPlat.Method
ParserBCInfoDto bcSrcDto = new ParserBCInfoDto() ParserBCInfoDto bcSrcDto = new ParserBCInfoDto()
{ {
ContractNo = taskBcInfo.CONTRACTNO, ContractNo = taskBcInfo.CONTRACTNO,
Vessel = taskBcInfo.VESSEL, Vessel = taskBcInfo.VESSEL,
VoyNo = taskBcInfo.VOYNO, VoyNo = taskBcInfo.VOYNO,
DischargePort = taskBcInfo.PORTDISCHARGE,
Destination = taskBcInfo.PLACEDELIVERY,
ETD = taskBcInfo.ETD?.ToString("yyyy-MM-dd"), ETD = taskBcInfo.ETD?.ToString("yyyy-MM-dd"),
Portload = taskBcInfo.PORTLOAD?.Split(',').FirstOrDefault()?.Trim(),
DischargePort = taskBcInfo.PORTDISCHARGE?.Split(',').FirstOrDefault()?.Trim(),
CtnList = taskBcCtnList.GroupBy(x => x.CTNALL).Select(x => new ParserBCCTNInfoDto CtnList = taskBcCtnList.GroupBy(x => x.CTNALL).Select(x => new ParserBCCTNInfoDto
{ {
CtnALL = x.Key, CtnALL = x.Key,
@ -1217,12 +1222,14 @@ namespace DS.WMS.Core.TaskPlat.Method
ParserBCInfoDto bcTargetDto = new ParserBCInfoDto() ParserBCInfoDto bcTargetDto = new ParserBCInfoDto()
{ {
ContractNo = seaExport.ContractNo, ContractNo = seaExport.ContractNo,
Vessel = seaExport.Vessel, Vessel = seaExport.Vessel,
VoyNo = seaExport.Voyno, VoyNo = seaExport.Voyno,
DischargePort = seaExport.DischargePort,
Destination = seaExport.Destination,
ETD = seaExport.ETD?.ToString("yyyy-MM-dd"), ETD = seaExport.ETD?.ToString("yyyy-MM-dd"),
Portload = seaExport.LoadPort?.Split(',').FirstOrDefault()?.Trim(),
DischargePort = seaExport.DischargePort?.Split(',').FirstOrDefault()?.Trim(),
CtnList = seaExportCtnList.GroupBy(x => x.CtnAll).Select(x => new ParserBCCTNInfoDto CtnList = seaExportCtnList.GroupBy(x => x.CtnAll).Select(x => new ParserBCCTNInfoDto
{ {
CtnALL = x.Key, CtnALL = x.Key,
@ -1335,6 +1342,12 @@ namespace DS.WMS.Core.TaskPlat.Method
{ {
dataContext.Set(TaskFlowDataNameConst.BusinessId, seaExportId); dataContext.Set(TaskFlowDataNameConst.BusinessId, seaExportId);
taskBcInfo.BOOKING_ORDER_ID = seaExportId; taskBcInfo.BOOKING_ORDER_ID = seaExportId;
await tenantDb.Updateable<TaskBCInfo>(taskBcInfo).UpdateColumns(x=>new
{
x.BOOKING_ORDER_ID,
}).ExecuteCommandAsync();
return DataResult.Successed("匹配成功", MultiLanguageConst.OperationSuccess); return DataResult.Successed("匹配成功", MultiLanguageConst.OperationSuccess);
} }
else else

Loading…
Cancel
Save