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
82afe199
Commit
82afe199
authored
Dec 13, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消防预案信息修改
parent
64b41969
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
97 additions
and
11 deletions
+97
-11
EquipmentSpecificVo.java
...oin/equipmanage/common/entity/vo/EquipmentSpecificVo.java
+2
-1
EquipmentSpecificMapper.java
...m/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
+1
-1
IEquipmentSpecificSerivce.java
...eejoin/equipmanage/service/IEquipmentSpecificSerivce.java
+4
-0
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+5
-0
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+66
-8
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+17
-0
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+2
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/EquipmentSpecificVo.java
View file @
82afe199
...
@@ -42,5 +42,6 @@ public class EquipmentSpecificVo implements Serializable {
...
@@ -42,5 +42,6 @@ public class EquipmentSpecificVo implements Serializable {
@ApiModelProperty
(
value
=
"数据类型:equip 装备,car 车辆"
)
@ApiModelProperty
(
value
=
"数据类型:equip 装备,car 车辆"
)
private
String
type
;
private
String
type
;
@ApiModelProperty
(
value
=
"装备分类code"
)
private
String
ecode
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
View file @
82afe199
...
@@ -248,5 +248,5 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
...
@@ -248,5 +248,5 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
Page
<
FireFightingSystemDto
>
fireSysIotEquipCount
(
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
Page
<
FireFightingSystemDto
>
fireSysIotEquipCount
(
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
List
<
FireFightingSystemDto
>
fireSysIotEquipAlarmCount
(
Date
date
,
String
bizOrgCode
);
List
<
FireFightingSystemDto
>
fireSysIotEquipAlarmCount
(
Date
date
,
String
bizOrgCode
);
List
<
Map
>
getwater
(
@Param
(
"id"
)
Long
id
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEquipmentSpecificSerivce.java
View file @
82afe199
...
@@ -265,4 +265,8 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
...
@@ -265,4 +265,8 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
* @return
* @return
*/
*/
List
<
FireFightingSystemDto
>
fireSysIotEquipAlarmCount
(
Date
date
,
String
bizOrgCode
);
List
<
FireFightingSystemDto
>
fireSysIotEquipAlarmCount
(
Date
date
,
String
bizOrgCode
);
List
<
Map
>
getwater
(
Long
id
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
82afe199
...
@@ -2039,4 +2039,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -2039,4 +2039,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
public
List
<
FireFightingSystemDto
>
fireSysIotEquipAlarmCount
(
Date
date
,
String
bizOrgCode
)
{
public
List
<
FireFightingSystemDto
>
fireSysIotEquipAlarmCount
(
Date
date
,
String
bizOrgCode
)
{
return
equipmentSpecificMapper
.
fireSysIotEquipAlarmCount
(
date
,
bizOrgCode
);
return
equipmentSpecificMapper
.
fireSysIotEquipAlarmCount
(
date
,
bizOrgCode
);
}
}
@Override
public
List
<
Map
>
getwater
(
Long
id
)
{
return
equipmentSpecificMapper
.
getwater
(
id
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
82afe199
...
@@ -102,7 +102,12 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -102,7 +102,12 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
@Autowired
@Autowired
MarqueeDataMapper
marqueeDataMapper
;
MarqueeDataMapper
marqueeDataMapper
;
//消防泵
@Value
(
"${equipment.plan.pump}"
)
String
pumpCodes
;
//消防炮
@Value
(
"${equipment.plan.monitor}"
)
String
monitorCodes
;
/**
/**
* 泡沫罐KEY
* 泡沫罐KEY
*/
*/
...
@@ -233,6 +238,11 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -233,6 +238,11 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
@Value
(
"${equipment.pressurepump.stop}"
)
@Value
(
"${equipment.pressurepump.stop}"
)
private
String
pressurePumpStop
;
private
String
pressurePumpStop
;
@Value
(
"${emergency.disposal.indicators}"
)
private
String
emergencyDisposalIndicators
;
private
static
Boolean
bool
=
Boolean
.
FALSE
;
private
static
Boolean
bool
=
Boolean
.
FALSE
;
@Autowired
@Autowired
...
@@ -303,9 +313,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -303,9 +313,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
x
.
setTraceId
(
finalTraceId
);
x
.
setTraceId
(
finalTraceId
);
return
x
;
return
x
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
realTimeDateProcessing
(
topicEntity
,
collect
);
realTimeDateProcessing
(
topicEntity
,
collect
,
vo
);
}
else
{
}
else
{
realTimeDateProcessing
(
topicEntity
,
iotDatalist
);
realTimeDateProcessing
(
topicEntity
,
iotDatalist
,
vo
);
}
}
}
}
...
@@ -315,7 +325,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -315,7 +325,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
* @param topicEntity
* @param topicEntity
* @param iotDatalist
* @param iotDatalist
*/
*/
public
void
realTimeDateProcessing
(
TopicEntityVo
topicEntity
,
List
<
IotDataVO
>
iotDatalist
)
{
public
void
realTimeDateProcessing
(
TopicEntityVo
topicEntity
,
List
<
IotDataVO
>
iotDatalist
,
EquipmentSpecificVo
vo
)
{
String
iotCode
=
topicEntity
.
getIotCode
();
String
iotCode
=
topicEntity
.
getIotCode
();
if
(
EquipAndCarEnum
.
equip
.
type
.
equals
(
topicEntity
.
getType
()))
{
if
(
EquipAndCarEnum
.
equip
.
type
.
equals
(
topicEntity
.
getType
()))
{
...
@@ -324,13 +334,13 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -324,13 +334,13 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
if
(
ObjectUtils
.
isEmpty
(
indexList
))
{
if
(
ObjectUtils
.
isEmpty
(
indexList
))
{
return
;
return
;
}
}
equipRealTimeDate
(
iotDatalist
,
indexList
,
topicEntity
);
equipRealTimeDate
(
iotDatalist
,
indexList
,
topicEntity
,
vo
);
}
else
{
}
else
{
List
<
CarProperty
>
carProperties
=
carPropertyService
.
getCarPropListByIotCode
(
iotCode
);
List
<
CarProperty
>
carProperties
=
carPropertyService
.
getCarPropListByIotCode
(
iotCode
);
if
(
ObjectUtils
.
isEmpty
(
carProperties
))
{
if
(
ObjectUtils
.
isEmpty
(
carProperties
))
{
return
;
return
;
}
}
carRealTimeDate
(
iotDatalist
,
carProperties
);
carRealTimeDate
(
iotDatalist
,
carProperties
,
topicEntity
);
}
}
}
}
...
@@ -343,7 +353,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -343,7 +353,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
* @param topicEntity
* @param topicEntity
*/
*/
public
void
equipRealTimeDate
(
List
<
IotDataVO
>
iotDatalist
,
List
<
EquipmentSpecificIndex
>
indexList
,
public
void
equipRealTimeDate
(
List
<
IotDataVO
>
iotDatalist
,
List
<
EquipmentSpecificIndex
>
indexList
,
TopicEntityVo
topicEntity
)
{
TopicEntityVo
topicEntity
,
EquipmentSpecificVo
vo
)
{
List
<
EquipmentSpecificIndex
>
equipmentSpecificIndexList
=
new
ArrayList
<>();
List
<
EquipmentSpecificIndex
>
equipmentSpecificIndexList
=
new
ArrayList
<>();
List
<
EquipmentSpecificAlarm
>
equipmentSpecificAlarms
=
new
ArrayList
<>();
List
<
EquipmentSpecificAlarm
>
equipmentSpecificAlarms
=
new
ArrayList
<>();
List
<
IndexStateVo
>
indexStateList
=
new
ArrayList
<>();
List
<
IndexStateVo
>
indexStateList
=
new
ArrayList
<>();
...
@@ -498,6 +508,49 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -498,6 +508,49 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
publishDataToDCCenterPage
(
equipmentSpecificIndexList
);
publishDataToDCCenterPage
(
equipmentSpecificIndexList
);
}
}
});
});
if
(
vo
.
getEcode
()!=
null
){
String
ecode
=
vo
.
getEcode
();
boolean
flag
=
false
;
//消防泵
String
[]
strings
=
pumpCodes
.
split
(
","
);
for
(
String
string
:
strings
)
{
if
(
ecode
.
startsWith
(
string
)){
//通知>消防应急预案
topicEntity
.
setType
(
"xfb"
);
mqttSendGateway
.
sendToMqtt
(
emergencyDisposalIndicators
,
JSONObject
.
toJSONString
(
topicEntity
));
flag
=
true
;
break
;
}
}
// 消防炮
String
[]
stringxfp
=
monitorCodes
.
split
(
","
);
if
(!
flag
){
for
(
String
string1
:
stringxfp
)
{
if
(
ecode
.
startsWith
(
string1
)){
//通知>消防应急预案
topicEntity
.
setType
(
"xfp"
);
mqttSendGateway
.
sendToMqtt
(
emergencyDisposalIndicators
,
JSONObject
.
toJSONString
(
topicEntity
));
flag
=
true
;
break
;
}
}
}
//消防水源
if
(!
flag
){
List
<
Map
>
lit
=
iEquipmentSpecificSerivce
.
getwater
(
vo
.
getId
());
if
(
lit
!=
null
&&
lit
.
size
()>
0
){
topicEntity
.
setType
(
"xfsy"
);
mqttSendGateway
.
sendToMqtt
(
emergencyDisposalIndicators
,
JSONObject
.
toJSONString
(
topicEntity
));
}
}
}
}
}
...
@@ -637,7 +690,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -637,7 +690,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
}
public
void
carRealTimeDate
(
List
<
IotDataVO
>
iotDatalist
,
List
<
CarProperty
>
carProperties
)
{
public
void
carRealTimeDate
(
List
<
IotDataVO
>
iotDatalist
,
List
<
CarProperty
>
carProperties
,
TopicEntityVo
topicEntity
)
{
List
<
CarProperty
>
carIndexsList
=
new
ArrayList
<>();
List
<
CarProperty
>
carIndexsList
=
new
ArrayList
<>();
iotDatalist
.
forEach
(
iotDataVO
->
{
iotDatalist
.
forEach
(
iotDataVO
->
{
// 对指标key为labels的数据处理
// 对指标key为labels的数据处理
...
@@ -673,6 +726,11 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -673,6 +726,11 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
carTransactionSynch
(
carProperties
,
carPropertyVos
);
carTransactionSynch
(
carProperties
,
carPropertyVos
);
}
}
});
});
//通知>消防应急预案
mqttSendGateway
.
sendToMqtt
(
emergencyDisposalIndicators
,
JSONObject
.
toJSONString
(
topicEntity
));
// 需要在事务提交之后,否侧事务隔离查询不出数据
// 需要在事务提交之后,否侧事务隔离查询不出数据
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
@Override
@Override
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
82afe199
...
@@ -155,6 +155,7 @@
...
@@ -155,6 +155,7 @@
SELECT
SELECT
wes.id,
wes.id,
wes.iot_code AS iotCode,
wes.iot_code AS iotCode,
wes.equipment_code ecode,
'equip' AS type,
'equip' AS type,
(SELECT GROUP_CONCAT(fs.system_type_code) FROM f_fire_fighting_system fs WHERE find_in_set(
(SELECT GROUP_CONCAT(fs.system_type_code) FROM f_fire_fighting_system fs WHERE find_in_set(
`fs`.`id`,
`fs`.`id`,
...
@@ -167,6 +168,7 @@
...
@@ -167,6 +168,7 @@
SELECT
SELECT
wc.id,
wc.id,
wc.iot_code AS iotCode,
wc.iot_code AS iotCode,
'' as ecode,
'car' AS type,
'car' AS type,
wc.car_num AS `code`
wc.car_num AS `code`
FROM
FROM
...
@@ -2179,4 +2181,18 @@
...
@@ -2179,4 +2181,18 @@
GROUP BY
GROUP BY
fs.id) s
fs.id) s
</select>
</select>
<select
id=
"getwater"
resultType=
"java.util.Map"
>
SELECT
ei.equipment_specific_id
FROM
cb_water_resource r
LEFT JOIN cb_water_resource_pool rp ON rp.resource_id = r.sequence_nbr
LEFT JOIN wl_equipment_specific_index ei ON ei.equipment_specific_id = rp.level_device_id
WHERE
r.resource_type in ( 'industryPool','pool')
AND r.is_delete = 1
and ei.equipment_specific_id is not null
and ei.equipment_specific_id =#{id}
</select>
</mapper>
</mapper>
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
82afe199
...
@@ -5345,7 +5345,8 @@
...
@@ -5345,7 +5345,8 @@
`wc`.`iot_code` AS `iot_code`,
`wc`.`iot_code` AS `iot_code`,
`wc`.`name` AS `name`,
`wc`.`name` AS `name`,
IFNULL( max( CASE WHEN ( `wcp`.`equipment_index_key` = 'FireCar_WaterCapacity' ) THEN `wcp`.`value` END ), 0 ) AS `waterCapacity`,
IFNULL( max( CASE WHEN ( `wcp`.`equipment_index_key` = 'FireCar_WaterCapacity' ) THEN `wcp`.`value` END ), 0 ) AS `waterCapacity`,
IFNULL( max( CASE WHEN ( `wcp`.`equipment_index_key` = 'FireCar_FoamCapacity' ) THEN `wcp`.`value` END ), 0 ) AS `foamCapacity`
IFNULL( max( CASE WHEN ( `wcp`.`equipment_index_key` = 'FireCar_FoamCapacity' ) THEN `wcp`.`value` END ), 0 ) AS `foamCapacity`,
(select value from wl_car_property where wl_car_property.car_id=`wc`.`id` and equipment_index_key ='FireCar_Start') AS startup
FROM
FROM
`wl_car` `wc`
`wl_car` `wc`
LEFT JOIN `wl_car_property` `wcp` ON `wcp`.`car_id` = `wc`.`id`
LEFT JOIN `wl_car_property` `wcp` ON `wcp`.`car_id` = `wc`.`id`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment