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
fe422318
Commit
fe422318
authored
Dec 05, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消防系统状态与告警表关系优化
parent
63b482ee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
1 deletion
+103
-1
EmergencyMapper.java
.../java/com/yeejoin/equipmanage/mapper/EmergencyMapper.java
+8
-0
EmergencyServiceImpl.java
...eejoin/equipmanage/service/impl/EmergencyServiceImpl.java
+1
-1
EmergencyMapper.xml
...ystem-equip/src/main/resources/mapper/EmergencyMapper.xml
+94
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EmergencyMapper.java
View file @
fe422318
...
...
@@ -123,4 +123,12 @@ public interface EmergencyMapper extends BaseMapper{
List
<
Map
<
String
,
Object
>>
getAllTypeEquipStatistic
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"list"
)
List
<
String
>
list
);
List
<
Map
<
String
,
Object
>>
fireCannonValve
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
Page
<
Map
<
String
,
Object
>>
alarmListNew
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"systemCode"
)
String
systemCode
,
@Param
(
"systemType"
)
String
systemType
,
@Param
(
"types"
)
List
<
String
>
types
,
@Param
(
"emergencyLevels"
)
List
<
String
>
emergencyLevels
,
@Param
(
"name"
)
String
name
,
@Param
(
"cleanStatus"
)
Integer
cleanStatus
,
@Param
(
"handleStatus"
)
Integer
handleStatus
,
@Param
(
"createDate"
)
String
createDate
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"sortField"
)
String
sortField
,
@Param
(
"sortOrder"
)
String
sortOrder
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EmergencyServiceImpl.java
View file @
fe422318
...
...
@@ -647,7 +647,7 @@ public class EmergencyServiceImpl implements IEmergencyService {
List
<
String
>
types
,
List
<
String
>
emergencyLevels
,
String
name
,
Integer
cleanStatus
,
Integer
handleStatus
,
String
createDate
,
String
startDate
,
String
endDate
,
String
sortField
,
String
sortOrder
)
{
return
emergencyMapper
.
alarmList
(
page
,
bizOrgCode
,
systemCode
,
systemType
,
types
,
emergencyLevels
,
name
,
cleanStatus
,
return
emergencyMapper
.
alarmList
New
(
page
,
bizOrgCode
,
systemCode
,
systemType
,
types
,
emergencyLevels
,
name
,
cleanStatus
,
handleStatus
,
createDate
,
startDate
,
endDate
,
sortField
,
sortOrder
);
}
...
...
amos-boot-system-equip/src/main/resources/mapper/EmergencyMapper.xml
View file @
fe422318
...
...
@@ -1499,6 +1499,100 @@
</if>
</select>
<select
id=
"alarmListNew"
resultType=
"java.util.Map"
>
SELECT
wlesa.id,
wlesa.biz_org_name AS bizOrgName,
concat( wlesa.equipment_specific_name, wlesa.equipment_specific_index_name ) AS alamContent,
IF
( wlesa.recovery_date IS NULL, '未确认', '已确认' ) handleStatus,
IF
( wlesa.`status` = 0, '已消除', '未消除' ) cleanStatus,
wlesa.equipment_index_id AS fireEquipmentIndexId,
fs.CODE AS systemCode,
wlesa.equipment_specific_index_key AS fireEquipmentSpecificIndexKey,
wlesa.equipment_specific_index_name AS fireEquipmentSpecificIndexName,
wlesa.emergency_level_color AS emergencyLevelColor,
CASE
wlesa.equipment_specific_index_value
WHEN 'true' THEN
'是'
WHEN 'false' THEN
'否' ELSE wlesa.equipment_specific_index_value
END AS fireEquipmentPointValue,
wlesa.type AS typeCode,
( SELECT type_name FROM wl_signal_classify sc WHERE sc.type_code = wlesa.type LIMIT 1 ) AS type,
wlesa.equipment_specific_name AS equipmentSpecificName,
wlesa.location,
date_format( wlesa.create_date, '%Y-%m-%d %H:%i:%s' ) createDate,
wlesa.emergency_level_describe AS emergencyLevelDescribe,
fs.NAME AS systemName
FROM
wl_equipment_specific_alarm wlesa
LEFT JOIN wl_equipment_specific wes ON wes.id = wlesa.equipment_specific_id
LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET(fs.id, wlesa.system_ids)
<where>
fs.system_type_code IS NOT NULL
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and wlesa.biz_org_code like concat(#{bizOrgCode},'%')
</if>
<if
test=
'createDate != null and createDate == "1"'
>
AND wlesa.create_date LIKE CONCAT( DATE_FORMAT( NOW( ), '%Y-%m-%d' ), '%' )
</if>
<if
test=
"startDate != null and startDate != ''"
>
AND wlesa.create_date >= DATE_FORMAT( #{startDate}, '%Y-%m-%d %H:%i:%s' )
</if>
<if
test=
"endDate != null and endDate != ''"
>
AND DATE_FORMAT( #{endDate}, '%Y-%m-%d %H:%i:%s' ) >= wlesal.create_date
</if>
<if
test=
"systemCode != null and systemCode != ''"
>
and fs.code = #{systemCode}
</if>
<if
test=
"systemType != null and systemType != ''"
>
and fs.system_type = #{systemType}
</if>
<if
test=
"name != null and name != ''"
>
and wlesa.equipment_specific_name like concat('%', #{name},'%')
</if>
<if
test=
"cleanStatus != null and cleanStatus != '' and cleanStatus == 2"
>
and wlesa.status = 1
</if>
<if
test=
"cleanStatus != null and cleanStatus != '' and cleanStatus == 1"
>
and wlesa.status = 0
</if>
<if
test=
"handleStatus != null and handleStatus != '' and handleStatus == 2"
>
and wlesa.recovery_date IS NULL
</if>
<if
test=
"handleStatus != null and handleStatus != '' and handleStatus == 1"
>
and wlesa.recovery_date IS NOT NULL
</if>
<if
test=
"types != null"
>
<foreach
collection=
"types"
index=
"index"
item=
"item"
open=
"and ("
separator=
" OR "
close=
")"
>
wlesa.type = #{item}
</foreach>
</if>
<if
test=
"emergencyLevels != null"
>
<foreach
collection=
"emergencyLevels"
index=
"index"
item=
"item"
open=
"and ("
separator=
" OR "
close=
")"
>
wlesa.emergency_level = #{item}
</foreach>
</if>
</where>
ORDER BY
<if
test=
"sortField != null and sortField != ''"
>
<choose>
<when
test=
"sortOrder == 'ascend'"
>
@SORT_FIELD ASC
</when>
<otherwise>
@SORT_FIELD DESC
</otherwise>
</choose>
</if>
<if
test=
"sortField == null or sortField == ''"
>
wlesa.create_date DESC
</if>
</select>
<select
id=
"alarmListNoPage"
resultType=
"java.util.Map"
>
SELECT
wlesal.id,
...
...
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