Commit ed0b20dd authored by 廖旭伟's avatar 廖旭伟

汇总bug修改

parent b8028932
...@@ -138,8 +138,8 @@ public class CheckAllRecordController extends BaseJsonBodyController { ...@@ -138,8 +138,8 @@ public class CheckAllRecordController extends BaseJsonBodyController {
CheckAllScoreSummaryVo current = checkAllRecordService.getScoreSummary(query); CheckAllScoreSummaryVo current = checkAllRecordService.getScoreSummary(query);
NumberFormat numberFormat = NumberFormat.getPercentInstance(); NumberFormat numberFormat = NumberFormat.getPercentInstance();
numberFormat.setMaximumFractionDigits(2); numberFormat.setMaximumFractionDigits(2);
if (current != null) {
BigDecimal zero = new BigDecimal(0); BigDecimal zero = new BigDecimal(0);
if (current != null) {
model.put("initScore", current.getInitScore()); model.put("initScore", current.getInitScore());
model.put("checkScore", current.getCheckScore()); model.put("checkScore", current.getCheckScore());
model.put("appealScore", current.getAppealScore()); model.put("appealScore", current.getAppealScore());
...@@ -153,10 +153,12 @@ public class CheckAllRecordController extends BaseJsonBodyController { ...@@ -153,10 +153,12 @@ public class CheckAllRecordController extends BaseJsonBodyController {
CheckAllScoreSummaryVo last = checkAllRecordService.getScoreSummary(lastQuery); CheckAllScoreSummaryVo last = checkAllRecordService.getScoreSummary(lastQuery);
if (last != null) { if (last != null) {
if(last.getTotal().compareTo(zero)>0) {
BigDecimal huanbi = current.getTotal().subtract(last.getTotal()); BigDecimal huanbi = current.getTotal().subtract(last.getTotal());
huanbi = huanbi.divide(last.getTotal(), 6, BigDecimal.ROUND_HALF_UP); huanbi = huanbi.divide(last.getTotal(), 6, BigDecimal.ROUND_HALF_UP);
model.put("huanbi", numberFormat.format(huanbi)); model.put("huanbi", numberFormat.format(huanbi));
} }
}
if (query.getSummaryType() == SummaryTopTypeEnum..getValue()) { if (query.getSummaryType() == SummaryTopTypeEnum..getValue()) {
if (last != null) { if (last != null) {
model.put("tongbi", model.get("huanbi")); model.put("tongbi", model.get("huanbi"));
...@@ -177,12 +179,14 @@ public class CheckAllRecordController extends BaseJsonBodyController { ...@@ -177,12 +179,14 @@ public class CheckAllRecordController extends BaseJsonBodyController {
} }
CheckAllScoreSummaryVo tb = checkAllRecordService.getScoreSummary(lastQuery); CheckAllScoreSummaryVo tb = checkAllRecordService.getScoreSummary(lastQuery);
if (tb != null) { if (tb != null) {
if(last.getTotal().compareTo(zero)>0) {
BigDecimal tongbi = current.getTotal().subtract(tb.getTotal()); BigDecimal tongbi = current.getTotal().subtract(tb.getTotal());
tongbi = tongbi.divide(last.getTotal(), 6, BigDecimal.ROUND_HALF_UP); tongbi = tongbi.divide(last.getTotal(), 6, BigDecimal.ROUND_HALF_UP);
model.put("tongbi", numberFormat.format(tongbi)); model.put("tongbi", numberFormat.format(tongbi));
} }
} }
} }
}
model.put("message_info", busiDesc + "成功"); model.put("message_info", busiDesc + "成功");
if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) { if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
......
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