diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadVO.java index 5fa063a23..61878dbde 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadVO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadVO.java @@ -51,5 +51,6 @@ public class TrunklineCarsLoadVO extends TrunklineCarsLoadEntity { private Integer planUnloadNum; private Integer totalLoadingNum; private String loadCarsNo; + private String unloadStatus; } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index b1b10d0bd..d1b61c6f2 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -1045,10 +1045,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl advanceList = advanceClient.getAdvanceList(orderCode); + for (AdvanceEntity entity : advanceList) { + total = total + entity.getTotal(); + String waybillNo = entity.getWaybillNo(); + if(StringUtil.isNotBlank(waybillNo)){ + WayBillEntity wb = wayBillClient.getByWaybillNo(waybillNo); + if(!Objects.isNull(wb)){ + Integer oWid = wb.getWarehouseId(); + if(oldWarehouseId.equals(oWid)){ + advanceEntity = entity; + wayBillEntity = wb; + break; + } + } + } + } + if(Objects.isNull(advanceEntity)){ - log.warn("#################saveOrderInfo: 未查询单订单信息 orderCode={}",orderCode); - throw new CustomerException(403,"未查询单订单信息"); + log.warn("#################saveOrderInfo: 暂存单信息不存在 orderCode={}",orderCode); + throw new CustomerException(403,"暂存单信息不存在"); } + Integer advanceId = advanceEntity.getId(); - Integer waybillStatus = advanceEntity.getWaybillStatus(); - String waybillNo = advanceEntity.getWaybillNo(); - if(waybillStatus.equals(1)){ - log.warn("#################saveOrderInfo: 订单还未开单 orderCode={}",orderCode); - throw new CustomerException(403,"订单还未开单"); + + if(Objects.isNull(wayBillEntity)){ + log.warn("#################saveOrderInfo: 暂存单暂未有运单信息 orderCode={}",orderCode); + throw new CustomerException(403,"暂存单暂未有运单信息"); } @@ -4207,14 +4226,6 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl advanceList = advanceClient.getAdvanceList(orderCode); - for (AdvanceEntity entity : advanceList) { - total = total + entity.getTotal(); - } - - WayBillEntity wayBillEntity = wayBillClient.getByWayBillByAdvanceId(advanceId); - BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(newWarehouseId); if(Objects.isNull(basicdataWarehouseEntity)){ log.warn("#################saveOrderInfo: 未查询到仓库信息 newWarehouseId={}",newWarehouseId);