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
802a0f0a
Commit
802a0f0a
authored
Mar 24, 2021
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改历史数据及实时数据页面数据时间显示问题,实时数据三维推送问题
parent
902aedbf
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
3 deletions
+31
-3
HandlerMqttMessageImpl.java
...mos/fas/business/service/impl/HandlerMqttMessageImpl.java
+23
-0
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+1
-0
TopicEntityVo.java
.../java/com/yeejoin/amos/fas/business/vo/TopicEntityVo.java
+4
-0
dbTemplate_alarm.xml
...ysStart/src/main/resources/db/mapper/dbTemplate_alarm.xml
+1
-1
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+2
-2
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/HandlerMqttMessageImpl.java
View file @
802a0f0a
...
...
@@ -23,6 +23,7 @@ import com.yeejoin.amos.fas.business.util.RpnUtils;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.business.vo.EquipmentSpecificForRiskVo
;
import
com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.business.vo.Toke
;
import
com.yeejoin.amos.fas.business.vo.TopicEntityVo
;
import
com.yeejoin.amos.fas.client.invoke.RsDataQueue
;
...
...
@@ -132,10 +133,16 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
public
void
handlerMqttMessage
(
String
topic
,
String
data
)
{
TopicEntityVo
topicEntity
=
JSON
.
parseObject
(
data
,
TopicEntityVo
.
class
);
log
.
info
(
"iotCode 性能指标属于: "
+
topicEntity
.
getType
());
EquipmentSpecificIndexVo
equipmentSpecificIndex
=
JSONObject
.
parseObject
(
topicEntity
.
getMessage
(),
EquipmentSpecificIndexVo
.
class
);
long
eqSpecId
=
equipmentSpecificIndex
.
getEquipmentSpecificId
();
String
nameKey
=
equipmentSpecificIndex
.
getNameKey
();
if
(
topicEntity
.
getSimulationDate
().
equals
(
"false"
)
&&
!
indexStateIsChange
(
equipmentSpecificIndex
)){
log
.
info
(
"指标值没有发生变化: "
+
equipmentSpecificIndex
.
getIotCode
()+
"-"
+
equipmentSpecificIndex
.
getNameKey
()+
":"
+
equipmentSpecificIndex
.
getValue
());
return
;
}
EquipmentSpecificForRiskVo
equipmentSpecific
=
equipmentSpecificMapper
.
getOneById
(
eqSpecId
);
// 三维屏指标状态推送
String
specificIndexType
=
equipmentSpecificIndex
.
getType
();
...
...
@@ -212,6 +219,22 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
}
private
boolean
indexStateIsChange
(
EquipmentSpecificIndexVo
equipmentSpecificIndex
){
if
(
ObjectUtils
.
isEmpty
(
equipmentSpecificIndex
.
getValue
())){
return
false
;
}
String
key
=
equipmentSpecificIndex
.
getIotCode
()+
"-"
+
equipmentSpecificIndex
.
getNameKey
();
if
(
redisTemplate
.
hasKey
(
key
)){
EquipmentSpecificIndexVo
equipmentSpecificIndexVo
=
JSON
.
parseObject
(
redisTemplate
.
opsForValue
().
get
(
key
).
toString
(),
EquipmentSpecificIndexVo
.
class
);
if
(
equipmentSpecificIndex
.
getEquipmentSpecificId
().
equals
(
equipmentSpecificIndexVo
.
getEquipmentSpecificId
())
&&
equipmentSpecificIndex
.
getValue
().
equals
(
equipmentSpecificIndexVo
.
getValue
())){
return
false
;
}
}
redisTemplate
.
opsForValue
().
set
(
key
,
JSONObject
.
toJSONString
(
equipmentSpecificIndex
));
return
true
;
}
// @Override
// public void subscribeTopic(ReginParams reginParams) {
// // 若登录系统则订阅装备数据
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
802a0f0a
...
...
@@ -1077,6 +1077,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
Equipment
equipment
=
equipmentService
.
queryOne
(
id
);
topicEntity
.
setMessage
(
JSON
.
toJSONString
(
equipmentSpecificIndexVo
));
topicEntity
.
setEquipment
(
equipment
);
topicEntity
.
setSimulationDate
(
"true"
);
String
data
=
JSON
.
toJSONString
(
topicEntity
);
System
.
out
.
println
(
data
);
iEquipmentHandlerService
.
handlerMqttMessage
(
""
,
data
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/TopicEntityVo.java
View file @
802a0f0a
...
...
@@ -26,4 +26,8 @@ public class TopicEntityVo {
private
String
type
;
private
Equipment
equipment
;
/**
* 是否模拟发送的数据,初始值为false
*/
private
String
simulationDate
=
"false"
;
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_alarm.xml
View file @
802a0f0a
...
...
@@ -103,7 +103,7 @@
WHEN 'FIREALARM' THEN '火灾报警'
WHEN 'BREAKDOWN' THEN '故障告警' ELSE wlesa.type
END AS type,
wlesa.
upd
ate_date as createDate,
wlesa.
cre
ate_date as createDate,
wlesa.recovery_date as recoveryDate,
CONCAT(IFNULL(wws.full_name,''),' ',IFNULL(wlsd.description,'')) as warehouseStructureName,
(
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
802a0f0a
...
...
@@ -491,14 +491,14 @@
spe.CODE,
ala.equipment_specific_index_name,
CONCAT( ala.equipment_specific_index_name, '(', ala.equipment_specific_name, ')' ) AS label,
ala.
upd
ate_date AS changeDate
ala.
cre
ate_date AS changeDate
FROM
wl_equipment_specific_alarm AS ala
LEFT JOIN wl_equipment_specific AS spe ON ala.equipment_specific_id = spe.id
WHERE ala.status = true
AND (ala.org_code = #{orgCode} OR ala.org_code like CONCAT(#{orgCode},'-%'))
AND ala.type = 'FIREALARM'
ORDER BY ala.
upd
ate_date DESC
ORDER BY ala.
cre
ate_date DESC
limit 0,5
</select>
...
...
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