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
40d33f01
Commit
40d33f01
authored
Nov 16, 2022
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务 11836
parent
fc6e94d0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
0 deletions
+65
-0
EquipmentSpecificIndex.java
...oin/equipmanage/common/entity/EquipmentSpecificIndex.java
+9
-0
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+48
-0
application-dev.properties
...ystem-equip/src/main/resources/application-dev.properties
+5
-0
EquipmentSpecificIndexMapper.xml
...rc/main/resources/mapper/EquipmentSpecificIndexMapper.xml
+3
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentSpecificIndex.java
View file @
40d33f01
...
@@ -162,4 +162,13 @@ public class EquipmentSpecificIndex extends BaseEntity {
...
@@ -162,4 +162,13 @@ public class EquipmentSpecificIndex extends BaseEntity {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
bizOrgCode
;
private
String
bizOrgCode
;
@ApiModelProperty
(
value
=
"装备系统code"
)
@TableField
(
exist
=
false
)
private
String
specificCode
;
@ApiModelProperty
(
value
=
"装备定义名称"
)
@TableField
(
exist
=
false
)
private
String
equipmentName
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
40d33f01
...
@@ -180,6 +180,12 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -180,6 +180,12 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
@Value
(
"${equipManage.name}"
)
@Value
(
"${equipManage.name}"
)
private
String
serverName
;
private
String
serverName
;
@Value
(
"${state.code:code}"
)
private
String
stationCode
;
@Value
(
"${state.name:name}"
)
private
String
stationName
;
@Value
(
"${mqtt.vehicle.topic}"
)
@Value
(
"${mqtt.vehicle.topic}"
)
private
String
carTopic
;
private
String
carTopic
;
...
@@ -382,6 +388,48 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -382,6 +388,48 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
iotDataVO
.
getKey
().
toLowerCase
().
equals
(
FHS_WirelessliquidDetector_WaterLevel
.
toLowerCase
()))
{
iotDataVO
.
getKey
().
toLowerCase
().
equals
(
FHS_WirelessliquidDetector_WaterLevel
.
toLowerCase
()))
{
doWaterPoolLevel
(
iotDataVO
,
equipmentSpecificIndex
);
doWaterPoolLevel
(
iotDataVO
,
equipmentSpecificIndex
);
}
}
// 遥测遥信数据推送云端kafka
JSONObject
jsonObjectXf
=
new
JSONObject
();
jsonObjectXf
.
put
(
"data_class"
,
"realdata"
);
// 遥测
if
(
equipmentSpeIndex
.
getIsTrend
()
==
1
)
{
jsonObjectXf
.
put
(
"data_type"
,
"analog"
);
}
else
{
jsonObjectXf
.
put
(
"data_type"
,
"state"
);
}
String
date
=
DateUtils
.
date2LongStr
(
new
Date
());
jsonObjectXf
.
put
(
"op_type"
,
"subscribe_emergency"
);
JSONObject
jsonObjectCondition
=
new
JSONObject
();
jsonObjectCondition
.
put
(
"station_psr_id"
,
stationCode
);
jsonObjectCondition
.
put
(
"station_name"
,
stationName
);
jsonObjectCondition
.
put
(
"data_upload_time"
,
date
);
jsonObjectXf
.
put
(
"condition"
,
jsonObjectCondition
);
JSONObject
jsonObjectData
=
new
JSONObject
();
jsonObjectData
.
put
(
"psrId"
,
stationCode
);
jsonObjectData
.
put
(
"astId"
,
equipmentSpecificIndex
.
getSpecificCode
());
jsonObjectData
.
put
(
"equipType"
,
equipmentSpecificIndex
.
getEquipmentCode
());
jsonObjectData
.
put
(
"name"
,
equipmentSpecificIndex
.
getEquipmentSpecificName
()+
"-"
+
equipmentSpecificIndex
.
getEquipmentSpecificIndexName
());
if
(
value
.
equals
(
"true"
))
{
jsonObjectData
.
put
(
"value"
,
"1"
);
}
else
if
(
value
.
equals
(
"false"
))
{
jsonObjectData
.
put
(
"value"
,
"0"
);
}
else
{
jsonObjectData
.
put
(
"value"
,
value
);
}
jsonObjectData
.
put
(
"measurementType"
,
equipmentSpecificIndex
.
getEquipmentIndexKey
());
jsonObjectData
.
put
(
"dateTime"
,
date
);
jsonObjectData
.
put
(
"quality"
,
"0"
);
// 量测质量码:0 有效,1 无效
List
<
JSONObject
>
jsonObjects
=
Arrays
.
asList
(
jsonObjectData
);
jsonObjectXf
.
put
(
"data"
,
jsonObjects
);
try
{
emqKeeper
.
getMqttClient
().
publish
(
"eqm.xf.created"
,
jsonObjectXf
.
toString
().
getBytes
(),
1
,
false
);
}
catch
(
MqttException
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
});
});
...
...
amos-boot-system-equip/src/main/resources/application-dev.properties
View file @
40d33f01
...
@@ -111,3 +111,7 @@ equipment.scrap.cron=0 0 9 * * ?
...
@@ -111,3 +111,7 @@ equipment.scrap.cron=0 0 9 * * ?
equipment.pressurepump.start
=
FHS_PressurePump_Start
equipment.pressurepump.start
=
FHS_PressurePump_Start
# 稳压泵停止信号
# 稳压泵停止信号
equipment.pressurepump.stop
=
FHS_PressurePump_Stop
equipment.pressurepump.stop
=
FHS_PressurePump_Stop
# 站端标识
state.code
=
JP
state.name
=
NAME
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificIndexMapper.xml
View file @
40d33f01
...
@@ -47,9 +47,12 @@
...
@@ -47,9 +47,12 @@
wei.unit AS indexUnitName,
wei.unit AS indexUnitName,
wes.org_code AS orgCode,
wes.org_code AS orgCode,
ed.`name` AS equipmentSpecificName,
ed.`name` AS equipmentSpecificName,
ed.equipment_name AS equipmentName,
wes.iot_code AS iotCode,
wes.iot_code AS iotCode,
wes.code AS specificCode,
wei.`name` AS equipmentSpecificIndexName,
wei.`name` AS equipmentSpecificIndexName,
wei.`value_enum` AS valueEnum,
wei.`value_enum` AS valueEnum,
wei.is_trend AS isTrend,
wes.qr_code AS qrCode,
wes.qr_code AS qrCode,
wesi.update_date AS updateDate,
wesi.update_date AS updateDate,
ed.code AS equipmentCode,
ed.code AS equipmentCode,
...
...
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