组织架构修改

hehai
shijie 4 years ago
parent 3e60f8bda8
commit d86b5533e5
  1. 3
      src/main/java/com/msdw/tms/controller/SystemSettingController.java
  2. 2
      src/main/java/com/msdw/tms/dao/SystemSetttingDao.java
  3. 1
      src/main/java/com/msdw/tms/service/SystemSetttingService.java
  4. 6
      src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java
  5. 5
      src/main/resources/mapper/tms/SystemSetting.xml

@ -108,6 +108,9 @@ public class SystemSettingController implements SystemSetttingApi {
List<Integer> userIds = systemSetttingService.queryUserIdsByGradeId(staffGradeId);
if(userIds.size()>0){
systemSetttingService.daleteBatchStaff(userIds);
systemSetttingService.daleteBatchStaffPs(staffGradeId);
}else{//如果组织架构下面没有员工,则只删除组织架构
systemSetttingService.daleteBatchStaffPs(staffGradeId);
}
return R.ok();
}

@ -63,4 +63,6 @@ public interface SystemSetttingDao {
List<Integer> queryUserIdsByProfessionalId(Integer staffProfessionalArchitectureId);
List<Integer> queryStaffId(Integer userId);
boolean daleteBatchStaffPs(Integer staffGradeId);
}

@ -41,4 +41,5 @@ public interface SystemSetttingService {
List<Integer> queryUserIdsByProfessionalId(Integer staffProfessionalArchitectureId);
boolean daleteBatchStaffPs(Integer staffGradeId);
}

@ -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

@ -65,6 +65,11 @@
#{userId}
</foreach>)
</update>
<update id="daleteBatchStaffPs">
UPDATE staff_grade SET isdel = 1 where staffGradeId = #{staffGradeId}
</update>
<update id="updateStaffOnly">
UPDATE staff
<set>

Loading…
Cancel
Save