diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrDeptController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrDeptController.java index 2ae525b16..097c711ce 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrDeptController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrDeptController.java @@ -155,7 +155,8 @@ public class ThrDeptController { // return ResultVOUtils.error(500, "请先关联仓库对应的第三方仓库,再关联分库!"); // } // filterThrSubInvWarehouseRequest.setParentId((String) thirdId); - List thrInvWarehouseEntities = thrInvWarehouseService.filterThrInvWarehouse(filterThrSubInvWarehouseRequest); + filterThrSubInvWarehouseRequest.setStatus(0); + List thrInvWarehouseEntities = thrInvWarehouseService.selectByThrDeptCode(filterThrSubInvWarehouseRequest); PageInfo pageInfo; pageInfo = new PageInfo<>(thrInvWarehouseEntities); PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); diff --git a/src/main/java/com/glxp/api/dao/thrsys/ThrInvWarehouseDao.java b/src/main/java/com/glxp/api/dao/thrsys/ThrInvWarehouseDao.java index 39c74ca23..df1b16eda 100644 --- a/src/main/java/com/glxp/api/dao/thrsys/ThrInvWarehouseDao.java +++ b/src/main/java/com/glxp/api/dao/thrsys/ThrInvWarehouseDao.java @@ -16,6 +16,8 @@ public interface ThrInvWarehouseDao { List selectByPid(String pid); + List selectByThrDeptCode(FilterThrSubInvWarehouseRequest filterThrSubInvWarehouseRequest); + boolean insertThrInvWarehouse(ThrInvWarehouseEntity thrInvWarehouseEntity); boolean insertThrInvWarehouses(@Param("thrInvWarehouseEntitys") List thrInvWarehouseEntitys); diff --git a/src/main/java/com/glxp/api/req/inout/FilterOrderRequest.java b/src/main/java/com/glxp/api/req/inout/FilterOrderRequest.java index 91b7bbfc1..e7ed5bfb8 100644 --- a/src/main/java/com/glxp/api/req/inout/FilterOrderRequest.java +++ b/src/main/java/com/glxp/api/req/inout/FilterOrderRequest.java @@ -144,4 +144,6 @@ public class FilterOrderRequest extends ListPageRequest { private List orderIds; + private String corpName; + } diff --git a/src/main/java/com/glxp/api/req/thrsys/FilterThrSubInvWarehouseRequest.java b/src/main/java/com/glxp/api/req/thrsys/FilterThrSubInvWarehouseRequest.java index 2c9b5b51f..a728f1932 100644 --- a/src/main/java/com/glxp/api/req/thrsys/FilterThrSubInvWarehouseRequest.java +++ b/src/main/java/com/glxp/api/req/thrsys/FilterThrSubInvWarehouseRequest.java @@ -11,5 +11,6 @@ public class FilterThrSubInvWarehouseRequest extends ListPageRequest { private String name; private String parentId; private String thirdSysFk; + private Integer status; } diff --git a/src/main/java/com/glxp/api/res/inv/InvPreinOrderResponse.java b/src/main/java/com/glxp/api/res/inv/InvPreinOrderResponse.java index 8d600f673..8b8168e15 100644 --- a/src/main/java/com/glxp/api/res/inv/InvPreinOrderResponse.java +++ b/src/main/java/com/glxp/api/res/inv/InvPreinOrderResponse.java @@ -77,5 +77,6 @@ public class InvPreinOrderResponse { private String deptName; private String invName; + private Integer orderFromType; } diff --git a/src/main/java/com/glxp/api/service/thrsys/ThrInvWarehouseService.java b/src/main/java/com/glxp/api/service/thrsys/ThrInvWarehouseService.java index 362674b0f..073a23ba3 100644 --- a/src/main/java/com/glxp/api/service/thrsys/ThrInvWarehouseService.java +++ b/src/main/java/com/glxp/api/service/thrsys/ThrInvWarehouseService.java @@ -15,6 +15,7 @@ public interface ThrInvWarehouseService { List filterThrInvWarehouse(FilterThrSubInvWarehouseRequest filterThrSubInvWarehouseRequest); List selectByPid(String pid); + List selectByThrDeptCode( FilterThrSubInvWarehouseRequest filterThrSubInvWarehouseRequest); boolean insertThrInvWarehouse(ThrInvWarehouseEntity thrInvWarehouseEntity); diff --git a/src/main/java/com/glxp/api/service/thrsys/impl/ThrInvWarehouseServiceImpl.java b/src/main/java/com/glxp/api/service/thrsys/impl/ThrInvWarehouseServiceImpl.java index 37230d554..b03d8e96c 100644 --- a/src/main/java/com/glxp/api/service/thrsys/impl/ThrInvWarehouseServiceImpl.java +++ b/src/main/java/com/glxp/api/service/thrsys/impl/ThrInvWarehouseServiceImpl.java @@ -63,6 +63,11 @@ public class ThrInvWarehouseServiceImpl implements ThrInvWarehouseService { return thrInvWarehouseDao.selectByPid(pid); } + @Override + public List selectByThrDeptCode(FilterThrSubInvWarehouseRequest filterThrSubInvWarehouseRequest) { + return thrInvWarehouseDao.selectByThrDeptCode(filterThrSubInvWarehouseRequest); + } + @Override public boolean insertThrInvWarehouse(ThrInvWarehouseEntity thrInvWarehouseEntity) { return thrInvWarehouseDao.insertThrInvWarehouse(thrInvWarehouseEntity); diff --git a/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml b/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml index a4d380665..a89c8a70b 100644 --- a/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml +++ b/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml @@ -18,6 +18,9 @@ AND id = #{id} + + AND ( SELECT NAME FROM auth_warehouse aw2 WHERE aw2.CODE = io.fromInvCode ) like concat('%', #{corpName}, '%') + AND action = #{action} diff --git a/src/main/resources/mybatis/mapper/inv/InvPreinOrderDao.xml b/src/main/resources/mybatis/mapper/inv/InvPreinOrderDao.xml index b5b7dda7d..4bd97c9da 100644 --- a/src/main/resources/mybatis/mapper/inv/InvPreinOrderDao.xml +++ b/src/main/resources/mybatis/mapper/inv/InvPreinOrderDao.xml @@ -7,6 +7,7 @@ (select name from basic_bussiness_type bus where bus.action = io.action) billTypeName, (select name from auth_dept ad where ad.code = io.deptCode) deptName, (select name from auth_warehouse aw where aw.code = io.invCode) invName, + ( SELECT fromType FROM io_order ior WHERE ior.billNo = io.billNo ) orderFromType, (select employeeName from auth_user au where au.id = io.createUser) createUserName, (select employeeName from auth_user au2 where au2.id = io.updateUser) updateUserName, (select employeeName from auth_user au3 where au3.id = io.reviewUser) reviewUserName, diff --git a/src/main/resources/mybatis/mapper/thrsys/ThrInvWarehouseDao.xml b/src/main/resources/mybatis/mapper/thrsys/ThrInvWarehouseDao.xml index 924e5a476..fa340e07e 100644 --- a/src/main/resources/mybatis/mapper/thrsys/ThrInvWarehouseDao.xml +++ b/src/main/resources/mybatis/mapper/thrsys/ThrInvWarehouseDao.xml @@ -39,6 +39,14 @@ WHERE parentId = #{pid} + + +