|
|
|
@ -3,6 +3,7 @@ package com.engine.organization.service.impl;
|
|
|
|
|
import com.engine.organization.entity.staff.param.StaffOutParam;
|
|
|
|
|
import com.engine.organization.entity.staff.po.StaffPO;
|
|
|
|
|
import com.engine.organization.enums.StaffChangeEnum;
|
|
|
|
|
import com.engine.organization.exception.OrganizationRunTimeException;
|
|
|
|
|
import com.engine.organization.mapper.staff.StaffMapper;
|
|
|
|
|
import com.engine.organization.util.OrganizationAssert;
|
|
|
|
|
import com.engine.organization.util.db.MapperProxyFactory;
|
|
|
|
@ -62,7 +63,7 @@ public class FunctionOutStaffServiceImpl {
|
|
|
|
|
if (staffPO.getControlPolicy().equals(HARDCONTROLLER)) {
|
|
|
|
|
OrganizationAssert.isFalse(difference.compareTo(sums) < 0,"存在编制超编风险,请先修改控制策略");
|
|
|
|
|
}
|
|
|
|
|
staffPO.setStaffNum(difference);
|
|
|
|
|
staffPO.setStaffNum(difference < 0 ? 0 :difference);
|
|
|
|
|
buildStaffPO(staffPO);
|
|
|
|
|
return staffMapper().updateStaff(staffPO);
|
|
|
|
|
}
|
|
|
|
@ -172,7 +173,7 @@ public class FunctionOutStaffServiceImpl {
|
|
|
|
|
//2.部门
|
|
|
|
|
if (param.getDepartment() != null) {
|
|
|
|
|
String allSupDepartment = departmentComInfo.getAllSupDepartment(String.valueOf(param.getDepartment()));
|
|
|
|
|
if ("".equals(allSupDepartment)) {
|
|
|
|
|
if (!"".equals(allSupDepartment)) {
|
|
|
|
|
Collection<Integer> subDepartments = Arrays.stream(allSupDepartment.split(","))
|
|
|
|
|
.map(Integer::parseInt)
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|