Browse Source

Merge branch 'pre-production'

newStockUp
zhenghaoyu 1 year ago
parent
commit
4494786c5f
  1. 2
      blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/DealWithDataHandler.java
  2. 2
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/InventoryDetailMapper.xml
  3. 3
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/OrderMapper.xml
  4. 18
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java
  5. 17
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java

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

@ -43,7 +43,7 @@ public class DealWithDataHandler {
String status = orderStatusDTO.getStatus(); String status = orderStatusDTO.getStatus();
String unitNo = orderStatusDTO.getUnitNo(); String unitNo = orderStatusDTO.getUnitNo();
String operationTime = orderStatusDTO.getOperationTime(); String operationTime = orderStatusDTO.getOperationTime();
if ("4".equals(status)) { if ("4".equals(status)||"到货".equals(status)) {
//继续判断是否到达目的仓 //继续判断是否到达目的仓
String currentWarehouseId = orderStatusDTO.getCurrentWarehouse();//当前仓Id String currentWarehouseId = orderStatusDTO.getCurrentWarehouse();//当前仓Id
//查询destinationWarehouse logiBillNo plantId数据 //查询destinationWarehouse logiBillNo plantId数据

2
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/InventoryDetailMapper.xml

@ -30,6 +30,8 @@
where inventory_id in (185,187,188,189) where inventory_id in (185,187,188,189)
and tray_id != 0 and tray_id != 0
and unitNo != '10215486=027916' and unitNo != '10215486=027916'
and status = 2
and delete_time = 0
group by unitNo, group by unitNo,
tray_id tray_id

3
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/OrderMapper.xml

@ -33,8 +33,7 @@
`ht_order_count` `i` `ht_order_count` `i`
INNER JOIN `ht_order` `order` ON `order`.`selfnumber` = `i`.`orderSelfNum` INNER JOIN `ht_order` `order` ON `order`.`selfnumber` = `i`.`orderSelfNum`
WHERE WHERE
`i`.`history_type` = 0 `i`.`status` <> 11
AND `i`.`status` <> 11
AND `i`.`delete_time` = '0' AND `i`.`delete_time` = '0'
AND ( ( `i`.`in_num` + `i`.`delives_num` ) > 0 ) AND ( ( `i`.`in_num` + `i`.`delives_num` ) > 0 )
AND `i`.`goods_type` = '1' AND `i`.`goods_type` = '1'

18
blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java

@ -231,14 +231,22 @@ public class SyncOrderInfoToPlatform {
//查询需要同步的仓库 //查询需要同步的仓库
List<WarehouseMappingDataEntity> warehouseMappingDataEntityList = warehouseMappingDataService.getWarehouseMapping(); List<WarehouseMappingDataEntity> warehouseMappingDataEntityList = warehouseMappingDataService.getWarehouseMapping();
if(warehouseMappingDataEntityList.isEmpty()){ if(warehouseMappingDataEntityList.isEmpty()){
log.warn("###############syncZeroOrderInfo: 当前没有配置需要同步的仓库信息"); log.warn("###############syncTrayType: 当前没有配置需要同步的仓库信息");
return ReturnT.FAIL; return ReturnT.FAIL;
} }
for (WarehouseMappingDataEntity entity:warehouseMappingDataEntityList){ try{
Integer oldWarehouseId = entity.getOldWarehouseId(); for (WarehouseMappingDataEntity entity:warehouseMappingDataEntityList){
Long newWarehouseId = entity.getNewWarehouseId(); Integer oldWarehouseId = entity.getOldWarehouseId();
Long newWarehouseId = entity.getNewWarehouseId();
syncOrderInfoService.syncTrayType(oldWarehouseId,newWarehouseId); syncOrderInfoService.syncTrayType(oldWarehouseId,newWarehouseId);
}
}catch (CustomerException e){
log.error(e.message,e);
return ReturnT.FAIL;
}catch (Exception e){
log.error("#############syncTrayType: 同步数据失败",e);
return ReturnT.FAIL;
} }
return ReturnT.SUCCESS; return ReturnT.SUCCESS;

17
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java

@ -775,6 +775,11 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
log.info("###########saveOrderPackage: 包条不在盘点任务中存在,不同步 unitNo={}",unitNo); log.info("###########saveOrderPackage: 包条不在盘点任务中存在,不同步 unitNo={}",unitNo);
continue; continue;
} }
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCode(unitNo);
if(!Objects.isNull(parcelListEntity)){
log.info("###########saveOrderPackage: 包条已存在,不同步 unitNo={}",unitNo);
continue;
}
Integer status = orderDetailEntity.getStatus(); Integer status = orderDetailEntity.getStatus();
Integer carsType = orderDetailEntity.getCarsType(); Integer carsType = orderDetailEntity.getCarsType();
@ -1013,16 +1018,20 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
String unitNo = entity.getUnitNo();//包条码 String unitNo = entity.getUnitNo();//包条码
TrayScanDesEntity trayScanDesEntity = trayScanDesClient.findScanTypeId(trayId,unitNo,oldWarehouseId); TrayScanDesEntity trayScanDesEntity = trayScanDesClient.findScanTypeId(trayId,unitNo,oldWarehouseId);
Integer trayScanId = trayScanDesEntity.getTrayScanId(); Integer type = 0;
if(!Objects.isNull(trayScanDesEntity)){
Integer trayScanId = trayScanDesEntity.getTrayScanId();
//查询打托方式信息
TrayScanEntity trayScanEntity = trayScanClient.getEntityByTrayScanId(trayScanId);
type = trayScanEntity.getType();
}
InventoryDetailEntity inventoryDetailEntity = inventoryDetailClient.findUnitNoIsExist(unitNo); InventoryDetailEntity inventoryDetailEntity = inventoryDetailClient.findUnitNoIsExist(unitNo);
if(Objects.isNull(inventoryDetailEntity)){ if(Objects.isNull(inventoryDetailEntity)){
log.info("###########saveTrayTypeInfoPackage: 包条不在盘点任务中存在,不同步 unitNo={}",unitNo); log.info("###########saveTrayTypeInfoPackage: 包条不在盘点任务中存在,不同步 unitNo={}",unitNo);
continue; continue;
} }
//查询打托方式信息
TrayScanEntity trayScanEntity = trayScanClient.getEntityByTrayScanId(trayScanId);
Integer type = trayScanEntity.getType();
//方式:1=仓,2=商场,3=客户,4=其他,5=服务号,6=合同号 //方式:1=仓,2=商场,3=客户,4=其他,5=服务号,6=合同号
//方式:60=仓,30=商场,50=客户,100=其他,10=服务号,20=合同号 //方式:60=仓,30=商场,50=客户,100=其他,10=服务号,20=合同号

Loading…
Cancel
Save