From 2ca4d36345464ccd8239bf3cea3430ead3554ff7 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期五, 16 六月 2023 16:12:05 +0800 Subject: [PATCH] 1 --- src/main/java/com/yssh/dao/SuYuanMapper.java | 2 ++ src/main/resources/mapping/SuYuanMapper.xml | 11 +++++++++++ src/main/resources/mapping/WarningDetailMapper.xml | 4 ++-- src/main/resources/application-dev.yml | 2 +- src/main/resources/application-prod.yml | 2 +- src/main/resources/application-test.yml | 2 +- 6 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/yssh/dao/SuYuanMapper.java b/src/main/java/com/yssh/dao/SuYuanMapper.java index 792bbf7..654e033 100644 --- a/src/main/java/com/yssh/dao/SuYuanMapper.java +++ b/src/main/java/com/yssh/dao/SuYuanMapper.java @@ -24,6 +24,8 @@ List<SuYuan3d> get3d(@Param("tableName") String tableName, @Param("ids") List<String> ids); List<DistanceSuYuan> getDistanceSuYuan(@Param("tableName") String tableName, @Param("ids") List<String> ids); + + DistanceSuYuan getSuYuan500Max(@Param("tableName") String tableName, @Param("ids") List<String> ids); List<Temporary> getTemporary(@Param("tableName") String tableName, @Param("ids") List<String> ids); diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 111b65b..feb4d30 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -13,7 +13,7 @@ # 鏈�澶ц繛鎺ユ睜鏁伴噺 maxActive: 100 # 閰嶇疆鑾峰彇杩炴帴绛夊緟瓒呮椂鐨勬椂闂� - maxWait: 60000 + maxWait: 600000 # 閰嶇疆闂撮殧澶氫箙鎵嶈繘琛屼竴娆℃娴嬶紝妫�娴嬮渶瑕佸叧闂殑绌洪棽杩炴帴锛屽崟浣嶆槸姣 timeBetweenEvictionRunsMillis: 60000 # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�灏忕敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣 diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 056a860..4830a99 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -13,7 +13,7 @@ # 鏈�澶ц繛鎺ユ睜鏁伴噺 maxActive: 100 # 閰嶇疆鑾峰彇杩炴帴绛夊緟瓒呮椂鐨勬椂闂� - maxWait: 60000 + maxWait: 600000 # 閰嶇疆闂撮殧澶氫箙鎵嶈繘琛屼竴娆℃娴嬶紝妫�娴嬮渶瑕佸叧闂殑绌洪棽杩炴帴锛屽崟浣嶆槸姣 timeBetweenEvictionRunsMillis: 60000 # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�灏忕敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣 diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml index 8d77835..1726939 100644 --- a/src/main/resources/application-test.yml +++ b/src/main/resources/application-test.yml @@ -13,7 +13,7 @@ # 鏈�澶ц繛鎺ユ睜鏁伴噺 maxActive: 100 # 閰嶇疆鑾峰彇杩炴帴绛夊緟瓒呮椂鐨勬椂闂� - maxWait: 60000 + maxWait: 600000 # 閰嶇疆闂撮殧澶氫箙鎵嶈繘琛屼竴娆℃娴嬶紝妫�娴嬮渶瑕佸叧闂殑绌洪棽杩炴帴锛屽崟浣嶆槸姣 timeBetweenEvictionRunsMillis: 60000 # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�灏忕敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣 diff --git a/src/main/resources/mapping/SuYuanMapper.xml b/src/main/resources/mapping/SuYuanMapper.xml index 165b8e1..6ddee9a 100644 --- a/src/main/resources/mapping/SuYuanMapper.xml +++ b/src/main/resources/mapping/SuYuanMapper.xml @@ -103,6 +103,17 @@ </foreach> ORDER BY z ASC, x ASC, y DESC </select> + + <select id="getSuYuan500Max" resultMap="DistanceSuYuanResult"> + select id, x, y, format(c, 2) "c", u, v + from ${tableName} + where id in + <foreach collection="ids" item="item" open="(" separator="," close=")"> + #{item} + </foreach> + order by c desc + limit 1; + </select> <select id="getAlarmsAnalyse" resultMap="SuYuan2dResult"> SELECT id, x, y, c diff --git a/src/main/resources/mapping/WarningDetailMapper.xml b/src/main/resources/mapping/WarningDetailMapper.xml index 3e63793..8d6b42b 100644 --- a/src/main/resources/mapping/WarningDetailMapper.xml +++ b/src/main/resources/mapping/WarningDetailMapper.xml @@ -70,7 +70,7 @@ <select id="selectByTimeForYj" resultMap="WarningDetailResult"> with rs as (select jcyj, jcbj from alert_config limit 1) - select id, table_name, su_yuan_id, location_name, 1 "type", create_time, value + select id, table_name, su_yuan_id, location_name, 1 "type", create_time, format(value, 2) "value" from warning_detail where create_time between #{startTime} and #{endTime} and value >= (select jcyj from rs) and value < (select jcbj from rs) @@ -79,7 +79,7 @@ <select id="selectByTimeForBj" resultMap="WarningDetailResult"> with rs as (select jcyj, jcbj from alert_config limit 1) - select id, table_name, su_yuan_id, location_name, 0 "type", create_time, value + select id, table_name, su_yuan_id, location_name, 0 "type", create_time, format(value, 2) "value" from warning_detail where create_time between #{startTime} and #{endTime} and value >= (select jcbj from rs) -- Gitblit v1.9.3