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 1929b0dc..6ffd1535 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); 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}, '%')