删除专业的同时删除员工(假删)

hehai
shijie 4 years ago
parent 0d012f55de
commit 75add4bdc2
  1. 12
      src/main/java/com/msdw/tms/controller/SystemSettingController.java
  2. 2
      src/main/java/com/msdw/tms/dao/SystemSetttingDao.java
  3. 2
      src/main/java/com/msdw/tms/service/SystemSetttingService.java
  4. 5
      src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java
  5. 4
      src/main/resources/mapper/tms/SystemSetting.xml

@ -110,6 +110,18 @@ public class SystemSettingController implements SystemSetttingApi {
return R.ok(); return R.ok();
} }
/**
* 删除专业的同时删除员工假删
* @return
*/
@GetMapping("/dalStaffByProfessionalId")
public R dalStaffByProfessionalId(@RequestParam("staffProfessionalArchitectureId") Integer staffProfessionalArchitectureId){
//根据staffGradeId查询staff表中的userId,然后调用批量删除员工信息接口
List<Integer> userIds = systemSetttingService.queryUserIdsByProfessionalId(staffProfessionalArchitectureId);
systemSetttingService.daleteBatchStaff(userIds);
return R.ok();
}
/** /**
* 新增部门 * 新增部门
*/ */

@ -59,4 +59,6 @@ public interface SystemSetttingDao {
List<StaffVo> queryAccount(String account,Integer schoolId); List<StaffVo> queryAccount(String account,Integer schoolId);
List<Integer> queryUserIdsByGradeId(Integer staffGradeId); List<Integer> queryUserIdsByGradeId(Integer staffGradeId);
List<Integer> queryUserIdsByProfessionalId(Integer staffProfessionalArchitectureId);
} }

@ -38,4 +38,6 @@ public interface SystemSetttingService {
R resetPwd(Integer userId,String newPwd); R resetPwd(Integer userId,String newPwd);
List<Integer> queryUserIdsByGradeId(Integer staffGradeId); List<Integer> queryUserIdsByGradeId(Integer staffGradeId);
List<Integer> queryUserIdsByProfessionalId(Integer staffProfessionalArchitectureId);
} }

@ -742,4 +742,9 @@ public class SystemSettingServiceImpl implements SystemSetttingService {
return systemSetttingDao.queryUserIdsByGradeId(staffGradeId); return systemSetttingDao.queryUserIdsByGradeId(staffGradeId);
} }
@Override
public List<Integer> queryUserIdsByProfessionalId(Integer staffProfessionalArchitectureId) {
return systemSetttingDao.queryUserIdsByProfessionalId(staffProfessionalArchitectureId);
}
} }

@ -198,4 +198,8 @@ WHERE
<select id="queryUserIdsByGradeId" resultType="java.lang.Integer"> <select id="queryUserIdsByGradeId" resultType="java.lang.Integer">
select userId from staff where staffGradeId =#{staffGradeId} and isdel = 0 select userId from staff where staffGradeId =#{staffGradeId} and isdel = 0
</select> </select>
<select id="queryUserIdsByProfessionalId" resultType="java.lang.Integer">
select userId from staff where staffProfessionalArchitectureId =#{staffProfessionalArchitectureId} and isdel = 0
</select>
</mapper> </mapper>
Loading…
Cancel
Save