From ce3ceeeff70c6883784a7b159457e7ec7221fdc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=B3=BD=E8=85=BE?= <1178634255@qq.com> Date: Wed, 23 Aug 2023 17:42:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=94=B3=E8=B4=AD=E5=8D=95?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E4=BA=A7=E5=93=81=E5=BD=95=E5=85=A5=E6=97=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=B3=BB=E7=BB=9F=E7=B9=81=E5=BF=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchase/PurOrderReceiveController.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/purchase/PurOrderReceiveController.java b/src/main/java/com/glxp/api/controller/purchase/PurOrderReceiveController.java index c8c0a68c..a602c28a 100644 --- a/src/main/java/com/glxp/api/controller/purchase/PurOrderReceiveController.java +++ b/src/main/java/com/glxp/api/controller/purchase/PurOrderReceiveController.java @@ -287,7 +287,7 @@ public class PurOrderReceiveController extends BaseController { return ResultVOUtils.error(999, "库存不足!"); } } - if (listInv != null && listInv.size() > 0) { + if (listInv != null && listInv.size() > 0 && updateReceiveDetailRequest.getCount() != null) { if (listInv.get(0).getReCount() < updateReceiveDetailRequest.getCount()) { return ResultVOUtils.error(999, "库存不足!"); } @@ -296,7 +296,7 @@ public class PurOrderReceiveController extends BaseController { boolean falg = receivedetailService.updateReceiveDetail(updateReceiveDetailRequest); if (falg) { - return ResultVOUtils.success(); + return ResultVOUtils.success("成功"); } else { return ResultVOUtils.error(555, "更新失败!"); } @@ -432,16 +432,16 @@ public class PurOrderReceiveController extends BaseController { purApplyService.insert(purApplyEntity); //用stream流复制list List purApplyDetailEntityList = purReceiveDetailEntityList.stream().map(e -> { - PurApplyDetailEntity d = new PurApplyDetailEntity(); - d.setOrderIdFk(purApplyEntity.getId() + ""); - d.setProductId(e.getRelIdFk()); - UdiProductEntity udiProductEntity = udiProductService.findByNameCode(e.getNameCode()); - d.setProductName(udiProductEntity.getCpmctymc()); - d.setCount(e.getCount()); - d.setSupId(e.getSupId()); - d.setZczbhhzbapzbh(udiProductEntity.getZczbhhzbapzbh()); - return d; - }) + PurApplyDetailEntity d = new PurApplyDetailEntity(); + d.setOrderIdFk(purApplyEntity.getId() + ""); + d.setProductId(e.getRelIdFk()); + UdiProductEntity udiProductEntity = udiProductService.findByNameCode(e.getNameCode()); + d.setProductName(udiProductEntity.getCpmctymc()); + d.setCount(e.getCount()); + d.setSupId(e.getSupId()); + d.setZczbhhzbapzbh(udiProductEntity.getZczbhhzbapzbh()); + return d; + }) .collect(Collectors.toList()); purApplyDetailService.insertPurApplyDetailEntity(purApplyDetailEntityList);