diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java index 5644b2a78..43df6e19e 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java @@ -766,4 +766,33 @@ public class SyncOrderInfoToPlatform { } + @XxlJob("dealWithPackageUpdown") + public ReturnT dealWithPackageUpdown(String param) { + log.info("############dealWithPackageUpdown: 处理包件上架 开始"); + + if(StringUtil.isBlank(param)){ + log.warn("############dealWithPackageUpdown: 仓库id为空"); + return ReturnT.FAIL; + } + + Long warehouseId = Long.parseLong(param); + + List ls = warehouseMappingDataService.findPackageUpdownData(); + + for (JSONObject l : ls) { + Integer id = l.getInt("id"); + String orderPackageCode = l.getStr("orderPackageCode"); + Long allocationId = l.getLong("allocationId"); + + syncOrderInfoService.dealWithPackageUpdown(orderPackageCode,allocationId,warehouseId); + + warehouseMappingDataService.updatePackageUpdownStatus(id,1); + } + + log.info("############dealWithPackageUpdown: 处理包件上架 完成"); + + return ReturnT.SUCCESS; + } + + } diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java index 41249f313..7ac43cee3 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java @@ -85,4 +85,9 @@ public interface WarehouseMappingDataMapper { List findAllZeroOrder(); void updateSyncZeroStatus(@Param("id") Integer id, @Param("syncStatus") Integer syncStatus); + + List findPackageUpdownData(); + + void updatePackageUpdownStatus(@Param("id") Integer id, @Param("syncStatus") Integer syncStatus); + } diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml b/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml index ee61aa07e..a75c435a5 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml @@ -256,5 +256,18 @@ where id = #{id} + + + + update deal_with_package_updown + set sync_status = #{syncStatus} + where id = #{id} + diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/ISyncOrderInfoService.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/ISyncOrderInfoService.java index cf763ac21..ecf7bfa6e 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/ISyncOrderInfoService.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/ISyncOrderInfoService.java @@ -26,4 +26,6 @@ public interface ISyncOrderInfoService { void clearOrderPackageStatusStock(String orderPackageCode, Long warehouseId); void clearOrderPackageStatusOut(String orderPackageCode, Long warehouseId); + + void dealWithPackageUpdown(String orderPackageCode, Long allocationId,Long warehouseId); } diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java index cc9a89169..cb0e28ea1 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java @@ -83,4 +83,8 @@ public interface IWarehouseMappingDataService { List findAllZeroOrder(); void updateSyncZeroStatus(Integer id, Integer syncStatus); + + List findPackageUpdownData(); + + void updatePackageUpdownStatus(Integer id, Integer syncStatus); } diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java index fbc80607a..08529c467 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java @@ -349,6 +349,14 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService { } } + @Override + public void dealWithPackageUpdown(String orderPackageCode, Long allocationId,Long warehouseId) { + warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId,"系统下架解托"); + + warehouseUpdownTypeClient.upShelfPackage(orderPackageCode,allocationId,warehouseId,"系统上架"); + + } + @Transactional(rollbackFor = Exception.class) @Override diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java index d9b95f60d..cf23814c8 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java @@ -195,4 +195,14 @@ public class WarehouseMappingDataServiceImpl implements IWarehouseMappingDataSer public void updateSyncZeroStatus(Integer id, Integer syncStatus) { warehouseMappingDataMapper.updateSyncZeroStatus(id,syncStatus); } + + @Override + public List findPackageUpdownData() { + return warehouseMappingDataMapper.findPackageUpdownData(); + } + + @Override + public void updatePackageUpdownStatus(Integer id, Integer syncStatus) { + warehouseMappingDataMapper.updatePackageUpdownStatus(id,syncStatus); + } }