From 75add4bdc2aa345e3f24b9c8b1078b07415baccb Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Mon, 19 Apr 2021 17:27:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=93=E4=B8=9A=E7=9A=84?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E5=88=A0=E9=99=A4=E5=91=98=E5=B7=A5=EF=BC=88?= =?UTF-8?q?=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 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