|
@ -21,6 +21,8 @@ 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.function.Function; |
|
|
import java.util.stream.Collectors; |
|
|
import java.util.stream.Collectors; |
|
@ -143,7 +145,11 @@ public class AggreGridServiceImpl implements AggreGridService { |
|
|
GridMemberDataAnalysisResultDTO data = gridAndData.get(d.getGridId()); |
|
|
GridMemberDataAnalysisResultDTO data = gridAndData.get(d.getGridId()); |
|
|
if (data != null) { |
|
|
if (data != null) { |
|
|
data.setPatrolTimes(d.getPatrolTimes()); |
|
|
data.setPatrolTimes(d.getPatrolTimes()); |
|
|
data.setTotalTime(d.getTotalTime()); |
|
|
|
|
|
|
|
|
// 巡查时长,转为h为单位
|
|
|
|
|
|
double f = ((double)d.getTotalTime()) / 3600; |
|
|
|
|
|
BigDecimal h = new BigDecimal(f).setScale(2, RoundingMode.HALF_UP); |
|
|
|
|
|
data.setTotalTime(h.doubleValue()); |
|
|
data.setPatrolRoutineWorkTimes(d.getPatrolRoutineWorkTimes()); |
|
|
data.setPatrolRoutineWorkTimes(d.getPatrolRoutineWorkTimes()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|