change - 修复无数据bug

master
yinq 3 months ago
parent 9a6bacd8f8
commit 4899d48f69

@ -74,7 +74,11 @@ public class TemAndHumReportController extends BaseController {
calendar.setTime(new Date());
calendar.add(Calendar.MINUTE, -10);
if(t_W_Temperturedata.getMonitorId().equals("null")){
t_W_Temperturedata.setMonitorId(getMonitorInfo().getMonitorId());
String monitorId = getMonitorInfo().getMonitorId();
if (StringUtils.isNotEmpty(monitorId)){
t_W_Temperturedata.setMonitorId(monitorId);
}
return success();
}
if(t_W_Temperturedata.getStartTime().equals("")){
Map<String,Object> timeMap = new HashMap<>();

@ -140,8 +140,10 @@ public class T_W_TemperturedataController extends BaseController
*/
public String getTempFirstMonitorId(){
List<T_W_Temperturedata> t_w_temperturedata = t_W_TemperturedataService.select_Temp_TopOne();
String monitorId = t_w_temperturedata.get(0).getMonitorId();
return monitorId;
if (t_w_temperturedata.size() > 0){
return t_w_temperturedata.get(0).getMonitorId();
}
return null;
}
/**
@ -150,8 +152,10 @@ public class T_W_TemperturedataController extends BaseController
*/
public String getIllFirstMonitorId(){
List<T_W_Temperturedata> t_w_temperturedata = t_W_TemperturedataService.select_Ill_TopOne();
String monitorId = t_w_temperturedata.get(0).getMonitorId();
return monitorId;
if (t_w_temperturedata.size() > 0){
return t_w_temperturedata.get(0).getMonitorId();
}
return null;
}
/**

@ -159,7 +159,7 @@
function queryDeptTree()
{
var url = ctx + "system/Monitor/treeData?monitorType=17";
var url = ctx + "system/Monitor/treeData?monitorType=16";
var options = {
url: url,
expandLevel: 1,

Loading…
Cancel
Save