From 2eb50644dc2ca4c1bd6a3ee3b249bedb7ca1b2e0 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Mon, 30 Oct 2023 11:58:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=86=E7=94=A8=E9=A2=84=E9=AA=8C=E6=94=B6?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E4=B8=8D=E8=B6=B3=EF=BC=8C=E9=A2=86=E7=94=A8?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchase/PurOrderReceiveController.java | 13 +++++++------ .../api/req/inv/FilterInvPreProductRequest.java | 2 ++ .../api/req/inv/FilterInvPreinProductRequest.java | 1 + .../glxp/api/req/inv/FilterInvProductRequest.java | 2 ++ src/main/resources/application-dev.yml | 4 ++-- .../mybatis/mapper/auth/InvWarehouseDao.xml | 4 ++++ .../mybatis/mapper/inv/InvPreProductDao.xml | 3 +++ .../mybatis/mapper/inv/InvPreinProductDao.xml | 3 +++ .../resources/mybatis/mapper/inv/invProductDao.xml | 7 +++++-- 9 files changed, 29 insertions(+), 10 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 86ff5bb8..f1923c29 100644 --- a/src/main/java/com/glxp/api/controller/purchase/PurOrderReceiveController.java +++ b/src/main/java/com/glxp/api/controller/purchase/PurOrderReceiveController.java @@ -59,6 +59,7 @@ import com.glxp.api.service.purchase.impl.PurOrderDetailService; import com.glxp.api.service.purchase.impl.PurPlanDetailService; import com.glxp.api.util.CustomUtil; import com.glxp.api.util.GennerOrderUtils; +import com.glxp.api.util.IntUtil; import com.glxp.api.util.OrderNoTypeBean; import com.glxp.api.util.udi.FilterUdiUtils; import org.springframework.validation.BindingResult; @@ -161,8 +162,8 @@ public class PurOrderReceiveController extends BaseController { filterReceiveRequest.setCreateUser(authAdmin.getId() + ""); //查询自己 } if (filterReceiveRequest.getIsInvCode() != null && filterReceiveRequest.getIsInvCode()) { - AuthAdmin authAdmin = customerService.getUserBean(); - filterReceiveRequest.setTargetInvCode(authAdmin.getLocInvCode()); +// AuthAdmin authAdmin = customerService.getUserBean(); + filterReceiveRequest.setTargetInvCode("1000000"); } List data = receiveService.filterList(filterReceiveRequest); @@ -260,7 +261,7 @@ public class PurOrderReceiveController extends BaseController { //寄售 FilterInvPreProductRequest request = new FilterInvPreProductRequest(); // BeanUtils.copyProperties(updateReceiveDetailRequest,request); - request.setNameCode(updateReceiveDetailRequest.getNameCode()); + request.setDiCode(updateReceiveDetailRequest.getNameCode()); request.setInvCode(updateReceiveDetailRequest.getTargetInvCode()); list = selectFilterInvPreProductRequest(request); @@ -268,20 +269,20 @@ public class PurOrderReceiveController extends BaseController { //预验收 FilterInvPreinProductRequest request = new FilterInvPreinProductRequest(); // BeanUtils.copyProperties(updateReceiveDetailRequest,request); - request.setNameCode(updateReceiveDetailRequest.getNameCode()); + request.setDiCode(updateReceiveDetailRequest.getNameCode()); request.setInvCode(updateReceiveDetailRequest.getTargetInvCode()); listinvprein = selectfilterListStock(request); } else { FilterInvProductRequest request = new FilterInvProductRequest(); // BeanUtils.copyProperties(updateReceiveDetailRequest,request); - request.setNameCode(updateReceiveDetailRequest.getNameCode()); + request.setDiCode(updateReceiveDetailRequest.getNameCode()); request.setInvCode(updateReceiveDetailRequest.getTargetInvCode()); listInv = selectFilterInvProductRequest(request); } if (list != null && list.size() > 0) { - if (list.get(0).getReCount() < updateReceiveDetailRequest.getCount()) { + if (list.get(0).getReCount() < IntUtil.value(updateReceiveDetailRequest.getCount())) { return ResultVOUtils.error(999, "库存不足!"); } } diff --git a/src/main/java/com/glxp/api/req/inv/FilterInvPreProductRequest.java b/src/main/java/com/glxp/api/req/inv/FilterInvPreProductRequest.java index 3074d58c..0ff031e3 100644 --- a/src/main/java/com/glxp/api/req/inv/FilterInvPreProductRequest.java +++ b/src/main/java/com/glxp/api/req/inv/FilterInvPreProductRequest.java @@ -109,4 +109,6 @@ public class FilterInvPreProductRequest extends ListPageRequest { */ private Integer filterCount; + private String diCode; + } diff --git a/src/main/java/com/glxp/api/req/inv/FilterInvPreinProductRequest.java b/src/main/java/com/glxp/api/req/inv/FilterInvPreinProductRequest.java index 9c2583da..75dda00d 100644 --- a/src/main/java/com/glxp/api/req/inv/FilterInvPreinProductRequest.java +++ b/src/main/java/com/glxp/api/req/inv/FilterInvPreinProductRequest.java @@ -110,4 +110,5 @@ public class FilterInvPreinProductRequest extends ListPageRequest { */ private Integer filterCount; + private String diCode; } diff --git a/src/main/java/com/glxp/api/req/inv/FilterInvProductRequest.java b/src/main/java/com/glxp/api/req/inv/FilterInvProductRequest.java index 84625811..2400bcb1 100644 --- a/src/main/java/com/glxp/api/req/inv/FilterInvProductRequest.java +++ b/src/main/java/com/glxp/api/req/inv/FilterInvProductRequest.java @@ -114,4 +114,6 @@ public class FilterInvProductRequest extends ListPageRequest { private String manufactory; + private String diCode; + } diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index e0d96ac3..e7acbb9d 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -4,9 +4,9 @@ server: spring: datasource: driver-class-name: com.p6spy.engine.spy.P6SpyDriver - jdbc-url: jdbc:p6spy:mysql://192.168.0.242:3306/phxyy_wms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_ph?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true username: root - password: Glxp@6066 + password: 123456 hikari: connection-timeout: 60000 maximum-pool-size: 20 diff --git a/src/main/resources/mybatis/mapper/auth/InvWarehouseDao.xml b/src/main/resources/mybatis/mapper/auth/InvWarehouseDao.xml index c621eabe..b0cf70f2 100644 --- a/src/main/resources/mybatis/mapper/auth/InvWarehouseDao.xml +++ b/src/main/resources/mybatis/mapper/auth/InvWarehouseDao.xml @@ -83,6 +83,10 @@ INNER JOIN auth_warehouse_user on auth_warehouse.code = auth_warehouse_user.code + + + AND auth_warehouse.name like concat('%', #{name}, '%') + AND auth_warehouse_user.userId = #{userId} diff --git a/src/main/resources/mybatis/mapper/inv/InvPreProductDao.xml b/src/main/resources/mybatis/mapper/inv/InvPreProductDao.xml index 65f5a06e..0f8335ec 100644 --- a/src/main/resources/mybatis/mapper/inv/InvPreProductDao.xml +++ b/src/main/resources/mybatis/mapper/inv/InvPreProductDao.xml @@ -118,6 +118,9 @@ AND ipp.nameCode like concat('%', #{nameCode}, '%') + + AND ipp.nameCode = #{diCode} + AND ipp.relIdFk = #{relIdFk} diff --git a/src/main/resources/mybatis/mapper/inv/InvPreinProductDao.xml b/src/main/resources/mybatis/mapper/inv/InvPreinProductDao.xml index 5256cd08..fe31a215 100644 --- a/src/main/resources/mybatis/mapper/inv/InvPreinProductDao.xml +++ b/src/main/resources/mybatis/mapper/inv/InvPreinProductDao.xml @@ -116,6 +116,9 @@ AND ipp.nameCode like concat('%', #{nameCode}, '%') + + AND ipp.nameCode = #{diCode} + AND ipp.relIdFk = #{relIdFk} diff --git a/src/main/resources/mybatis/mapper/inv/invProductDao.xml b/src/main/resources/mybatis/mapper/inv/invProductDao.xml index 1cb7dea8..75705e1f 100644 --- a/src/main/resources/mybatis/mapper/inv/invProductDao.xml +++ b/src/main/resources/mybatis/mapper/inv/invProductDao.xml @@ -155,7 +155,7 @@ bp.ggxh, ip.batchNo, ip.code, - ip.produceDate productionDate, + ip.produceDate productionDate, ip.expireDate, ip.serialNo, basic_corp.NAME supName, @@ -297,7 +297,7 @@