薪酬系统-pg数据库适配,福利档案状态变换异常问题修复

This commit is contained in:
sy 2023-06-25 17:56:18 +08:00
parent 1bb9b939f0
commit 3657abe41b
3 changed files with 18 additions and 8 deletions

View File

@ -1,9 +1,7 @@
package com.engine.salary.mapper.siarchives;
import com.engine.salary.entity.salarysob.po.SalarySobEmpFieldPO;
import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam;
import com.engine.salary.entity.siarchives.po.InsuranceArchivesBaseInfoPO;
import com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;

View File

@ -202,11 +202,11 @@
WHERE t.delete_type = 0
AND t.run_status = '3'
AND (
(social.social_end_time is not null and social.social_end_time <![CDATA[ <> ]]> ' ' and social.social_end_time <![CDATA[ > ]]> #{today})
(social.social_end_time is not null and social.social_end_time <![CDATA[ > ]]> #{today})
OR
(fund.fund_end_time is not null and fund.fund_end_time <![CDATA[ <> ]]> ' ' and fund.fund_end_time <![CDATA[ > ]]> #{today})
(fund.fund_end_time is not null and fund.fund_end_time <![CDATA[ > ]]> #{today})
OR
(other.other_end_time is not null and other.other_end_time <![CDATA[ <> ]]> ' ' and other.other_end_time <![CDATA[ > ]]> #{today})
(other.other_end_time is not null and other.other_end_time <![CDATA[ > ]]> #{today})
)
</select>
@ -219,9 +219,9 @@
LEFT JOIN( SELECT other.payment_organization, other.employee_id, other.other_end_time, other.other_scheme_id FROM hrsa_other_archives other WHERE other.delete_type = 0 )other ON t.employee_id = other.employee_id AND t.payment_organization = other.payment_organization
WHERE t.delete_type = 0
AND t.run_status = '2'
AND (social.social_scheme_id is null or (social.social_end_time is not null and social.social_end_time <![CDATA[ <> ]]> ' ' and social.social_end_time <![CDATA[ <= ]]> #{today}))
AND (fund.fund_scheme_id is null or (fund.fund_end_time is not null and fund.fund_end_time <![CDATA[ <> ]]> ' ' and fund.fund_end_time <![CDATA[ <= ]]> #{today}))
AND (other.other_scheme_id is null or (other.other_end_time is not null and other.other_end_time <![CDATA[ <> ]]> ' ' and other.other_end_time <![CDATA[ <= ]]> #{today}))
AND (social.social_scheme_id is null or (social.social_end_time is not null and social.social_end_time <![CDATA[ <= ]]> #{today}))
AND (fund.fund_scheme_id is null or (fund.fund_end_time is not null and fund.fund_end_time <![CDATA[ <= ]]> #{today}))
AND (other.other_scheme_id is null or (other.other_end_time is not null and other.other_end_time <![CDATA[ <= ]]> #{today}))
</select>
<select id="getAbnormalList" resultType="com.engine.salary.entity.siarchives.po.InsuranceArchivesBaseInfoPO">

View File

@ -1099,11 +1099,15 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
String socialStartDate = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91319, "社保起始缴纳月")).get(SalaryI18nUtil.getI18nLabel(91319, "社保起始缴纳月"));
if (StringUtils.isNotBlank(socialStartDate) && socialStartDate.length() > 7) {
socialStartDate = socialStartDate.substring(0, 7);
} else if (StringUtils.isBlank(socialStartDate)){
socialStartDate = null;
}
insuranceArchivesSocialSchemePO.setSocialStartTime(socialStartDate);
String socialEndDate = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91320, "社保最后缴纳月")).get(SalaryI18nUtil.getI18nLabel(91320, "社保最后缴纳月"));
if (StringUtils.isNotBlank(socialEndDate) && socialEndDate.length() > 7) {
socialEndDate = socialEndDate.substring(0, 7);
} else if (StringUtils.isBlank(socialEndDate)){
socialEndDate = null;
}
insuranceArchivesSocialSchemePO.setSocialEndTime(socialEndDate);
insuranceArchivesSocialSchemePO.setTenantKey("");
@ -1154,12 +1158,16 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
String fundStartDate = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91483, "公积金起始缴纳月")).get(SalaryI18nUtil.getI18nLabel(91483, "公积金起始缴纳月"));
if (StringUtils.isNotBlank(fundStartDate) && fundStartDate.length() > 7) {
fundStartDate = fundStartDate.substring(0, 7);
} else if (StringUtils.isBlank(fundStartDate)){
fundStartDate = null;
}
insuranceArchivesFundSchemePO.setFundStartTime(fundStartDate);
String fundEndDate = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91484, "公积金最后缴纳月")).get(SalaryI18nUtil.getI18nLabel(91484, "公积金最后缴纳月"));
if (StringUtils.isNotBlank(fundEndDate) && fundEndDate.length() > 7) {
fundEndDate = fundEndDate.substring(0, 7);
} else if (StringUtils.isBlank(fundEndDate)){
fundEndDate = null;
}
insuranceArchivesFundSchemePO.setFundEndTime(fundEndDate);
insuranceArchivesFundSchemePO.setWelfareType(WelfareTypeEnum.ACCUMULATION_FUND.getValue());
@ -1204,11 +1212,15 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
String otherStartDate = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91490, "其他福利起始缴纳月")).get(SalaryI18nUtil.getI18nLabel(91490, "其他福利起始缴纳月"));
if (StringUtils.isNotBlank(otherStartDate) && otherStartDate.length() > 7) {
otherStartDate = otherStartDate.substring(0, 7);
} else if (StringUtils.isBlank(otherStartDate)){
otherStartDate = null;
}
insuranceArchivesOtherSchemePO.setOtherStartTime(otherStartDate);
String otherEndDate = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91494, "其他福利最后缴纳月")).get(SalaryI18nUtil.getI18nLabel(91494, "其他福利最后缴纳月"));
if (StringUtils.isNotBlank(otherEndDate) && otherEndDate.length() > 7) {
otherEndDate = otherEndDate.substring(0, 7);
} else if (StringUtils.isBlank(otherEndDate)){
otherEndDate = null;
}
insuranceArchivesOtherSchemePO.setOtherEndTime(otherEndDate);
insuranceArchivesOtherSchemePO.setPaymentOrganization(paymentNameIdMap.get((String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91497, "个税扣缴义务人")).get(SalaryI18nUtil.getI18nLabel(91497, "个税扣缴义务人"))));