Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
f448b4dd
Commit
f448b4dd
authored
Jan 21, 2021
by
maoying
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_upgrade' of 172.16.10.76:station/YeeAmosFireAutoSysRoot into upgrade
parents
2813ca3d
ea21ae04
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
615 additions
and
47 deletions
+615
-47
FireStation.java
...ain/java/com/yeejoin/amos/fas/dao/entity/FireStation.java
+56
-2
ContingencyRo.java
...yeejoin/amos/fas/business/action/model/ContingencyRo.java
+6
-0
ProtalDataRo.java
.../yeejoin/amos/fas/business/action/model/ProtalDataRo.java
+1
-1
EquipmentSpecificIndexController.java
...business/controller/EquipmentSpecificIndexController.java
+70
-0
EquipmentSpecificIndexMapper.java
...fas/business/dao/mapper/EquipmentSpecificIndexMapper.java
+22
-0
EquipmentSpecificMapper.java
...amos/fas/business/dao/mapper/EquipmentSpecificMapper.java
+8
-0
ImpAndFireEquipMapper.java
...n/amos/fas/business/dao/mapper/ImpAndFireEquipMapper.java
+7
-0
PollPointMapper.java
...yeejoin/amos/fas/business/dao/mapper/PollPointMapper.java
+25
-0
EquipmentSpecificIndexServiceImpl.java
...iness/service/impl/EquipmentSpecificIndexServiceImpl.java
+56
-0
FireEquipServiceImpl.java
.../amos/fas/business/service/impl/FireEquipServiceImpl.java
+40
-24
HandlerMqttMessageImpl.java
...mos/fas/business/service/impl/HandlerMqttMessageImpl.java
+30
-9
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+20
-6
EquipmentSpecificIndexService.java
...business/service/intfc/EquipmentSpecificIndexService.java
+23
-0
EquipmentSpecificIndexVo.java
...eejoin/amos/fas/business/vo/EquipmentSpecificIndexVo.java
+32
-1
PollPointVo.java
...in/java/com/yeejoin/amos/fas/business/vo/PollPointVo.java
+30
-0
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+8
-1
dbTemplate_equipment_specific.xml
...ain/resources/db/mapper/dbTemplate_equipment_specific.xml
+18
-0
dbTemplate_equipment_specific_index.xml
...sources/db/mapper/dbTemplate_equipment_specific_index.xml
+92
-0
dbTemplate_fire_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
+10
-3
dbTemplate_impAndfire_equip.xml
.../main/resources/db/mapper/dbTemplate_impAndfire_equip.xml
+14
-0
dbTemplate_p_point.xml
...Start/src/main/resources/db/mapper/dbTemplate_p_point.xml
+47
-0
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireStation.java
View file @
f448b4dd
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.*
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
javax.persistence.*
;
/**
/**
* 消防站点
* 消防站点
* @author Administrator
* @author Administrator
...
@@ -92,6 +91,29 @@ public class FireStation extends BasicEntity{
...
@@ -92,6 +91,29 @@ public class FireStation extends BasicEntity{
@Lob
@Lob
private
String
ue4Rotation
;
private
String
ue4Rotation
;
/**
* 高度/最大液位(m)
*/
@Transient
private
Double
height
;
/**
* 低度/最小液位(m)
*/
@Transient
private
Double
low
;
/**
* 实时液位(m)
*/
@Transient
private
String
level
;
/**
* 设计容量(m³)
*/
@Transient
private
Double
designCapacity
;
@Transient
@Transient
public
List
<
Map
>
getFireEquipmentInfo
()
{
public
List
<
Map
>
getFireEquipmentInfo
()
{
return
fireEquipmentInfo
;
return
fireEquipmentInfo
;
...
@@ -206,4 +228,36 @@ public class FireStation extends BasicEntity{
...
@@ -206,4 +228,36 @@ public class FireStation extends BasicEntity{
public
void
setUe4Rotation
(
String
ue4Rotation
)
{
public
void
setUe4Rotation
(
String
ue4Rotation
)
{
this
.
ue4Rotation
=
ue4Rotation
;
this
.
ue4Rotation
=
ue4Rotation
;
}
}
public
Double
getHeight
()
{
return
height
;
}
public
void
setHeight
(
Double
height
)
{
this
.
height
=
height
;
}
public
Double
getLow
()
{
return
low
;
}
public
void
setLow
(
Double
low
)
{
this
.
low
=
low
;
}
public
Double
getDesignCapacity
()
{
return
designCapacity
;
}
public
void
setDesignCapacity
(
Double
designCapacity
)
{
this
.
designCapacity
=
designCapacity
;
}
public
String
getLevel
()
{
return
level
;
}
public
void
setLevel
(
String
level
)
{
this
.
level
=
level
;
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/model/ContingencyRo.java
View file @
f448b4dd
...
@@ -85,4 +85,10 @@ public class ContingencyRo implements Serializable {
...
@@ -85,4 +85,10 @@ public class ContingencyRo implements Serializable {
@Label
(
"遥信数据"
)
@Label
(
"遥信数据"
)
private
HashMap
<
String
,
Integer
>
telesignallingMap
;
private
HashMap
<
String
,
Integer
>
telesignallingMap
;
//消防炮
@Label
(
"消防炮编号"
)
private
String
fireMonitorCodes
;
@Label
(
"消防炮id"
)
private
String
fireMonitorIds
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/model/ProtalDataRo.java
View file @
f448b4dd
...
@@ -45,7 +45,7 @@ public class ProtalDataRo extends BasicsRo {
...
@@ -45,7 +45,7 @@ public class ProtalDataRo extends BasicsRo {
* 任务编号,如果无任务,则填充0
* 任务编号,如果无任务,则填充0
*/
*/
@Label
(
"任务id"
)
@Label
(
"任务id"
)
private
Long
taskId
=
0
l
;
private
Long
taskId
=
0L
;
/**
/**
* 任务状态
* 任务状态
*/
*/
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/EquipmentSpecificIndexController.java
0 → 100644
View file @
f448b4dd
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.yeejoin.amos.fas.business.service.intfc.EquipmentSpecificIndexService
;
import
com.yeejoin.amos.fas.config.Permission
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
lombok.val
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @ProjectName: YeeAmosFireAutoSysRoot
* @Package: com.yeejoin.amos.fas.business.controller
* @ClassName: EquipmentSpecificIndexController
* @Author: Jianqiang Gao
* @Description: EquipmentSpecificIndexController
* @Date: 2021/1/18 16:32
* @Version: 1.0
*/
@RestController
@RequestMapping
(
value
=
"/api/equipSpecificIndex"
)
@Api
(
tags
=
"装备性能指标Api"
)
public
class
EquipmentSpecificIndexController
extends
BaseController
{
@Value
(
"${autoSys.alarm.nameKeys}"
)
private
String
nameKeys
;
@Value
(
"${autoSys.alarm.status}"
)
private
String
status
;
@Value
(
"${autoSys.alarm.value}"
)
private
String
value
;
@Autowired
private
EquipmentSpecificIndexService
equipmentSpecificIndexService
;
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取最新告警状态"
,
notes
=
"获取最新告警状态"
)
@RequestMapping
(
value
=
"/queryInitAlarm"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryInitAlerm
(
@ApiParam
(
value
=
"物联采集属性值"
,
required
=
true
)
@RequestParam
String
value
,
@ApiParam
(
value
=
"多nameKey,中间英文逗号隔开"
,
required
=
true
)
@RequestParam
String
nameKeys
,
@ApiParam
(
value
=
"多status,中间英文逗号隔开"
,
required
=
true
)
@RequestParam
String
status
)
{
return
CommonResponseUtil
.
success
(
equipmentSpecificIndexService
.
queryInitAlarm
(
value
,
nameKeys
,
status
));
}
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取三维初始化告警信息"
,
notes
=
"获取三维初始化告警信息"
)
@RequestMapping
(
value
=
"/getInitAlarm"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getInitAlarm
(
@ApiParam
(
value
=
"物联采集属性值"
)
@RequestParam
(
required
=
false
)
String
value
,
@ApiParam
(
value
=
"多nameKey,中间英文逗号隔开"
)
@RequestParam
(
required
=
false
)
String
nameKeys
,
@ApiParam
(
value
=
"多status,中间英文逗号隔开"
)
@RequestParam
(
required
=
false
)
String
status
)
{
if
(!
StringUtils
.
isNotBlank
(
value
)
&&
!
StringUtils
.
isNotBlank
(
nameKeys
)
&&
!
StringUtils
.
isNotBlank
(
status
))
{
value
=
this
.
value
;
nameKeys
=
this
.
nameKeys
;
status
=
this
.
status
;
}
return
CommonResponseUtil
.
success
(
equipmentSpecificIndexService
.
getInitAlarm
(
value
,
nameKeys
,
status
));
}
}
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/EquipmentSpecificIndexMapper.java
0 → 100644
View file @
f448b4dd
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 装备性能指标 Mapper 接口
*
* @author Jianqiang Gao
* @date 2021-01-18
*/
public
interface
EquipmentSpecificIndexMapper
extends
BaseMapper
<
EquipmentSpecificIndexVo
>
{
List
<
EquipmentSpecificIndexVo
>
findByDetailIdInAndNameKey
(
@Param
(
"list"
)
List
<
Object
>
equipDetailIdList
,
@Param
(
"nameKey"
)
String
nameKey
);
List
<
EquipmentSpecificIndexVo
>
queryInitAlarm
(
@Param
(
"value"
)
String
value
,
@Param
(
"list"
)
String
[]
nameKeys
);
List
<
EquipmentSpecificIndexVo
>
getInitAlarm
(
@Param
(
"value"
)
String
value
,
@Param
(
"list"
)
String
[]
nameKeys
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/EquipmentSpecificMapper.java
View file @
f448b4dd
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint;
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 设备配置 Mapper 接口
* 设备配置 Mapper 接口
...
@@ -69,4 +70,11 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecificVo>
...
@@ -69,4 +70,11 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecificVo>
* @Date 2020/11/17 19:32
* @Date 2020/11/17 19:32
*/
*/
EquipmentSpecificForRiskVo
getOneById
(
@Param
(
"id"
)
long
id
);
EquipmentSpecificForRiskVo
getOneById
(
@Param
(
"id"
)
long
id
);
/**
* 查询重点设备关联消防炮
* @param equipmentId
* @return
*/
Map
queryFireMonitor
(
@Param
(
"equipmentId"
)
String
equipmentId
,
@Param
(
"code"
)
String
fireMonitor
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/ImpAndFireEquipMapper.java
View file @
f448b4dd
...
@@ -32,6 +32,13 @@ public interface ImpAndFireEquipMapper extends BaseMapper {
...
@@ -32,6 +32,13 @@ public interface ImpAndFireEquipMapper extends BaseMapper {
Map
queryForCamera
(
@Param
(
"equipmentId"
)
String
equipmentId
);
Map
queryForCamera
(
@Param
(
"equipmentId"
)
String
equipmentId
);
/**
* 查询重点设备关联视频点位
* @param equipmentId
* @return
*/
Map
queryCamera
(
@Param
(
"equipmentId"
)
String
equipmentId
);
List
<
Map
<
String
,
Object
>>
findEquipVideo
();
List
<
Map
<
String
,
Object
>>
findEquipVideo
();
public
Boolean
existsAlarmPointByEqpPointIdAndEquipId
(
@Param
(
"pointId"
)
long
pointId
,
@Param
(
"equipmentId"
)
long
equipmentId
);
public
Boolean
existsAlarmPointByEqpPointIdAndEquipId
(
@Param
(
"pointId"
)
long
pointId
,
@Param
(
"equipmentId"
)
long
equipmentId
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/PollPointMapper.java
0 → 100644
View file @
f448b4dd
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo
;
import
com.yeejoin.amos.fas.business.vo.PollPointVo
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @ProjectName: YeeAmosFireAutoSysRoot
* @Package: com.yeejoin.amos.fas.business.dao.mapper
* @ClassName: PollPointMapper
* @Author: Jianqiang Gao
* @Description: 巡检点Mapper
* @Date: 2021/1/18 17:36
* @Version: 1.0
*/
public
interface
PollPointMapper
extends
BaseMapper
<
PollPointVo
>
{
List
<
PollPointVo
>
queryInitAlarm
(
@Param
(
"list"
)
String
[]
status
);
List
<
EquipmentSpecificIndexVo
>
getInitAlarm
(
@Param
(
"list"
)
String
[]
status
);
}
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentSpecificIndexServiceImpl.java
0 → 100644
View file @
f448b4dd
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.yeejoin.amos.fas.business.dao.mapper.EquipmentSpecificIndexMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PollPointMapper
;
import
com.yeejoin.amos.fas.business.service.intfc.EquipmentSpecificIndexService
;
import
com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo
;
import
com.yeejoin.amos.fas.business.vo.PollPointVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @ProjectName: YeeAmosFireAutoSysRoot
* @Package: com.yeejoin.amos.fas.business.service.impl
* @ClassName: EquipmentSpecificIndexServiceImpl
* @Author: Jianqiang Gao
* @Description: EquipmentSpecificIndexServiceImpl
* @Date: 2021/1/18 16:35
* @Version: 1.0
*/
@Service
public
class
EquipmentSpecificIndexServiceImpl
implements
EquipmentSpecificIndexService
{
@Autowired
private
EquipmentSpecificIndexMapper
equipmentSpecificIndexMapper
;
@Autowired
private
PollPointMapper
pollPointMapper
;
@Override
public
Map
<
String
,
Object
>
queryInitAlarm
(
String
value
,
String
nameKeys
,
String
status
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>(
16
);
// 查询设备告警
List
<
EquipmentSpecificIndexVo
>
equipmentSpecificAlarmVoList
=
equipmentSpecificIndexMapper
.
queryInitAlarm
(
value
,
nameKeys
.
split
(
","
));
map
.
put
(
"equip"
,
equipmentSpecificAlarmVoList
);
// 查询巡检告警
List
<
PollPointVo
>
pollPointVoList
=
pollPointMapper
.
queryInitAlarm
(
status
.
split
(
","
));
map
.
put
(
"poll"
,
pollPointVoList
);
return
map
;
}
@Override
public
List
<
EquipmentSpecificIndexVo
>
getInitAlarm
(
String
value
,
String
nameKeys
,
String
status
)
{
// 查询设备告警
List
<
EquipmentSpecificIndexVo
>
equipmentSpecificAlarmVoList
=
equipmentSpecificIndexMapper
.
getInitAlarm
(
value
,
nameKeys
.
split
(
","
));
// 查询巡检告警
List
<
EquipmentSpecificIndexVo
>
pollPointVoList
=
pollPointMapper
.
getInitAlarm
(
status
.
split
(
","
));
pollPointVoList
.
stream
().
sequential
().
collect
(
Collectors
.
toCollection
(()
->
equipmentSpecificAlarmVoList
));
return
equipmentSpecificAlarmVoList
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireEquipServiceImpl.java
View file @
f448b4dd
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.yeejoin.amos.fas.business.dao.mapper.EquipmentSpecificIndexMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDao
;
...
@@ -9,6 +10,7 @@ import com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity;
...
@@ -9,6 +10,7 @@ import com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireEquipService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireEquipService
;
import
com.yeejoin.amos.fas.business.util.FireEquipmentType
;
import
com.yeejoin.amos.fas.business.util.FireEquipmentType
;
import
com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo
;
import
com.yeejoin.amos.fas.common.enums.EquipClassifyEnum
;
import
com.yeejoin.amos.fas.common.enums.EquipClassifyEnum
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.CommonPage
;
import
com.yeejoin.amos.fas.core.common.response.CommonPage
;
...
@@ -21,14 +23,16 @@ import org.springframework.data.domain.Page;
...
@@ -21,14 +23,16 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
@Service
(
"fireEquipService"
)
@Service
(
"fireEquipService"
)
public
class
FireEquipServiceImpl
implements
IFireEquipService
{
public
class
FireEquipServiceImpl
implements
IFireEquipService
{
/**
* 液位
*/
private
final
static
String
NAME_KEY
=
"liquidLevel"
;
@Autowired
@Autowired
FireEquipMapper
fireEquipMapper
;
FireEquipMapper
fireEquipMapper
;
...
@@ -44,6 +48,9 @@ public class FireEquipServiceImpl implements IFireEquipService {
...
@@ -44,6 +48,9 @@ public class FireEquipServiceImpl implements IFireEquipService {
@Autowired
@Autowired
IFireStationDao
iFireStationDao
;
IFireStationDao
iFireStationDao
;
@Autowired
EquipmentSpecificIndexMapper
equipmentSpecificIndexMapper
;
public
FireEquipment
save
(
FireEquipment
fireEquipment
)
{
public
FireEquipment
save
(
FireEquipment
fireEquipment
)
{
Long
id
=
fireEquipment
.
getId
();
Long
id
=
fireEquipment
.
getId
();
iFireEquipmentDao
.
save
(
fireEquipment
);
iFireEquipmentDao
.
save
(
fireEquipment
);
...
@@ -52,8 +59,8 @@ public class FireEquipServiceImpl implements IFireEquipService {
...
@@ -52,8 +59,8 @@ public class FireEquipServiceImpl implements IFireEquipService {
public
FireEquipment
queryOne
(
Long
id
)
{
public
FireEquipment
queryOne
(
Long
id
)
{
Optional
<
FireEquipment
>
fireEquipment1
=
iFireEquipmentDao
.
findById
(
id
);
Optional
<
FireEquipment
>
fireEquipment1
=
iFireEquipmentDao
.
findById
(
id
);
if
(
fireEquipment1
.
isPresent
())
{
if
(
fireEquipment1
.
isPresent
())
{
return
fireEquipment1
.
get
();
return
fireEquipment1
.
get
();
}
}
return
null
;
return
null
;
...
@@ -62,9 +69,9 @@ public class FireEquipServiceImpl implements IFireEquipService {
...
@@ -62,9 +69,9 @@ public class FireEquipServiceImpl implements IFireEquipService {
public
String
[]
delete
(
String
[]
idArray
)
throws
Exception
{
public
String
[]
delete
(
String
[]
idArray
)
throws
Exception
{
for
(
String
id
:
idArray
)
{
for
(
String
id
:
idArray
)
{
Optional
<
FireEquipment
>
fireEquipment1
=
iFireEquipmentDao
.
findById
(
Long
.
parseLong
(
id
));
Optional
<
FireEquipment
>
fireEquipment1
=
iFireEquipmentDao
.
findById
(
Long
.
parseLong
(
id
));
FireEquipment
fireEquipment
=
null
;
FireEquipment
fireEquipment
=
null
;
if
(
fireEquipment1
.
isPresent
())
{
if
(
fireEquipment1
.
isPresent
())
{
fireEquipment
=
fireEquipment1
.
get
();
fireEquipment
=
fireEquipment1
.
get
();
}
}
if
(
fireEquipment
!=
null
)
{
if
(
fireEquipment
!=
null
)
{
...
@@ -107,7 +114,7 @@ public class FireEquipServiceImpl implements IFireEquipService {
...
@@ -107,7 +114,7 @@ public class FireEquipServiceImpl implements IFireEquipService {
String
endTime
,
String
endTime
,
CommonPageable
commonPageable
)
{
CommonPageable
commonPageable
)
{
long
total
=
fireEquipMapper
.
queryForFireEquipmentHistoryCount
(
fireEquipmentName
,
equipmentName
,
long
total
=
fireEquipMapper
.
queryForFireEquipmentHistoryCount
(
fireEquipmentName
,
equipmentName
,
startTime
,
startTime
,
endTime
);
endTime
);
...
@@ -122,9 +129,9 @@ public class FireEquipServiceImpl implements IFireEquipService {
...
@@ -122,9 +129,9 @@ public class FireEquipServiceImpl implements IFireEquipService {
}
}
public
Page
queryForEquipmentList
(
String
name
,
String
code
,
String
equipClassify
,
CommonPageable
commonPageable
,
String
bindStation
)
{
public
Page
queryForEquipmentList
(
String
name
,
String
code
,
String
equipClassify
,
CommonPageable
commonPageable
,
String
bindStation
)
{
long
total
=
fireEquipMapper
.
queryForEquipmentPageCount
(
name
,
code
,
equipClassify
,
bindStation
);
long
total
=
fireEquipMapper
.
queryForEquipmentPageCount
(
name
,
code
,
equipClassify
,
bindStation
);
List
<
Map
>
content
=
this
.
fireEquipMapper
.
queryForEquipmentPage
(
name
,
code
,
equipClassify
,
commonPageable
.
getOffset
(),
commonPageable
.
getPageSize
(),
bindStation
);
List
<
Map
>
content
=
this
.
fireEquipMapper
.
queryForEquipmentPage
(
name
,
code
,
equipClassify
,
commonPageable
.
getOffset
(),
commonPageable
.
getPageSize
(),
bindStation
);
Page
result
=
new
CommonPage
(
content
,
commonPageable
,
total
);
Page
result
=
new
CommonPage
(
content
,
commonPageable
,
total
);
return
result
;
return
result
;
}
}
...
@@ -132,42 +139,51 @@ public class FireEquipServiceImpl implements IFireEquipService {
...
@@ -132,42 +139,51 @@ public class FireEquipServiceImpl implements IFireEquipService {
/**
/**
* 查询设备信息明细
* 查询设备信息明细
*
* @param type
* @param type
* @param id
* @param id
* @return
* @return
* @throws Exception
* @throws Exception
*/
*/
public
Object
queryForDetail
(
String
type
,
Long
id
)
throws
Exception
public
Object
queryForDetail
(
String
type
,
Long
id
)
throws
Exception
{
{
Object
returnEntity
=
null
;
Object
returnEntity
=
null
;
FireEquipmentType
fireEquipmentType
=
FireEquipmentType
.
valueOf
(
type
);
FireEquipmentType
fireEquipmentType
=
FireEquipmentType
.
valueOf
(
type
);
switch
(
fireEquipmentType
)
switch
(
fireEquipmentType
)
{
{
case
pool:
case
pool:
FireStation
fireStation
=
fireEquipMapper
.
findFireStationById
(
id
);
FireStation
fireStation
=
fireEquipMapper
.
findFireStationById
(
id
);
fireStation
.
setType
(
"2"
);
fireStation
.
setType
(
"2"
);
fireStation
.
setFireEquipmentInfo
(
this
.
fireEquipMapper
.
queryStorageEquips
(
id
));
List
<
Map
>
equipDetails
=
this
.
fireEquipMapper
.
queryStorageEquips
(
fireStation
.
getRiskSourceId
());
fireStation
.
setFireEquipmentInfo
(
equipDetails
);
// 获取水池实时液位
List
<
Object
>
equipDetailIdList
=
new
ArrayList
<>();
if
(
equipDetails
!=
null
&&
!
equipDetails
.
isEmpty
())
{
equipDetails
.
stream
().
forEach
(
map
->
equipDetailIdList
.
add
(
map
.
get
(
"id"
)));
List
<
EquipmentSpecificIndexVo
>
specificIndexVos
=
equipmentSpecificIndexMapper
.
findByDetailIdInAndNameKey
(
equipDetailIdList
,
NAME_KEY
);
if
(
specificIndexVos
!=
null
&&
!
specificIndexVos
.
isEmpty
())
{
fireStation
.
setLevel
(
specificIndexVos
.
get
(
0
).
getValue
());
}
}
returnEntity
=
fireStation
;
returnEntity
=
fireStation
;
break
;
break
;
case
fireFoamRoom:
case
fireFoamRoom:
FireStation
fireStation1
=
fireEquipMapper
.
findFireStationById
(
id
);
FireStation
fireStation1
=
fireEquipMapper
.
findFireStationById
(
id
);
fireStation1
.
setType
(
"2"
);
fireStation1
.
setType
(
"2"
);
fireStation1
.
setFireEquipmentInfo
(
this
.
fireEquipMapper
.
queryStorageEquips
(
id
));
fireStation1
.
setFireEquipmentInfo
(
this
.
fireEquipMapper
.
queryStorageEquips
(
fireStation1
.
getRiskSourceId
()
));
returnEntity
=
fireStation1
;
returnEntity
=
fireStation1
;
break
;
break
;
case
fireChamber:
case
fireChamber:
FireStation
fireStation11
=
fireEquipMapper
.
findFireStationById
(
id
);
FireStation
fireStation11
=
fireEquipMapper
.
findFireStationById
(
id
);
fireStation11
.
setType
(
"1"
);
fireStation11
.
setType
(
"1"
);
fireStation11
.
setFireEquipmentInfo
(
this
.
fireEquipMapper
.
queryStorageEquips
(
id
));
fireStation11
.
setFireEquipmentInfo
(
this
.
fireEquipMapper
.
queryStorageEquips
(
fireStation11
.
getRiskSourceId
()
));
returnEntity
=
fireStation11
;
returnEntity
=
fireStation11
;
break
;
break
;
case
extinguisher:
case
extinguisher:
case
hydrant:
case
hydrant:
case
monitorEquipment:
case
monitorEquipment:
FireEquipment
fireEquipment
=
fireEquipMapper
.
findFireEquipById
(
id
);
FireEquipment
fireEquipment
=
fireEquipMapper
.
findFireEquipById
(
id
);
fireEquipment
.
setEquipClassify
(
Integer
.
parseInt
(
EquipClassifyEnum
.
EQUIPMENT
.
getCode
()));
fireEquipment
.
setEquipClassify
(
Integer
.
parseInt
(
EquipClassifyEnum
.
EQUIPMENT
.
getCode
()));
returnEntity
=
fireEquipment
;
returnEntity
=
fireEquipment
;
break
;
break
;
...
@@ -179,9 +195,9 @@ public class FireEquipServiceImpl implements IFireEquipService {
...
@@ -179,9 +195,9 @@ public class FireEquipServiceImpl implements IFireEquipService {
case
fireDetection:
case
fireDetection:
Optional
<
FireEquipment
>
fireDetection1
=
this
.
iFireEquipmentDao
.
findById
(
id
);
Optional
<
FireEquipment
>
fireDetection1
=
this
.
iFireEquipmentDao
.
findById
(
id
);
FireEquipment
fireDetection
=
null
;
FireEquipment
fireDetection
=
null
;
if
(
fireDetection1
.
isPresent
())
{
if
(
fireDetection1
.
isPresent
())
{
fireDetection
=
fireDetection1
.
get
();
fireDetection
=
fireDetection1
.
get
();
}
}
fireDetection
.
setProtectObjNames
(
this
.
impEquipMapper
.
queryProtectObjNames
(
fireDetection
.
getId
()));
fireDetection
.
setProtectObjNames
(
this
.
impEquipMapper
.
queryProtectObjNames
(
fireDetection
.
getId
()));
returnEntity
=
fireDetection
;
returnEntity
=
fireDetection
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/HandlerMqttMessageImpl.java
View file @
f448b4dd
...
@@ -89,6 +89,9 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
...
@@ -89,6 +89,9 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
@Value
(
"${emqx.defaultTopic}"
)
@Value
(
"${emqx.defaultTopic}"
)
private
String
defaultTopic
;
private
String
defaultTopic
;
@Value
(
"${data.type.fireMonitor}"
)
private
String
fireMonitor
;
@Autowired
@Autowired
private
WebMqttComponent
webMqttComponent
;
private
WebMqttComponent
webMqttComponent
;
...
@@ -143,6 +146,9 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
...
@@ -143,6 +146,9 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
@Value
(
"${spring.application.name}"
)
@Value
(
"${spring.application.name}"
)
private
String
serviceName
;
private
String
serviceName
;
@Value
(
"${autoSys.alarm.nameKeys}"
)
private
String
nameKeys
;
@Override
@Override
public
void
handlerMqttMessage
(
String
topic
,
String
data
)
{
public
void
handlerMqttMessage
(
String
topic
,
String
data
)
{
...
@@ -150,7 +156,19 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
...
@@ -150,7 +156,19 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
log
.
info
(
"iotCode 性能指标属于: "
+
topicEntity
.
getType
());
log
.
info
(
"iotCode 性能指标属于: "
+
topicEntity
.
getType
());
EquipmentSpecificIndexVo
equipmentSpecificIndex
=
JSONObject
.
parseObject
(
topicEntity
.
getMessage
(),
EquipmentSpecificIndexVo
.
class
);
EquipmentSpecificIndexVo
equipmentSpecificIndex
=
JSONObject
.
parseObject
(
topicEntity
.
getMessage
(),
EquipmentSpecificIndexVo
.
class
);
long
eqSpecId
=
equipmentSpecificIndex
.
getEquipmentSpecificId
();
long
eqSpecId
=
equipmentSpecificIndex
.
getEquipmentSpecificId
();
String
nameKey
=
equipmentSpecificIndex
.
getNameKey
();
EquipmentSpecificForRiskVo
equipmentSpecific
=
equipmentSpecificMapper
.
getOneById
(
eqSpecId
);
EquipmentSpecificForRiskVo
equipmentSpecific
=
equipmentSpecificMapper
.
getOneById
(
eqSpecId
);
// 三维屏指标状态推送
if
(
nameKeys
.
contains
(
nameKey
))
{
if
(
equipmentSpecific
!=
null
)
{
equipmentSpecificIndex
.
setId
(
equipmentSpecific
.
getId
());
equipmentSpecificIndex
.
setName
(
equipmentSpecific
.
getName
());
equipmentSpecificIndex
.
setCode
(
equipmentSpecific
.
getCode
());
}
equipmentSpecificIndex
.
setType
(
"equip"
);
String
title
=
String
.
format
(
"/%s/%s"
,
serviceName
,
"data/refresh/indexStatus"
);
webMqttComponent
.
publish
(
title
,
JSON
.
toJSONString
(
equipmentSpecificIndex
));
}
Equipment
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
eqSpecId
);
Equipment
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
eqSpecId
);
Toke
toke
=
remoteSecurityService
.
getServerToken
();
Toke
toke
=
remoteSecurityService
.
getServerToken
();
AlarmParam
deviceData
=
new
AlarmParam
();
AlarmParam
deviceData
=
new
AlarmParam
();
...
@@ -404,16 +422,19 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
...
@@ -404,16 +422,19 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
contingencyRo
.
setEquipmentCode
(
equipment
.
getCode
());
contingencyRo
.
setEquipmentCode
(
equipment
.
getCode
());
contingencyRo
.
setEquipmentOrgCode
(
equipment
.
getOrgCode
());
contingencyRo
.
setEquipmentOrgCode
(
equipment
.
getOrgCode
());
// Map cameraInfo = impAndFireEquipMapper.queryForCamera(String.valueOf(equipment.getId()));//查询重点设备关联视频点位,暂不处理
//查询重点设备关联视频点位
//
Map
cameraInfo
=
impAndFireEquipMapper
.
queryCamera
(
String
.
valueOf
(
equipment
.
getId
()));
// if (cameraInfo != null
) {
if
(
cameraInfo
!=
null
&&
!
cameraInfo
.
isEmpty
()
)
{
//
contingencyRo.setCameraCodes(String.valueOf(cameraInfo.get("codes")));
contingencyRo
.
setCameraCodes
(
String
.
valueOf
(
cameraInfo
.
get
(
"codes"
)));
//
contingencyRo.setCameraIds(String.valueOf(cameraInfo.get("ids")));
contingencyRo
.
setCameraIds
(
String
.
valueOf
(
cameraInfo
.
get
(
"ids"
)));
//
}
}
// contingencyRo.setMobile("13259783333");
//查询重点设备关联消防炮
// contingencyRo.setAdminName("admin");
Map
fireMonitorInfo
=
equipmentSpecificMapper
.
queryFireMonitor
(
String
.
valueOf
(
equipment
.
getId
()),
fireMonitor
);
// contingencyRo.setFireEquipmentPosition(fireEquipment.getPosition3d());
if
(
fireMonitorInfo
!=
null
&&
!
fireMonitorInfo
.
isEmpty
())
{
contingencyRo
.
setFireMonitorCodes
(
String
.
valueOf
(
fireMonitorInfo
.
get
(
"codes"
)));
contingencyRo
.
setFireMonitorIds
(
String
.
valueOf
(
fireMonitorInfo
.
get
(
"ids"
)));
}
List
<
PreplanPicture
>
pictures
=
iPreplanPictureDao
.
findByEquipmentId
(
Long
.
valueOf
(
equipment
.
getId
()));
List
<
PreplanPicture
>
pictures
=
iPreplanPictureDao
.
findByEquipmentId
(
Long
.
valueOf
(
equipment
.
getId
()));
if
(!
CollectionUtils
.
isEmpty
(
pictures
))
{
if
(!
CollectionUtils
.
isEmpty
(
pictures
))
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
f448b4dd
...
@@ -22,6 +22,7 @@ import java.util.stream.Collectors;
...
@@ -22,6 +22,7 @@ import java.util.stream.Collectors;
import
javax.annotation.PostConstruct
;
import
javax.annotation.PostConstruct
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
com.yeejoin.amos.fas.business.vo.*
;
import
com.yeejoin.amos.fas.core.enums.NumberEnum
;
import
com.yeejoin.amos.fas.core.enums.NumberEnum
;
import
com.yeejoin.amos.fas.core.enums.ReserveEnum
;
import
com.yeejoin.amos.fas.core.enums.ReserveEnum
;
import
com.yeejoin.amos.fas.core.util.DateUtil
;
import
com.yeejoin.amos.fas.core.util.DateUtil
;
...
@@ -105,10 +106,6 @@ import com.yeejoin.amos.fas.business.util.CacheMap;
...
@@ -105,10 +106,6 @@ import com.yeejoin.amos.fas.business.util.CacheMap;
import
com.yeejoin.amos.fas.business.util.DateUtils
;
import
com.yeejoin.amos.fas.business.util.DateUtils
;
import
com.yeejoin.amos.fas.business.util.JexlUtil
;
import
com.yeejoin.amos.fas.business.util.JexlUtil
;
import
com.yeejoin.amos.fas.business.util.RpnUtils
;
import
com.yeejoin.amos.fas.business.util.RpnUtils
;
import
com.yeejoin.amos.fas.business.vo.EquipCommunicationData
;
import
com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo
;
import
com.yeejoin.amos.fas.business.vo.Toke
;
import
com.yeejoin.amos.fas.business.vo.TopicEntityVo
;
import
com.yeejoin.amos.fas.client.invoke.RsDataQueue
;
import
com.yeejoin.amos.fas.client.invoke.RsDataQueue
;
import
com.yeejoin.amos.fas.common.enums.CheckStatusEnum
;
import
com.yeejoin.amos.fas.common.enums.CheckStatusEnum
;
import
com.yeejoin.amos.fas.common.enums.DataRefreshTypeEum
;
import
com.yeejoin.amos.fas.common.enums.DataRefreshTypeEum
;
...
@@ -839,11 +836,28 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -839,11 +836,28 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Async
@Async
void
protalRuleMessagePush
(
ProtalDataRo
protalData
,
String
token
,
String
product
,
String
appKey
)
{
void
protalRuleMessagePush
(
ProtalDataRo
protalData
,
String
token
,
String
product
,
String
appKey
)
{
String
bacthNo
=
UUID
.
randomUUID
().
toString
();
String
bacthNo
=
UUID
.
randomUUID
().
toString
();
String
nodeState
=
protalData
.
getNodeState
();
String
name
=
protalData
.
getName
();
protalData
.
setBatchNo
(
bacthNo
);
protalData
.
setBatchNo
(
bacthNo
);
protalData
.
setOriginalNodeState
(
protalData
.
getNodeState
()
);
protalData
.
setOriginalNodeState
(
nodeState
);
protalData
.
setUserName
(
protalData
.
getCheckUser
());
protalData
.
setUserName
(
protalData
.
getCheckUser
());
protalData
.
setPointName
(
protalData
.
getName
()
);
protalData
.
setPointName
(
name
);
try
{
try
{
EquipmentSpecificIndexVo
specificIndexVo
=
new
EquipmentSpecificIndexVo
();
specificIndexVo
.
setId
(
protalData
.
getId
());
specificIndexVo
.
setName
(
name
);
specificIndexVo
.
setCode
(
protalData
.
getPointNo
());
specificIndexVo
.
setType
(
"patrol"
);
specificIndexVo
.
setNameKey
(
"patrol"
);
if
(
"2"
.
equals
(
nodeState
)
||
"3"
.
equals
(
nodeState
))
{
specificIndexVo
.
setValue
(
"true"
);
}
else
{
specificIndexVo
.
setValue
(
"false"
);
}
// 三维屏巡检点状态推送
String
title
=
String
.
format
(
"/%s/%s"
,
serviceName
,
"data/refresh/indexStatus"
);
webMqttComponent
.
publish
(
title
,
JSON
.
toJSONString
(
specificIndexVo
));
RequestContext
.
setToken
(
token
);
RequestContext
.
setToken
(
token
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setProduct
(
product
);
log
.
info
(
"巡检消息发送规则"
+
JSONObject
.
toJSONString
(
protalData
));
log
.
info
(
"巡检消息发送规则"
+
JSONObject
.
toJSONString
(
protalData
));
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/EquipmentSpecificIndexService.java
0 → 100644
View file @
f448b4dd
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo
;
import
java.util.List
;
import
java.util.Map
;
/**
* @ProjectName: YeeAmosFireAutoSysRoot
* @Package: com.yeejoin.amos.fas.business.service.intfc
* @ClassName: EquipmentSpecificIndexService
* @Author: Jianqiang Gao
* @Description: EquipmentSpecificIndexService
* @Date: 2021/1/18 16:34
* @Version: 1.0
*/
public
interface
EquipmentSpecificIndexService
{
Map
<
String
,
Object
>
queryInitAlarm
(
String
value
,
String
nameKeys
,
String
status
);
List
<
EquipmentSpecificIndexVo
>
getInitAlarm
(
String
value
,
String
nameKeys
,
String
status
);
}
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/EquipmentSpecificIndexVo.java
View file @
f448b4dd
...
@@ -25,6 +25,8 @@ public class EquipmentSpecificIndexVo {
...
@@ -25,6 +25,8 @@ public class EquipmentSpecificIndexVo {
// 性能指标id
// 性能指标id
private
Long
equipmentIndexId
;
private
Long
equipmentIndexId
;
private
String
name
;
private
String
equipmentIndexName
;
private
String
equipmentIndexName
;
private
String
equipmentIndexUnitName
;
private
String
equipmentIndexUnitName
;
...
@@ -105,16 +107,45 @@ public class EquipmentSpecificIndexVo {
...
@@ -105,16 +107,45 @@ public class EquipmentSpecificIndexVo {
this
.
code
=
code
;
this
.
code
=
code
;
}
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getEquipmentIndexName
()
{
return
equipmentIndexName
;
}
public
void
setEquipmentIndexName
(
String
equipmentIndexName
)
{
this
.
equipmentIndexName
=
equipmentIndexName
;
}
public
String
getEquipmentIndexUnitName
()
{
return
equipmentIndexUnitName
;
}
public
void
setEquipmentIndexUnitName
(
String
equipmentIndexUnitName
)
{
this
.
equipmentIndexUnitName
=
equipmentIndexUnitName
;
}
public
EquipmentSpecificIndexVo
()
{
public
EquipmentSpecificIndexVo
()
{
}
}
public
EquipmentSpecificIndexVo
(
Long
equipmentSpecificId
,
String
value
,
Long
equipmentIndexId
,
String
nameKey
,
String
code
,
String
iotCode
,
String
type
)
{
public
EquipmentSpecificIndexVo
(
long
id
,
Long
equipmentSpecificId
,
String
value
,
Long
equipmentIndexId
,
String
name
,
String
equipmentIndexName
,
String
equipmentIndexUnitName
,
String
nameKey
,
String
code
,
String
iotCode
,
String
type
)
{
this
.
id
=
id
;
this
.
equipmentSpecificId
=
equipmentSpecificId
;
this
.
equipmentSpecificId
=
equipmentSpecificId
;
this
.
value
=
value
;
this
.
value
=
value
;
this
.
equipmentIndexId
=
equipmentIndexId
;
this
.
equipmentIndexId
=
equipmentIndexId
;
this
.
name
=
name
;
this
.
equipmentIndexName
=
equipmentIndexName
;
this
.
equipmentIndexUnitName
=
equipmentIndexUnitName
;
this
.
nameKey
=
nameKey
;
this
.
nameKey
=
nameKey
;
this
.
code
=
code
;
this
.
code
=
code
;
this
.
iotCode
=
iotCode
;
this
.
iotCode
=
iotCode
;
this
.
type
=
type
;
this
.
type
=
type
;
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/PollPointVo.java
0 → 100644
View file @
f448b4dd
package
com
.
yeejoin
.
amos
.
fas
.
business
.
vo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @ProjectName: YeeAmosFireAutoSysRoot
* @Package: com.yeejoin.amos.fas.business.vo
* @ClassName: EquipmentSpecificAlarm
* @Author: Jianqiang Gao
* @Description: 巡检点Vo
* @Date: 2021/1/18 15:54
* @Version: 1.0
*/
@Data
@Api
(
"巡检点Vo"
)
public
class
PollPointVo
{
@ApiModelProperty
(
"巡检点名称"
)
private
String
name
;
@ApiModelProperty
(
"巡检点编码"
)
private
String
code
;
@ApiModelProperty
(
"巡检点状态:0 未纳入巡检,1 合格;2 不合格;3 漏检"
)
private
String
status
;
}
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
f448b4dd
...
@@ -75,11 +75,16 @@ amos.feign.gennerator.use-gateway=true
...
@@ -75,11 +75,16 @@ amos.feign.gennerator.use-gateway=true
# 消息推送类型
# 消息推送类型
autoSys.push.type
=
mqtt
autoSys.push.type
=
mqtt
# 3D告警初始化
autoSys.alarm.nameKeys
=
fireAlarm,fault,shield
autoSys.alarm.status
=
2,3
autoSys.alarm.value
=
true
#查询装备分类
#查询装备分类
#消防视频:xfsp
#消防视频:xfsp
#消防车:2101
#消防车:2101
data.type.fireC
hambe
r
=
2101
data.type.fireC
a
r
=
2101
#消防小室:9301
#消防小室:9301
data.type.fireChamber
=
9301
data.type.fireChamber
=
9301
#消防水池:9302
#消防水池:9302
...
@@ -88,6 +93,8 @@ data.type.pool=9302
...
@@ -88,6 +93,8 @@ data.type.pool=9302
data.type.fireFoamRoom
=
9305
data.type.fireFoamRoom
=
9305
#探测器:8501
#探测器:8501
data.type.monitorEquipment
=
8501
data.type.monitorEquipment
=
8501
#消防炮:3103
data.type.fireMonitor
=
3103
#灭火器:3104
#灭火器:3104
data.type.extinguisher
=
3104
data.type.extinguisher
=
3104
#消火栓:3105
#消火栓:3105
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_equipment_specific.xml
View file @
f448b4dd
...
@@ -185,4 +185,21 @@
...
@@ -185,4 +185,21 @@
where
where
wes.id=#{id}
wes.id=#{id}
</select>
</select>
<select
id=
"queryFireMonitor"
resultType=
"map"
>
SELECT
GROUP_CONCAT( es.id ) ids,
GROUP_CONCAT( es.`code` ) codes
FROM
`f_equipment_fire_equipment` fe
LEFT JOIN wl_equipment_specific es ON fe.fire_equipment_id = es.id
LEFT JOIN wl_equipment_detail ed ON es.equipment_detail_id = ed.id
<where>
<if
test=
"equipmentId !=null and equipmentId != ''"
>
AND fe.equipment_id = #{equipmentId}
</if>
<if
test=
"code !=null and code != ''"
>
AND ed.`code` LIKE CONCAT(#{code},'%')
</if>
</where>
</select>
</mapper>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_equipment_specific_index.xml
0 → 100644
View file @
f448b4dd
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.EquipmentSpecificIndexMapper"
>
<select
id=
"findByDetailIdInAndNameKey"
resultType=
"com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo"
>
SELECT
wsi.`value`
FROM
`wl_equipment_index` wei
RIGHT JOIN wl_equipment_specific_index wsi ON wei.id = wsi.equipment_index_id
LEFT JOIN wl_equipment_specific wes ON wsi.equipment_specific_id = wes.id
WHERE
wsi.`value` != ''
<if
test=
"nameKey != null and nameKey !=''"
>
AND wei.name_key = #{nameKey}
</if>
<if
test=
"list != null and list.size() > 0"
>
AND wes.equipment_detail_id IN
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
GROUP BY
wsi.id
ORDER BY
wsi.update_date DESC
</select>
<select
id=
"queryInitAlarm"
resultType=
"com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo"
>
SELECT
wed.id,
wed.`name`,
wed.`code`,
wei.name_key,
wei.`name` AS equipmentIndexName,
wsi.`value`
FROM
`wl_equipment_specific_index` wsi
LEFT JOIN wl_equipment_index wei ON wsi.equipment_index_id = wei.id
LEFT JOIN wl_equipment_specific wes ON wsi.equipment_specific_id = wes.id
LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id
<where>
<if
test=
"value != null and value != ''"
>
AND wsi.`value` = #{value}
</if>
<if
test=
"list != null and list.length > 0"
>
AND
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
"OR"
>
wei.name_key = #{item}
</foreach>
</if>
</where>
GROUP BY
wsi.equipment_specific_id
ORDER BY
wsi.update_date DESC
</select>
<select
id=
"getInitAlarm"
resultType=
"com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo"
>
SELECT
wed.id,
wed.`name`,
wed.`code`,
wei.name_key,
wei.`name` AS equipmentIndexName,
wsi.`value`,
'equip' AS type
FROM
`wl_equipment_specific_index` wsi
LEFT JOIN wl_equipment_index wei ON wsi.equipment_index_id = wei.id
LEFT JOIN wl_equipment_specific wes ON wsi.equipment_specific_id = wes.id
LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id
<where>
<if
test=
"value != null and value != ''"
>
AND wsi.`value` = #{value}
</if>
<if
test=
"list != null and list.length > 0"
>
AND
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
"OR"
>
wei.name_key = #{item}
</foreach>
</if>
</where>
GROUP BY
wsi.equipment_specific_id
ORDER BY
wsi.update_date DESC
</select>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
View file @
f448b4dd
...
@@ -289,6 +289,7 @@
...
@@ -289,6 +289,7 @@
<select
id=
"queryStorageEquips"
resultType=
"map"
>
<select
id=
"queryStorageEquips"
resultType=
"map"
>
SELECT
SELECT
wed.id,
wed.`name`,
wed.`name`,
u.`name` AS unit,
u.`name` AS unit,
sum(wsd.amount) fireEquipmentCount
sum(wsd.amount) fireEquipmentCount
...
@@ -298,8 +299,11 @@
...
@@ -298,8 +299,11 @@
LEFT JOIN wl_equipment we ON we.id = wed.equipment_id
LEFT JOIN wl_equipment we ON we.id = wed.equipment_id
LEFT JOIN wl_unit u ON u.id = we.unit_id
LEFT JOIN wl_unit u ON u.id = we.unit_id
LEFT JOIN wl_warehouse_structure ws ON ws.id = wsd.warehouse_structure_id
LEFT JOIN wl_warehouse_structure ws ON ws.id = wsd.warehouse_structure_id
WHERE
<where>
ws.source_id = #{riskSourceId}
<if
test=
"riskSourceId != null"
>
AND ws.source_id = #{riskSourceId}
</if>
</where>
GROUP BY
GROUP BY
wsd.equipment_detail_id,
wsd.equipment_detail_id,
wed.`name`
wed.`name`
...
@@ -607,7 +611,10 @@
...
@@ -607,7 +611,10 @@
wb.`name`,
wb.`name`,
wb.`code`,
wb.`code`,
wb.address,
wb.address,
wb.region_id AS riskSourceId
wb.region_id AS riskSourceId,
wb.height,
wb.low,
wb.design_capacity
FROM
FROM
wl_building wb
wl_building wb
WHERE
WHERE
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_impAndfire_equip.xml
View file @
f448b4dd
...
@@ -126,6 +126,20 @@
...
@@ -126,6 +126,20 @@
)
)
</select>
</select>
<select
id=
"queryCamera"
resultType=
"map"
>
SELECT
GROUP_CONCAT(v.id) ids,
GROUP_CONCAT(v.`code`) codes
FROM
wl_video v
RIGHT JOIN wl_video_important_equipment e ON e.video_id = v.id
<where>
<if
test=
"equipmentId !=null and equipmentId != ''"
>
e.important_equipment_id = #{equipmentId}
</if>
</where>
</select>
<select
id=
"findEquipVideo"
resultType=
"map"
>
<select
id=
"findEquipVideo"
resultType=
"map"
>
SELECT
SELECT
eq.`name` equipName,
eq.`name` equipName,
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_p_point.xml
0 → 100644
View file @
f448b4dd
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.PollPointMapper"
>
<select
id=
"queryInitAlarm"
resultType=
"com.yeejoin.amos.fas.business.vo.PollPointVo"
>
SELECT
p.`name`,
p.point_no AS `code`,
p.`status`
FROM
`p_point` p
<where>
<if
test=
"list != null and list.length > 0"
>
AND
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
"OR"
>
p.`status` = #{item}
</foreach>
</if>
</where>
</select>
<select
id=
"getInitAlarm"
resultType=
"com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo"
>
SELECT
p.id,
p.`name`,
p.point_no AS `code`,
'patrol' AS type,
'patrol' AS nameKey,
CASE
WHEN p.`status` = '2' THEN
'true'
WHEN p.`status` = '3' THEN
'true' ELSE 'false'
END AS `value`
FROM
`p_point` p
<where>
<if
test=
"list != null and list.length > 0"
>
AND
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
"OR"
>
p.`status` = #{item}
</foreach>
</if>
</where>
</select>
</mapper>
\ No newline at end of file
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