编制模块
This commit is contained in:
parent
9ac1ca9852
commit
b7d7912fff
|
|
@ -389,7 +389,7 @@
|
|||
where t.delete_type = 0
|
||||
AND t.ec_department IN
|
||||
<foreach collection="departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||
#{departmentId}
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
AND t.plan_id IN (SELECT id from jcl_org_staffplan s where s.control_dimension = 2)
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -164,8 +164,10 @@ public class FunctionOutStaffServiceImpl {
|
|||
.collect(Collectors.toList());
|
||||
subCompanys.addAll(sub);
|
||||
}
|
||||
|
||||
List<StaffPO> staffPOS = staffMapper().selectByEcCompany(subCompanys);
|
||||
List<StaffPO> staffPOS = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(subCompanys)) {
|
||||
staffPOS = staffMapper().selectByEcCompany(subCompanys);
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(staffPOS)) {
|
||||
staffPOS.forEach(item -> {
|
||||
if (param.getType().getValue() == 3){
|
||||
|
|
@ -193,8 +195,10 @@ public class FunctionOutStaffServiceImpl {
|
|||
.collect(Collectors.toList());
|
||||
subDepartments.addAll(sub);
|
||||
}
|
||||
|
||||
List<StaffPO> staffPOS = staffMapper().selectByEcDepartment(subDepartments);
|
||||
List<StaffPO> staffPOS = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(subDepartments)) {
|
||||
staffPOS = staffMapper().selectByEcDepartment(subDepartments);
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(staffPOS)) {
|
||||
staffPOS.forEach(item -> {
|
||||
if (param.getType().getValue() == 3){
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|||
|
||||
private static final String RIGHT_NAME = "Staff:All";
|
||||
|
||||
private static final Integer HARDCONTROLLER = 2;
|
||||
|
||||
private StaffMapper getStaffMapper() {
|
||||
return MapperProxyFactory.getProxy(StaffMapper.class);
|
||||
}
|
||||
|
|
@ -171,6 +173,9 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|||
}
|
||||
OrganizationAssert.isFalse(staffPO.getStaffNum() < 0, "调整后编制数小于0,请更正");
|
||||
StaffBO.buildStaffDesc(staffPO);
|
||||
if (staffPO.getControlPolicy().equals(HARDCONTROLLER) && staffPO.getStaffNum() < (staffPO.getPermanentNum() + staffPO.getFreezeNum())){
|
||||
throw new OrganizationRunTimeException("存在编制超编风险,请先修改控制策略");
|
||||
}
|
||||
// 更新主表
|
||||
int updateStaff = getStaffMapper().updateStaff(staffPO);
|
||||
// 同步组织架构图编制信息
|
||||
|
|
|
|||
Loading…
Reference in New Issue