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 d7f13037..2ad2f61e 100644 --- a/src/main/java/com/glxp/api/controller/auth/InvWarehouseController.java +++ b/src/main/java/com/glxp/api/controller/auth/InvWarehouseController.java @@ -585,4 +585,10 @@ public class InvWarehouseController extends BaseController { return ResultVOUtils.success(); } + @PostMapping("/warehouse/inout/getDeptById") + public BaseResponse getDeptById(@RequestBody List deptIds) { + List list = deptService.getDeptById(deptIds); + return ResultVOUtils.success(list); + } + } 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 7615dea3..fffcd938 100644 --- a/src/main/java/com/glxp/api/dao/auth/DeptDao.java +++ b/src/main/java/com/glxp/api/dao/auth/DeptDao.java @@ -27,6 +27,8 @@ public interface DeptDao { boolean deleteById(@Param("id") String id); + List getDeptById(@Param("ids") List ids); + String getNameByCode(@Param("fromCorpId") String fromCorpId); Long getIdByCode(@Param("fromCorpId") Long fromCorpId); 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 a98dcf75..ed8b83fb 100644 --- a/src/main/java/com/glxp/api/service/auth/DeptService.java +++ b/src/main/java/com/glxp/api/service/auth/DeptService.java @@ -73,4 +73,6 @@ public interface DeptService { boolean updateTime(String code, Date updateTime); + List getDeptById( List ids); + } 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 df853215..c6875904 100644 --- a/src/main/java/com/glxp/api/service/auth/DeptUserService.java +++ b/src/main/java/com/glxp/api/service/auth/DeptUserService.java @@ -1,8 +1,10 @@ package com.glxp.api.service.auth; +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.auth.DeptUserResponse; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -13,6 +15,8 @@ public interface DeptUserService { List selectByUserId(Long userId); + List getDeptById( List ids); + List selectJoinDeptUser(FilterDeptUserReqeust filterDeptUserReqeust); boolean delete(Long deptId, Long userId); 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 d4dc0c8c..9fcf061c 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 @@ -172,4 +172,9 @@ 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); + } } 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 5e7fda2e..73814f88 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 @@ -2,7 +2,9 @@ package com.glxp.api.service.auth.impl; import cn.hutool.core.collection.CollUtil; import com.github.pagehelper.PageHelper; +import com.glxp.api.dao.auth.DeptDao; import com.glxp.api.dao.auth.DeptUserDao; +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.auth.DeptUserResponse; @@ -19,6 +21,9 @@ public class DeptUserServiceImpl implements DeptUserService { @Resource DeptUserDao deptUserDao; + @Resource + DeptDao deptDao; + @Override @@ -37,6 +42,11 @@ public class DeptUserServiceImpl implements DeptUserService { return deptUserDao.selectJoinDeptUser(filterDeptUserReqeust); } + @Override + public List getDeptById(List ids) { + return deptDao.getDeptById(ids); + } + @Override public List selectJoinDeptUser(FilterDeptUserReqeust filterDeptUserReqeust) { if (filterDeptUserReqeust.getPage() != null) { diff --git a/src/main/resources/mybatis/mapper/auth/DeptDao.xml b/src/main/resources/mybatis/mapper/auth/DeptDao.xml index 46c36627..0d53fda4 100644 --- a/src/main/resources/mybatis/mapper/auth/DeptDao.xml +++ b/src/main/resources/mybatis/mapper/auth/DeptDao.xml @@ -225,6 +225,16 @@ WHERE id = #{id} + + UPDATE auth_dept diff --git a/src/main/resources/mybatis/mapper/auth/DeptUserDao.xml b/src/main/resources/mybatis/mapper/auth/DeptUserDao.xml index 92803701..de48fd49 100644 --- a/src/main/resources/mybatis/mapper/auth/DeptUserDao.xml +++ b/src/main/resources/mybatis/mapper/auth/DeptUserDao.xml @@ -41,7 +41,7 @@ auth_user.employeeName like concat('%', #{key}, '%')) - group by auth_dept_user.userId +