Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
663f4254
Commit
663f4254
authored
Jul 18, 2024
by
lilongyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、解决冲突
parent
4d37b07c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
88 deletions
+0
-88
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+0
-88
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
663f4254
...
...
@@ -140,94 +140,6 @@
</where>
limit 1
</select>
<select
id=
"getHealthListInfo"
resultType=
"java.util.Map"
>
SELECT
CEILING(IFNULL( AVG( HEALTH_INDEX ), 100 )) AS avgHealthIndex,
DATE_ADD( a.date, INTERVAL - 1 DAY ) as date
FROM
(
SELECT
DATE_FORMAT( DATE_ADD(( DATE( DATE_ADD( now(), INTERVAL - 15 DAY ))), INTERVAL @s DAY ), '%Y-%m-%d' ) AS date,
@s := @s + 1 AS `index`
FROM
mysql.help_topic,
( SELECT @s := 1 ) temp
WHERE
DATEDIFF( now(), DATE( DATE_ADD( now(), INTERVAL - 15 DAY )) ) >= @s
) a
LEFT JOIN (
SELECT
HEALTH_INDEX,
DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) AS recDate
FROM
idx_biz_pv_health_index
<where>
ANALYSIS_TYPE = '按天'
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE like concat('%', #{areaCode}, '%')
AND ANALYSIS_OBJ_TYPE = '片区'
</if>
<if
test=
"stationCode != null and stationCode != ''"
>
AND GATEWAY_ID = #{stationCode}
AND ANALYSIS_OBJ_TYPE = '场站'
</if>
<if
test=
"(stationCode == null or stationCode == '') and (areaCode == null or areaCode == '')"
>
AND ANALYSIS_OBJ_TYPE = '片区'
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
AND GATEWAY_ID IN
<foreach
collection=
"gatewayIds"
item=
"item"
open=
"("
separator=
","
close=
")"
>
${item}
</foreach>
</if>
</where>
UNION ALL
(
SELECT
HEALTH_INDEX,
DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) AS recDate
FROM
idx_biz_fan_health_index
<where>
ANALYSIS_TYPE = '按天'
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE like concat('%', #{areaCode}, '%')
AND ANALYSIS_OBJ_TYPE = '片区'
</if>
<if
test=
"stationCode != null and stationCode != ''"
>
AND GATEWAY_ID = #{stationCode}
AND ANALYSIS_OBJ_TYPE = '场站'
</if>
<if
test=
"(stationCode == null or stationCode == '') and (areaCode == null or areaCode == '')"
>
AND ANALYSIS_OBJ_TYPE = '片区'
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
AND GATEWAY_ID IN
<foreach
collection=
"gatewayIds"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</where>
)
) b ON DATE_FORMAT( b.recDate, '%Y-%m-%d' ) = a.date
GROUP BY
a.date
</select>
<select
id=
"getAllEquipAlarmInfo"
resultType=
"java.util.Map"
>
SELECT ARAE as area,
WARNING_NAME as warningName,
count(1) as num
FROM ${tableName} a
where (a.DISPOSOTION_STATE = '待确认')
<!-- or (a.DISPOSOTION_STATE = '已确认' and a.DISPOSOTION_DATE > DATE_ADD(now(), INTERVAL - 3 DAY ))-->
AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')
<if
test=
"stationCode != null and stationCode != ''"
>
AND GATEWAY_ID = #{stationCode}
AND ANALYSIS_OBJ_TYPE = '场站'
</if>
</where>
limit 1
</select>
<select
id=
"getHealthScoreInfoByStationByMinute"
resultType=
"java.math.BigDecimal"
>
SELECT
round(IFNULL( HEALTH_INDEX , 100 ), 1) AS healthIndex
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment