修改仓库bug

master
wangwei 3 years ago
parent 5e915fd4f0
commit e72352d7f0

@ -155,7 +155,8 @@ public class ThrDeptController {
// return ResultVOUtils.error(500, "请先关联仓库对应的第三方仓库,再关联分库!"); // return ResultVOUtils.error(500, "请先关联仓库对应的第三方仓库,再关联分库!");
// } // }
// filterThrSubInvWarehouseRequest.setParentId((String) thirdId); // filterThrSubInvWarehouseRequest.setParentId((String) thirdId);
List<ThrInvWarehouseEntity> thrInvWarehouseEntities = thrInvWarehouseService.filterThrInvWarehouse(filterThrSubInvWarehouseRequest); filterThrSubInvWarehouseRequest.setStatus(0);
List<ThrInvWarehouseEntity> thrInvWarehouseEntities = thrInvWarehouseService.selectByThrDeptCode(filterThrSubInvWarehouseRequest);
PageInfo<ThrInvWarehouseEntity> pageInfo; PageInfo<ThrInvWarehouseEntity> pageInfo;
pageInfo = new PageInfo<>(thrInvWarehouseEntities); pageInfo = new PageInfo<>(thrInvWarehouseEntities);
PageSimpleResponse<ThrInvWarehouseEntity> pageSimpleResponse = new PageSimpleResponse<>(); PageSimpleResponse<ThrInvWarehouseEntity> pageSimpleResponse = new PageSimpleResponse<>();

@ -16,6 +16,8 @@ public interface ThrInvWarehouseDao {
List<ThrInvWarehouseEntity> selectByPid(String pid); List<ThrInvWarehouseEntity> selectByPid(String pid);
List<ThrInvWarehouseEntity> selectByThrDeptCode(FilterThrSubInvWarehouseRequest filterThrSubInvWarehouseRequest);
boolean insertThrInvWarehouse(ThrInvWarehouseEntity thrInvWarehouseEntity); boolean insertThrInvWarehouse(ThrInvWarehouseEntity thrInvWarehouseEntity);
boolean insertThrInvWarehouses(@Param("thrInvWarehouseEntitys") List<ThrInvWarehouseEntity> thrInvWarehouseEntitys); boolean insertThrInvWarehouses(@Param("thrInvWarehouseEntitys") List<ThrInvWarehouseEntity> thrInvWarehouseEntitys);

@ -11,5 +11,6 @@ public class FilterThrSubInvWarehouseRequest extends ListPageRequest {
private String name; private String name;
private String parentId; private String parentId;
private String thirdSysFk; private String thirdSysFk;
private Integer status;
} }

@ -15,6 +15,7 @@ public interface ThrInvWarehouseService {
List<ThrInvWarehouseEntity> filterThrInvWarehouse(FilterThrSubInvWarehouseRequest filterThrSubInvWarehouseRequest); List<ThrInvWarehouseEntity> filterThrInvWarehouse(FilterThrSubInvWarehouseRequest filterThrSubInvWarehouseRequest);
List<ThrInvWarehouseEntity> selectByPid(String pid); List<ThrInvWarehouseEntity> selectByPid(String pid);
List<ThrInvWarehouseEntity> selectByThrDeptCode( FilterThrSubInvWarehouseRequest filterThrSubInvWarehouseRequest);
boolean insertThrInvWarehouse(ThrInvWarehouseEntity thrInvWarehouseEntity); boolean insertThrInvWarehouse(ThrInvWarehouseEntity thrInvWarehouseEntity);

@ -63,6 +63,11 @@ public class ThrInvWarehouseServiceImpl implements ThrInvWarehouseService {
return thrInvWarehouseDao.selectByPid(pid); return thrInvWarehouseDao.selectByPid(pid);
} }
@Override
public List<ThrInvWarehouseEntity> selectByThrDeptCode(FilterThrSubInvWarehouseRequest filterThrSubInvWarehouseRequest) {
return thrInvWarehouseDao.selectByThrDeptCode(filterThrSubInvWarehouseRequest);
}
@Override @Override
public boolean insertThrInvWarehouse(ThrInvWarehouseEntity thrInvWarehouseEntity) { public boolean insertThrInvWarehouse(ThrInvWarehouseEntity thrInvWarehouseEntity) {
return thrInvWarehouseDao.insertThrInvWarehouse(thrInvWarehouseEntity); return thrInvWarehouseDao.insertThrInvWarehouse(thrInvWarehouseEntity);

@ -39,6 +39,14 @@
WHERE parentId = #{pid} WHERE parentId = #{pid}
</select> </select>
<select id="selectByThrDeptCode" parameterType="com.glxp.api.req.thrsys.FilterThrSubInvWarehouseRequest"
resultType="com.glxp.api.entity.thrsys.ThrInvWarehouseEntity">
select * from thr_inv_warehouse where parentId not in (SELECT code FROM thr_dept
where status=#{status} and thirdSysFk=#{thirdSysFk}) and thirdSysFk=#{thirdSysFk}
</select>
<select id="countSubInvByParentInvId" resultType="java.lang.Integer"> <select id="countSubInvByParentInvId" resultType="java.lang.Integer">
select count(*) from thr_inv_warehouse where select count(*) from thr_inv_warehouse where
parentId = (select code from thr_dept where id = #{parentInvId}) parentId = (select code from thr_dept where id = #{parentInvId})

Loading…
Cancel
Save