|
@ -21,11 +21,7 @@ import com.google.common.collect.Lists; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
|
|
import java.math.RoundingMode; |
|
|
|
|
|
import java.util.*; |
|
|
import java.util.*; |
|
|
import java.util.function.Function; |
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
@Service |
|
|
@Service |
|
|
public class AggreGridServiceImpl implements AggreGridService { |
|
|
public class AggreGridServiceImpl implements AggreGridService { |
|
@ -144,13 +140,17 @@ public class AggreGridServiceImpl implements AggreGridService { |
|
|
if (gridAndData != null) { |
|
|
if (gridAndData != null) { |
|
|
GridMemberDataAnalysisResultDTO data = gridAndData.get(d.getGridId()); |
|
|
GridMemberDataAnalysisResultDTO data = gridAndData.get(d.getGridId()); |
|
|
if (data != null) { |
|
|
if (data != null) { |
|
|
|
|
|
data.setPatrolRoutineWorkTimes(d.getPatrolRoutineWorkTimes()); |
|
|
data.setPatrolTimes(d.getPatrolTimes()); |
|
|
data.setPatrolTimes(d.getPatrolTimes()); |
|
|
|
|
|
|
|
|
// 巡查时长,转为h为单位
|
|
|
int totalTime = d.getTotalTime(); |
|
|
double f = ((double)d.getTotalTime()) / 3600; |
|
|
if (totalTime > 0){ |
|
|
BigDecimal h = new BigDecimal(f).setScale(2, RoundingMode.HALF_UP); |
|
|
int minutes = totalTime / 60; |
|
|
data.setTotalTime(h.doubleValue()); |
|
|
if (minutes > 0){ |
|
|
data.setPatrolRoutineWorkTimes(d.getPatrolRoutineWorkTimes()); |
|
|
String totalTimeDesc = minutes / 60 + "小时"+ minutes % 60 + "分钟"; |
|
|
|
|
|
data.setTotalTime(totalTimeDesc); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|