Commit 7263208e authored by suhuiguang's avatar suhuiguang

1.平均救援时间格式化去掉小数,否则前端展示不完整

parent ac07f6d8
...@@ -596,7 +596,7 @@ public class ZLDPStatisticsServiceImpl { ...@@ -596,7 +596,7 @@ public class ZLDPStatisticsServiceImpl {
JSONObject jsonObject5 = new JSONObject(); JSONObject jsonObject5 = new JSONObject();
jsonObject5.put("key", "pjjysj"); jsonObject5.put("key", "pjjysj");
jsonObject5.put("value", ValidationUtil.isEmpty(statistics.getAvgTime()) ? 0 : statistics.getAvgTime()); jsonObject5.put("value", ValidationUtil.isEmpty(statistics.getAvgTime()) ? 0 : this.roundString(statistics.getAvgTime()));
jsonObject5.put("name", "平均救援时间"); jsonObject5.put("name", "平均救援时间");
String orgCode = stCommonService.getAndSetOrgCode(regionCode); String orgCode = stCommonService.getAndSetOrgCode(regionCode);
...@@ -647,6 +647,10 @@ public class ZLDPStatisticsServiceImpl { ...@@ -647,6 +647,10 @@ public class ZLDPStatisticsServiceImpl {
return jsonArray; return jsonArray;
} }
private Long roundString(String avgTime) {
return Math.round(new Double(avgTime));
}
private Long getQuestionNumber(String problemType, DPFilterParamDto params, String orgCode) { private Long getQuestionNumber(String problemType, DPFilterParamDto params, String orgCode) {
return alertStatisticsMapper.countProblemByTypeDateAndOrgCode(problemType, params, orgCode); return alertStatisticsMapper.countProblemByTypeDateAndOrgCode(problemType, params, orgCode);
} }
......
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