Browse Source

1.老系统卸分一体数据逻辑处理

training
zhenghaoyu 1 year ago
parent
commit
108a0abec8
  1. 1
      blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java
  2. 16
      blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/DealWithDataHandler.java

1
blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java

@ -34,6 +34,7 @@ public class FactoryCommonServiceImpl implements IFactoryCommonService {
@Override
public void syncTrayTypeData(String unitNo, Integer trayId, String oldWarehouseId) {
log.info("###############syncTrayTypeData: 包件打托开始 unitNo={} trayId={} oldWarehouseId={}",unitNo,trayId,oldWarehouseId);
//先判断新系统仓库信息是否存在
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getWarehouseByOldId(Integer.parseInt(oldWarehouseId));
if(Objects.isNull(warehouseEntity)){

16
blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/DealWithDataHandler.java

@ -17,7 +17,6 @@ import org.springframework.stereotype.Component;
import java.io.IOException;
import java.util.Map;
import java.util.Objects;
/**
@ -48,7 +47,7 @@ public class DealWithDataHandler {
String unitNo = orderStatusDTO.getUnitNo();
String operationTime = orderStatusDTO.getOperationTime();
Integer trayId = orderStatusDTO.getTrayId();
if ("4".equals(status)) {
if ("4".equals(status) || "2".equals(status)) {
//继续判断是否到达目的仓
String currentWarehouseId = orderStatusDTO.getCurrentWarehouse();//当前仓Id
//查询destinationWarehouse logiBillNo plantId数据
@ -68,11 +67,16 @@ public class DealWithDataHandler {
} else {
//真正的处理需要的数据
try {
panFactoryDataService.handleDataToPlatform(unitNo, operationTime);
//同步打托数据
if(!Objects.isNull(trayId)){
factoryCommonService.syncTrayTypeData(unitNo,trayId,currentWarehouseId);
if ("4".equals(status)) {
panFactoryDataService.handleDataToPlatform(unitNo, operationTime);
}else if("2".equals(status)){
// //同步打托数据
// if(!Objects.isNull(trayId)){
// factoryCommonService.syncTrayTypeData(unitNo,trayId,currentWarehouseId);
// }
}
} catch (Exception e) {
e.printStackTrace();
}

Loading…
Cancel
Save