From f9cf15592fbb18a59d2a6564ec6543e6ea24f411 Mon Sep 17 00:00:00 2001 From: "0.0" <1092404103.qq.com> Date: Thu, 21 Sep 2023 11:59:40 +0800 Subject: [PATCH 1/4] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WarehouseGoodsAllocationController.java | 58 +++++++++---------- .../impl/WarehouseUpdownTypeServiceImpl.java | 8 +++ 2 files changed, 37 insertions(+), 29 deletions(-) diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseGoodsAllocationController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseGoodsAllocationController.java index e6ac98e19..a35b026d7 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseGoodsAllocationController.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseGoodsAllocationController.java @@ -270,9 +270,9 @@ public class WarehouseGoodsAllocationController extends BladeController { } R r = warehouseUpdownTypeService.upShelfPackage(upShelfPackageList, allocationId,myCurrentWarehouse.getId()); - if (r.getCode() == 200) { - warehouseGoodsAllocationService.updateAllocationCache(allocationId.toString()); - } +// if (r.getCode() == 200) { +// warehouseGoodsAllocationService.updateAllocationCache(allocationId.toString()); +// } return r; } @@ -294,9 +294,9 @@ public class WarehouseGoodsAllocationController extends BladeController { } //上架托盘 R r = warehouseUpdownTypeService.upShelfTray(trayCode, allocationId,myCurrentWarehouse.getId()); - if (r.getCode() == 200) { - warehouseGoodsAllocationService.updateAllocationCache(allocationId.toString()); - } +// if (r.getCode() == 200) { +// warehouseGoodsAllocationService.updateAllocationCache(allocationId.toString()); +// } return r; } @@ -319,9 +319,9 @@ public class WarehouseGoodsAllocationController extends BladeController { //查询该库位的货物信息 R r = warehouseUpdownTypeService.upShelfStockList(upShelfStockList, allocationId,myCurrentWarehouse.getId()); - if (r.getCode() == 200) { - warehouseGoodsAllocationService.updateAllocationCache(allocationId.toString()); - } +// if (r.getCode() == 200) { +// warehouseGoodsAllocationService.updateAllocationCache(allocationId.toString()); +// } return r; } @@ -345,9 +345,9 @@ public class WarehouseGoodsAllocationController extends BladeController { //查询该库位的货物信息 R r = warehouseUpdownTypeService.upShelfZeroOrder(upShelfZeroOrderList, allocationId,myCurrentWarehouse.getId()); - if (r.getCode() == 200) { - warehouseGoodsAllocationService.updateAllocationCache(allocationId.toString()); - } +// if (r.getCode() == 200) { +// warehouseGoodsAllocationService.updateAllocationCache(allocationId.toString()); +// } return r; } @@ -375,12 +375,12 @@ public class WarehouseGoodsAllocationController extends BladeController { @ApiOperationSupport(order = 18) @ApiOperation(value = "货位 统计所有库位数量") public R locationsnub() { -// if (null !=bladeRedis.get(Url+"/locationsnub)")){ -// log.info("缓存取值>>>>>>>>>>"); -// return R.data(bladeRedis.get(Url+"/locationsnub")); -// } + if (null !=bladeRedis.get(Url+"/locationsnub)")){ + log.info("缓存取值>>>>>>>>>>"); + return R.data(bladeRedis.get(Url+"/locationsnub")); + } locationsnubVO locationsnubVO = warehouseGoodsAllocationService.selectlocationsnub(); - //bladeRedis.setEx(Url+"/locationsnub",locationsnubVO,360L); + bladeRedis.setEx(Url+"/locationsnub",locationsnubVO,360L); return R.data(locationsnubVO); } @@ -458,10 +458,10 @@ public class WarehouseGoodsAllocationController extends BladeController { } try { R r = warehouseUpdownTypeService.downPackage(upShelfPackageList); - if (r.getCode() == 200) { - String prefix = Url+"/*"; - bladeRedis.del(bladeRedis.keys(prefix)); - } +// if (r.getCode() == 200) { +// String prefix = Url+"/*"; +// bladeRedis.del(bladeRedis.keys(prefix)); +// } return r; } catch (CustomerException e) { log.warn(e.message); @@ -485,10 +485,10 @@ public class WarehouseGoodsAllocationController extends BladeController { } try { R r = warehouseUpdownTypeService.downZeroOrder(upShelfZeroOrderList); - if (r.getCode() == 200) { - String prefix = Url+"/*"; - bladeRedis.del(bladeRedis.keys(prefix)); - } +// if (r.getCode() == 200) { +// String prefix = Url+"/*"; +// bladeRedis.del(bladeRedis.keys(prefix)); +// } return r; } catch (CustomerException e) { log.warn(e.message); @@ -513,10 +513,10 @@ public class WarehouseGoodsAllocationController extends BladeController { } try { R r = warehouseUpdownTypeService.downStock(upShelfStockList); - if (r.getCode() == 200) { - String prefix = Url+"/*"; - bladeRedis.del(bladeRedis.keys(prefix)); - } +// if (r.getCode() == 200) { +// String prefix = Url+"/*"; +// bladeRedis.del(bladeRedis.keys(prefix)); +// } return r; } catch (CustomerException e) { log.warn(e.message); diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java index 509136b12..b016a85c3 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java @@ -649,6 +649,8 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl0){msg = msg+s+"超出输入数量,或输入数量为0,请输入正确数量再进行操作";} return Resp.scanSuccess(msg,"成功上架"+num+"件"); } @@ -1871,6 +1877,8 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl Date: Thu, 21 Sep 2023 14:08:32 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=9B=B6=E6=8B=85=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9F1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-prod.yml | 26 +++++++++++++++++++ .../impl/WarehouseWaybillServiceImpl.java | 14 +++++++--- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/resources/application-prod.yml b/blade-service/logpm-distribution/src/main/resources/application-prod.yml index 3dd1b224d..94d36fb66 100644 --- a/blade-service/logpm-distribution/src/main/resources/application-prod.yml +++ b/blade-service/logpm-distribution/src/main/resources/application-prod.yml @@ -29,3 +29,29 @@ spring: url: ${blade.datasource.distribution.slave.url} username: ${blade.datasource.distribution.slave.username} password: ${blade.datasource.distribution.slave.password} + #rabbitmq配置 + rabbitmq: + host: 172.16.128.146 + port: 5672 + username: admin + password: Slwk@123654 + #虚拟host 可以不设置,使用server默认host + virtual-host: / + #确认消息已发送到队列(Queue) + publisher-returns: true + publisher-confirm-type: correlated + # 手动提交消息 + listener: + simple: + acknowledge-mode: auto + default-requeue-rejected: false + retry: + enabled: true # 开启消费者失败重试 + initial-interval: 1000 # 初识的失败等待时长为1秒 + multiplier: 1 # 失败的等待时长倍数,下次等待时长 = multiplier * last-interval + max-attempts: 3 # 最大重试次数 + stateless: true # true无状态;false有状态。如果业务中包含事务,这里改为false + direct: + acknowledge-mode: manual + template: + mandatory: true diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java index 3689f571b..659c8a8e9 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java @@ -170,11 +170,11 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl Date: Thu, 21 Sep 2023 14:52:28 +0800 Subject: [PATCH 3/4] =?UTF-8?q?1.=E5=BA=93=E5=86=85=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WarehouseUpdownTypeServiceImpl.java | 11 +++++++++++ .../service/impl/WarehouseWaybillServiceImpl.java | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java index b016a85c3..8f9383b9a 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java @@ -316,6 +316,11 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl Date: Thu, 21 Sep 2023 14:56:32 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E9=9B=B6=E6=8B=85=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9F2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../warehouse/service/impl/WarehouseWaybillServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java index ef5afd1dc..83150fe49 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java @@ -93,6 +93,9 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl waybillQueryWrapper = new QueryWrapper<>(); waybillQueryWrapper.eq("waybill_no", waybillNo);