医疗补助算法整改
This commit is contained in:
+13
-12
@@ -99,9 +99,8 @@ public class MedicalApplyServiceImpl extends BaseServiceImpl<MedicalApply> imple
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
map.put("bxyMoney$", bxyMoney$);
|
||||
|
||||
map.put("totalMoney", hospitalSumMoney$
|
||||
.add(reimbursementMoney$)
|
||||
.add(singleBearMoney$)
|
||||
// 合计金额只统计个人实际承担的费用,住院总额和已报销金额不重复计入。
|
||||
map.put("totalMoney", singleBearMoney$
|
||||
.add(personExpenseMoney$)
|
||||
.add(outpatientServiceMoney$)
|
||||
.add(bxyMoney$));
|
||||
@@ -237,10 +236,10 @@ public class MedicalApplyServiceImpl extends BaseServiceImpl<MedicalApply> imple
|
||||
boolean fullFifYears = DateUtil.thisYear() - Integer.parseInt(user.getAidFundDeductTime()) >= 15;
|
||||
|
||||
|
||||
// 连续缴满15年 或者是 连续缴满10年
|
||||
if (fullFifYears) {
|
||||
// 年限加成仅适用于首次申请;历史已完成申请记录已排除本次申请。
|
||||
if (applyRecords.isEmpty() && fullFifYears) {
|
||||
ratio += medicalSetting.getFifteenYearNeverAddSubsidyRatio();
|
||||
} else if (fullTenYears) {
|
||||
} else if (applyRecords.isEmpty() && fullTenYears) {
|
||||
ratio += medicalSetting.getTenYearNeverAddSubsidyRatio();
|
||||
}
|
||||
|
||||
@@ -261,15 +260,17 @@ public class MedicalApplyServiceImpl extends BaseServiceImpl<MedicalApply> imple
|
||||
//如果是重大疾病
|
||||
allMedicalMoney = personExpenseMoney.add(singleBearMoney).add(outpatientServiceMoney).add(bxyMoney);
|
||||
} else {
|
||||
//个人承担费用
|
||||
singleBearMoney = costs.stream()
|
||||
// 普通疾病以每次住院的个人承担金额是否达到一万元为准,达标记录的自费金额一并计入。
|
||||
List<MedicalApplyCost> eligibleCosts = costs.stream()
|
||||
.filter(cost -> cost.getSingleBearMoney() != null
|
||||
&& cost.getSingleBearMoney().compareTo(BigDecimal.valueOf(10000)) >= 0)
|
||||
.toList();
|
||||
singleBearMoney = eligibleCosts.stream()
|
||||
.map(MedicalApplyCost::getSingleBearMoney)
|
||||
.filter(amount -> amount.compareTo(BigDecimal.valueOf(10000)) >= 0) // >= 10000
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
//自费
|
||||
personExpenseMoney = costs.stream()
|
||||
personExpenseMoney = eligibleCosts.stream()
|
||||
.map(MedicalApplyCost::getPersonExpenseMoney)
|
||||
.filter(amount -> amount.compareTo(BigDecimal.valueOf(10000)) >= 0) // >= 10000
|
||||
.filter(Objects::nonNull)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
allMedicalMoney = personExpenseMoney.add(singleBearMoney).add(outpatientServiceMoney).add(bxyMoney);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user