change - 配置文件

master
yinq 3 months ago
parent 547692ee89
commit 9a6bacd8f8

@ -14,6 +14,14 @@ spring:
# url: jdbc:sqlserver://localhost:1433;SelectMethod=cursor;DatabaseName=hw_iot_ems
# username: sa
# password: haiwei@2024
# 泰国成山采集系统
# url: jdbc:sqlserver://localhost:1433;SelectMethod=cursor;DatabaseName=hw_iot_ems
# username: sa
# password: Call3248
# 沈阳赛轮能源采集系统
# url: jdbc:sqlserver://192.168.100.60:1433;SelectMethod=cursor;DatabaseName=hw_iot_ems
# username: sa
# password: abc@123
# 从库数据源
slave:
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver

@ -83,11 +83,20 @@ public class T_MonitorServiceImpl implements IT_MonitorService
TSetmonitorthresholdvalue tSetmonitorthresholdvalue = new TSetmonitorthresholdvalue();
tSetmonitorthresholdvalue.setMonitorId(t_Monitor.getMonitorId());
tSetmonitorthresholdvalue.setMonitorType(16);
try {
TSetmonitorthresholdvalue setmonitorthresholdvalue = new TSetmonitorthresholdvalue();
setmonitorthresholdvalue.setMonitorId(t_Monitor.getMonitorId());
List<TSetmonitorthresholdvalue> tSetmonitorthresholdvalueList = tSetmonitorthresholdvalueService.selectTSetmonitorthresholdvalueList(setmonitorthresholdvalue);
if (tSetmonitorthresholdvalueList.size() == 0){
tSetmonitorthresholdvalueService.insertTSetmonitorthresholdvalue(tSetmonitorthresholdvalue);
}
} catch (Exception e) {
e.printStackTrace();
}
}
} catch (Exception e) {
e.printStackTrace();
}
return t_MonitorMapper.insertT_Monitor(t_Monitor);
}

@ -1591,7 +1591,7 @@
SELECT *,
ROW_NUMBER() OVER (PARTITION BY monitorId ORDER BY collectTime DESC) AS rn
FROM T_ArrayTemperatureData
WHERE recodeTime > (GETDATE() - 30)
WHERE collectTime > (GETDATE() - 1)
<if test="monitorId != null and monitorId != ''"> and monitorId like concat(#{monitorId}, '%') </if>
)
SELECT m.monitorName,t.*

Loading…
Cancel
Save