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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
726 additions
and
158 deletions
+726
-158
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
+71
-55
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
+33
-2
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
+88
-81
dbTemplate_impAndfire_equip.xml
.../main/resources/db/mapper/dbTemplate_impAndfire_equip.xml
+15
-1
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
;
import
javax.persistence.*
;
import
java.util.List
;
import
java.util.Map
;
import
javax.persistence.*
;
/**
* 消防站点
* @author Administrator
...
...
@@ -92,6 +91,29 @@ public class FireStation extends BasicEntity{
@Lob
private
String
ue4Rotation
;
/**
* 高度/最大液位(m)
*/
@Transient
private
Double
height
;
/**
* 低度/最小液位(m)
*/
@Transient
private
Double
low
;
/**
* 实时液位(m)
*/
@Transient
private
String
level
;
/**
* 设计容量(m³)
*/
@Transient
private
Double
designCapacity
;
@Transient
public
List
<
Map
>
getFireEquipmentInfo
()
{
return
fireEquipmentInfo
;
...
...
@@ -206,4 +228,36 @@ public class FireStation extends BasicEntity{
public
void
setUe4Rotation
(
String
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 {
@Label
(
"遥信数据"
)
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 {
* 任务编号,如果无任务,则填充0
*/
@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;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* 设备配置 Mapper 接口
...
...
@@ -69,4 +70,11 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecificVo>
* @Date 2020/11/17 19:32
*/
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
...
...
@@ -31,6 +31,13 @@ public interface ImpAndFireEquipMapper extends BaseMapper {
Long
queryBindFirEqumtPageCount
(
@Param
(
"equipmentId"
)
String
equipmentId
);
Map
queryForCamera
(
@Param
(
"equipmentId"
)
String
equipmentId
);
/**
* 查询重点设备关联视频点位
* @param equipmentId
* @return
*/
Map
queryCamera
(
@Param
(
"equipmentId"
)
String
equipmentId
);
List
<
Map
<
String
,
Object
>>
findEquipVideo
();
...
...
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
This diff is collapsed.
Click to expand it.
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 {
@Value
(
"${emqx.defaultTopic}"
)
private
String
defaultTopic
;
@Value
(
"${data.type.fireMonitor}"
)
private
String
fireMonitor
;
@Autowired
private
WebMqttComponent
webMqttComponent
;
...
...
@@ -143,6 +146,9 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
@Value
(
"${spring.application.name}"
)
private
String
serviceName
;
@Value
(
"${autoSys.alarm.nameKeys}"
)
private
String
nameKeys
;
@Override
public
void
handlerMqttMessage
(
String
topic
,
String
data
)
{
...
...
@@ -150,7 +156,19 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
log
.
info
(
"iotCode 性能指标属于: "
+
topicEntity
.
getType
());
EquipmentSpecificIndexVo
equipmentSpecificIndex
=
JSONObject
.
parseObject
(
topicEntity
.
getMessage
(),
EquipmentSpecificIndexVo
.
class
);
long
eqSpecId
=
equipmentSpecificIndex
.
getEquipmentSpecificId
();
String
nameKey
=
equipmentSpecificIndex
.
getNameKey
();
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
);
Toke
toke
=
remoteSecurityService
.
getServerToken
();
AlarmParam
deviceData
=
new
AlarmParam
();
...
...
@@ -404,16 +422,19 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
contingencyRo
.
setEquipmentCode
(
equipment
.
getCode
());
contingencyRo
.
setEquipmentOrgCode
(
equipment
.
getOrgCode
());
// Map cameraInfo = impAndFireEquipMapper.queryForCamera(String.valueOf(equipment.getId()));//查询重点设备关联视频点位,暂不处理
//
// if (cameraInfo != null
) {
//
contingencyRo.setCameraCodes(String.valueOf(cameraInfo.get("codes")));
//
contingencyRo.setCameraIds(String.valueOf(cameraInfo.get("ids")));
//
}
//查询重点设备关联视频点位
Map
cameraInfo
=
impAndFireEquipMapper
.
queryCamera
(
String
.
valueOf
(
equipment
.
getId
()));
if
(
cameraInfo
!=
null
&&
!
cameraInfo
.
isEmpty
()
)
{
contingencyRo
.
setCameraCodes
(
String
.
valueOf
(
cameraInfo
.
get
(
"codes"
)));
contingencyRo
.
setCameraIds
(
String
.
valueOf
(
cameraInfo
.
get
(
"ids"
)));
}
// contingencyRo.setMobile("13259783333");
// contingencyRo.setAdminName("admin");
// contingencyRo.setFireEquipmentPosition(fireEquipment.getPosition3d());
//查询重点设备关联消防炮
Map
fireMonitorInfo
=
equipmentSpecificMapper
.
queryFireMonitor
(
String
.
valueOf
(
equipment
.
getId
()),
fireMonitor
);
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
()));
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;
import
javax.annotation.PostConstruct
;
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.ReserveEnum
;
import
com.yeejoin.amos.fas.core.util.DateUtil
;
...
...
@@ -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.JexlUtil
;
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.common.enums.CheckStatusEnum
;
import
com.yeejoin.amos.fas.common.enums.DataRefreshTypeEum
;
...
...
@@ -839,11 +836,28 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Async
void
protalRuleMessagePush
(
ProtalDataRo
protalData
,
String
token
,
String
product
,
String
appKey
)
{
String
bacthNo
=
UUID
.
randomUUID
().
toString
();
String
nodeState
=
protalData
.
getNodeState
();
String
name
=
protalData
.
getName
();
protalData
.
setBatchNo
(
bacthNo
);
protalData
.
setOriginalNodeState
(
protalData
.
getNodeState
()
);
protalData
.
setOriginalNodeState
(
nodeState
);
protalData
.
setUserName
(
protalData
.
getCheckUser
());
protalData
.
setPointName
(
protalData
.
getName
()
);
protalData
.
setPointName
(
name
);
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
.
setProduct
(
product
);
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
...
...
@@ -24,7 +24,9 @@ public class EquipmentSpecificIndexVo {
// 性能指标id
private
Long
equipmentIndexId
;
private
String
name
;
private
String
equipmentIndexName
;
private
String
equipmentIndexUnitName
;
...
...
@@ -105,16 +107,45 @@ public class EquipmentSpecificIndexVo {
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
(
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
.
value
=
value
;
this
.
equipmentIndexId
=
equipmentIndexId
;
this
.
name
=
name
;
this
.
equipmentIndexName
=
equipmentIndexName
;
this
.
equipmentIndexUnitName
=
equipmentIndexUnitName
;
this
.
nameKey
=
nameKey
;
this
.
code
=
code
;
this
.
iotCode
=
iotCode
;
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
# 消息推送类型
autoSys.push.type
=
mqtt
# 3D告警初始化
autoSys.alarm.nameKeys
=
fireAlarm,fault,shield
autoSys.alarm.status
=
2,3
autoSys.alarm.value
=
true
#查询装备分类
#消防视频:xfsp
#消防车:2101
data.type.fireC
hambe
r
=
2101
data.type.fireC
a
r
=
2101
#消防小室:9301
data.type.fireChamber
=
9301
#消防水池:9302
...
...
@@ -88,6 +93,8 @@ data.type.pool=9302
data.type.fireFoamRoom
=
9305
#探测器:8501
data.type.monitorEquipment
=
8501
#消防炮:3103
data.type.fireMonitor
=
3103
#灭火器:3104
data.type.extinguisher
=
3104
#消火栓:3105
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_equipment_specific.xml
View file @
f448b4dd
...
...
@@ -185,4 +185,21 @@
where
wes.id=#{id}
</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>
\ 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
...
...
@@ -158,8 +158,8 @@
FROM
(
SELECT
det.`name` as
fireEquipmentName,
spe.`code` as
fireEquipmentCode,
det.`name` as fireEquipmentName,
spe.`code` as fireEquipmentCode,
ein.name as eq_point_name,
CASE ind.value WHEN 'true' THEN '是'
WHEN 'false' THEN '否'
...
...
@@ -178,10 +178,10 @@
ind.update_date as create_date
FROM
wl_equipment_specific_index as ind
left join wl_equipment_specific as spe on
spe.id = ind.equipment_specific_id
left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
left join wl_equipment_index as ein on ind.equipment_index_id = ein.id
left join wl_stock_detail as sto on
sto.qr_code = spe.qr_code
left join wl_stock_detail as sto on sto.qr_code = spe.qr_code
left join wl_warehouse_structure as str on sto.warehouse_structure_id = str.id
left join f_risk_source as sce on str.source_id = sce.id
) d
...
...
@@ -221,16 +221,16 @@
<!-- 筛选未绑定的配套设施
-->
<if
test=
"bindStation != null and bindStation == 'false'"
>
AND (select true from
f_fire_station_equipment fse
left join f_fire_equipment e on fse.fire_equipment_id = e.id
where fse.fire_equipment_id = fe.id AND e.equip_classify != 1
limit 0,1) is not true
AND (select true from
f_fire_station_equipment fse
left join f_fire_equipment e on fse.fire_equipment_id = e.id
where fse.fire_equipment_id = fe.id AND e.equip_classify != 1
limit 0,1) is not true
</if>
</select>
<select
id=
"queryForEquipmentPage"
resultType=
"map"
>
select * from (
select
select
fe.*, (
SELECT
'YES'
...
...
@@ -241,28 +241,28 @@
) isBind,
frs.name riskSourceName,
(select true from
f_fire_station_equipment fse
left join f_fire_equipment e on fse.fire_equipment_id = e.id
where fse.fire_equipment_id = fe.id AND e.equip_classify != 1
limit 0,1) as bindStation
f_fire_station_equipment fse
left join f_fire_equipment e on fse.fire_equipment_id = e.id
where fse.fire_equipment_id = fe.id AND e.equip_classify != 1 limit 0,1) as bindStation
from f_fire_equipment fe
left join f_risk_source frs on frs.id = fe.risk_source_id
where 1=1) tmp
where 1=1) tmp
<where>
<if
test=
"equipClassify!=null"
>
and tmp.equip_classify in ( ${equipClassify} )
</if>
<if
test=
"equipClassify!=null"
>
and tmp.equip_classify in ( ${equipClassify} )
</if>
<if
test=
"code!=null"
>
and tmp.`code` like '%${code}%'
</if>
<if
test=
"name!=null"
>
and (tmp.`name` like '%${name}%' or tmp.`code` like '%${name}%')
</if>
<!-- 筛选未绑定的配套设施
-->
<if
test=
"bindStation != null and bindStation == 'false'"
>
AND tmp.bindStation is not true
</if>
<if
test=
"code!=null"
>
and tmp.`code` like '%${code}%'
</if>
<if
test=
"name!=null"
>
and (tmp.`name` like '%${name}%' or tmp.`code` like '%${name}%')
</if>
<!-- 筛选未绑定的配套设施
-->
<if
test=
"bindStation != null and bindStation == 'false'"
>
AND tmp.bindStation is not true
</if>
</where>
LIMIT ${start},${length}
</select>
...
...
@@ -286,24 +286,28 @@
AND se.fire_equipment_id = fe.id
)
</select>
<select
id=
"queryStorageEquips"
resultType=
"map"
>
SELECT
wed.`name`,
u.`name` AS unit,
sum(wsd.amount) fireEquipmentCount
FROM
wl_stock_detail wsd
LEFT JOIN wl_equipment_detail wed ON wed.id = wsd.equipment_detail_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_warehouse_structure ws ON ws.id = wsd.warehouse_structure_id
WHERE
ws.source_id = #{riskSourceId}
GROUP BY
wsd.equipment_detail_id,
wed.`name`
</select>
<select
id=
"queryStorageEquips"
resultType=
"map"
>
SELECT
wed.id,
wed.`name`,
u.`name` AS unit,
sum(wsd.amount) fireEquipmentCount
FROM
wl_stock_detail wsd
LEFT JOIN wl_equipment_detail wed ON wed.id = wsd.equipment_detail_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_warehouse_structure ws ON ws.id = wsd.warehouse_structure_id
<where>
<if
test=
"riskSourceId != null"
>
AND ws.source_id = #{riskSourceId}
</if>
</where>
GROUP BY
wsd.equipment_detail_id,
wed.`name`
</select>
<select
id=
"findEquipDetailsById"
resultType=
"com.yeejoin.amos.fas.core.common.response.EquipDetailsResponse"
>
SELECT
...
...
@@ -316,7 +320,7 @@
f_equipment eq
LEFT JOIN f_fire_station fs ON fs.id = eq.fire_station_id
<where>
<if
test=
"id!=null"
>
AND eq.id = #{id}
</if>
<if
test=
"id!=null"
>
AND eq.id = #{id}
</if>
</where>
</select>
...
...
@@ -339,26 +343,26 @@
</select>
<select
id=
"listByCodes"
resultType=
"com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity"
>
select
id,
code,
name
from
f_fire_equipment
where
code in
select
id,
code,
name
from
f_fire_equipment
where
code in
<foreach
collection=
"codes"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</select>
</select>
<select
id=
"listByType"
resultType=
"com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity"
>
select
id,
code,
name
id,
code,
name
from
f_fire_equipment
f_fire_equipment
<where>
<if
test=
"type!=null"
>
equip_classify = #{type}
...
...
@@ -371,26 +375,26 @@
useGeneratedKeys=
"true"
>
insert into f_fire_equipment
(
org_code,
code,
equip_classify,
equip_type,
position3d,
floor3d,
is_indoor,
name,
maintenance_cycle,
manufacturer,
number,
unit,
room,
equip_status,
weight,
risk_source_id
org_code,
code,
equip_classify,
equip_type,
position3d,
floor3d,
is_indoor,
name,
maintenance_cycle,
manufacturer,
number,
unit,
room,
equip_status,
weight,
risk_source_id
)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
(
#{item.orgCode},
#{item.code},
#{item.equipClassify},
...
...
@@ -407,7 +411,7 @@
#{item.equipStatus},
#{item.weight},
#{item.riskSourceId}
)
)
</foreach>
</insert>
...
...
@@ -505,7 +509,7 @@
select name from f_fire_equipment where id= #{id}
</select>
<select
id=
"removeIfmeaPointByFireEquipIdAndEquipId"
resultType=
"long"
>
<select
id=
"removeIfmeaPointByFireEquipIdAndEquipId"
resultType=
"long"
>
DELETE fmep FROM `f_fmea_equipment_point` fmep
LEFT JOIN wl_equipment_specific_index esi ON esi.id = fmep.equipment_point_id
WHERE esi.equipment_specific_id = #{fireEquipmentId} AND fmep.important_equipment_id = #{importantEquipmentId}
...
...
@@ -594,20 +598,23 @@
ffe.video_id = video.id
) protectObjNames
FROM wl_video video
LEFT JOIN wl_video_source
source ON source.video_id =video.id
LEFT JOIN wl_video_source source ON source.video_id =video.id
LEFT JOIN f_risk_source risk ON risk.id = source.source_id
WHERE
<if
test=
"id != null"
>
video.id = #{id}
</if>
</select>
<select
id=
"findFireStationById"
resultType=
"com.yeejoin.amos.fas.dao.entity.FireStation"
>
SELECT
wb.`name`,
wb.`code`,
wb.address,
wb.region_id AS riskSourceId
wb.region_id AS riskSourceId,
wb.height,
wb.low,
wb.design_capacity
FROM
wl_building wb
WHERE
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_impAndfire_equip.xml
View file @
f448b4dd
...
...
@@ -108,7 +108,7 @@
</select>
<select
id=
"queryForCamera"
resultType=
"map"
>
SELECT
SELECT
GROUP_CONCAT(id) ids,
GROUP_CONCAT(CODE) codes
FROM
...
...
@@ -125,6 +125,20 @@
and f.id = efe.fire_equipment_id
)
</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
...
...
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