From 0bc201a82b185d7a6cea692266122ef0f4835aee Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Mon, 19 Apr 2021 17:08:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=BB=84=E7=BB=87=E6=9E=B6?= =?UTF-8?q?=E6=9E=84=E7=9A=84=E5=90=8C=E6=97=B6=E5=88=A0=E9=99=A4=E5=91=98?= =?UTF-8?q?=E5=B7=A5=EF=BC=88=E5=81=87=E5=88=A0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../msdw/tms/controller/SystemSettingController.java | 12 ++++++++++++ .../java/com/msdw/tms/dao/SystemSetttingDao.java | 2 ++ .../com/msdw/tms/service/SystemSetttingService.java | 2 ++ .../tms/service/impl/SystemSettingServiceImpl.java | 5 +++++ src/main/resources/mapper/tms/SystemSetting.xml | 4 ++++ 5 files changed, 25 insertions(+) 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