Commit 86830f71 authored by suhuiguang's avatar suhuiguang

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

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