|
|
|
|
@ -1,7 +1,12 @@
|
|
|
|
|
package com.ruoyi.system.service.impl;
|
|
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.Calendar;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
|
|
@ -97,7 +102,21 @@ public class T_W_TemperturedataServiceImpl implements IT_W_TemperturedataService
|
|
|
|
|
if (monitorIdList.isEmpty()) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
t_W_Temperturedata.getParams().put("monitorIdList", monitorIdList);
|
|
|
|
|
Map<String, Object> params = t_W_Temperturedata.getParams();
|
|
|
|
|
Object beginCollectTime = params.get("beginCollectTime");
|
|
|
|
|
if (beginCollectTime == null || StringUtils.isBlank(String.valueOf(beginCollectTime))) {
|
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
|
|
calendar.setTime(new Date());
|
|
|
|
|
calendar.add(Calendar.HOUR, -1);
|
|
|
|
|
Map<String, Object> timeParams = new HashMap<>();
|
|
|
|
|
timeParams.put("beginCollectTime", simpleDateFormat.format(calendar.getTime()));
|
|
|
|
|
timeParams.put("endCollectTime", simpleDateFormat.format(new Date()));
|
|
|
|
|
timeParams.put("monitorIdList", monitorIdList);
|
|
|
|
|
t_W_Temperturedata.setParams(timeParams);
|
|
|
|
|
} else {
|
|
|
|
|
params.put("monitorIdList", monitorIdList);
|
|
|
|
|
}
|
|
|
|
|
return t_W_TemperturedataMapper.selectDistributionCabinetRealTimeMonitor(t_W_Temperturedata);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|