Commit 324bea6b authored by duanruiming's avatar duanruiming

[add] 国产化数据库改造

parent 42929683
...@@ -2,14 +2,16 @@ spring: ...@@ -2,14 +2,16 @@ spring:
cloud: cloud:
nacos: nacos:
config: config:
server-addr: 37.12.182.29:8848 server-addr: 37.8.219.227:28848
file-extension: yaml file-extension: yaml
group: signal group: signal
namespace: signal namespace: signal
username: nacos username: nacos
password: nacos password: Nacos@2025
application: application:
# dubbo启动需要程序名称 # dubbo启动需要程序名称
name: signal-optimize-service name: signal-optimize-service
main: main:
allow-circular-references: true allow-circular-references: true
inforsuite:
license-path: D:\license
\ No newline at end of file
spring:
cloud:
nacos:
config:
server-addr: 37.8.219.227:28848
file-extension: yaml
group: signal
namespace: signal
username: nacos
password: Nacos@2025
application:
# dubbo启动需要程序名称
name: signal-optimize-service
main:
allow-circular-references: true
inforsuite:
license-path: D:\license
spring: spring:
profiles: profiles:
active: dockerCH active: docker
...@@ -207,7 +207,7 @@ ...@@ -207,7 +207,7 @@
dt, dt,
dir, dir,
sum(event_number)AS event_number , sum(event_number)AS event_number ,
DATE_FORMAT(t1.window_start_time,'%H:%i') AS hours_window_start_time , to_char(t1.window_start_time,'HH24:MI') AS hours_window_start_time ,
t1.event_type, t1.event_type,
t2.label AS typeName t2.label AS typeName
FROM t_analysis_problem_green_hour t1 FROM t_analysis_problem_green_hour t1
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
and t1.event_type = #{eventType} and t1.event_type = #{eventType}
</if> </if>
GROUP BY GROUP BY
DATE_FORMAT(t1.window_start_time,'%H:%i') to_char(t1.window_start_time,'HH24:MI')
ORDER BY event_number desc ORDER BY event_number desc
limit 2 limit 2
</select> </select>
......
...@@ -5,15 +5,28 @@ ...@@ -5,15 +5,28 @@
SELECT b.start_time as startTime,b.end_time as endTime,cycle from t_base_cross_schedules_plan as a LEFT JOIN t_base_cross_section as b on a.plan_id = b.plan_id LEFT JOIN t_base_cross_scheme as c on b.scheme_id = c.id where a.cross_id = #{crossId} and a.week = #{weekNumber} ORDER BY start_time SELECT b.start_time as startTime,b.end_time as endTime,cycle from t_base_cross_schedules_plan as a LEFT JOIN t_base_cross_section as b on a.plan_id = b.plan_id LEFT JOIN t_base_cross_scheme as c on b.scheme_id = c.id where a.cross_id = #{crossId} and a.week = #{weekNumber} ORDER BY start_time
</select> </select>
<!-- <select id="getSpecialDate" resultType="java.util.Map">-->
<!-- SELECT DATE_FORMAT(special_date, '%Y-%m-%d %H:%i:%s') AS special_date, plan_id-->
<!-- FROM t_base_cross_schedules_plan-->
<!-- WHERE cross_id = #{crossId}-->
<!-- <if test="endTime != null and endTime != '' and startTime != null and startTime !='' ">-->
<!-- and special_date between #{startTime} and #{endTime}-->
<!-- </if>-->
<!-- AND week = 0-->
<!-- </select>-->
<select id="getSpecialDate" resultType="java.util.Map"> <select id="getSpecialDate" resultType="java.util.Map">
SELECT DATE_FORMAT(special_date, '%Y-%m-%d %H:%i:%s') AS special_date, plan_id SELECT
to_char(special_date, 'YYYY-MM-DD HH24:MI:SS') AS special_date,
plan_id
FROM t_base_cross_schedules_plan FROM t_base_cross_schedules_plan
WHERE cross_id = #{crossId} WHERE cross_id = #{crossId}
<if test="endTime != null and endTime != '' and startTime != null and startTime !='' "> <if test="endTime != null and endTime != '' and startTime != null and startTime !=''">
and special_date between #{startTime} and #{endTime} AND special_date BETWEEN #{startTime}::timestamp AND #{endTime}::timestamp
</if> </if>
AND week = 0 AND week = 0
</select> </select>
<select id="getSpecialByDateScope" resultType="java.util.Map"> <select id="getSpecialByDateScope" resultType="java.util.Map">
SELECT b.start_time as startTime,b.end_time as endTime,cycle from t_base_cross_section as b LEFT JOIN t_base_cross_scheme as c on b.scheme_id = c.id where b.cross_id = #{crossId} and b.plan_id = #{planId} ORDER BY start_time SELECT b.start_time as startTime,b.end_time as endTime,cycle from t_base_cross_section as b LEFT JOIN t_base_cross_scheme as c on b.scheme_id = c.id where b.cross_id = #{crossId} and b.plan_id = #{planId} ORDER BY start_time
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment