薪酬系统-福利台账,福利缴纳周期核算时考虑起始缴纳月相关逻辑,福利补缴不允许补缴起始缴纳月之前的月份
This commit is contained in:
parent
45d9fa4c12
commit
de5b5d4c19
|
|
@ -553,6 +553,8 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
});
|
||||
}
|
||||
//判断核算周期、核算月、福利起始缴纳月的关系
|
||||
checkCycleSettingWithStartMonth(otherPerson, billMonth, otherPO.getOtherStartTime());
|
||||
|
||||
List<BigDecimal> otherPer = new ArrayList<>();
|
||||
Map<String, String> otherPerJsonMap = new HashMap<>();
|
||||
|
|
@ -613,6 +615,8 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
});
|
||||
}
|
||||
//判断核算周期、核算月、福利起始缴纳月的关系
|
||||
checkCycleSettingWithStartMonth(otherCom, billMonth, otherPO.getOtherStartTime());
|
||||
|
||||
List<BigDecimal> otherComList = new ArrayList<>();
|
||||
Map<String, String> otherComJsonMap = new HashMap<>();
|
||||
|
|
@ -691,6 +695,8 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
});
|
||||
}
|
||||
//判断核算周期、核算月、福利起始缴纳月的关系
|
||||
checkCycleSettingWithStartMonth(fundperson, billMonth, fundPO.getFundStartTime());
|
||||
|
||||
List<BigDecimal> fundPer = new ArrayList<>();
|
||||
Map<String, String> fundPerJsonMap = new HashMap<>();
|
||||
|
|
@ -750,6 +756,8 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
});
|
||||
}
|
||||
//判断核算周期、核算月、福利起始缴纳月的关系
|
||||
checkCycleSettingWithStartMonth(fundCom, billMonth, fundPO.getFundStartTime());
|
||||
|
||||
List<BigDecimal> fundComList = new ArrayList<>();
|
||||
Map<String, String> fundComJsonMap = new HashMap<>();
|
||||
|
|
@ -831,6 +839,8 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
});
|
||||
}
|
||||
//判断核算周期、核算月、福利起始缴纳月的关系
|
||||
checkCycleSettingWithStartMonth(schemeperson, billMonth, socialPO.getSocialStartTime());
|
||||
|
||||
List<BigDecimal> socialPer = new ArrayList<>();
|
||||
Map<String, String> socialPerJsonMap = new HashMap<>();
|
||||
|
|
@ -890,6 +900,8 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
});
|
||||
}
|
||||
//判断核算周期、核算月、福利起始缴纳月的关系
|
||||
checkCycleSettingWithStartMonth(schemeCom, billMonth, socialPO.getSocialStartTime());
|
||||
|
||||
List<BigDecimal> socialCom = new ArrayList<>();
|
||||
Map<String, String> sociaComJsonMap = new HashMap<>();
|
||||
|
|
@ -938,6 +950,29 @@ public class SIAccountBiz extends Service {
|
|||
return insuranceAccountDetailPO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 对于核算月和福利起始缴纳月处于同年时,要避免根据周期缴纳福利费用时,可能出现的多余费用缴纳情况
|
||||
* @param schemeDetail 福利方案明细
|
||||
* @param billMonth 核算月
|
||||
* @param startMonth 福利起始缴纳月
|
||||
* @return
|
||||
*/
|
||||
public Map<Long, InsuranceSchemeDetailPO> checkCycleSettingWithStartMonth(Map<Long, InsuranceSchemeDetailPO> schemeDetail, String billMonth, String startMonth) {
|
||||
String billYear = billMonth.substring(0,4);
|
||||
if (StringUtils.isNotBlank(startMonth) && billYear.equals(startMonth.substring(0,4))) {
|
||||
int startMonthIndex = Integer.parseInt(startMonth.split("-")[1]) - 1;
|
||||
schemeDetail.forEach((k, v) -> {
|
||||
if (v.getPaymentCycle() != null && v.getPaymentCycle().equals(1) && startMonthIndex != 0) {
|
||||
StringBuilder newCycleSetting = new StringBuilder(v.getCycleSetting());
|
||||
newCycleSetting.setCharAt(startMonthIndex - 1, '1');
|
||||
v.setCycleSetting(newCycleSetting.toString());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
return schemeDetail;
|
||||
}
|
||||
|
||||
public void batchSaveAccountInspectDetail(List<InsuranceAccountDetailPO> list, String billMonth, String tenantKey) {
|
||||
List<InsuranceAccountInspectPO> insuranceAccountInspectAllPOS = accountInspect(list, true);
|
||||
batchDelInspectDetail(insuranceAccountInspectAllPOS);
|
||||
|
|
@ -1338,7 +1373,9 @@ public class SIAccountBiz extends Service {
|
|||
insuranceAccountDetailPO.setOtherPayOrg(otherPO.getPaymentOrganization());
|
||||
insuranceAccountDetailPO.setOtherSchemeId(otherPO.getOtherSchemeId());
|
||||
insuranceAccountDetailPO.setOtherPaymentBaseString(otherPO.getOtherPaymentBaseString());
|
||||
if ((Objects.equals(NonPaymentEnum.YES.getValue(), otherPO.getNonPayment()) || otherPO.getNonPayment() == null) && otherPO.getOtherSchemeId() != null) {
|
||||
//判断是否在起始缴纳月和最后缴纳月之间
|
||||
Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), otherPO.getOtherStartTime(), otherPO.getOtherEndTime());
|
||||
if ((Objects.equals(NonPaymentEnum.YES.getValue(), otherPO.getNonPayment()) || otherPO.getNonPayment() == null) && otherPO.getOtherSchemeId() != null && inDataRange) {
|
||||
List<InsuranceSchemeDetailPO> detailPOS = MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class).queryListBySchemeId(otherPO.getOtherSchemeId());
|
||||
encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class);
|
||||
//方案中包含的需要缴纳其他的个人福利
|
||||
|
|
@ -1358,6 +1395,8 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
});
|
||||
}
|
||||
//判断核算周期、核算月、福利起始缴纳月的关系
|
||||
checkCycleSettingWithStartMonth(otherPerson, billMonth, otherPO.getOtherStartTime());
|
||||
|
||||
List<BigDecimal> otherPer = new ArrayList<>();
|
||||
Map<String, String> otherPerJsonMap = new HashMap<>();
|
||||
|
|
@ -1418,6 +1457,8 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
});
|
||||
}
|
||||
//判断核算周期、核算月、福利起始缴纳月的关系
|
||||
checkCycleSettingWithStartMonth(otherCom, billMonth, otherPO.getOtherStartTime());
|
||||
|
||||
List<BigDecimal> otherComList = new ArrayList<>();
|
||||
Map<String, String> otherComJsonMap = new HashMap<>();
|
||||
|
|
@ -1473,7 +1514,9 @@ public class SIAccountBiz extends Service {
|
|||
insuranceAccountDetailPO.setSupplementFundAccount(fundPO.getSupplementFundAccount());
|
||||
insuranceAccountDetailPO.setFundSchemeId(fundPO.getFundSchemeId());
|
||||
insuranceAccountDetailPO.setFundPaymentBaseString(fundPO.getFundPaymentBaseString());
|
||||
if ((NonPaymentEnum.YES.getValue() == fundPO.getNonPayment() || fundPO.getNonPayment() == null) && fundPO.getFundSchemeId() != null) {
|
||||
//判断是否在起始缴纳月和最后缴纳月之间
|
||||
Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), fundPO.getFundStartTime(), fundPO.getFundEndTime());
|
||||
if ((NonPaymentEnum.YES.getValue() == fundPO.getNonPayment() || fundPO.getNonPayment() == null) && fundPO.getFundSchemeId() != null && inDataRange) {
|
||||
List<InsuranceSchemeDetailPO> detailPOS = MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class).queryListBySchemeId(fundPO.getFundSchemeId());
|
||||
encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class);
|
||||
//方案中包含的需要缴纳社保的个人福利
|
||||
|
|
@ -1493,6 +1536,8 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
});
|
||||
}
|
||||
//判断核算周期、核算月、福利起始缴纳月的关系
|
||||
checkCycleSettingWithStartMonth(fundperson, billMonth, fundPO.getFundStartTime());
|
||||
|
||||
List<BigDecimal> fundPer = new ArrayList<>();
|
||||
Map<String, String> fundPerJsonMap = new HashMap<>();
|
||||
|
|
@ -1552,6 +1597,8 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
});
|
||||
}
|
||||
//判断核算周期、核算月、福利起始缴纳月的关系
|
||||
checkCycleSettingWithStartMonth(fundCom, billMonth, fundPO.getFundStartTime());
|
||||
|
||||
List<BigDecimal> fundComList = new ArrayList<>();
|
||||
Map<String, String> fundComJsonMap = new HashMap<>();
|
||||
|
|
@ -1607,7 +1654,9 @@ public class SIAccountBiz extends Service {
|
|||
insuranceAccountDetailPO.setSocialAccount(socialPO.getSocialAccount());
|
||||
insuranceAccountDetailPO.setSocialSchemeId(socialPO.getSocialSchemeId());
|
||||
insuranceAccountDetailPO.setSocialPaymentBaseString(socialPO.getSocialPaymentBaseString());
|
||||
if ((NonPaymentEnum.YES.getValue() == socialPO.getNonPayment() || socialPO.getNonPayment() == null) && socialPO.getSocialSchemeId() != null) {
|
||||
//判断是否在起始缴纳月和最后缴纳月之间
|
||||
Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), socialPO.getSocialStartTime(), socialPO.getSocialEndTime());
|
||||
if ((NonPaymentEnum.YES.getValue() == socialPO.getNonPayment() || socialPO.getNonPayment() == null) && socialPO.getSocialSchemeId() != null && inDataRange) {
|
||||
List<InsuranceSchemeDetailPO> detailPOS = MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class).queryListBySchemeId(socialPO.getSocialSchemeId());
|
||||
encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class);
|
||||
//方案中包含的需要缴纳社保的个人福利
|
||||
|
|
@ -1631,6 +1680,9 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
});
|
||||
}
|
||||
//判断核算周期、核算月、福利起始缴纳月的关系
|
||||
checkCycleSettingWithStartMonth(schemeperson, billMonth, socialPO.getSocialStartTime());
|
||||
|
||||
List<BigDecimal> socialPer = new ArrayList<>();
|
||||
Map<String, String> socialPerJsonMap = new HashMap<>();
|
||||
needArchivesPerson.forEach(e -> {
|
||||
|
|
@ -1690,6 +1742,8 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
});
|
||||
}
|
||||
//判断核算周期、核算月、福利起始缴纳月的关系
|
||||
checkCycleSettingWithStartMonth(schemeCom, billMonth, socialPO.getSocialStartTime());
|
||||
|
||||
List<BigDecimal> socialCom = new ArrayList<>();
|
||||
Map<String, String> sociaComJsonMap = new HashMap<>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue