Commit 86830f71 authored by suhuiguang's avatar suhuiguang

1.大屏-应急-维保单位平均救援时间排名 调整

parent 6cc81681
...@@ -256,18 +256,19 @@ public class YJDPStatisticsServiceImpl { ...@@ -256,18 +256,19 @@ public class YJDPStatisticsServiceImpl {
Long seconds = Long.valueOf(x.get("avgTime").toString()); Long seconds = Long.valueOf(x.get("avgTime").toString());
long days = TimeUnit.SECONDS.toDays(seconds); long days = TimeUnit.SECONDS.toDays(seconds);
long hours = TimeUnit.SECONDS.toHours(seconds) - TimeUnit.DAYS.toHours(days); long hours = TimeUnit.SECONDS.toHours(seconds) - TimeUnit.DAYS.toHours(days);
long minutes = TimeUnit.SECONDS.toMinutes(seconds) - TimeUnit.HOURS.toMinutes(hours); long minutes = TimeUnit.SECONDS.toMinutes(seconds) - TimeUnit.HOURS.toMinutes(hours) - TimeUnit.SECONDS.toMinutes(days);
if (!ValidationUtil.isEmpty(days) && days > 0) { long sec = seconds - (TimeUnit.DAYS.toSeconds(days) + TimeUnit.HOURS.toSeconds(hours) + TimeUnit.MINUTES.toSeconds(minutes));
if (days > 0) {
avgTime = avgTime + days + "天"; avgTime = avgTime + days + "天";
} }
if (!ValidationUtil.isEmpty(hours) && hours > 0) { if (hours > 0) {
avgTime = avgTime + hours + "小时"; avgTime = avgTime + hours + "小时";
} }
if (!ValidationUtil.isEmpty(minutes) && minutes > 0) { if (minutes > 0) {
avgTime = avgTime + minutes + "分钟"; avgTime = avgTime + minutes + "分钟";
} }
if (seconds < 60) { if (sec > 0) {
avgTime = avgTime + seconds + "秒"; avgTime = avgTime + sec + "秒";
} }
x.put("avgTime", avgTime); x.put("avgTime", avgTime);
}); });
...@@ -276,8 +277,8 @@ public class YJDPStatisticsServiceImpl { ...@@ -276,8 +277,8 @@ public class YJDPStatisticsServiceImpl {
public JSONObject regionEventRank(DPFilterParamDto dpFilterParamDto) { public JSONObject regionEventRank(DPFilterParamDto dpFilterParamDto) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
String orgCodeR = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode()); String orgCodeParent = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode());
if (orgCodeR == null) { if (orgCodeParent == null) {
return jsonObject; return jsonObject;
} }
List<RegionModel> childRegion = stCommonService.setRegionIfRootParentAndNoAccessIf3Level(dpFilterParamDto); List<RegionModel> childRegion = stCommonService.setRegionIfRootParentAndNoAccessIf3Level(dpFilterParamDto);
......
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