Browse Source

巡查显示小时分钟 没有为0

master
jianjun 4 years ago
parent
commit
f059a9ccf9
  1. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/AggreGridServiceImpl.java

11
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/AggreGridServiceImpl.java

@ -1,5 +1,6 @@
package com.epmet.dataaggre.service.impl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.page.PageData;
@ -142,12 +143,12 @@ public class AggreGridServiceImpl implements AggreGridService {
if (data != null) {
data.setPatrolRoutineWorkTimes(d.getPatrolRoutineWorkTimes());
data.setPatrolTimes(d.getPatrolTimes());
data.setTotalTime(NumConstant.ZERO_STR);
int totalTime = d.getTotalTime();
if (totalTime > 0){
int minutes = totalTime / 60;
if (minutes > 0){
String totalTimeDesc = minutes / 60 + "小时"+ minutes % 60 + "分钟";
if (totalTime > NumConstant.ZERO){
int minutes = totalTime / NumConstant.SIXTY;
if (minutes > NumConstant.ZERO){
String totalTimeDesc = minutes / NumConstant.SIXTY + "小时"+ minutes % NumConstant.SIXTY + "分钟";
data.setTotalTime(totalTimeDesc);
}
}

Loading…
Cancel
Save