Browse Source

1.干线bug修复

2.同步老系统托盘数据逻辑优化
dist.1.3.0
zhenghaoyu 6 months ago
parent
commit
ccf8c0ad55
  1. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadVO.java
  2. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  3. 43
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

1
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;
}

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -1045,10 +1045,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
log.warn("#############unloadByLoadId: 当前节点为终点 loadId={} loadStatus={}", loadId, loadStatus);
throw new CustomerException(400, "当前节点为终点");
}
if (!"10".equals(nodeStatus)) {
log.warn("#############unloadByLoadId: 当前节点未到车 nowWarehouseId={} nodeStatus={}", nowWarehouseId, nodeStatus);
throw new CustomerException(400, "当前节点未到车");
}
currentCarsLoadLineEntity.setUnloadStatus("1");
currentCarsLoadLineEntity.setUnloadUserId(AuthUtil.getUserId());
@ -6735,6 +6731,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
TrunklineCarsLoadLineEntity carsLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId);
Integer sort = carsLoadLineEntity.getSort();
String nodeStatus1 = carsLoadLineEntity.getNodeStatus();
String unloadStatus = carsLoadLineEntity.getUnloadStatus();
trunklineCarsLoadVO.setUnloadStatus(unloadStatus);
TrunklineCarsLoadLineEntity upCarsLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndSort(loadId, sort - 1);
String nodeStatus = upCarsLoadLineEntity.getNodeStatus();
trunklineCarsLoadVO.setLastStartCarStatus(0);

43
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

@ -4184,17 +4184,36 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
private void saveOrderInfo(String orderCode, Integer oldWarehouseId, Long newWarehouseId) {
//通过订单号查询暂存单
AdvanceEntity advanceEntity = advanceClient.getQueryDataOne(orderCode);
Integer total = 0;
AdvanceEntity advanceEntity = null;
WayBillEntity wayBillEntity = null;
List<AdvanceEntity> 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<WarehouseTrayT
throw new CustomerException(403,"未查询单订单信息");
}
Integer total = 0;
List<AdvanceEntity> 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);

Loading…
Cancel
Save