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