diff --git a/src/main/java/com/glxp/api/controller/auth/DeptController.java b/src/main/java/com/glxp/api/controller/auth/DeptController.java index 8a3fcd407..644c69e20 100644 --- a/src/main/java/com/glxp/api/controller/auth/DeptController.java +++ b/src/main/java/com/glxp/api/controller/auth/DeptController.java @@ -9,12 +9,16 @@ import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.entity.auth.AuthAdmin; import com.glxp.api.entity.auth.DeptEntity; +import com.glxp.api.entity.auth.DeptUserEntity; +import com.glxp.api.entity.auth.InvWarehouseEntity; import com.glxp.api.entity.system.SystemParamConfigEntity; +import com.glxp.api.req.auth.FilterDeptUserReqeust; import com.glxp.api.req.auth.FilterInvWarehouseRequest; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.service.auth.CustomerService; import com.glxp.api.service.auth.DeptService; +import com.glxp.api.service.auth.DeptUserService; import com.glxp.api.service.auth.InvWarehouseService; import com.glxp.api.service.system.SystemParamConfigService; import org.springframework.validation.BindingResult; @@ -226,6 +230,11 @@ public class DeptController { return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); } + //判断状态 + String msg = isCheckStatus(deptEntity.getStatus(), deptEntity); + if (msg != "") { + return ResultVOUtils.error(999, msg); + } List deptEntityList = deptService.selectByNameList(deptEntity.getName()); if (deptEntityList != null && deptEntityList.size() > 0) { for (DeptEntity obj : deptEntityList) { @@ -244,6 +253,8 @@ public class DeptController { return ResultVOUtils.success(); } + @Resource + DeptUserService deptUserService; @AuthRuleAnnotation("") @PostMapping("/spms/inv/warehouse/delete") public BaseResponse delete(@RequestBody DeleteRequest deleteRequest) { @@ -252,18 +263,27 @@ public class DeptController { return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); } - //todo 代码未迁移完,后续记得修改 + DeptEntity deptEntity = deptService.selectById(deleteRequest.getId()); + if (deptEntity.getLevel() != null && deptEntity.getLevel() == 1) { + return ResultVOUtils.error(500, "删除失败,一级部门不允许删除!"); + } + + List invSubWarehouseEntities = invWarehouseService.findByParentId(deptEntity.getCode()); + if (CollUtil.isNotEmpty(invSubWarehouseEntities)) { + return ResultVOUtils.error(500, "删除失败,请先移除该部门关联仓库信息!"); + } + FilterDeptUserReqeust filterDeptUserReqeust = new FilterDeptUserReqeust(); + filterDeptUserReqeust.setDeptId(deptEntity.getId().longValue()); + List deptUserEntities = deptUserService.selectDeptUser(filterDeptUserReqeust); + if (CollUtil.isNotEmpty(deptUserEntities)) { + return ResultVOUtils.error(500, "删除失败,请先移除该部门关联用户信息!"); + } + List deptEntities = deptService.selectByPcode(deptEntity.getCode()); + if (deptEntities.size() > 0) { + return ResultVOUtils.error(500, "删除失败,请先移除该部门下的子部门!"); + } + -// DeptEntity deptEntity = deptService.selectById(deleteRequest.getId()); -// InvProductDetailEntity invProductDetailEntity = invProductDetailService.isExit(deptEntity.getCode()); -// if (invProductDetailEntity != null) { -// return ResultVOUtils.error(500, "该仓库已有库存,不能删除!"); -// } -// -// List invSubWarehouseEntities = invSubWarehouseService.findByParentId(deptEntity.getCode()); -// if (CollUtil.isNotEmpty(invSubWarehouseEntities)) { -// return ResultVOUtils.error(500, "删除失败,请先移除该部门关联仓库信息!"); -// } boolean b = deptService.deleteById(deleteRequest.getId()); if (!b) { return ResultVOUtils.error(ResultEnum.NOT_NETWORK); @@ -298,4 +318,43 @@ public class DeptController { return ResultVOUtils.success(byCode); } + @AuthRuleAnnotation("") + @PostMapping("/spms/inv/warehouse/selectInvById") + public BaseResponse selectInvById(@RequestBody List InvList) { + + if (InvList.size() == 0) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); + } + //先得到部门编码 + List String = deptService.selectByIdCode(InvList); + + + List list = invWarehouseService.selectInvById(String); + + return ResultVOUtils.success(list); + } + + public String isCheckStatus(Integer status, DeptEntity deptEntity) { + //启用的时候需要判断上级是不是被禁用 + if (status == 1) { + //查询所有的上级 + List deptEntityList = deptService.selectupDeptAll(deptEntity.getPcode()); + for (DeptEntity obj : deptEntityList) { + if (obj.getStatus() == 0) { + return "上级存在禁用的部门修改失败!"; + } + } + } else { + List deptEntityList = deptService.selectLowDeptAll(deptEntity.getCode()); + for (DeptEntity obj : deptEntityList) { + if (obj.getStatus() == 1) { + return "下级存在启用的部门修改失败!"; + } + } + } + return ""; + } + + + } diff --git a/src/main/java/com/glxp/api/controller/auth/DeptUserController.java b/src/main/java/com/glxp/api/controller/auth/DeptUserController.java index a4b8fe81f..2a49d387e 100644 --- a/src/main/java/com/glxp/api/controller/auth/DeptUserController.java +++ b/src/main/java/com/glxp/api/controller/auth/DeptUserController.java @@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo; import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; +import com.glxp.api.entity.auth.DeptEntity; import com.glxp.api.entity.auth.DeptUserEntity; import com.glxp.api.req.auth.FilterDeptUserReqeust; import com.glxp.api.res.PageSimpleResponse; @@ -26,12 +27,19 @@ public class DeptUserController { DeptUserService deptUserService; @Resource DeptService deptService; - + @AuthRuleAnnotation("") @GetMapping("udi/auth/dept/user/filter") public BaseResponse filterList(FilterDeptUserReqeust filterDeptUserReqeust) { - filterDeptUserReqeust.setDeptId(filterDeptUserReqeust.getDeptId()); + //获取部门id + Long idByCode = deptService.getIdByCode(filterDeptUserReqeust.getDeptId()); + DeptEntity deptEntity = deptService.selectById(idByCode + ""); + if (deptEntity.getLevel() == 1) { + filterDeptUserReqeust.setDeptId(null); + } else { + filterDeptUserReqeust.setDeptId(idByCode); + } List deptEntityList = deptUserService.selectJoinDeptUser(filterDeptUserReqeust); PageInfo pageInfo = new PageInfo<>(deptEntityList); PageSimpleResponse deptEntityPageSimpleResponse = new PageSimpleResponse<>(); diff --git a/src/main/java/com/glxp/api/controller/auth/InvWarehouseController.java b/src/main/java/com/glxp/api/controller/auth/InvWarehouseController.java index 14b58a248..0eacca173 100644 --- a/src/main/java/com/glxp/api/controller/auth/InvWarehouseController.java +++ b/src/main/java/com/glxp/api/controller/auth/InvWarehouseController.java @@ -219,6 +219,7 @@ public class InvWarehouseController extends BaseController { public BaseResponse save(@RequestBody @Valid InvWarehouseEntity invWarehouseEntity, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); } @@ -245,6 +246,7 @@ public class InvWarehouseController extends BaseController { updateEntity.setUpdateTime(new Date()); deptService.updateInvWarehouse(updateEntity); invWarehouseEntity.setId(IdUtil.getSnowflake(6, 1).nextId() + ""); + invWarehouseEntity.setUpdateTime(new Date()); boolean b = invWarehouseService.insertInvSubWarehouse(invWarehouseEntity); if (!b) { return ResultVOUtils.error(ResultEnum.NOT_NETWORK); @@ -341,6 +343,14 @@ public class InvWarehouseController extends BaseController { // return ResultVOUtils.error(500, "此分库存在库存,不能删除!"); // } // + + // 判断此分库中是否还有库存 + InvWarehouseEntity byWareId = invWarehouseService.getByWareId(deleteRequest.getId()); + List byWarePcode = invWarehouseService.getByWarePcode(byWareId.getCode()); + if( byWarePcode.size()>0){ + return ResultVOUtils.error(500, "此仓库下存在仓库无法删除!"); + } + //判断此分库下是否有货位 List spaceList = invSpaceService.findBySubWarehouseCode(invWarehouseEntity.getCode()); if (CollUtil.isNotEmpty(spaceList)) { @@ -462,8 +472,8 @@ public class InvWarehouseController extends BaseController { //1.获取所有单据类型 FilterBussinessTypeRequest filterBussinessTypeRequest = new FilterBussinessTypeRequest(); filterBussinessTypeRequest.setEnable(true); - if (invWarehouseEntity.getAdvanceType()) { - filterBussinessTypeRequest.setAdvanceType(true); + if (invWarehouseEntity.getAdvanceType() == 2) { + filterBussinessTypeRequest.setAdvanceType(2); } List basicBussinessTypeEntities = basicBussinessTypeService.findList(filterBussinessTypeRequest); diff --git a/src/main/java/com/glxp/api/controller/auth/SysUserController.java b/src/main/java/com/glxp/api/controller/auth/SysUserController.java index a4a0b1e26..43e69beb0 100644 --- a/src/main/java/com/glxp/api/controller/auth/SysUserController.java +++ b/src/main/java/com/glxp/api/controller/auth/SysUserController.java @@ -64,15 +64,26 @@ public class SysUserController extends BaseController { AuthAdminResponse authAdminResponse = new AuthAdminResponse(); BeanUtils.copyProperties(item, authAdminResponse); List roles = sysRoleService.selectRoleListByUserId(authAdminResponse.getId()); - List deptUserResponses = deptUserService.selectByUserId(authAdminResponse.getId()); + List deptUserResponses=null; + if("key".equals(filterAuthUserRequest.getKey())){ + deptUserResponses = deptUserService.selectByUserIdKey(authAdminResponse.getId()); + }else{ + deptUserResponses = deptUserService.selectByUserId(authAdminResponse.getId()); + } if (CollUtil.isNotEmpty(deptUserResponses)) { List depts = new ArrayList<>(); String deptName = ""; for (DeptUserResponse deptUserResponse : deptUserResponses) { - depts.add(deptUserResponse.getDeptId()); - deptName = deptName + "," + deptUserResponse.getDeptName(); + if(deptUserResponse.getDeptId()!=1){ + depts.add(deptUserResponse.getDeptId()); + deptName = deptName + "," + deptUserResponse.getDeptName(); + } + } + if(deptName.length()!=0){ + authAdminResponse.setDeptName(deptName.substring(1)); + }else{ + authAdminResponse.setDeptName(deptName); } - authAdminResponse.setDeptName(deptName.substring(1)); authAdminResponse.setDepts(depts); } authAdminResponse.setRoles(roles); diff --git a/src/main/java/com/glxp/api/controller/sync/SpsSyncExportStatusController.java b/src/main/java/com/glxp/api/controller/sync/SpsSyncExportStatusController.java index 4b0bdfdb1..a15eccff2 100644 --- a/src/main/java/com/glxp/api/controller/sync/SpsSyncExportStatusController.java +++ b/src/main/java/com/glxp/api/controller/sync/SpsSyncExportStatusController.java @@ -1,6 +1,7 @@ package com.glxp.api.controller.sync; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; import com.github.pagehelper.PageInfo; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; @@ -60,7 +61,9 @@ public class SpsSyncExportStatusController { @PostMapping("/spssync/basic/udiinfo/deleteByStatus") public BaseResponse deleteByStatus(@RequestBody DeleteRequest deleteRequest) { - + if (StrUtil.isBlank(deleteRequest.getId())) { + return ResultVOUtils.error(500, "缺少唯一标识"); + } boolean b = basicExportService.deleteById(deleteRequest.getId()); redisUtil.del(deleteRequest.getId()); if (b) diff --git a/src/main/java/com/glxp/api/dao/auth/DeptDao.java b/src/main/java/com/glxp/api/dao/auth/DeptDao.java index 1750556ed..0f72e36ce 100644 --- a/src/main/java/com/glxp/api/dao/auth/DeptDao.java +++ b/src/main/java/com/glxp/api/dao/auth/DeptDao.java @@ -17,6 +17,8 @@ public interface DeptDao { List filterGroupInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest); + List selectByIdCode(@Param("List") List list); + boolean insertInvWarehouse(DeptEntity DeptEntity); boolean updateInvWarehouse(DeptEntity DeptEntity); @@ -49,6 +51,10 @@ public interface DeptDao { boolean updateTime(@Param("code") String code, @Param("updateTime") Date updateTime); + List getDeptById(@Param("ids") List ids); + + List selectByPcode(@Param("pcode") String pcode); + DeptEntity selectByThirdSys(@Param("thirdIdSys") String thirdIdSys, @Param("thirdId") String thirdId); /** @@ -63,4 +69,8 @@ public interface DeptDao { * @return */ String selectNameByCode(@Param("code") String code); + + List selectupDeptAll(@Param("pcode") String pCode); + + List selectLowDeptAll(@Param("pcode") String pCode); } diff --git a/src/main/java/com/glxp/api/dao/auth/DeptUserDao.java b/src/main/java/com/glxp/api/dao/auth/DeptUserDao.java index dc10b7efd..b43f8987f 100644 --- a/src/main/java/com/glxp/api/dao/auth/DeptUserDao.java +++ b/src/main/java/com/glxp/api/dao/auth/DeptUserDao.java @@ -16,6 +16,8 @@ public interface DeptUserDao { List selectJoinDeptUser(FilterDeptUserReqeust filterDeptUserReqeust); + List selectJoinDeptUserKey(FilterDeptUserReqeust filterDeptUserReqeust); + boolean delete(@Param("deptId") Long deptId, @Param("userId") Long userId); int deleteById(Integer id); diff --git a/src/main/java/com/glxp/api/dao/auth/InvWarehouseDao.java b/src/main/java/com/glxp/api/dao/auth/InvWarehouseDao.java index 4b5a65a64..d411dd6ed 100644 --- a/src/main/java/com/glxp/api/dao/auth/InvWarehouseDao.java +++ b/src/main/java/com/glxp/api/dao/auth/InvWarehouseDao.java @@ -21,6 +21,11 @@ public interface InvWarehouseDao extends BaseMapperPlus getByWarePcode(@Param("parentCode") String parentCode); + boolean insertInvSubWarehouse(InvWarehouseEntity invWarehouseEntity); boolean updateInvSubWarehouse(InvWarehouseEntity invWarehouseEntity); @@ -96,6 +101,8 @@ public interface InvWarehouseDao extends BaseMapperPlus selectInvById(@Param("InvList") List InvList); + List selectLowWarehouseAll(@Param("pcode") String pCode); } diff --git a/src/main/java/com/glxp/api/entity/auth/InvWarehouseEntity.java b/src/main/java/com/glxp/api/entity/auth/InvWarehouseEntity.java index e3e7f5f98..886697531 100644 --- a/src/main/java/com/glxp/api/entity/auth/InvWarehouseEntity.java +++ b/src/main/java/com/glxp/api/entity/auth/InvWarehouseEntity.java @@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; +import java.util.Date; + @Data @TableName(value = "auth_warehouse") public class InvWarehouseEntity { @@ -84,7 +86,10 @@ public class InvWarehouseEntity { * 是否寄售 */ @TableField(value = "advanceType") - private Boolean advanceType; + private Integer advanceType; + + @TableField(value = "updateTime") + private Date updateTime; @TableField(exist = false) public String thirdName; diff --git a/src/main/java/com/glxp/api/req/auth/FilterAuthUserRequest.java b/src/main/java/com/glxp/api/req/auth/FilterAuthUserRequest.java index f1d1238eb..5037b4a75 100644 --- a/src/main/java/com/glxp/api/req/auth/FilterAuthUserRequest.java +++ b/src/main/java/com/glxp/api/req/auth/FilterAuthUserRequest.java @@ -28,5 +28,5 @@ public class FilterAuthUserRequest extends ListPageRequest { */ private String deptCode; private String invCode; //仓库号 - + private String key; } diff --git a/src/main/java/com/glxp/api/req/auth/FilterInvSubWarehouseRequest.java b/src/main/java/com/glxp/api/req/auth/FilterInvSubWarehouseRequest.java index 85184b738..85c6ecc76 100644 --- a/src/main/java/com/glxp/api/req/auth/FilterInvSubWarehouseRequest.java +++ b/src/main/java/com/glxp/api/req/auth/FilterInvSubWarehouseRequest.java @@ -11,7 +11,7 @@ public class FilterInvSubWarehouseRequest extends ListPageRequest { private String name; private String parentId; private Boolean defaultInv; - private Boolean advanceType; + private Integer advanceType; public String thirdId; public String thirdId1; diff --git a/src/main/java/com/glxp/api/req/basic/FilterBussinessTypeRequest.java b/src/main/java/com/glxp/api/req/basic/FilterBussinessTypeRequest.java index 59ea48443..2163adbfe 100644 --- a/src/main/java/com/glxp/api/req/basic/FilterBussinessTypeRequest.java +++ b/src/main/java/com/glxp/api/req/basic/FilterBussinessTypeRequest.java @@ -44,7 +44,7 @@ public class FilterBussinessTypeRequest extends ListPageRequest { /** * 是否预入库 */ - private Boolean advanceType; + private Integer advanceType; private String type; diff --git a/src/main/java/com/glxp/api/res/auth/InvSubWarehouseResponse.java b/src/main/java/com/glxp/api/res/auth/InvSubWarehouseResponse.java index ac82e6bc6..24ab3cf0b 100644 --- a/src/main/java/com/glxp/api/res/auth/InvSubWarehouseResponse.java +++ b/src/main/java/com/glxp/api/res/auth/InvSubWarehouseResponse.java @@ -21,5 +21,5 @@ public class InvSubWarehouseResponse { private boolean defaultInv; private String parentCode; private String parentInvName; - private Boolean advanceType; + private Integer advanceType; } diff --git a/src/main/java/com/glxp/api/service/auth/DeptService.java b/src/main/java/com/glxp/api/service/auth/DeptService.java index 70e50dcce..b58dafd23 100644 --- a/src/main/java/com/glxp/api/service/auth/DeptService.java +++ b/src/main/java/com/glxp/api/service/auth/DeptService.java @@ -10,7 +10,7 @@ import java.util.List; public interface DeptService { - + List selectByIdCode(List list); DeptEntity findDefault(Boolean advaceType, Boolean isDefault); DeptEntity selectMaxCode(FilterInvWarehouseRequest filterInvWarehouseRequest); @@ -35,6 +35,8 @@ public interface DeptService { boolean deleteById(String id); + List selectByPcode(String pcode); + List selectByNameList(String name); /** @@ -73,4 +75,10 @@ public interface DeptService { boolean updateTime(String code, Date updateTime); + List getDeptById( List ids); + + List selectupDeptAll(String pCode); + + List selectLowDeptAll(String pCode); + } diff --git a/src/main/java/com/glxp/api/service/auth/DeptUserService.java b/src/main/java/com/glxp/api/service/auth/DeptUserService.java index df853215c..977f4b2a7 100644 --- a/src/main/java/com/glxp/api/service/auth/DeptUserService.java +++ b/src/main/java/com/glxp/api/service/auth/DeptUserService.java @@ -13,6 +13,8 @@ public interface DeptUserService { List selectByUserId(Long userId); + List selectByUserIdKey(Long userId); + List selectJoinDeptUser(FilterDeptUserReqeust filterDeptUserReqeust); boolean delete(Long deptId, Long userId); diff --git a/src/main/java/com/glxp/api/service/auth/InvWarehouseService.java b/src/main/java/com/glxp/api/service/auth/InvWarehouseService.java index 35dd24208..7dfe6e0e3 100644 --- a/src/main/java/com/glxp/api/service/auth/InvWarehouseService.java +++ b/src/main/java/com/glxp/api/service/auth/InvWarehouseService.java @@ -12,6 +12,10 @@ import java.util.List; public interface InvWarehouseService { + InvWarehouseEntity getByWareId( String id); + + List getByWarePcode(@Param("parentCode") String parentCode); + InvWarehouseEntity findById(String id); InvWarehouseEntity selectByThrCode(String code, String thirdSys); @@ -86,5 +90,9 @@ public interface InvWarehouseService { String selectParentIdByCode(String invCode); + List selectInvById(List InvList); + List findByLastTime(Date lastUpdateTime); + + List selectLowWarehouseAll(String pCode); } diff --git a/src/main/java/com/glxp/api/service/auth/impl/DeptServiceImpl.java b/src/main/java/com/glxp/api/service/auth/impl/DeptServiceImpl.java index f81197ef1..b4a35958a 100644 --- a/src/main/java/com/glxp/api/service/auth/impl/DeptServiceImpl.java +++ b/src/main/java/com/glxp/api/service/auth/impl/DeptServiceImpl.java @@ -22,6 +22,11 @@ public class DeptServiceImpl implements DeptService { @Resource DeptDao deptDao; + @Override + public List selectByIdCode(List list) { + return deptDao.selectByIdCode(list); + } + @Override public DeptEntity findDefault(Boolean advaceType, Boolean isDefault) { FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest(); @@ -138,6 +143,11 @@ public class DeptServiceImpl implements DeptService { return deptDao.deleteById(id); } + @Override + public List selectByPcode(String pcode) { + return deptDao.selectByPcode(pcode); + } + @Override public void importInvWarehouse(List invWarehouseEntities) { if (CollUtil.isNotEmpty(invWarehouseEntities)) { @@ -173,4 +183,20 @@ public class DeptServiceImpl implements DeptService { public boolean updateTime(String code, Date updateTime) { return deptDao.updateTime(code, updateTime); } + + @Override + public List getDeptById(List ids) { + return deptDao.getDeptById(ids); + } + + @Override + public List selectupDeptAll(String pCode) { + return deptDao.selectupDeptAll(pCode); + } + + @Override + public List selectLowDeptAll(String pCode) { + return deptDao.selectLowDeptAll(pCode); + } + } diff --git a/src/main/java/com/glxp/api/service/auth/impl/DeptUserServiceImpl.java b/src/main/java/com/glxp/api/service/auth/impl/DeptUserServiceImpl.java index 5e7fda2ea..4d2b3f7a3 100644 --- a/src/main/java/com/glxp/api/service/auth/impl/DeptUserServiceImpl.java +++ b/src/main/java/com/glxp/api/service/auth/impl/DeptUserServiceImpl.java @@ -37,6 +37,13 @@ public class DeptUserServiceImpl implements DeptUserService { return deptUserDao.selectJoinDeptUser(filterDeptUserReqeust); } + @Override + public List selectByUserIdKey(Long userId) { + FilterDeptUserReqeust filterDeptUserReqeust = new FilterDeptUserReqeust(); + filterDeptUserReqeust.setUserId(userId); + return deptUserDao.selectJoinDeptUserKey(filterDeptUserReqeust); + } + @Override public List selectJoinDeptUser(FilterDeptUserReqeust filterDeptUserReqeust) { if (filterDeptUserReqeust.getPage() != null) { diff --git a/src/main/java/com/glxp/api/service/auth/impl/InvWarehouseServiceImpl.java b/src/main/java/com/glxp/api/service/auth/impl/InvWarehouseServiceImpl.java index b3144530d..f9a0b38dc 100644 --- a/src/main/java/com/glxp/api/service/auth/impl/InvWarehouseServiceImpl.java +++ b/src/main/java/com/glxp/api/service/auth/impl/InvWarehouseServiceImpl.java @@ -35,6 +35,16 @@ public class InvWarehouseServiceImpl implements InvWarehouseService { @Resource private ThrSystemDao thrSystemDao; + @Override + public InvWarehouseEntity getByWareId(String id) { + return invWarehouseDao.getByWareId(id); + } + + @Override + public List getByWarePcode(String parentCode) { + return invWarehouseDao.getByWarePcode(parentCode); + } + @Override public InvWarehouseEntity findById(String id) { FilterInvSubWarehouseRequest filterInvSubWarehouseRequest = new FilterInvSubWarehouseRequest(); @@ -235,8 +245,18 @@ public class InvWarehouseServiceImpl implements InvWarehouseService { return invWarehouseDao.selectParentIdByCode(invCode); } + @Override + public List selectInvById(List InvList) { + return invWarehouseDao.selectInvById(InvList); + } + @Override public List findByLastTime(Date lastUpdateTime) { return invWarehouseDao.selectList(new QueryWrapper().gt("updateTime", lastUpdateTime)); } + + @Override + public List selectLowWarehouseAll(String pCode) { + return invWarehouseDao.selectLowWarehouseAll(pCode); + } } diff --git a/src/main/resources/mybatis/mapper/auth/DeptDao.xml b/src/main/resources/mybatis/mapper/auth/DeptDao.xml index eacf395c3..40e9d0f2d 100644 --- a/src/main/resources/mybatis/mapper/auth/DeptDao.xml +++ b/src/main/resources/mybatis/mapper/auth/DeptDao.xml @@ -94,6 +94,21 @@ + + + select * + from auth_dept + where id in + + #{item} + + + + + select name from auth_dept where code = #{code} + + + diff --git a/src/main/resources/mybatis/mapper/auth/DeptUserDao.xml b/src/main/resources/mybatis/mapper/auth/DeptUserDao.xml index 6cfb932fc..123fa62ac 100644 --- a/src/main/resources/mybatis/mapper/auth/DeptUserDao.xml +++ b/src/main/resources/mybatis/mapper/auth/DeptUserDao.xml @@ -17,6 +17,30 @@ + + + + + @@ -373,4 +386,26 @@ from auth_warehouse where code = #{invCode} + + + +