Merge pull request '测试' (#211) from feature/cl into develop
Reviewed-on: http://221.226.25.34:3000/liang.cheng/weaver-hrm-organization/pulls/211
This commit is contained in:
commit
89cd9761f5
|
|
@ -373,27 +373,25 @@
|
|||
</select>
|
||||
|
||||
<select id="selectByEcCompany" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_staff t
|
||||
WHERE delete_type = 0
|
||||
AND control_policy = 1
|
||||
AND ec_company IN
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM jcl_org_staff t
|
||||
where t.delete_type = 0
|
||||
AND t.ec_company IN
|
||||
<foreach collection="companyIds" open="(" item="companyId" separator="," close=")">
|
||||
#{companyId}
|
||||
</foreach>
|
||||
AND t.plan_id IN (SELECT id from jcl_org_staffplan s where s.control_dimension = 1)
|
||||
</select>
|
||||
|
||||
<select id="selectByEcDepartment" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_staff t
|
||||
WHERE delete_type = 0
|
||||
AND control_policy = 2
|
||||
AND ec_department IN
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM jcl_org_staff t
|
||||
where t.delete_type = 0
|
||||
AND t.ec_department IN
|
||||
<foreach collection="departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||
#{departmentIds}
|
||||
</foreach>
|
||||
AND t.plan_id IN (SELECT id from jcl_org_staffplan s where s.control_dimension = 2)
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|||
String sqlWhere = " where t.delete_type ='0' ";
|
||||
|
||||
String planId = param.getPlanId();
|
||||
if ("".equals(planId)) {
|
||||
if (!"".equals(planId)) {
|
||||
sqlWhere += " AND t.plan_id in (" + planId + ")";
|
||||
} else {
|
||||
sqlWhere = " where 1 = 2 ";
|
||||
|
|
|
|||
Loading…
Reference in New Issue