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);