From e91a030744727fd68581331570ffa04afec0fba5 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 15:09:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/glxp/api/req/purchase/PurApplyDetailRequest.java | 1 + .../com/glxp/api/req/purchase/PurOrderDetailRequest.java | 2 +- .../com/glxp/api/req/purchase/PurPlanDetailRequest.java | 2 +- .../service/purchase/impl/PurApplyDetailImplService.java | 9 --------- .../mybatis/mapper/purchase/PurApplyDetailDao.xml | 3 +++ .../mybatis/mapper/purchase/PurOrderDetailDao.xml | 3 +++ .../mybatis/mapper/purchase/PurPlanDetailDao.xml | 3 +++ 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/glxp/api/req/purchase/PurApplyDetailRequest.java b/src/main/java/com/glxp/api/req/purchase/PurApplyDetailRequest.java index ac4dda2e..0e598e7b 100644 --- a/src/main/java/com/glxp/api/req/purchase/PurApplyDetailRequest.java +++ b/src/main/java/com/glxp/api/req/purchase/PurApplyDetailRequest.java @@ -67,4 +67,5 @@ public class PurApplyDetailRequest extends ListPageRequest { * 截止席间 */ private String endDate; + private String nameCode; } diff --git a/src/main/java/com/glxp/api/req/purchase/PurOrderDetailRequest.java b/src/main/java/com/glxp/api/req/purchase/PurOrderDetailRequest.java index 347b3dc0..8624bbfc 100644 --- a/src/main/java/com/glxp/api/req/purchase/PurOrderDetailRequest.java +++ b/src/main/java/com/glxp/api/req/purchase/PurOrderDetailRequest.java @@ -75,5 +75,5 @@ public class PurOrderDetailRequest extends ListPageRequest { * 生产企业 */ private String manufactory; - + private String nameCode; } diff --git a/src/main/java/com/glxp/api/req/purchase/PurPlanDetailRequest.java b/src/main/java/com/glxp/api/req/purchase/PurPlanDetailRequest.java index c792cec1..b925d8e4 100644 --- a/src/main/java/com/glxp/api/req/purchase/PurPlanDetailRequest.java +++ b/src/main/java/com/glxp/api/req/purchase/PurPlanDetailRequest.java @@ -75,7 +75,7 @@ public class PurPlanDetailRequest extends ListPageRequest { * 生产企业 */ private String manufactory; - + private String nameCode; private String checksupId; } diff --git a/src/main/java/com/glxp/api/service/purchase/impl/PurApplyDetailImplService.java b/src/main/java/com/glxp/api/service/purchase/impl/PurApplyDetailImplService.java index 32600559..61dcc2da 100644 --- a/src/main/java/com/glxp/api/service/purchase/impl/PurApplyDetailImplService.java +++ b/src/main/java/com/glxp/api/service/purchase/impl/PurApplyDetailImplService.java @@ -90,15 +90,6 @@ public class PurApplyDetailImplService implements PurApplyDetailService { @Override public List getDetailList(PurApplyDetailRequest purApplyDetailRequest) { -// if (null == purApplyDetailRequest) { -// return Collections.emptyList(); -// } -// if (purApplyDetailRequest.getPage() == null) -// purApplyDetailRequest.setPage(1); -// if (purApplyDetailRequest.getLimit() == null) { -// purApplyDetailRequest.setLimit(10); -// } -// PageHelper.offsetPage((purApplyDetailRequest.getPage() - 1) * purApplyDetailRequest.getLimit(), purApplyDetailRequest.getLimit()); if (purApplyDetailRequest == null) { return Collections.emptyList(); } diff --git a/src/main/resources/mybatis/mapper/purchase/PurApplyDetailDao.xml b/src/main/resources/mybatis/mapper/purchase/PurApplyDetailDao.xml index f0ec81f0..74529845 100644 --- a/src/main/resources/mybatis/mapper/purchase/PurApplyDetailDao.xml +++ b/src/main/resources/mybatis/mapper/purchase/PurApplyDetailDao.xml @@ -132,6 +132,9 @@ left JOIN basic_corp ON pur_apply_detail.supId = basic_corp.erpId left join pur_apply on pur_apply.id = pur_apply_detail.orderIdFk + + AND basic_products.nameCode like concat('%', #{nameCode}, '%') + AND pur_apply.billNo like concat('%', #{billNo}, '%') diff --git a/src/main/resources/mybatis/mapper/purchase/PurOrderDetailDao.xml b/src/main/resources/mybatis/mapper/purchase/PurOrderDetailDao.xml index d9a61469..4d236cc6 100644 --- a/src/main/resources/mybatis/mapper/purchase/PurOrderDetailDao.xml +++ b/src/main/resources/mybatis/mapper/purchase/PurOrderDetailDao.xml @@ -151,6 +151,9 @@ INNER JOIN basic_corp ON pur_order_detail.supId = basic_corp.erpId left join pur_order on pur_order.id = pur_order_detail.orderIdFk + + AND basic_products.nameCode like concat('%', #{nameCode}, '%') + AND pur_order.billNo like concat('%', #{billNo}, '%') diff --git a/src/main/resources/mybatis/mapper/purchase/PurPlanDetailDao.xml b/src/main/resources/mybatis/mapper/purchase/PurPlanDetailDao.xml index 531f386f..ebb9499b 100644 --- a/src/main/resources/mybatis/mapper/purchase/PurPlanDetailDao.xml +++ b/src/main/resources/mybatis/mapper/purchase/PurPlanDetailDao.xml @@ -148,6 +148,9 @@ left JOIN basic_corp ON pur_plan_detail.supId = basic_corp.erpId left join pur_plan on pur_plan.id = pur_plan_detail.orderIdFk + + AND basic_products.nameCode like concat('%', #{nameCode}, '%') + AND pur_plan.billNo like concat('%', #{billNo}, '%') 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 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=94=B3=E8=B4=AD?= =?UTF-8?q?=E5=8D=95=E7=82=B9=E5=87=BB=E4=BA=A7=E5=93=81=E5=BD=95=E5=85=A5?= =?UTF-8?q?=E6=97=B6=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);