From 5cbffab28ce36377d02a1d03ee3ec0333ad664bf Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Tue, 2 Apr 2024 10:27:12 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=89=B9=E9=87=8F=E5=85=A5=E5=BA=93=20?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trunkline/controller/IncomingController.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/IncomingController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/IncomingController.java index 828421cc2..8e56a026b 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/IncomingController.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/IncomingController.java @@ -13,6 +13,7 @@ import org.springblade.common.exception.CustomerException; import org.springblade.core.tool.api.R; import org.springframework.web.bind.annotation.*; +import java.util.List; import java.util.Objects; @Slf4j @@ -67,11 +68,12 @@ public class IncomingController { @ResponseBody @PostMapping("/incomingBatchOrder") @ApiOperationSupport(order = 1) - @ApiOperation(value = "查询入库订单明细", notes = "传入inComingDTO") + @ApiOperation(value = "批量入库", notes = "传入inComingDTO") public R incomingBatchOrder(@RequestBody InComingDTO inComingDTO) { String method = "############incomingBatchOrder: "; log.info(method+"请求参数{}",inComingDTO); - Integer incomingType = inComingDTO.getIncomingType(); + List advanceIds = inComingDTO.getAdvanceIds(); + try{ BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); @@ -82,15 +84,11 @@ public class IncomingController { inComingDTO.setWarehouseId(myCurrentWarehouse.getId()); inComingDTO.setWarehouseName(myCurrentWarehouse.getName()); - if(Objects.isNull(incomingType)){ - log.warn(method+"入库方式不能为空 incomingType={}",incomingType); - return R.fail(405,"入库方式不能为空"); + if(advanceIds.isEmpty() || advanceIds.size() == 0){ + log.warn(method+"处理订单数据为空"); + return R.fail(405,"处理订单数据为空"); } - if(incomingType < 4){ - log.warn(method+"入库方式不正确 incomingType={}",incomingType); - return R.fail(405,"入库方式不正确"); - } return inComingService.incomingBatchOrder(inComingDTO); }catch (CustomerException e){ log.error(e.message,e);