From 831472148f355686ac038f4928a99ef85ce5ef64 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Wed, 10 Apr 2024 17:19:37 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=96=B0=E5=A2=9E=E7=B3=BB=E7=BB=9F=E4=B8=8A?= =?UTF-8?q?=E6=9E=B6=E8=A1=A5=E4=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jobhandle/SyncOrderInfoToPlatform.java | 29 +++++++++++++++++++ .../mapper/WarehouseMappingDataMapper.java | 5 ++++ .../mapper/WarehouseMappingDataMapper.xml | 13 +++++++++ .../patch/service/ISyncOrderInfoService.java | 2 ++ .../service/IWarehouseMappingDataService.java | 4 +++ .../impl/SyncOrderInfoServiceImpl.java | 8 +++++ .../impl/WarehouseMappingDataServiceImpl.java | 10 +++++++ 7 files changed, 71 insertions(+) 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); + } }