Commit 25b0382b authored by 蔡镇泽's avatar 蔡镇泽

费用结算

parent a3991f66
......@@ -146,7 +146,12 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
} else if (bo.getPlanningFrequencyType() == 3) {
monPlanningFrequency = bo.getPlanningFrequency() * 4;
}
BigDecimal divide = BigDecimal.valueOf(taskDetailsFinishCount).divide(BigDecimal.valueOf(taskDetailsCount), 2, BigDecimal.ROUND_DOWN);
BigDecimal divide;
if (taskDetailsCount == 0) {
divide = BigDecimal.valueOf(0);
} else {
divide = BigDecimal.valueOf(taskDetailsFinishCount).divide(BigDecimal.valueOf(taskDetailsCount), 2, BigDecimal.ROUND_DOWN);
}
BigDecimal divide1 = BigDecimal.valueOf(bo.getItemTimes()).divide(BigDecimal.valueOf(monPlanningFrequency), 2, BigDecimal.ROUND_DOWN);
if (divide.doubleValue() > 1) {
divide = BigDecimal.valueOf(1);
......@@ -154,8 +159,8 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
if (divide1.doubleValue() > 1) {
divide1 = BigDecimal.valueOf(1);
}
BigDecimal comp = divide.multiply(divide1).setScale(4, BigDecimal.ROUND_DOWN);//基护完成率
vo.setCompletionRateFoundationProtection(comp.multiply(BigDecimal.valueOf(100)).doubleValue() + "%");
BigDecimal comp = divide.doubleValue() == 0 ? BigDecimal.valueOf(0) : divide.multiply(divide1).setScale(4, BigDecimal.ROUND_DOWN);//基护完成率
vo.setCompletionRateFoundationProtection(comp.doubleValue() == 0 ? "0%" : comp.multiply(BigDecimal.valueOf(100)).doubleValue() + "%");
//巡护基护完成考核
vo.setPatrolAndBasicProtectionCompletedAssessment("-");
BigDecimal patrolAndBasicProtectionCompletedAssessment = BigDecimal.valueOf(0.8);//巡护基护完成考核
......@@ -251,7 +256,12 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
.eq(ChSrvTaskDetail::getSrvTaskId, srvTaskId)
.in(ChSrvTaskDetail::getIllegalType, 0, 2)
.ne(ChSrvTaskDetail::getStatus, 3));
BigDecimal divide2 = BigDecimal.valueOf(taskDetailsFinishCount2).divide(BigDecimal.valueOf(taskDetailsCount2), 2, BigDecimal.ROUND_DOWN);
BigDecimal divide2;
if (taskDetailsCount2 == 0) {
divide2 = BigDecimal.valueOf(0);
} else {
divide2 = BigDecimal.valueOf(taskDetailsFinishCount2).divide(BigDecimal.valueOf(taskDetailsCount2), 2, BigDecimal.ROUND_DOWN);
}
BigDecimal divide3 = BigDecimal.valueOf(bo.getItemTimes()).divide(BigDecimal.valueOf(monPlanningFrequency), 2, BigDecimal.ROUND_DOWN);
if (divide2.doubleValue() > 1) {
divide2 = BigDecimal.valueOf(1);
......@@ -259,8 +269,8 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
if (divide3.doubleValue() > 1) {
divide3 = BigDecimal.valueOf(1);
}
BigDecimal comp2 = divide2.multiply(divide3).setScale(4, BigDecimal.ROUND_DOWN);//照护完成率
vo.setCareCompletionRate(comp2.multiply(BigDecimal.valueOf(100)).doubleValue() + "%");
BigDecimal comp2 = divide2.doubleValue() == 0 ? BigDecimal.valueOf(0) : divide2.multiply(divide3).setScale(4, BigDecimal.ROUND_DOWN);//照护完成率
vo.setCareCompletionRate(comp2.doubleValue() == 0 ? "0%" : comp2.multiply(BigDecimal.valueOf(100)).doubleValue() + "%");
//巡护照护完成考核
vo.setPatrolCareCompletionAssessment("-");
BigDecimal patrolCareCompletionAssessment = BigDecimal.valueOf(0.8);//巡护照护完成考核
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment