diff --git a/src/main/java/com/msdw/tms/controller/SystemSettingController.java b/src/main/java/com/msdw/tms/controller/SystemSettingController.java index 93331e6..70844f9 100644 --- a/src/main/java/com/msdw/tms/controller/SystemSettingController.java +++ b/src/main/java/com/msdw/tms/controller/SystemSettingController.java @@ -98,6 +98,18 @@ public class SystemSettingController implements SystemSetttingApi { return R.ok(); } + /** + * 删除组织架构的同时删除员工(假删) + * @return + */ + @GetMapping("/dalStaffByStaffGradeId") + public R dalStaffByStaffGradeId(@RequestParam("staffGradeId") Integer staffGradeId){ + //根据staffGradeId查询staff表中的userId,然后调用批量删除员工信息接口 + List userIds = systemSetttingService.queryUserIdsByGradeId(staffGradeId); + systemSetttingService.daleteBatchStaff(userIds); + return R.ok(); + } + /** * 新增部门 */ diff --git a/src/main/java/com/msdw/tms/dao/SystemSetttingDao.java b/src/main/java/com/msdw/tms/dao/SystemSetttingDao.java index 7e6848d..737a09a 100644 --- a/src/main/java/com/msdw/tms/dao/SystemSetttingDao.java +++ b/src/main/java/com/msdw/tms/dao/SystemSetttingDao.java @@ -57,4 +57,6 @@ public interface SystemSetttingDao { List judgmentGrade(String name,Integer schoolId); List queryAccount(String account,Integer schoolId); + + List queryUserIdsByGradeId(Integer staffGradeId); } diff --git a/src/main/java/com/msdw/tms/service/SystemSetttingService.java b/src/main/java/com/msdw/tms/service/SystemSetttingService.java index 7b0d6e6..4615751 100644 --- a/src/main/java/com/msdw/tms/service/SystemSetttingService.java +++ b/src/main/java/com/msdw/tms/service/SystemSetttingService.java @@ -36,4 +36,6 @@ public interface SystemSetttingService { R queryAccount(String account,Integer schoolId); R resetPwd(Integer userId,String newPwd); + + List queryUserIdsByGradeId(Integer staffGradeId); } diff --git a/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java index e620417..f553cd1 100644 --- a/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java @@ -512,4 +512,9 @@ public class SystemSettingServiceImpl implements SystemSetttingService { } } + @Override + public List queryUserIdsByGradeId(Integer staffGradeId) { + return systemSetttingDao.queryUserIdsByGradeId(staffGradeId); + } + } \ No newline at end of file diff --git a/src/main/resources/mapper/tms/SystemSetting.xml b/src/main/resources/mapper/tms/SystemSetting.xml index 86f6802..1fefb9e 100644 --- a/src/main/resources/mapper/tms/SystemSetting.xml +++ b/src/main/resources/mapper/tms/SystemSetting.xml @@ -194,4 +194,8 @@ WHERE AND s.isdel = 0 GROUP BY u.userId + + \ No newline at end of file