diff --git a/src/main/java/com/msdw/tms/controller/SystemSettingController.java b/src/main/java/com/msdw/tms/controller/SystemSettingController.java index 70844f9..0949acd 100644 --- a/src/main/java/com/msdw/tms/controller/SystemSettingController.java +++ b/src/main/java/com/msdw/tms/controller/SystemSettingController.java @@ -110,6 +110,18 @@ public class SystemSettingController implements SystemSetttingApi { return R.ok(); } + /** + * 删除专业的同时删除员工(假删) + * @return + */ + @GetMapping("/dalStaffByProfessionalId") + public R dalStaffByProfessionalId(@RequestParam("staffProfessionalArchitectureId") Integer staffProfessionalArchitectureId){ + //根据staffGradeId查询staff表中的userId,然后调用批量删除员工信息接口 + List userIds = systemSetttingService.queryUserIdsByProfessionalId(staffProfessionalArchitectureId); + 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 737a09a..970b732 100644 --- a/src/main/java/com/msdw/tms/dao/SystemSetttingDao.java +++ b/src/main/java/com/msdw/tms/dao/SystemSetttingDao.java @@ -59,4 +59,6 @@ public interface SystemSetttingDao { List queryAccount(String account,Integer schoolId); List queryUserIdsByGradeId(Integer staffGradeId); + + List queryUserIdsByProfessionalId(Integer staffProfessionalArchitectureId); } diff --git a/src/main/java/com/msdw/tms/service/SystemSetttingService.java b/src/main/java/com/msdw/tms/service/SystemSetttingService.java index 4615751..64864be 100644 --- a/src/main/java/com/msdw/tms/service/SystemSetttingService.java +++ b/src/main/java/com/msdw/tms/service/SystemSetttingService.java @@ -38,4 +38,6 @@ public interface SystemSetttingService { R resetPwd(Integer userId,String newPwd); List queryUserIdsByGradeId(Integer staffGradeId); + + List queryUserIdsByProfessionalId(Integer staffProfessionalArchitectureId); } 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 6282bc1..6a85643 100644 --- a/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java @@ -742,4 +742,9 @@ public class SystemSettingServiceImpl implements SystemSetttingService { return systemSetttingDao.queryUserIdsByGradeId(staffGradeId); } + @Override + public List queryUserIdsByProfessionalId(Integer staffProfessionalArchitectureId) { + return systemSetttingDao.queryUserIdsByProfessionalId(staffProfessionalArchitectureId); + } + } \ 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 4c61eee..ab1fc96 100644 --- a/src/main/resources/mapper/tms/SystemSetting.xml +++ b/src/main/resources/mapper/tms/SystemSetting.xml @@ -198,4 +198,8 @@ WHERE + + \ No newline at end of file