Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
8cb51d15
Commit
8cb51d15
authored
Jul 31, 2024
by
李松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加查询字典值方法
parent
f35806a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
0 deletions
+95
-0
AlertCalledMapper.java
...os/boot/module/elevator/api/mapper/AlertCalledMapper.java
+8
-0
AlertCalledMapper.xml
...96333-api/src/main/resources/mapper/AlertCalledMapper.xml
+87
-0
No files found.
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-api/src/main/java/com/yeejoin/amos/boot/module/elevator/api/mapper/AlertCalledMapper.java
View file @
8cb51d15
...
...
@@ -96,6 +96,12 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
@Param
(
"sortRule"
)
String
sortRule
,
@Param
(
"groupCode"
)
String
groupCode
,
@Param
(
"ids"
)
List
<
String
>
ids
);
/**
* 根据查询条件返回警情记录(大屏应急处理使用)
* @param
* @return
*/
Page
<
List
<
AlertCalledQueryDto
>>
getAlertCalledRecords
(
IPage
<
AlertCalledQueryDto
>
page
,
@Param
(
"dto"
)
AlertCalledQueryDto
dto
);
Map
<
String
,
Integer
>
getTodayEmergencyCount
(
String
regionCode
);
...
...
@@ -138,4 +144,6 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
Integer
getCountNum
(
String
userName
,
Date
startTime
,
Date
endTime
,
String
groupCode
);
Map
<
String
,
Long
>
getMyBacklog
(
String
groupCode
);
String
getDictName
(
@Param
(
"id"
)
String
id
);
}
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
8cb51d15
...
...
@@ -645,6 +645,93 @@
WHERE alert_status = false
AND skill_group = #{groupCode}
</select>
<select
id=
"getDictName"
resultType=
"java.lang.String"
>
SELECT name from cb_data_dictionary where sequence_nbr = #{id} limit 1
</select>
<select
id=
"getAlertCalledRecords"
resultType=
"java.util.List"
>
SELECT
a.sequence_nbr AS sequenceNbr,
a.work_order_number AS workOrderNumber,
a.rec_user_name AS creator,
a.emergency_person AS emergency,
a.call_time AS callTime,
a.emergency_call AS emergencyCall,
a.device_id AS deviceId,
ibjui.ADDRESS AS elevatorAddress,
CONCAT(a.city,a.district) AS address,
a.alarm_type AS alertType,
a.alert_source AS alertSource,
a.alert_stage AS alertStage,
CASE
a.alert_status
WHEN 0 THEN
'未完成'
WHEN 1 THEN
'完成'
ELSE
''
END AS alertStatus
FROM
tz_alert_called a
LEFT JOIN idx_biz_jg_other_info ibjoi ON ibjoi.CODE96333 = a.device_id
LEFT JOIN idx_biz_jg_use_info ibjui ON ibjoi.RECORD = ibjui.RECORD
WHERE a.is_delete = 0 and a.father_alert is null
and a.skill_group = #{groupCode}
<if
test=
"workOrderNumber != null and workOrderNumber != ''"
>
AND a.work_order_number like
CONCAT(CONCAT('%',#{workOrderNumber}),'%')
</if>
<if
test=
"creator != null and creator != ''"
>
AND a.rec_user_name like
CONCAT(CONCAT('%',#{creator}),'%')
</if>
<if
test=
"emergency != null and emergency != ''"
>
AND a.emergency_person like
CONCAT(CONCAT('%',#{emergency}),'%')
</if>
<if
test=
"emergencyTimeStart != null "
>
and #{emergencyTimeStart}
<![CDATA[ <= ]]>
a.call_time
</if>
<if
test=
"emergencyTimeEnd != null "
>
and a.call_time
<![CDATA[ <= ]]>
#{emergencyTimeEnd}
</if>
<if
test=
"emergencyCall != null and emergencyCall != ''"
>
AND a.emergency_call like
CONCAT(CONCAT('%',#{emergencyCall}),'%')
</if>
<if
test=
"deviceId != null and deviceId != ''"
>
AND a.device_id like CONCAT(CONCAT('%',#{deviceId}),'%')
</if>
<if
test=
"elevatorAddress != null and elevatorAddress != ''"
>
AND ibjui.ADDRESS like
CONCAT(CONCAT('%',#{elevatorAddress}),'%')
</if>
<if
test=
"district != null and district != ''"
>
AND a.district like
CONCAT(CONCAT('%',#{district}),'%')
</if>
<if
test=
"alertType != null and alertType != ''"
>
AND a.alarm_type_code = #{alertType}
</if>
<if
test=
"alertSource != null and alertSource != ''"
>
AND a.alert_source_code = #{alertSource}
</if>
<if
test=
"alertStage != null and alertStage != ''"
>
AND a.alert_stage_code = #{alertStage}
</if>
<if
test=
"alertStatus != null and alertStatus != ''"
>
AND a.alert_status = #{alertStatus}
</if>
<if
test=
"ids != null and ids.size>0"
>
AND a.sequence_nbr in
<foreach
collection=
"ids"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
ORDER BY
</select>
</mapper>
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