From c447edf882d7c07860ac1ab7c6b3a2da5fc80d58 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Fri, 29 Dec 2023 11:38:59 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=A7=A3=E5=86=B3=E7=AD=BE=E6=94=B6=E8=B6=85?= =?UTF-8?q?=E6=97=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionSignforAppController.java | 18 ++++++++++++++---- .../java/com/logpm/distribution/bean/Resp.java | 10 +++++++++- .../impl/DistributionSignforServiceImpl.java | 11 ++++++++--- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java index 19fd9bce2..1155ba236 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java @@ -142,8 +142,17 @@ public class DistributionSignforAppController { @PostMapping("/signfor") @ApiOperationSupport(order = 2) public R signfor(@Valid @RequestBody DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) { - R msg = distributionSignforService.signfor(distrilbutionloadingscanDTO); - return msg; + R r = distributionSignforService.signfor(distrilbutionloadingscanDTO); + try{ + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + List packageCodes = (List) r.getData(); + for (String packageCode : packageCodes) { + updownTypeClient.downPackageOrDelTray(packageCode,myCurrentWarehouse.getId()); + } + }catch (Exception e){ + log.error("#############signfor: 下架失败"); + } + return r; } /** @@ -217,8 +226,9 @@ public class DistributionSignforAppController { public R oneclick(@Valid @RequestBody DistributionSignforDTO distributionSignfor) { distributionSignfor.setIsClerk(false); R r = distributionSignforService.oneclick(distributionSignfor); - List packageIds = (List)r.getData(); + try{ + List packageIds = (List)r.getData(); String orderPackageCodes = null; for (Long packageId : packageIds) { if(StringUtils.isBlank(orderPackageCodes)){ @@ -230,7 +240,7 @@ public class DistributionSignforAppController { BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); updownTypeClient.downPackageOrDelTray(orderPackageCodes,myCurrentWarehouse.getId()); }catch (Exception e){ - log.error("##############oneclick: 更新包件下架状态失败 packageIds={}",packageIds); + log.error("##############oneclick: 更新包件下架状态失败"); } return r; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/Resp.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/Resp.java index 41caab809..bd8e9ddba 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/Resp.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/Resp.java @@ -1,7 +1,6 @@ package com.logpm.distribution.bean; import lombok.Data; -import org.apache.poi.ss.formula.functions.T; import org.springblade.core.tool.api.R; @Data @@ -17,6 +16,15 @@ public class Resp extends R { return resp; } + public static Resp scanSuccessWithData(String msg,String audio,Object data){ + Resp resp = new Resp(); + resp.setCode(200); + resp.setMsg(msg); + resp.setData(data); + resp.setAudio(audio); + return resp; + } + public static Resp scanFail(String msg,String audio){ Resp resp = new Resp(); resp.setCode(3001); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index 25a8511d3..ddd7ae07e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -790,6 +790,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl packageCodes = new ArrayList<>(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // ---------------------------------2023-09-09 包件签收调整--------------------------------------------------------------- @@ -864,7 +865,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl