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
254a0712
Commit
254a0712
authored
Aug 08, 2022
by
maoying
Browse files
Options
Browse Files
Download
Plain Diff
合并station分支代码
parents
91ee7568
f4a9ecae
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
853 additions
and
424 deletions
+853
-424
SystemTypeEnum.java
.../com/yeejoin/equipmanage/common/enums/SystemTypeEnum.java
+2
-2
CommonPageInfoParam.java
...yeejoin/equipmanage/common/utils/CommonPageInfoParam.java
+30
-0
CommonPageParamUtil.java
...yeejoin/equipmanage/common/utils/CommonPageParamUtil.java
+10
-0
EquipmentAlarmController.java
...join/equipmanage/controller/EquipmentAlarmController.java
+23
-0
FireFightingSystemController.java
.../equipmanage/controller/FireFightingSystemController.java
+3
-3
FireFightingSystemMapper.java
.../yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
+6
-1
IFireFightingSystemService.java
...ejoin/equipmanage/service/IFireFightingSystemService.java
+17
-9
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+3
-5
view_all.sql
...stem-equip/src/main/resources/changelog/init/view_all.sql
+587
-2
EquipmentSpecificAlarmMapper.xml
...rc/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
+115
-119
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+1
-0
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+56
-283
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/SystemTypeEnum.java
View file @
254a0712
...
...
@@ -17,8 +17,8 @@ public enum SystemTypeEnum {
fireFoamMistSys
(
"fireFoamMistSys"
,
"细水雾涡扇炮系统"
),
fireWaterSys
(
"fireWaterSys"
,
"消防给水系统"
),
otherSys
(
"otherSys"
,
"其他系统"
),
envMonitoringSys
(
"envMonitoringSys"
,
"环境监测系统"
)
;
envMonitoringSys
(
"envMonitoringSys"
,
"环境监测系统"
)
,
fireSpraySys
(
"fireSpraySys"
,
"换流变水喷雾系统"
);
private
String
code
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/CommonPageInfoParam.java
View file @
254a0712
...
...
@@ -124,6 +124,36 @@ public class CommonPageInfoParam extends CommonPageable {
private
String
isRemovedFire
;
private
String
equipmentCode
;
private
String
indexTypeCode
;
private
String
fireEquipmentSpecificIndexKey
;
public
void
setFireEquipmentSpecificIndexKey
(
String
fireEquipmentSpecificIndexKey
)
{
this
.
fireEquipmentSpecificIndexKey
=
fireEquipmentSpecificIndexKey
;
}
public
String
getFireEquipmentSpecificIndexKey
()
{
return
fireEquipmentSpecificIndexKey
;
}
public
String
getIndexTypeCode
()
{
return
indexTypeCode
;
}
public
void
setIndexTypeCode
(
String
indexTypeCode
)
{
this
.
indexTypeCode
=
indexTypeCode
;
}
public
String
getEquipmentCode
()
{
return
equipmentCode
;
}
public
void
setEquipmentCode
(
String
equipmentCode
)
{
this
.
equipmentCode
=
equipmentCode
;
}
public
void
setIsRemovedFire
(
String
isRemovedFire
)
{
this
.
isRemovedFire
=
isRemovedFire
;
}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/CommonPageParamUtil.java
View file @
254a0712
...
...
@@ -65,9 +65,19 @@ public class CommonPageParamUtil {
param
.
setIsRemoveShield
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"isRemovedFire"
.
equals
(
name
)){
param
.
setIsRemovedFire
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
<<<<<<<
HEAD
}
else
if
(
"bizOrgCode"
.
equals
(
name
)){
param
.
setBizOrgCode
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
=======
}
else
if
(
"equipmentCode"
.
equals
(
name
)){
param
.
setEquipmentCode
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"specificIndexKey"
.
equals
(
name
)){
param
.
setFireEquipmentSpecificIndexKey
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"indexTypeCode"
.
equals
(
name
)){
param
.
setIndexTypeCode
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
>>>>>>>
develop_station
}
if
(
commonPageable
!=
null
){
param
.
setPageNumber
(
commonPageable
.
getPageNumber
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentAlarmController.java
View file @
254a0712
...
...
@@ -225,6 +225,7 @@ public class EquipmentAlarmController extends AbstractBaseController {
public
ResponseModel
listAlarmsPage
(
@RequestParam
(
value
=
"beginDate"
,
required
=
false
)
String
beginDate
,
@RequestParam
(
value
=
"endDate"
,
required
=
false
)
String
endDate
,
@RequestParam
(
value
=
"warehouseStructureName"
,
required
=
false
)
String
warehouseStructureName
,
// 此处equipCode指的是equipmentSpecificCode
@RequestParam
(
value
=
"equipCode"
,
required
=
false
)
String
equipCode
,
@RequestParam
(
value
=
"equipDetailCode"
,
required
=
false
)
String
equipDetailCode
,
@RequestParam
(
value
=
"confirmType"
,
required
=
false
)
String
confirmType
,
...
...
@@ -235,6 +236,9 @@ public class EquipmentAlarmController extends AbstractBaseController {
@RequestParam
(
value
=
"id"
,
required
=
false
)
String
id
,
@RequestParam
(
value
=
"cleanStatus"
,
required
=
false
)
String
cleanStatus
,
@RequestParam
(
value
=
"isRemovedFire"
,
required
=
false
)
String
isRemovedFire
,
@RequestParam
(
value
=
"equipmentCode"
,
required
=
false
)
String
equipmentCode
,
@RequestParam
(
value
=
"indexTypeCode"
,
required
=
false
)
String
indexTypeCode
,
@RequestParam
(
value
=
"specificIndexKey"
,
required
=
false
)
String
specificIndexKey
,
CommonPageable
commonPageable
)
{
List
<
CommonRequest
>
queryRequests
=
new
ArrayList
<>();
ReginParams
reginParams
=
getSelectedOrgInfo
();
...
...
@@ -287,10 +291,28 @@ public class EquipmentAlarmController extends AbstractBaseController {
request13
.
setName
(
"isRemovedFire"
);
request13
.
setValue
(
StringUtil
.
isNotEmpty
(
isRemovedFire
)
?
StringUtils
.
trimToNull
(
isRemovedFire
)
:
null
);
queryRequests
.
add
(
request13
);
CommonRequest
request15
=
new
CommonRequest
();
request15
.
setName
(
"equipDetailCode"
);
request15
.
setValue
(
StringUtil
.
isNotEmpty
(
equipDetailCode
)
?
StringUtils
.
trimToNull
(
equipDetailCode
)
:
null
);
queryRequests
.
add
(
request15
);
CommonRequest
request16
=
new
CommonRequest
();
request16
.
setName
(
"specificIndexKey"
);
request16
.
setValue
(
StringUtil
.
isNotEmpty
(
specificIndexKey
)
?
StringUtils
.
trimToNull
(
specificIndexKey
)
:
null
);
queryRequests
.
add
(
request16
);
CommonRequest
request17
=
new
CommonRequest
();
request17
.
setName
(
"indexTypeCode"
);
request17
.
setValue
(
StringUtil
.
isNotEmpty
(
indexTypeCode
)
?
StringUtils
.
trimToNull
(
indexTypeCode
)
:
null
);
queryRequests
.
add
(
request17
);
CommonRequest
request18
=
new
CommonRequest
();
request18
.
setName
(
"equipmentCode"
);
request18
.
setValue
(
StringUtil
.
isNotEmpty
(
equipmentCode
)
?
StringUtils
.
trimToNull
(
equipmentCode
)
:
null
);
queryRequests
.
add
(
request18
);
if
(
equioEnabled
){
if
(!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())){
CommonRequest
request14
=
new
CommonRequest
();
...
...
@@ -305,6 +327,7 @@ public class EquipmentAlarmController extends AbstractBaseController {
}
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
org
.
springframework
.
data
.
domain
.
Page
<
AlarmListDataVO
>
list
=
iEquipmentSpecificAlarmService
.
listAlarmsPage
(
param
);
return
CommonResponseUtil
.
success
(
list
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireFightingSystemController.java
View file @
254a0712
...
...
@@ -672,14 +672,14 @@ public class FireFightingSystemController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"按照组态格式获取系统报警,或者建筑报警列表"
,
notes
=
"按照组态格式获取系统报警,或者建筑报警列表"
)
@GetMapping
(
value
=
"/getEquipmentAlarmBySystemIdOrSourceIdVO/{Systemtype}/{id}"
)
public
IPage
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
getEquipmentAlarmBySystemIdOrSourceIdVO
(
Integer
pageSize
,
Integer
current
,
Integer
confirmType
,
String
createDate
,
String
type
,
@PathVariable
String
Systemtype
,
@PathVariable
Long
id
)
{
public
IPage
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
getEquipmentAlarmBySystemIdOrSourceIdVO
(
Integer
pageSize
,
Integer
current
,
Integer
confirmType
,
String
createDate
,
String
type
,
@PathVariable
String
Systemtype
,
@PathVariable
Long
id
,
String
equipmentId
)
{
Page
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
page
=
new
Page
();
page
.
setCurrent
(
current
);
page
.
setSize
(
pageSize
);
if
((
"building"
).
equals
(
Systemtype
))
{
return
fireFightingSystemService
.
getEquipmentAlarmBySystemIdOrSourceIdVO
(
page
,
id
,
null
,
confirmType
,
createDate
,
type
);
return
fireFightingSystemService
.
getEquipmentAlarmBySystemIdOrSourceIdVO
(
page
,
id
,
null
,
confirmType
,
createDate
,
type
,
equipmentId
);
}
else
if
(
"system"
.
equals
(
Systemtype
))
{
return
fireFightingSystemService
.
getEquipmentAlarmBySystemIdOrSourceIdVO
(
page
,
null
,
id
,
confirmType
,
createDate
,
type
);
return
fireFightingSystemService
.
getEquipmentAlarmBySystemIdOrSourceIdVO
(
page
,
null
,
id
,
confirmType
,
createDate
,
type
,
equipmentId
);
}
else
{
return
page
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
View file @
254a0712
...
...
@@ -111,7 +111,8 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
,
@Param
(
"systemId"
)
Long
systemId
,
@Param
(
"confirmType"
)
Integer
confirmType
,
@Param
(
"createDate"
)
String
createDate
,
@Param
(
"type"
)
String
type
);
,
@Param
(
"type"
)
String
type
,
@Param
(
"equipmentId"
)
String
equipmentId
);
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountList
(
@Param
(
"page"
)
IPage
page
,
@Param
(
"hierarchy"
)
int
hierarchy
,
...
...
@@ -128,6 +129,7 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
@Param
(
"codeHead"
)
String
codeHead
,
@Param
(
"equipTypeAmountPage"
)
EquipTypeAmountPageDTO
equipTypeAmountPage
);
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountEquList
(
@Param
(
"page"
)
IPage
page
,
@Param
(
"hierarchy"
)
int
hierarchy
,
@Param
(
"codeHead"
)
String
codeHead
,
...
...
@@ -196,6 +198,9 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
Map
<
String
,
Object
>
fireWaterSysPipeNetwork
();
Map
<
String
,
Object
>
fireWaterSysPipeStatus
();
/**
* 消防水系统-》消火栓按钮
*
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFireFightingSystemService.java
View file @
254a0712
package
com
.
yeejoin
.
equipmanage
.
service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
...
...
@@ -8,13 +12,18 @@ import com.yeejoin.amos.feign.morphic.model.ResourceDTO;
import
com.yeejoin.equipmanage.common.datasync.entity.FireFightingSystem
;
import
com.yeejoin.equipmanage.common.entity.FireFightingSystemEntity
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipTypeAmountPageDTO
;
import
com.yeejoin.equipmanage.common.entity.vo.*
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
java.util.HashMap
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipCountBySystemVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipTypeImgAmountVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquiplistSpecificBySystemVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentAlarmBySystemIdOrSourceIdVO
;
import
com.yeejoin.equipmanage.common.entity.vo.PointTreeVo
;
import
com.yeejoin.equipmanage.common.vo.AlarmDataVO
;
import
com.yeejoin.equipmanage.common.vo.EquipmentManageVo
;
import
com.yeejoin.equipmanage.common.vo.FireFightingSystem3dVo
;
import
com.yeejoin.equipmanage.common.vo.FireFightingSystemTreeVo
;
import
com.yeejoin.equipmanage.common.vo.FireFightingSystemTypeTreeVo
;
import
com.yeejoin.equipmanage.common.vo.FireFightingSystemVo
;
import
com.yeejoin.equipmanage.common.vo.SpeIndexVo
;
public
interface
IFireFightingSystemService
extends
IService
<
FireFightingSystemEntity
>
{
...
...
@@ -112,8 +121,7 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
*/
List
<
AlarmDataVO
>
getSystemById
(
Long
id
);
IPage
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
getEquipmentAlarmBySystemIdOrSourceIdVO
(
IPage
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
page
,
Long
sourceId
,
Long
systemId
,
Integer
confirmType
,
String
createDate
,
String
type
);
IPage
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
getEquipmentAlarmBySystemIdOrSourceIdVO
(
IPage
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
page
,
Long
sourceId
,
Long
systemId
,
Integer
confirmType
,
String
createDate
,
String
type
,
String
equipmentId
);
/**
* 删除装备系统
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
254a0712
...
...
@@ -957,11 +957,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
@Override
public
IPage
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
getEquipmentAlarmBySystemIdOrSourceIdVO
(
IPage
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
page
,
Long
sourceId
,
Long
systemId
,
Integer
confirmType
,
String
createDate
,
String
type
)
{
return
this
.
baseMapper
.
getEquipmentAlarmBySystemIdOrSourceIdVO
(
page
,
sourceId
,
systemId
,
confirmType
,
createDate
,
type
);
public
IPage
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
getEquipmentAlarmBySystemIdOrSourceIdVO
(
IPage
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
page
,
Long
sourceId
,
Long
systemId
,
Integer
confirmType
,
String
createDate
,
String
type
,
String
equipmentId
)
{
return
this
.
baseMapper
.
getEquipmentAlarmBySystemIdOrSourceIdVO
(
page
,
sourceId
,
systemId
,
confirmType
,
createDate
,
type
,
equipmentId
);
}
private
static
String
getInet4Address
()
{
...
...
@@ -1031,6 +1028,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
this
.
putAll
(
data
,
fireFightingSystemMapper
.
fireWaterSysWaterPump
());
this
.
putAll
(
data
,
fireFightingSystemMapper
.
fireWaterSysHydrant
());
this
.
putAll
(
data
,
fireFightingSystemMapper
.
fireWaterSysPipeNetwork
());
// this.putAll(data, fireFightingSystemMapper.fireWaterSysPipeStatus());
}
else
{
data
=
fireFightingSystemMapper
.
otherSysIndexNumAndTotal
();
}
...
...
amos-boot-system-equip/src/main/resources/changelog/init/view_all.sql
View file @
254a0712
...
...
@@ -7122,4 +7122,589 @@ SELECT
AND
(
to_days
(
`p_plan_task`
.
`end_time`
)
-
to_days
(
curdate
())
)
>=
0
)
AS
`unFinishNum`
;
\ No newline at end of file
)
AS
`unFinishNum`
;
-- 增加火报系统各属性查询视图,以后维护只在本视图
DROP
VIEW
IF
EXISTS
`v_fire_fas_index_num`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_fas_index_num`
AS
SELECT
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_SmokeAlarm_Shield'
AND
s
.
`value`
=
'true'
)
AS
ywtcqpb
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_SmokeAlarm_Fault'
AND
s
.
`value`
=
'true'
)
AS
ywtcqgz
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_SmokeAlarm_FireAlarm'
AND
s
.
`value`
=
'true'
)
AS
ywtcqhj
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_SoundLightAlarm_Shield'
AND
s
.
`value`
=
'true'
)
AS
sgbjqpb
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_SoundLightAlarm_Fault'
AND
s
.
`value`
=
'true'
)
AS
sgbjqgz
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_SoundLightAlarm_FireAlarm'
AND
s
.
`value`
=
'true'
)
AS
sgbjqhj
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_InfraredLight_Shield'
AND
s
.
`value`
=
'true'
)
AS
hwdspb
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_InfraredLight_Fault'
AND
s
.
`value`
=
'true'
)
AS
hwdsgz
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_InfraredLight_FireAlarm'
AND
s
.
`value`
=
'true'
)
AS
hwdshj
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_ManualAlarm_Shield'
AND
s
.
`value`
=
'true'
)
AS
sdbjapb
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_ManualAlarm_Fault'
AND
s
.
`value`
=
'true'
)
AS
sdbjagz
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_ManualAlarm_FireAlarm'
AND
s
.
`value`
=
'true'
)
AS
sdbjahj
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_TemperatureCable_Shield'
AND
s
.
`value`
=
'true'
)
AS
gwdlpb
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_TemperatureCable_Fault'
AND
s
.
`value`
=
'true'
)
AS
gwdlgz
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_TemperatureCable_FireAlarm'
AND
s
.
`value`
=
'true'
)
AS
gwdlhj
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_TemperatureFireDetector_Shield'
AND
s
.
`value`
=
'true'
)
AS
fbwgpb
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_TemperatureFireDetector_Fault'
AND
s
.
`value`
=
'true'
)
AS
fbwggz
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_TemperatureFireDetector_FireAlarm'
AND
s
.
`value`
=
'true'
)
AS
fbwgqhj
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_AirSampler_Shield'
AND
s
.
`value`
=
'true'
)
AS
kqcypb
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_AirSampler_Fault'
AND
s
.
`value`
=
'true'
)
AS
kqcygz
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_AirSampler_FireAlarm'
AND
s
.
`value`
=
'true'
)
AS
kqcyhj
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_UltravioletLight_Shield'
AND
s
.
`value`
=
'true'
)
AS
zwhypb
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_UltravioletLight_Fault'
AND
s
.
`value`
=
'true'
)
AS
zwhygz
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FAS_UltravioletLight_FireAlarm'
AND
s
.
`value`
=
'true'
)
AS
zwhyhj
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'SCS_FireDamper_Shield'
AND
s
.
`value`
=
'true'
)
AS
fhzpb
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'SCS_FireDamper_Fault'
AND
s
.
`value`
=
'true'
)
AS
fhzgz
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'SCS_FireDamper_FireAlarm'
AND
s
.
`value`
=
'true'
)
AS
fhzhj
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FES_FireBroadcast_Shield'
AND
s
.
`value`
=
'true'
)
AS
yjgbpb
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FES_FireBroadcast_Fault'
AND
s
.
`value`
=
'true'
)
AS
yjgbgz
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
s
WHERE
s
.
equipment_index_key
=
'FES_FireBroadcast_Start'
AND
s
.
`value`
=
'true'
)
AS
yjgbqd
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
si
WHERE
si
.
equipment_index_key
=
'FES_FireBroadcast_Start'
)
AS
yjgbnum
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
`s`
WHERE
`s`
.
`equipment_index_key`
=
'FAS_VESDA_SignalMAction'
AND
upper
(
`s`
.
`value`
)
=
'TRUE'
)
AS
`vesdahj`
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
`s`
WHERE
`s`
.
`equipment_index_key`
IN
(
'FAS_VESDA_SignalMFault'
,
'FAS_VESDA_Fault'
,
'FAS_VESDAActionOutputMFault'
,
'FAS_VESDAAlarmOutputMFault'
)
AND
upper
(
`s`
.
`value`
)
=
'TRUE'
)
AS
`vesdagz`
,
(
SELECT
count
(
1
)
FROM
`wl_equipment_specific_index`
`s`
WHERE
`s`
.
`equipment_index_key`
IN
(
'FAS_VESDA_SignalMShield'
,
'FAS_VESDA_Shield'
,
'FAS_VESDAActionOutputMShield'
,
'FAS_VESDAAlarmOutputMShield'
)
AND
upper
(
`s`
.
`value`
)
=
'TRUE'
)
AS
`vesdapb`
;
-- 换流变水喷雾系统3小物联监测告警(因为绍兴现场目前是已确认待确认不能共用,所以此处新增视图)
DROP
VIEW
IF
EXISTS
`v_fire_fss_stattistics`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_fss_stattistics`
AS
SELECT
(
count
(
1
)
-
count
(
`wl_equipment_specific_alarm_log`
.
`clean_time`
))
AS
`unCleaned`
,(
count
(
1
)
-
count
(
`wl_equipment_specific_alarm_log`
.
`confirm_type`
))
AS
`pending`
FROM
`wl_equipment_specific_alarm_log`
WHERE
FIND_IN_SET
(
'011023306003010000000129'
,
system_codes
)
>
0
;
-- 换流变水喷雾系统3小近一月设备告警top5
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_fss_top5_3small`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_fss_top5_3small`
AS
SELECT
ifnull
(
`a`
.
`fightSysName`
,
NULL
)
AS
`fightSysName`
,
ifnull
(
`a`
.
`fightSysCode`
,
NULL
)
AS
`fightSysCode`
,
ifnull
(
`a`
.
`fightSysId`
,
NULL
)
AS
`fightSysId`
,
ifnull
(
`a`
.
`report_date`
,
NULL
)
AS
`reportDate`
,
`a`
.
`equipName`
AS
`equipName`
,
sum
(
`a`
.
`total`
)
AS
`total`
FROM
(
SELECT
`rd`
.
`index_type`
AS
`indxKey`
,
`rd`
.
`index_name`
AS
`index_name`
,
`we`
.
`name`
AS
`equipName`
,
count
(
DISTINCT
`rd`
.
`equipment_specific_id`
)
AS
`total`
,
`rd`
.
`report_date`
AS
`report_date`
,
`fs`
.
`name`
AS
`fightSysName`
,
`fs`
.
`code`
AS
`fightSysCode`
,
`fs`
.
`id`
AS
`fightSysId`
,
`rd`
.
`equipment_id`
AS
`equipId`
FROM
((
`wl_equipment_alarm_report_day`
`rd`
LEFT
JOIN
`f_fire_fighting_system`
`fs`
ON
((
0
<>
find_in_set
(
`fs`
.
`id`
,
`rd`
.
`system_ids`
))))
LEFT
JOIN
`wl_equipment`
`we`
ON
((
`we`
.
`id`
=
`rd`
.
`equipment_id`
)))
WHERE
(((
curdate
()
-
INTERVAL
30
DAY
)
<=
cast
(
`rd`
.
`report_date`
AS
date
))
AND
(
`fs`
.
`code`
=
'011023306003010000000129'
)
AND
((
`rd`
.
`index_type`
LIKE
'%Fault'
)
OR
(
`rd`
.
`index_type`
LIKE
'%FireAlarm'
)
OR
(
`rd`
.
`index_type`
LIKE
'%Shield'
)))
GROUP
BY
`rd`
.
`equipment_specific_id`
,
`rd`
.
`report_date`
)
`a`
GROUP
BY
`a`
.
`equipId`
ORDER
BY
`total`
DESC
LIMIT
5
;
-- 换流变水喷雾系统3小设备状态统计视图
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_fss_3small`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_fss_3small`
AS
SELECT
`b`
.
`speId`
AS
`id`
,
`b`
.
`equipName`
AS
`equipName`
,(
CASE
WHEN
(
`b`
.
`totalNum`
>
0
)
THEN
'异常'
ELSE
'正常'
END
)
AS
`status`
,
`b`
.
`totalNum`
AS
`totalNum`
FROM
(
SELECT
`a`
.
`speId`
AS
`speId`
,
`a`
.
`equipName`
AS
`equipName`
,
count
(
wesl
.
equipment_specific_id
)
as
totalNum
FROM
(
SELECT
`wes`
.
`id`
AS
`speId`
,
`wed`
.
`equipment_name`
AS
`equipName`
,
`wed`
.
`equipment_id`
AS
`equipmentId`
FROM
(
`wl_equipment_specific`
`wes`
LEFT
JOIN
`wl_equipment_detail`
`wed`
ON
((
`wed`
.
`id`
=
`wes`
.
`equipment_detail_id`
)))
WHERE
(
find_in_set
(
'1657264678908'
,
`wes`
.
`system_id`
)
>
0
)
GROUP
BY
`wed`
.
`equipment_id`
)
`a`
LEFT
JOIN
`wl_equipment_specific_alarm_log`
`wesl`
ON
`wesl`
.
`equipment_specific_id`
=
`a`
.
`speId`
GROUP
BY
`a`
.
`equipmentId`
)
b
ORDER
BY
`b`
.
`totalNum`
DESC
;
-- 换流变水喷雾系统4小设备状态统计视图
DROP
VIEW
IF
EXISTS
`v_fire_equip_status_fss`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_status_fss`
AS
SELECT
sum
((
CASE
WHEN
(
`temp`
.
`value`
=
'true'
)
THEN
1
ELSE
0
END
))
AS
`total`
,
`temp`
.
`fieldlabel`
AS
`fieldlabel`
,
`temp`
.
`fieldname`
AS
`fieldname`
FROM
(
SELECT
(
CASE
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%FireAlarm'
)
THEN
'FireAlarm'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Fault'
)
THEN
'Fault'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Shield'
)
THEN
'Shield'
ELSE
NULL
END
)
AS
`fieldname`
,(
CASE
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%FireAlarm'
)
THEN
'火灾报警'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Fault'
)
THEN
'故障'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Shield'
)
THEN
'屏蔽'
ELSE
NULL
END
)
AS
`fieldlabel`
,
`esi`
.
`value`
AS
`value`
FROM
((
`wl_equipment_specific_index`
`esi`
LEFT
JOIN
`wl_equipment_specific`
`es`
ON
((
`es`
.
`id`
=
`esi`
.
`equipment_specific_id`
)))
LEFT
JOIN
`f_fire_fighting_system`
`fs`
ON
((
0
<>
find_in_set
(
`fs`
.
`id`
,
`es`
.
`system_id`
))))
WHERE
((
--此处需要更改为水喷雾系统code
`fs`
.
`code`
=
'011023306003010000000129'
)
AND
((
`esi`
.
`equipment_index_key`
LIKE
'%FireAlarm'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%Fault'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%Shield'
))))
`temp`
GROUP
BY
`temp`
.
`fieldlabel`
,
`temp`
.
`fieldname`
;
-- 换流变水喷雾系统4小7天风险趋势统计视图
DROP
VIEW
IF
EXISTS
`v_fire_fsssys_alarm_equip_total_7d`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_fsssys_alarm_equip_total_7d`
AS
SELECT
ifnull
(
`b`
.
`fightSysId`
,
NULL
)
AS
`fightSysId`
,
ifnull
(
`b`
.
`fightSysCode`
,
NULL
)
AS
`fightSysCode`
,
ifnull
(
`b`
.
`fightSysName`
,
NULL
)
AS
`fightSysName`
,
ifnull
(
`b`
.
`reportDate`
,
`c`
.
`click_date`
)
AS
`reportDate`
,
ifnull
(
`b`
.
`FireAlarm`
,
0
)
AS
`FireAlarm`
,
ifnull
(
`b`
.
`Fault`
,
0
)
AS
`Fault`
,
ifnull
(
`b`
.
`Shield`
,
0
)
AS
`Shield`
FROM
((
SELECT
curdate
()
AS
`click_date`
UNION
ALL
SELECT
(
curdate
()
-
INTERVAL
1
DAY
)
AS
`click_date`
UNION
ALL
SELECT
(
curdate
()
-
INTERVAL
2
DAY
)
AS
`click_date`
UNION
ALL
SELECT
(
curdate
()
-
INTERVAL
3
DAY
)
AS
`click_date`
UNION
ALL
SELECT
(
curdate
()
-
INTERVAL
4
DAY
)
AS
`click_date`
UNION
ALL
SELECT
(
curdate
()
-
INTERVAL
5
DAY
)
AS
`click_date`
UNION
ALL
SELECT
(
curdate
()
-
INTERVAL
6
DAY
)
AS
`click_date`
)
`c`
LEFT
JOIN
(
SELECT
ifnull
(
`a`
.
`fightSysName`
,
NULL
)
AS
`fightSysName`
,
ifnull
(
`a`
.
`fightSysCode`
,
NULL
)
AS
`fightSysCode`
,
ifnull
(
`a`
.
`fightSysId`
,
NULL
)
AS
`fightSysId`
,
ifnull
(
`a`
.
`report_date`
,
NULL
)
AS
`reportDate`
,
sum
(
IF
(
locate
(
'Fault'
,
`a`
.
`indxKey`
),
`a`
.
`total`
,
0
))
AS
`Fault`
,
sum
(
IF
(
locate
(
'FireAlarm'
,
`a`
.
`indxKey`
),
`a`
.
`total`
,
0
))
AS
`FireAlarm`
,
sum
(
IF
(
locate
(
'Shield'
,
`a`
.
`indxKey`
),
`a`
.
`total`
,
0
))
AS
`Shield`
FROM
(
SELECT
`rd`
.
`index_type`
AS
`indxKey`
,
`rd`
.
`index_name`
AS
`index_name`
,
count
(
DISTINCT
`rd`
.
`equipment_specific_id`
)
AS
`total`
,
`rd`
.
`report_date`
AS
`report_date`
,
`fs`
.
`name`
AS
`fightSysName`
,
`fs`
.
`code`
AS
`fightSysCode`
,
`fs`
.
`id`
AS
`fightSysId`
FROM
(
`wl_equipment_alarm_report_day`
`rd`
LEFT
JOIN
`f_fire_fighting_system`
`fs`
ON
((
0
<>
find_in_set
(
`fs`
.
`id`
,
`rd`
.
`system_ids`
))))
WHERE
(((
curdate
()
-
INTERVAL
7
DAY
)
<=
cast
(
`rd`
.
`report_date`
AS
date
))
--此处需要更改为水喷雾系统code
AND
(
`fs`
.
`code`
=
'011023306003010000000129'
)
AND
((
`rd`
.
`index_type`
LIKE
'%Fault'
)
OR
(
`rd`
.
`index_type`
LIKE
'%FireAlarm'
)
OR
(
`rd`
.
`index_type`
LIKE
'%Shield'
)))
GROUP
BY
`rd`
.
`equipment_specific_id`
,
`rd`
.
`report_date`
,
`rd`
.
`alarm_type_name`
)
`a`
GROUP
BY
`a`
.
`report_date`
,
`a`
.
`fightSysCode`
)
`b`
ON
((
to_days
(
`c`
.
`click_date`
)
=
to_days
(
`b`
.
`reportDate`
))))
ORDER
BY
`c`
.
`click_date`
;
-- 换流变水喷雾系统4小60List统计视图
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_60list_fss`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_fss`
AS
SELECT
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
IF
((
`sa`
.
`clean_time`
IS
NOT
NULL
),
'已消除'
,
'未消除'
)
AS
`cleanStatus`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
FROM
(
`wl_equipment_specific_alarm_log`
`sa`
LEFT
JOIN
`wl_equipment_specific`
`ec`
ON
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
WHERE
(
--此处需要更改为水喷雾系统code
0
<>
find_in_set
(
'011023306003010000000013'
,
`sa`
.
`system_codes`
))
ORDER
BY
`sa`
.
`create_date`
DESC
LIMIT
60
;
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
View file @
254a0712
...
...
@@ -285,130 +285,126 @@
</select>
<select
id=
"pageAlarmsInfo"
resultType=
"Map"
>
SELECT
d.*
FROM
(
SELECT
wlesal.id AS alarmId,
wlesal.org_code,
wlesal.equipment_specific_id AS fireEquipmentId,
wlesal.equipment_detail_id AS equipDetailId,
wlesal.equipment_specific_code AS fireEquipmentCode,
wlesal.equipment_specific_name AS fireEquipmentName,
concat(
wlesal.equipment_specific_name,
wlesal.equipment_specific_index_name
) AS alamContent,
IF (
wlesal.confirm_type
<![CDATA[<>]]>
'',
'已处理',
'未处理'
) handleStatus,
IF (
wlesal.clean_time IS NOT NULL,
'已消除',
'未消除'
) cleanStatus,
IF (
wlesal.clean_time IS NOT NULL,
'1',
'2'
) cleanStatusVal,
wlesal.confirm_type AS handleType,
wlesal.system_codes AS systemCodes,
wlesal.equipment_index_id AS fireEquipmentIndexId,
wlesal.equipment_specific_index_key AS fireEquipmentSpecificIndexKey,
wlesal.equipment_specific_index_name AS fireEquipmentSpecificIndexName,
we.img AS imgUrl,
CASE wlesal.equipment_specific_index_value
WHEN 'true' THEN
'是'
WHEN 'false' THEN
'否'
ELSE
wlesal.equipment_specific_index_value
END AS fireEquipmentPointValue,
wlesa.frequency AS frequency,
wlesal.status AS status,
wlesal.type AS type,
(select type_name from wl_signal_classify sc where sc.type_code = wlesal.type limit 1) as alarmType,
wlesal.create_date AS createDate,
wlesal.build_id AS buildId,
wlesa.recovery_date AS recoveryDate,
wlesal.location AS warehouseStructureName,
(
SELECT
group_concat(fet.`name`)
FROM
f_equipment_fire_equipment AS fefe
LEFT JOIN f_equipment AS fet ON fet.id = fefe.equipment_id
WHERE
fefe.fire_equipment_id = wlesal.equipment_specific_id
) AS equipmentName,
we.code AS equipDetailCode
wlesal.id AS alarmId,
wlesal.org_code AS orgCode,
wlesal.equipment_specific_id AS fireEquipmentId,
wlesal.equipment_detail_id AS equipDetailId,
wlesal.equipment_specific_code AS fireEquipmentCode,
wlesal.equipment_specific_name AS fireEquipmentName,
concat(
wlesal.equipment_specific_name,
wlesal.equipment_specific_index_name
) AS alamContent,
IF (
wlesal.confirm_type
<![CDATA[<>]]>
'',
'已处理',
'未处理'
) handleStatus,
IF (
wlesal.clean_time IS NOT NULL,
'已消除',
'未消除'
) cleanStatus,
IF (
wlesal.clean_time IS NOT NULL,
'1',
'2'
) cleanStatusVal,
wlesal.confirm_type AS handleType,
wlesal.system_codes AS systemCodes,
wlesal.equipment_index_id AS fireEquipmentIndexId,
wlesal.equipment_specific_index_key AS fireEquipmentSpecificIndexKey,
wlesal.equipment_specific_index_name AS fireEquipmentSpecificIndexName,
we.img AS imgUrl,
CASE wlesal.equipment_specific_index_value
WHEN 'true' THEN
'是'
WHEN 'false' THEN
'否'
ELSE
wlesal.equipment_specific_index_value
END AS fireEquipmentPointValue,
wlesa.frequency AS frequency,
wlesal.status AS status,
wlesal.type AS `type`,
(select type_name from wl_signal_classify sc where sc.type_code = wlesal.type limit 1) as alarmType,
wlesal.create_date AS createDate,
wlesal.build_id AS buildId,
wlesa.recovery_date AS recoveryDate,
wlesal.location AS warehouseStructureName,
<!-- (
SELECT
group_concat(fet.`name`)
FROM
f_equipment_fire_equipment AS fefe
LEFT JOIN f_equipment AS fet ON fet.id = fefe.equipment_id
WHERE
fefe.fire_equipment_id = wlesal.equipment_specific_id
) 页面未使用该字段返回值,不进行查询,该字段查询影响查询效率-->
'' AS equipmentName,
wlesal.equipment_code AS equipmentCode
FROM
wl_equipment_specific_alarm_log wlesal
LEFT JOIN wl_equipment we ON wlesal.equipment_code = we.code
LEFT JOIN wl_equipment_specific_alarm wlesa ON wlesa.id = wlesal.equipment_specific_alarm_id
LEFT JOIN wl_equipment_specific wls ON wls.id = wlesal.equipment_specific_id
wl_equipment_specific_alarm_log wlesal
LEFT JOIN wl_equipment we ON wlesal.equipment_code = we.code
LEFT JOIN wl_equipment_specific_alarm wlesa ON wlesa.id = wlesal.equipment_specific_alarm_id
<where>
<if
test=
"param.bizOrgCode != null and param.bizOrgCode != ''"
>
AND
<if
test=
"param.bizOrgCode != null and param.bizOrgCode != ''"
>
AND
wls.biz_org_code like concat (#{param.bizOrgCode},'%')
</if>
<if
test=
"param.warehouseStructureName != null and param.warehouseStructureName != ''"
>
wlesal.location like concat(concat("%",#{param.warehouseStructureName}),"%")
</if>
<if
test=
"param.equipCode != null and param.equipCode != ''"
>
AND wlesal.equipment_specific_code like concat(concat("%",#{param.equipCode}),"%")
</if>
<if
test=
"param.confirmType != null and param.confirmType != '' and param.confirmType == 1"
>
AND wlesal.confirm_type
<![CDATA[<>]]>
''
</if>
<if
test=
"param.confirmType != null and param.confirmType != '' and param.confirmType == 0"
>
AND wlesal.confirm_type IS NULL
</if>
<if
test=
"param.confirmType != null and param.confirmType != '' and param.confirmType == 2"
>
AND wlesal.clean_time IS NULL
</if>
<if
test=
"param.confirmType != null and param.confirmType != '' and param.confirmType == 3"
>
AND wlesal.clean_time IS NOT NULL
</if>
<if
test=
"param.beginDate!=null"
>
AND wlesal.create_date
<![CDATA[>=]]>
#{param.beginDate}
</if>
<if
test=
"param.endDate!=null"
>
AND wlesal.create_date
<![CDATA[<=]]>
#{param.endDate}
</if>
<if
test=
"param.alarmType != null and param.alarmType != ''"
>
AND wlesal.type = #{param.alarmType}
</if>
<if
test=
"param.systemCode != null and param.systemCode != ''"
>
AND find_in_set(#{param.systemCode}, wlesal.system_codes)
</if>
<if
test=
"param.buildId != null and param.buildId != ''"
>
and (wlesal.build_id=#{param.buildId}
or find_in_set(wlesal.equipment_specific_id, (SELECT s.point_in_scene FROM `wl_source_scene` s where s.source_id =
#{param.buildId})))
</if>
<if
test=
"param.id!=null and param.id!=''"
>
AND wlesal.equipment_specific_id = #{param.id}
</if>
<if
test=
"param.status!=null and param.status!=3"
>
AND wlesal.status = #{param.status}
</if>
<if
test=
"param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 1"
>
AND
wlesal.clean_time IS NOT NULL
</if>
<if
test=
"param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 2"
>
AND
wlesal.clean_time IS NULL
</if>
<if
test=
"param.isRemoveShield != null and param.isRemoveShield != ''"
>
AND
wlesal.type != 'SHIELD'
</if>
<if
test=
"param.isRemovedFire != null and param.isRemovedFire == 1"
>
AND
wlesal.type != 'FIREALARM'
</if>
<if
test=
"param.equipmentCode != null and param.equipmentCode != ''"
>
AND wlesal.equipment_code like concat(concat("%",#{param.equipmentCode}),"%")
</if>
<if
test=
"param.indexTypeCode != null and param.indexTypeCode != ''"
>
AND wlesal.type = #{param.indexTypeCode}
</if>
<if
test=
"param.fireEquipmentSpecificIndexKey != null and param.fireEquipmentSpecificIndexKey != ''"
>
AND wlesal.equipment_specific_index_key like concat(concat("%",#{param.fireEquipmentSpecificIndexKey}),"%")
</if>
</where>
) d
<where>
<if
test=
"param.warehouseStructureName != null and param.warehouseStructureName != ''"
>
d.warehouseStructureName like
concat(concat("%",#{param.warehouseStructureName}),"%")
</if>
<if
test=
"param.equipCode != null and param.equipCode != ''"
>
AND d.fireEquipmentCode like
concat(concat("%",#{param.equipCode}),"%")
</if>
<if
test=
"param.equipDetailCode != null and param.equipDetailCode != ''"
>
AND d.equipDetailCode like
concat(concat("%",#{param.equipDetailCode}),"%")
</if>
<choose>
<when
test=
"param.confirmType != null and param.confirmType != '' and param.confirmType == 1"
>
AND d.handleType
<![CDATA[<>]]>
''
</when>
<when
test=
"param.confirmType != null and param.confirmType != '' and param.confirmType == 0"
>
AND d.handleType IS NULL
</when>
<when
test=
"param.confirmType != null and param.confirmType != '' and param.confirmType == 2"
>
AND d.cleanStatus = '未消除'
</when>
<when
test=
"param.confirmType != null and param.confirmType != '' and param.confirmType == 3"
>
AND d.cleanStatus = '已消除'
</when>
</choose>
<if
test=
"param.beginDate!=null"
>
AND d.createDate
<![CDATA[>=]]>
#{param.beginDate}
</if>
<if
test=
"param.endDate!=null"
>
AND d.createDate
<![CDATA[<=]]>
#{param.endDate}
</if>
<if
test=
"param.alarmType != null and param.alarmType != ''"
>
AND d.type = #{param.alarmType}
</if>
<if
test=
"param.systemCode != null and param.systemCode != ''"
>
AND find_in_set(#{param.systemCode},d.systemCodes)
</if>
<if
test=
"param.buildId != null and param.buildId != ''"
>
and (d.buildId=#{param.buildId}
or find_in_set(d.fireEquipmentId,(SELECT s.point_in_scene FROM `wl_source_scene` s where s.source_id =
#{param.buildId})))
</if>
<if
test=
"param.id!=null and param.id!=''"
>
AND d.fireEquipmentId = #{param.id}
</if>
<if
test=
"param.status!=null and param.status!=3"
>
AND d.status = #{param.status}
</if>
<if
test=
"param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 1"
>
AND
d.cleanStatus = '已消除'
</if>
<if
test=
"param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 2"
>
AND
d.cleanStatus = '未消除'
</if>
<if
test=
"param.isRemoveShield != null and param.isRemoveShield != ''"
>
AND
d.type != 'SHIELD'
</if>
<if
test=
"param.isRemovedFire != null and param.isRemovedFire == 1"
>
AND
d.type != 'FIREALARM'
</if>
</where>
ORDER BY d.createDate DESC
ORDER BY wlesal.create_date DESC
</select>
<select
id=
"getAlarmList"
resultType=
"java.util.HashMap"
>
SELECT
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
254a0712
...
...
@@ -1319,6 +1319,7 @@
es.id,
ed.`name`,
es.`code`,
es.equipment_code AS equipmentCode,
es.`qr_code` AS qrCde,
es.system_id,
ws.full_name as location
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
254a0712
...
...
@@ -746,6 +746,9 @@
<if
test=
'confirmType != null and confirmType == 3'
>
and wlesal.clean_time IS NOT NULL
</if>
<if
test=
'equipmentId != null'
>
and wlesal.equipment_id=#{equipmentId}
</if>
</where>
) d
<where>
...
...
@@ -1162,288 +1165,16 @@
`wl_equipment_specific_index` si
WHERE
si.equipment_index_key = 'SCS_FireDamper_FireAlarm'
) AS fhznum
) AS fhznum,
(SELECT
count(1)
from
`wl_equipment_specific_index` si
where
si.equipment_index_key = 'FAS_VESDA_SignalMAction') as vesdanum
</select>
<select
id=
"fireAlarmSysIndexNumber"
resultType=
"java.util.Map"
>
SELECT
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_SmokeAlarm_Shield'
AND s.`value` = 'true'
) AS ywtcqpb,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_SmokeAlarm_Fault'
AND s.`value` = 'true'
) AS ywtcqgz,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_SmokeAlarm_FireAlarm'
AND s.`value` = 'true'
) AS ywtcqhj,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_SoundLightAlarm_Shield'
AND s.`value` = 'true'
) AS sgbjqpb,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_SoundLightAlarm_Fault'
AND s.`value` = 'true'
) AS sgbjqgz,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_SoundLightAlarm_FireAlarm'
AND s.`value` = 'true'
) AS sgbjqhj,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_InfraredLight_Shield'
AND s.`value` = 'true'
) AS hwdspb,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_InfraredLight_Fault'
AND s.`value` = 'true'
) AS hwdsgz,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_InfraredLight_FireAlarm'
AND s.`value` = 'true'
) AS hwdshj,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_ManualAlarm_Shield'
AND s.`value` = 'true'
) AS sdbjapb,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_ManualAlarm_Fault'
AND s.`value` = 'true'
) AS sdbjagz,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_ManualAlarm_FireAlarm'
AND s.`value` = 'true'
) AS sdbjahj,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_TemperatureCable_Shield'
AND s.`value` = 'true'
) AS gwdlpb,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_TemperatureCable_Fault'
AND s.`value` = 'true'
) AS gwdlgz,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_TemperatureCable_FireAlarm'
AND s.`value` = 'true'
) AS gwdlhj,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_TemperatureFireDetector_Shield'
AND s.`value` = 'true'
) AS fbwgpb,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_TemperatureFireDetector_Fault'
AND s.`value` = 'true'
) AS fbwggz,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_TemperatureFireDetector_FireAlarm'
AND s.`value` = 'true'
) AS fbwgqhj,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_AirSampler_Shield'
AND s.`value` = 'true'
) AS kqcypb,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_AirSampler_Fault'
AND s.`value` = 'true'
) AS kqcygz,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_AirSampler_FireAlarm'
AND s.`value` = 'true'
) AS kqcyhj,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_UltravioletLight_Shield'
AND s.`value` = 'true'
) AS zwhypb,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_UltravioletLight_Fault'
AND s.`value` = 'true'
) AS zwhygz,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_UltravioletLight_FireAlarm'
AND s.`value` = 'true'
) AS zwhyhj,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'SCS_FireDamper_Shield'
AND s.`value` = 'true'
) AS fhzpb,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'SCS_FireDamper_Fault'
AND s.`value` = 'true'
) AS fhzgz,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'SCS_FireDamper_FireAlarm'
AND s.`value` = 'true'
) AS fhzhj,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FES_FireBroadcast_Shield'
AND s.`value` = 'true'
) AS yjgbpb,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FES_FireBroadcast_Fault'
AND s.`value` = 'true'
) AS yjgbgz,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FES_FireBroadcast_Start'
AND s.`value` = 'true'
) AS yjgbqd,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` si
WHERE
si.equipment_index_key = 'FES_FireBroadcast_Start'
) AS yjgbnum
<select
id=
"fireAlarmSysIndexNumber"
resultType=
"java.util.Map"
>
SELECT * FROM v_fire_fas_index_num
</select>
<select
id=
"fireWaterSysHydrant"
resultType=
"java.util.Map"
>
SELECT
...
...
@@ -1669,6 +1400,18 @@
LIMIT 1
</select>
<select
id=
"fireWaterSysPipeStatus"
resultType=
"java.util.Map"
>
SELECT
esi.`value`,
esi.equipment_index_key
FROM
`wl_equipment_specific_index` esi
LEFT JOIN wl_equipment_specific es ON es.id = esi.equipment_specific_id
WHERE
-- 此处为水喷雾系统code,水系统实现消息实时刷新
es.`code` = "011023306003020000010509"
</select>
<select
id=
"fireFoamSysEquipmentIndexNumber"
resultType=
"java.util.Map"
>
select * from v_fire_equip_ffs_num
</select>
...
...
@@ -1697,7 +1440,10 @@
`d`.`mjnum` AS `mjnum`,
`d`.`mjqd` AS `mjqd`,
`d`.`mjgz` AS `mjgz`,
`d`.`mjpb` AS `mjpb`
`d`.`mjpb` AS `mjpb`,
`d`.fhzpb AS fhzpb,
`d`.fhzgz AS fhzgz,
`d`.fhzhj AS fhzhj
FROM
(
SELECT
...
...
@@ -1910,7 +1656,34 @@
where
si.equipment_index_key = 'ACS_AccessControl_Shield'
and si.`value` = 'true'
) AS `mjpb`
) AS `mjpb`,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'SCS_FireDamper_Shield'
AND s.`value` = 'true'
) AS fhzpb,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'SCS_FireDamper_Fault'
AND s.`value` = 'true'
) AS fhzgz,
(
SELECT
count(1)
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'SCS_FireDamper_FireAlarm'
AND s.`value` = 'true'
) AS fhzhj
) `d`
</select>
<select
id=
"fireFoamSysEquipmentNumber"
resultType=
"java.util.Map"
>
...
...
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