change - 配置文件

master
yinq 3 months ago
parent 547692ee89
commit 9a6bacd8f8

@ -14,7 +14,15 @@ spring:
# url: jdbc:sqlserver://localhost:1433;SelectMethod=cursor;DatabaseName=hw_iot_ems # url: jdbc:sqlserver://localhost:1433;SelectMethod=cursor;DatabaseName=hw_iot_ems
# username: sa # username: sa
# password: haiwei@2024 # 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: slave:
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver # driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
# # 从数据源开关/默认关闭 # # 从数据源开关/默认关闭

@ -83,7 +83,16 @@ public class T_MonitorServiceImpl implements IT_MonitorService
TSetmonitorthresholdvalue tSetmonitorthresholdvalue = new TSetmonitorthresholdvalue(); TSetmonitorthresholdvalue tSetmonitorthresholdvalue = new TSetmonitorthresholdvalue();
tSetmonitorthresholdvalue.setMonitorId(t_Monitor.getMonitorId()); tSetmonitorthresholdvalue.setMonitorId(t_Monitor.getMonitorId());
tSetmonitorthresholdvalue.setMonitorType(16); tSetmonitorthresholdvalue.setMonitorType(16);
tSetmonitorthresholdvalueService.insertTSetmonitorthresholdvalue(tSetmonitorthresholdvalue); 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) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();

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

Loading…
Cancel
Save