薪酬系统-福利模块bug修复v8,历史数据处理触发全量增员逻辑调整,基数上下限逻辑调整
This commit is contained in:
parent
d279884168
commit
49e1f7624f
|
|
@ -829,24 +829,32 @@ public class SIArchivesBiz {
|
|||
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOList = getInsuranceSchemeDetailMapper().getByPI(primaryId, Long.valueOf(entry.getKey()));
|
||||
log.info("福利方案id: {},, 福利明细项id:{}", primaryId, Long.valueOf(entry.getKey()));
|
||||
if (insuranceSchemeDetailPOList.size() == 0) {
|
||||
log.info("根据福利方案id、险种id、缴纳对象查询明细为null!福利方案id: {}, 缴纳所属: {}, 福利明细项id:{}", primaryId, Long.valueOf(entry.getKey()));
|
||||
log.info("根据福利方案id、险种id、缴纳对象查询明细为null!福利方案id: {}, 福利明细项id:{}", primaryId, Long.valueOf(entry.getKey()));
|
||||
return false;
|
||||
}
|
||||
InsuranceSchemeDetailPO insuranceSchemeDetailPO = insuranceSchemeDetailPOList.get(0);
|
||||
List<InsuranceSchemeDetailPO> isPaymentList = insuranceSchemeDetailPOList.stream()
|
||||
.filter(f -> f.getIsPayment().equals(IsPaymentEnum.YES.getValue()) && f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_PERSON.getValue())).collect(Collectors.toList());
|
||||
if (isPaymentList.size() > 0) {
|
||||
InsuranceSchemeDetailPO insuranceSchemeDetailPO = isPaymentList.get(0);
|
||||
|
||||
InsuranceSchemeDetailPOEncrypt.decryptItem(insuranceSchemeDetailPO);
|
||||
String lowerLimit = "0.000".equals(insuranceSchemeDetailPO.getLowerLimit()) ? null : insuranceSchemeDetailPO.getLowerLimit();
|
||||
String upperLimit = "0.000".equals(insuranceSchemeDetailPO.getUpperLimit()) ? null : insuranceSchemeDetailPO.getUpperLimit();
|
||||
if (lowerLimit != null && lowerLimit.length() > 0 && Double.parseDouble(entry.getValue()) < Double.parseDouble(lowerLimit)) {
|
||||
//数值低于对应福利明细下限
|
||||
log.info("社保基数 {} 数值 {} 低于对应福利明细下限 {}!", entry.getKey(), entry.getValue(), lowerLimit);
|
||||
return false;
|
||||
}
|
||||
if (upperLimit != null && upperLimit.length() > 0 && Double.parseDouble(entry.getValue()) > Double.parseDouble(upperLimit)) {
|
||||
//数值高于对应福利明细上限
|
||||
log.info("社保基数 {} 数值 {} 高于对应福利明细上限 {} !", entry.getKey(), entry.getValue(), upperLimit);
|
||||
return false;
|
||||
InsuranceSchemeDetailPOEncrypt.decryptItem(insuranceSchemeDetailPO);
|
||||
String lowerLimit = "0.000".equals(insuranceSchemeDetailPO.getLowerLimit()) ? null : insuranceSchemeDetailPO.getLowerLimit();
|
||||
String upperLimit = "0.000".equals(insuranceSchemeDetailPO.getUpperLimit()) ? null : insuranceSchemeDetailPO.getUpperLimit();
|
||||
if (lowerLimit != null && lowerLimit.length() > 0 && Double.parseDouble(entry.getValue()) < Double.parseDouble(lowerLimit)) {
|
||||
//数值低于对应福利明细下限
|
||||
log.info("社保基数 {} 数值 {} 低于对应福利明细下限 {}!", entry.getKey(), entry.getValue(), lowerLimit);
|
||||
return false;
|
||||
}
|
||||
if (upperLimit != null && upperLimit.length() > 0 && Double.parseDouble(entry.getValue()) > Double.parseDouble(upperLimit)) {
|
||||
//数值高于对应福利明细上限
|
||||
log.info("社保基数 {} 数值 {} 高于对应福利明细上限 {} !", entry.getKey(), entry.getValue(), upperLimit);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
log.info("福利明细项属于未缴费状态,不对上下限进行约束");
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1454,12 +1462,13 @@ public class SIArchivesBiz {
|
|||
/**
|
||||
* 判断是否需要生成历史福利档案基本信息
|
||||
*/
|
||||
public void createOldInsuranceBaseInfo(Long creator) {
|
||||
public Boolean createOldInsuranceBaseInfo(Long creator) {
|
||||
|
||||
|
||||
StopWatch sw = new StopWatch();
|
||||
log.info("判断是否需要生成历史数据");
|
||||
List<InsuranceArchivesBaseInfoPO> nowBaseInfoList = getInsuranceBaseInfoMapper().getInsuranceBaseInfoList();
|
||||
if (nowBaseInfoList.size() == 0) {
|
||||
StopWatch sw = new StopWatch();
|
||||
log.info("福利档案基础信息表为空,开始生成历史数据:");
|
||||
//处理公积金、其他福利档案中个税扣缴义务人为空的情况
|
||||
sw.start("处理公积金、其他福利档案中个税扣缴义务人为空的情况");
|
||||
|
|
@ -1520,8 +1529,11 @@ public class SIArchivesBiz {
|
|||
partition.forEach(getInsuranceBaseInfoMapper()::batchSave);
|
||||
}
|
||||
sw.stop();
|
||||
log.info("各操作计时 {}", sw.prettyPrint());
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
log.info("各操作计时 {}", sw.prettyPrint());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -186,13 +186,10 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
* @param currentEmployeeId
|
||||
*/
|
||||
private void handleHistoryData(long currentEmployeeId) {
|
||||
List<InsuranceArchivesBaseInfoPO> nowBaseInfoList = getInsuranceBaseInfoMapper().getInsuranceBaseInfoList();
|
||||
if (nowBaseInfoList.size() == 0) {
|
||||
siArchivesBiz.createOldInsuranceBaseInfo(currentEmployeeId);
|
||||
|
||||
//如果触发历史数据处理,则进行一次全量增员
|
||||
if (siArchivesBiz.createOldInsuranceBaseInfo(currentEmployeeId)) {
|
||||
//全量增员
|
||||
allStayAddToPay();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue