Commit d56f232b authored by hongguangwu's avatar hongguangwu

MVP1.7.17-离职待办-优化代码

parent f73a69ed
......@@ -1528,7 +1528,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
private boolean judgeToUpdateContract(String isExit, String doType, LocalDateTime nowTime, EmployeeRegistrationLeave leave) {
return (Common.isEmpty(doType) || doType.contains(CommonConstants.FOUR_STRING))
&& Common.isNotNull(leave.getContractIdOld()) && (CommonConstants.ZERO_STRING.equals(isExit)
|| (CommonConstants.ONE_STRING.equals(isExit) && leave.getContractExpectedTime().isBefore(nowTime)))
|| (CommonConstants.ONE_STRING.equals(isExit) && Common.isNotNull(leave.getContractExpectedTime()) && leave.getContractExpectedTime().isBefore(nowTime)))
&& Common.isNotNull(leave.getDoStatusContract())
&& (leave.getDoStatusContract().equals(CommonConstants.TWO_STRING)
|| leave.getDoStatusContract().equals(CommonConstants.THREE_STRING)
......@@ -1539,7 +1539,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
private boolean judgeToUpdateSocial(String isExit, String doType, LocalDateTime nowTime, EmployeeRegistrationLeave leave) {
return (Common.isEmpty(doType) || doType.contains(CommonConstants.ONE_STRING))
&& Common.isNotNull(leave.getSocialDispatchIdOld()) && (CommonConstants.ZERO_STRING.equals(isExit)
|| (CommonConstants.ONE_STRING.equals(isExit) && leave.getSocialExpectedTime().isBefore(nowTime)))
|| (CommonConstants.ONE_STRING.equals(isExit) && Common.isNotNull(leave.getSocialExpectedTime()) && leave.getSocialExpectedTime().isBefore(nowTime)))
&& Common.isNotNull(leave.getDoStatusSocial())
&& (leave.getDoStatusSocial().equals(CommonConstants.TWO_STRING)
|| leave.getDoStatusSocial().equals(CommonConstants.THREE_STRING)
......@@ -1552,7 +1552,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
private boolean judgeToUpdateFund(String isExit, String doType, LocalDateTime nowTime, EmployeeRegistrationLeave leave) {
return (Common.isEmpty(doType) || doType.contains(CommonConstants.TWO_STRING))
&& Common.isNotNull(leave.getFundDispatchIdOld()) && (CommonConstants.ZERO_STRING.equals(isExit)
|| (CommonConstants.ONE_STRING.equals(isExit) && leave.getFundExpectedTime().isBefore(nowTime)))
|| (CommonConstants.ONE_STRING.equals(isExit) && Common.isNotNull(leave.getFundExpectedTime()) && leave.getFundExpectedTime().isBefore(nowTime)))
&& Common.isNotNull(leave.getDoStatusFund())
&& (leave.getDoStatusFund().equals(CommonConstants.TWO_STRING)
|| leave.getDoStatusFund().equals(CommonConstants.THREE_STRING)
......@@ -1565,7 +1565,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
private boolean judgeToUpdateInsurance(String isExit, String doType, LocalDateTime nowTime, EmployeeRegistrationLeave leave) {
return (Common.isEmpty(doType) || doType.contains(CommonConstants.THREE_STRING))
&& Common.isNotNull(leave.getInsuranceIdOld()) && (CommonConstants.ZERO_STRING.equals(isExit)
|| (CommonConstants.ONE_STRING.equals(isExit) && leave.getInsuranceExpectedTime().isBefore(nowTime)))
|| (CommonConstants.ONE_STRING.equals(isExit) && Common.isNotNull(leave.getInsuranceExpectedTime()) && leave.getInsuranceExpectedTime().isBefore(nowTime)))
&& Common.isNotNull(leave.getDoStatusInsurance())
&& (leave.getDoStatusInsurance().equals(CommonConstants.TWO_STRING)
|| leave.getDoStatusInsurance().equals(CommonConstants.THREE_STRING)
......
......@@ -604,19 +604,19 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh
<if test="idList != null and idList.size() > 0">
<if test="doType != null and doType.trim() != ''">
<if test='doType == "1" '>
and a.social_id in
and a.do_status_social not in ('0','1') and a.social_id in
</if>
<if test='doType == "2" '>
and a.fund_id in
and a.do_status_fund not in ('0','1') and a.fund_id in
</if>
<if test='doType == "4" '>
and a.contract_id in
and a.do_status_contract not in ('0','1') and a.contract_id in
</if>
<if test='doType == "5" '>
and a.emp_project_id in
and a.do_status_project not in ('0','1') and a.emp_project_id in
</if>
<if test='doType == "6" '>
and a.emp_id in
and a.do_status_emp not in ('0','1') and a.emp_id in
</if>
<foreach collection="idList" item="param" index="index" open="(" close=")" separator=",">
#{param}
......@@ -633,7 +633,7 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh
<include refid="Base_Column_List"/>
FROM employee_registration_leave a
JOIN employee_registration_leave_insurance i on a.id=i.leave_id
where i.insurance_id in
where a.do_status_insurance not in ('0','1') and a.insurance_id is not null and i.insurance_id in
<foreach collection="idList" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment