|
|
|
|
@ -208,20 +208,26 @@ public class DataAnalysisServiceImpl implements IDataAnalysisService {
|
|
|
|
|
@Override
|
|
|
|
|
public List<Map<String, String>> pointTimeSiteReport(Map map) {
|
|
|
|
|
List<Map<String, String>> resultList = new ArrayList<>();
|
|
|
|
|
if (String.valueOf(map.get("startTime")).equals("") || String.valueOf(map.get("endTime")).equals("")){
|
|
|
|
|
Object startTime = map.get("startTime");
|
|
|
|
|
Object endTime = map.get("endTime");
|
|
|
|
|
if (startTime == null || endTime == null
|
|
|
|
|
|| StringUtils.isEmpty(String.valueOf(startTime))
|
|
|
|
|
|| StringUtils.isEmpty(String.valueOf(endTime))) {
|
|
|
|
|
return resultList;
|
|
|
|
|
}
|
|
|
|
|
String monitorId = String.valueOf(map.get("monitorId"));
|
|
|
|
|
T_Monitor tMonitor = new T_Monitor();
|
|
|
|
|
tMonitor.setpMonitorid(monitorId);
|
|
|
|
|
List<T_Monitor> tMonitors = t_MonitorMapper.selectT_MonitorList(tMonitor);
|
|
|
|
|
if (!tMonitors.isEmpty()) {
|
|
|
|
|
List<String> monitorIdList = tMonitors.stream().map(T_Monitor::getMonitorId).collect(Collectors.toList());
|
|
|
|
|
map.put("monitorIdList", monitorIdList);
|
|
|
|
|
map.remove(("monitorId"));
|
|
|
|
|
String monitorId = map.get("monitorId") == null ? "" : String.valueOf(map.get("monitorId")).trim();
|
|
|
|
|
if (StringUtils.isNotEmpty(monitorId) && !"null".equalsIgnoreCase(monitorId)) {
|
|
|
|
|
T_Monitor tMonitor = new T_Monitor();
|
|
|
|
|
tMonitor.setpMonitorid(monitorId);
|
|
|
|
|
List<T_Monitor> tMonitors = t_MonitorMapper.selectT_MonitorList(tMonitor);
|
|
|
|
|
if (!tMonitors.isEmpty()) {
|
|
|
|
|
List<String> monitorIdList = tMonitors.stream().map(T_Monitor::getMonitorId).collect(Collectors.toList());
|
|
|
|
|
map.put("monitorIdList", monitorIdList);
|
|
|
|
|
map.remove("monitorId");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
List<Map<String, String>> repPointTempertures = repPointTempertureMapper.selectpointTimeSiteReport(map);
|
|
|
|
|
resultList = transform(repPointTempertures);
|
|
|
|
|
resultList = transform(repPointTempertures);
|
|
|
|
|
return resultList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -240,7 +246,8 @@ public class DataAnalysisServiceImpl implements IDataAnalysisService {
|
|
|
|
|
String monitorId = originalMap.get("monitorId");
|
|
|
|
|
String monitorName = originalMap.get("monitorName");
|
|
|
|
|
String pointTime = String.valueOf(originalMap.get("pointTime"));
|
|
|
|
|
String expend = String.valueOf(originalMap.get("expend"));
|
|
|
|
|
Object expendValue = originalMap.get("expend");
|
|
|
|
|
String expend = expendValue == null ? "" : String.valueOf(expendValue);
|
|
|
|
|
resultMap.put("monitorId",monitorId);
|
|
|
|
|
resultMap.put("monitorName",monitorName);
|
|
|
|
|
resultMap.put("expend"+ pointTime,expend);
|
|
|
|
|
|