薪酬系统-福利方案,福利方案新增、编辑、查看方法改进,福利核算加入福利方案中的缴纳周期因素
This commit is contained in:
parent
ae6822dc91
commit
6abc2068ea
|
|
@ -388,11 +388,11 @@ public class SIAccountBiz extends Service {
|
|||
insuranceAccountDetailPO.setPaymentOrganization(paymentOrganization);
|
||||
|
||||
//核算社保
|
||||
accountSocial(insuranceAccountDetailPO, v, tenantKey);
|
||||
accountSocial(insuranceAccountDetailPO, v, billMonth, tenantKey);
|
||||
//核算公积金
|
||||
accountFund(insuranceAccountDetailPO, v, tenantKey);
|
||||
accountFund(insuranceAccountDetailPO, v, billMonth, tenantKey);
|
||||
//核算其他福利
|
||||
accountOther(insuranceAccountDetailPO, v, tenantKey);
|
||||
accountOther(insuranceAccountDetailPO, v, billMonth, tenantKey);
|
||||
//计算合计
|
||||
account(insuranceAccountDetailPO);
|
||||
//临时表PO
|
||||
|
|
@ -524,7 +524,7 @@ public class SIAccountBiz extends Service {
|
|||
return insuranceAccountDetailPO;
|
||||
}
|
||||
|
||||
public InsuranceAccountDetailPO accountOther(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String tenantKey) {
|
||||
public InsuranceAccountDetailPO accountOther(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth, String tenantKey) {
|
||||
if (accountPO.getOther() != null) {
|
||||
InsuranceArchivesOtherSchemePO otherPO = accountPO.getOther();
|
||||
insuranceAccountDetailPO.setOtherPayOrg(otherPO.getPaymentOrganization());
|
||||
|
|
@ -536,8 +536,10 @@ public class SIAccountBiz extends Service {
|
|||
List<InsuranceSchemeDetailPO> detailPOS = MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class).queryListBySchemeId(otherPO.getOtherSchemeId());
|
||||
encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class);
|
||||
//方案中包含的需要缴纳其他的个人福利
|
||||
int monthIndex = Integer.parseInt(billMonth.split("-")[1]) - 1;
|
||||
Map<Long, InsuranceSchemeDetailPO> otherPerson = detailPOS.stream()
|
||||
.filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && item.getPaymentScope() == PaymentScopeEnum.SCOPE_PERSON.getValue())
|
||||
.filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_PERSON.getValue())
|
||||
&& (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1"))))
|
||||
.collect(
|
||||
Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity()));
|
||||
//档案中包含的基数信息
|
||||
|
|
@ -560,7 +562,29 @@ public class SIAccountBiz extends Service {
|
|||
BigDecimal paymentNum = new BigDecimal(StringUtils.isBlank(archivesPerson.get(String.valueOf(e))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
BigDecimal result = new BigDecimal("0");
|
||||
if (po.getPaymentCycle() != null && po.getPaymentCycle() == 1) {
|
||||
int monthValue = 1;
|
||||
for (int i = monthIndex - 1; i >= 0; i--) {
|
||||
String cycleValue = po.getCycleSetting().charAt(i) + "";
|
||||
if (Integer.parseInt(cycleValue) == 1) {
|
||||
break;
|
||||
}
|
||||
monthValue++;
|
||||
}
|
||||
if (po.getAccountType() == 1) {
|
||||
paymentNum = paymentNum.multiply(new BigDecimal(monthValue));
|
||||
fixedCost = fixedCost.multiply(new BigDecimal(monthValue));
|
||||
result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
} else {
|
||||
for (int i = 0; i < monthValue; i++) {
|
||||
result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
}
|
||||
otherPerJsonMap.put(String.valueOf(e), result.toPlainString());
|
||||
otherPer.add(result);
|
||||
});
|
||||
|
|
@ -574,7 +598,8 @@ public class SIAccountBiz extends Service {
|
|||
//方案中包含的需要缴纳公积金的单位福利
|
||||
Map<Long, InsuranceSchemeDetailPO> otherCom = detailPOS.stream()
|
||||
.filter(
|
||||
item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && item.getPaymentScope() == PaymentScopeEnum.SCOPE_COMPANY.getValue())
|
||||
item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_COMPANY.getValue())
|
||||
&& (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1"))))
|
||||
.collect(
|
||||
Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity()));
|
||||
//档案中包含的基数信息
|
||||
|
|
@ -597,7 +622,29 @@ public class SIAccountBiz extends Service {
|
|||
BigDecimal paymentNum = new BigDecimal(StringUtils.isBlank(archivesCom.get(String.valueOf(e))) ? "0" : archivesCom.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
BigDecimal result = new BigDecimal("0");
|
||||
if (Objects.equals(po.getPaymentCycle(), 1)) {
|
||||
int monthValue = 1;
|
||||
for (int i = monthIndex - 1; i >= 0; i--) {
|
||||
String cycleValue = po.getCycleSetting().charAt(i) + "";
|
||||
if (Integer.parseInt(cycleValue) == 1) {
|
||||
break;
|
||||
}
|
||||
monthValue++;
|
||||
}
|
||||
if (po.getAccountType() == 1) {
|
||||
paymentNum = paymentNum.multiply(new BigDecimal(monthValue));
|
||||
fixedCost = fixedCost.multiply(new BigDecimal(monthValue));
|
||||
result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
} else {
|
||||
for (int i = 0; i < monthValue; i++) {
|
||||
result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
}
|
||||
otherComJsonMap.put(String.valueOf(e), result.toPlainString());
|
||||
otherComList.add(result);
|
||||
});
|
||||
|
|
@ -613,7 +660,7 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
|
||||
|
||||
public InsuranceAccountDetailPO accountFund(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String tenantKey) {
|
||||
public InsuranceAccountDetailPO accountFund(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth, String tenantKey) {
|
||||
if (accountPO.getFund() != null) {
|
||||
InsuranceArchivesFundSchemePO fundPO = accountPO.getFund();
|
||||
insuranceAccountDetailPO.setFundPayOrg(fundPO.getPaymentOrganization());
|
||||
|
|
@ -627,8 +674,10 @@ public class SIAccountBiz extends Service {
|
|||
List<InsuranceSchemeDetailPO> detailPOS = MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class).queryListBySchemeId(fundPO.getFundSchemeId());
|
||||
encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class);
|
||||
//方案中包含的需要缴纳社保的个人福利
|
||||
int monthIndex = Integer.parseInt(billMonth.split("-")[1]) - 1;
|
||||
Map<Long, InsuranceSchemeDetailPO> fundperson = detailPOS.stream()
|
||||
.filter(item -> IsPaymentEnum.YES.getValue() == item.getIsPayment() && item.getPaymentScope() == PaymentScopeEnum.SCOPE_PERSON.getValue())
|
||||
.filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_PERSON.getValue())
|
||||
&& (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1"))))
|
||||
.collect(
|
||||
Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity()));
|
||||
//档案中包含的基数信息
|
||||
|
|
@ -651,7 +700,29 @@ public class SIAccountBiz extends Service {
|
|||
BigDecimal paymentNum = new BigDecimal(StringUtils.isBlank(archivesPerson.get(String.valueOf(e))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
BigDecimal result = new BigDecimal("0");
|
||||
if (Objects.equals(po.getPaymentCycle(), 1)) {
|
||||
int monthValue = 1;
|
||||
for (int i = monthIndex - 1; i >= 0; i--) {
|
||||
String cycleValue = po.getCycleSetting().charAt(i) + "";
|
||||
if (Integer.parseInt(cycleValue) == 1) {
|
||||
break;
|
||||
}
|
||||
monthValue++;
|
||||
}
|
||||
if (po.getAccountType() == 1) {
|
||||
paymentNum = paymentNum.multiply(new BigDecimal(monthValue));
|
||||
fixedCost = fixedCost.multiply(new BigDecimal(monthValue));
|
||||
result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
} else {
|
||||
for (int i = 0; i < monthValue; i++) {
|
||||
result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
}
|
||||
fundPerJsonMap.put(String.valueOf(e), result.toPlainString());
|
||||
fundPer.add(result);
|
||||
});
|
||||
|
|
@ -664,7 +735,8 @@ public class SIAccountBiz extends Service {
|
|||
|
||||
//方案中包含的需要缴纳公积金的单位福利
|
||||
Map<Long, InsuranceSchemeDetailPO> fundCom = detailPOS.stream()
|
||||
.filter(item -> IsPaymentEnum.YES.getValue() == item.getIsPayment() && item.getPaymentScope() == PaymentScopeEnum.SCOPE_COMPANY.getValue())
|
||||
.filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_COMPANY.getValue())
|
||||
&& (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1"))))
|
||||
.collect(
|
||||
Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity()));
|
||||
//档案中包含的基数信息
|
||||
|
|
@ -687,8 +759,29 @@ public class SIAccountBiz extends Service {
|
|||
BigDecimal paymentNum = new BigDecimal(StringUtils.isBlank(archivesCom.get(String.valueOf(e))) ? "0" : archivesCom.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
;
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
BigDecimal result = new BigDecimal("0");
|
||||
if (Objects.equals(po.getPaymentCycle(), 1)) {
|
||||
int monthValue = 1;
|
||||
for (int i = monthIndex - 1; i >= 0; i--) {
|
||||
String cycleValue = po.getCycleSetting().charAt(i) + "";
|
||||
if (Integer.parseInt(cycleValue) == 1) {
|
||||
break;
|
||||
}
|
||||
monthValue++;
|
||||
}
|
||||
if (po.getAccountType() == 1) {
|
||||
paymentNum = paymentNum.multiply(new BigDecimal(monthValue));
|
||||
fixedCost = fixedCost.multiply(new BigDecimal(monthValue));
|
||||
result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
} else {
|
||||
for (int i = 0; i < monthValue; i++) {
|
||||
result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
}
|
||||
fundComJsonMap.put(String.valueOf(e), result.toPlainString());
|
||||
fundComList.add(result);
|
||||
});
|
||||
|
|
@ -705,7 +798,7 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
|
||||
|
||||
public InsuranceAccountDetailPO accountSocial(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String tenantKey) {
|
||||
public InsuranceAccountDetailPO accountSocial(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth, String tenantKey) {
|
||||
if (accountPO.getSocial() != null) {
|
||||
InsuranceArchivesSocialSchemePO socialPO = accountPO.getSocial();
|
||||
insuranceAccountDetailPO.setSocialPayOrg(socialPO.getPaymentOrganization());
|
||||
|
|
@ -718,8 +811,13 @@ public class SIAccountBiz extends Service {
|
|||
List<InsuranceSchemeDetailPO> detailPOS = MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class).queryListBySchemeId(socialPO.getSocialSchemeId());
|
||||
encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class);
|
||||
//方案中包含的需要缴纳社保的个人福利
|
||||
int monthIndex = Integer.parseInt(billMonth.split("-")[1]) - 1;
|
||||
Map<Long, InsuranceSchemeDetailPO> schemeperson = detailPOS.stream()
|
||||
.filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_PERSON.getValue()))
|
||||
.filter(item ->
|
||||
Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) &&
|
||||
Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_PERSON.getValue()) &&
|
||||
(item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1")))
|
||||
)
|
||||
.collect(
|
||||
Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity()));
|
||||
//档案中包含的基数信息
|
||||
|
|
@ -736,13 +834,35 @@ public class SIAccountBiz extends Service {
|
|||
|
||||
List<BigDecimal> socialPer = new ArrayList<>();
|
||||
Map<String, String> socialPerJsonMap = new HashMap<>();
|
||||
needArchivesPerson.stream().forEach(e -> {
|
||||
needArchivesPerson.forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = schemeperson.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal(StringUtils.isBlank(archivesPerson.get(String.valueOf(e))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
BigDecimal result = new BigDecimal("0");
|
||||
if (Objects.equals(po.getPaymentCycle(), 1)) {
|
||||
int monthValue = 1;
|
||||
for (int i = monthIndex - 1; i >= 0; i--) {
|
||||
String cycleValue = po.getCycleSetting().charAt(i) + "";
|
||||
if (Integer.parseInt(cycleValue) == 1) {
|
||||
break;
|
||||
}
|
||||
monthValue++;
|
||||
}
|
||||
if (po.getAccountType() == 1) {
|
||||
paymentNum = paymentNum.multiply(new BigDecimal(monthValue));
|
||||
fixedCost = fixedCost.multiply(new BigDecimal(monthValue));
|
||||
result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
} else {
|
||||
for (int i = 0; i < monthValue; i++) {
|
||||
result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
}
|
||||
socialPerJsonMap.put(String.valueOf(e), result.toPlainString());
|
||||
socialPer.add(result);
|
||||
});
|
||||
|
|
@ -755,7 +875,8 @@ public class SIAccountBiz extends Service {
|
|||
|
||||
//方案中包含的需要缴纳社保的单位福利
|
||||
Map<Long, InsuranceSchemeDetailPO> schemeCom = detailPOS.stream()
|
||||
.filter(item -> IsPaymentEnum.YES.getValue() == item.getIsPayment() && item.getPaymentScope() == PaymentScopeEnum.SCOPE_COMPANY.getValue())
|
||||
.filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_COMPANY.getValue()) &&
|
||||
(item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1"))))
|
||||
.collect(
|
||||
Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity()));
|
||||
//档案中包含的基数信息
|
||||
|
|
@ -778,7 +899,29 @@ public class SIAccountBiz extends Service {
|
|||
BigDecimal paymentNum = new BigDecimal(StringUtils.isBlank(archivesCom.get(String.valueOf(e))) ? "0" : archivesCom.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
BigDecimal result = new BigDecimal("0");
|
||||
if (Objects.equals(po.getPaymentCycle(), 1)) {
|
||||
int monthValue = 1;
|
||||
for (int i = monthIndex - 1; i >= 0; i--) {
|
||||
String cycleValue = po.getCycleSetting().charAt(i) + "";
|
||||
if (Integer.parseInt(cycleValue) == 1) {
|
||||
break;
|
||||
}
|
||||
monthValue++;
|
||||
}
|
||||
if (po.getAccountType() == 1) {
|
||||
paymentNum = paymentNum.multiply(new BigDecimal(monthValue));
|
||||
fixedCost = fixedCost.multiply(new BigDecimal(monthValue));
|
||||
result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
} else {
|
||||
for (int i = 0; i < monthValue; i++) {
|
||||
result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
}
|
||||
sociaComJsonMap.put(String.valueOf(e), result.toPlainString());
|
||||
socialCom.add(result);
|
||||
|
||||
|
|
|
|||
|
|
@ -79,6 +79,9 @@ public class SISchemeBiz {
|
|||
.insuranceName(item.getInsuranceName())
|
||||
.paymentScope(e.getDefaultLabel())
|
||||
.rententionRule(String.valueOf(RententionRuleEnum.ROUND.getValue()))
|
||||
.cycleSetting("000000000000")
|
||||
.paymentCycle("0")
|
||||
.accountType("0")
|
||||
.build();
|
||||
if (Objects.equals(item.getDataType(), DataTypeEnum.SYSTEM.getValue())) {
|
||||
insuranceSchemeDetailDTO.setIsPayment(true);
|
||||
|
|
@ -98,6 +101,21 @@ public class SISchemeBiz {
|
|||
if (insuranceSchemeDetailPO.getIsPayment() != null) {
|
||||
insuranceSchemeDetailDTO.setIsPayment(Objects.equals(insuranceSchemeDetailPO.getIsPayment(), IsPaymentEnum.YES.getValue()));
|
||||
}
|
||||
if (insuranceSchemeDetailPO.getPaymentCycle() != null) {
|
||||
insuranceSchemeDetailDTO.setPaymentCycle(insuranceSchemeDetailPO.getPaymentCycle() + "");
|
||||
} else {
|
||||
insuranceSchemeDetailDTO.setPaymentCycle("0");
|
||||
}
|
||||
if (insuranceSchemeDetailPO.getAccountType() != null) {
|
||||
insuranceSchemeDetailDTO.setAccountType(insuranceSchemeDetailPO.getAccountType() + "");
|
||||
} else {
|
||||
insuranceSchemeDetailDTO.setAccountType("0");
|
||||
}
|
||||
if (insuranceSchemeDetailPO.getCycleSetting() == null) {
|
||||
insuranceSchemeDetailDTO.setCycleSetting("000000000000");
|
||||
} else {
|
||||
insuranceSchemeDetailDTO.setCycleSetting(insuranceSchemeDetailPO.getCycleSetting());
|
||||
}
|
||||
if (StringUtils.isNotBlank(insuranceSchemeDetailPO.getUpperLimit())) {
|
||||
BigDecimal bigDecimal = new BigDecimal(insuranceSchemeDetailPO.getUpperLimit());
|
||||
insuranceSchemeDetailDTO.setUpperLimit(numberCheck(bigDecimal.toPlainString()) ? null : bigDecimal);
|
||||
|
|
|
|||
|
|
@ -72,6 +72,9 @@ public class InsuranceSchemeBO {
|
|||
.upperLimit(item.getUpperLimit() != null ? item.getUpperLimit().toString() : "0.000")
|
||||
.paymentProportion(item.getPaymentProportion() != null ? item.getPaymentProportion().toString() : "0.0000")
|
||||
.rententionRule(item.getRententionRule() != null ? Integer.valueOf(item.getRententionRule()) : null)
|
||||
.paymentCycle(Integer.parseInt(item.getPaymentCycle()))
|
||||
.cycleSetting(item.getCycleSetting())
|
||||
.accountType(Integer.parseInt(item.getAccountType()))
|
||||
.updateTime(new Date())
|
||||
.validNum(item.getValidNum())
|
||||
.build()
|
||||
|
|
|
|||
|
|
@ -128,6 +128,9 @@
|
|||
fixed_cost,
|
||||
valid_num,
|
||||
rentention_rule,
|
||||
payment_cycle,
|
||||
account_type,
|
||||
cycle_setting,
|
||||
create_time,
|
||||
update_time,
|
||||
creator,
|
||||
|
|
@ -147,6 +150,9 @@
|
|||
#{fixedCost},
|
||||
#{validNum},
|
||||
#{rententionRule},
|
||||
#{paymentCycle},
|
||||
#{accountType},
|
||||
#{cycleSetting},
|
||||
#{createTime},
|
||||
#{updateTime},
|
||||
#{creator},
|
||||
|
|
@ -174,6 +180,9 @@
|
|||
fixed_cost,
|
||||
valid_num,
|
||||
rentention_rule,
|
||||
payment_cycle,
|
||||
account_type,
|
||||
cycle_setting,
|
||||
create_time,
|
||||
update_time,
|
||||
creator,
|
||||
|
|
@ -193,6 +202,9 @@
|
|||
#{fixedCost},
|
||||
#{validNum},
|
||||
#{rententionRule},
|
||||
#{paymentCycle},
|
||||
#{accountType},
|
||||
#{cycleSetting},
|
||||
#{createTime},
|
||||
#{updateTime},
|
||||
#{creator},
|
||||
|
|
|
|||
Loading…
Reference in New Issue