From d86b5533e543500eb845359216edfc5c47317ef5 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Fri, 21 May 2021 11:19:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=9E=B6=E6=9E=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/msdw/tms/controller/SystemSettingController.java | 3 +++ src/main/java/com/msdw/tms/dao/SystemSetttingDao.java | 2 ++ .../java/com/msdw/tms/service/SystemSetttingService.java | 1 + .../com/msdw/tms/service/impl/SystemSettingServiceImpl.java | 6 ++++++ src/main/resources/mapper/tms/SystemSetting.xml | 5 +++++ 5 files changed, 17 insertions(+) diff --git a/src/main/java/com/msdw/tms/controller/SystemSettingController.java b/src/main/java/com/msdw/tms/controller/SystemSettingController.java index 48f3346..b45f290 100644 --- a/src/main/java/com/msdw/tms/controller/SystemSettingController.java +++ b/src/main/java/com/msdw/tms/controller/SystemSettingController.java @@ -108,6 +108,9 @@ public class SystemSettingController implements SystemSetttingApi { List userIds = systemSetttingService.queryUserIdsByGradeId(staffGradeId); if(userIds.size()>0){ systemSetttingService.daleteBatchStaff(userIds); + systemSetttingService.daleteBatchStaffPs(staffGradeId); + }else{//如果组织架构下面没有员工,则只删除组织架构 + systemSetttingService.daleteBatchStaffPs(staffGradeId); } 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 4f74d61..a7d2807 100644 --- a/src/main/java/com/msdw/tms/dao/SystemSetttingDao.java +++ b/src/main/java/com/msdw/tms/dao/SystemSetttingDao.java @@ -63,4 +63,6 @@ public interface SystemSetttingDao { List queryUserIdsByProfessionalId(Integer staffProfessionalArchitectureId); List queryStaffId(Integer userId); + + boolean daleteBatchStaffPs(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 93f0865..d75afb4 100644 --- a/src/main/java/com/msdw/tms/service/SystemSetttingService.java +++ b/src/main/java/com/msdw/tms/service/SystemSetttingService.java @@ -41,4 +41,5 @@ public interface SystemSetttingService { List queryUserIdsByProfessionalId(Integer staffProfessionalArchitectureId); + boolean daleteBatchStaffPs(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 58e65eb..87e54a5 100644 --- a/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java @@ -252,6 +252,12 @@ public class SystemSettingServiceImpl implements SystemSetttingService { return result; } + @Override + public boolean daleteBatchStaffPs(Integer staffGradeId) { + boolean result = systemSetttingDao.daleteBatchStaffPs(staffGradeId); + return result; + } + @Override @Transactional diff --git a/src/main/resources/mapper/tms/SystemSetting.xml b/src/main/resources/mapper/tms/SystemSetting.xml index a433787..6dd6eb3 100644 --- a/src/main/resources/mapper/tms/SystemSetting.xml +++ b/src/main/resources/mapper/tms/SystemSetting.xml @@ -65,6 +65,11 @@ #{userId} ) + + + UPDATE staff_grade SET isdel = 1 where staffGradeId = #{staffGradeId} + + UPDATE staff