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
02175635
Commit
02175635
authored
Jun 14, 2023
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(equip):对接Iot平台透传数据
parent
8196356b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
34 additions
and
5 deletions
+34
-5
EquipmentSpecificIndex.java
...oin/equipmanage/common/entity/EquipmentSpecificIndex.java
+4
-0
EquipmentIotMqttReceiveConfig.java
...oin/equipmanage/config/EquipmentIotMqttReceiveConfig.java
+3
-0
EquipmentSpecificIndexMapper.java
...join/equipmanage/mapper/EquipmentSpecificIndexMapper.java
+1
-1
IEquipmentSpecificIndexService.java
...n/equipmanage/service/IEquipmentSpecificIndexService.java
+1
-1
MqttReceiveService.java
...a/com/yeejoin/equipmanage/service/MqttReceiveService.java
+7
-0
EquipmentSpecificIndexServiceImpl.java
...anage/service/impl/EquipmentSpecificIndexServiceImpl.java
+2
-2
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+0
-0
wl-3.6.0.xml
...ot-system-equip/src/main/resources/changelog/wl-3.6.0.xml
+12
-0
EquipmentSpecificIndexMapper.xml
...rc/main/resources/mapper/EquipmentSpecificIndexMapper.xml
+4
-1
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 @
02175635
...
...
@@ -203,4 +203,8 @@ public class EquipmentSpecificIndex extends BaseEntity {
@ApiModelProperty
(
value
=
"指标值枚举"
)
@TableField
(
"value_enum"
)
private
String
valueEnum
;
@ApiModelProperty
(
value
=
"网关标识"
)
@TableField
(
value
=
"gateway_id"
)
private
String
gatewayId
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/config/EquipmentIotMqttReceiveConfig.java
View file @
02175635
...
...
@@ -125,6 +125,7 @@ public class EquipmentIotMqttReceiveConfig {
list
.
add
(
"+/+/property"
);
// 添加iot車輛裝備數據上報事件监听
list
.
add
(
"+/+/event"
);
// 添加iot事件监听
list
.
add
(
"+/+/transmit"
);
// 添加交换站事件监听
list
.
add
(
"+/+/perspective"
);
// 添加交换站事件监听
String
[]
arr
=
list
.
toArray
(
new
String
[
list
.
size
()]);
adapter
=
new
MqttPahoMessageDrivenChannelAdapter
(
clientId
+
"_inbound"
,
mqttPahoClientFactory
(),
arr
);
adapter
.
setCompletionTimeout
(
completionTimeout
);
...
...
@@ -150,6 +151,8 @@ public class EquipmentIotMqttReceiveConfig {
mqttEventReceiveService
.
handlerMqttIncrementMessage
(
topic
,
msg
);
}
else
if
(
dataType
.
equals
(
"transmit"
)
&&
StringUtil
.
isNotEmpty
(
msg
)){
mqttReceiveService
.
handlerMqttRomaMessage
(
topic
,
msg
);
}
else
if
(
dataType
.
equals
(
"perspective"
)
&&
StringUtil
.
isNotEmpty
(
msg
)){
mqttReceiveService
.
handlerMqttIotMessage
(
topic
,
msg
);
}
}
};
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificIndexMapper.java
View file @
02175635
...
...
@@ -114,5 +114,5 @@ public interface EquipmentSpecificIndexMapper extends BaseMapper<EquipmentSpecif
List
<
EquipmentSpecificIndex
>
getEquipIndexInIndex
(
@Param
(
"list"
)
List
<
String
>
listIndex
);
EquipmentSpecificIndex
getEquipmentSpeIndexByIndexAddress
(
String
indexAddress
);
EquipmentSpecificIndex
getEquipmentSpeIndexByIndexAddress
(
String
indexAddress
,
String
gatewayId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEquipmentSpecificIndexService.java
View file @
02175635
...
...
@@ -40,5 +40,5 @@ public interface IEquipmentSpecificIndexService extends IService<EquipmentSpecif
* @param indexAddress indexAddress
* @return EquipmentSpecificIndex
*/
EquipmentSpecificIndex
getEquipmentSpeIndexByIndexAddress
(
String
indexAddress
);
EquipmentSpecificIndex
getEquipmentSpeIndexByIndexAddress
(
String
indexAddress
,
String
gatewayId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/MqttReceiveService.java
View file @
02175635
...
...
@@ -24,4 +24,11 @@ public interface MqttReceiveService {
* @param message 消息内容
*/
void
handlerMqttRomaMessage
(
String
topic
,
String
message
);
/**
* 处理Iot消息数据
* @param topic 主题
* @param message 消息内容
*/
void
handlerMqttIotMessage
(
String
topic
,
String
message
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificIndexServiceImpl.java
View file @
02175635
...
...
@@ -30,7 +30,7 @@ public class EquipmentSpecificIndexServiceImpl extends ServiceImpl<EquipmentSpec
}
@Override
public
EquipmentSpecificIndex
getEquipmentSpeIndexByIndexAddress
(
String
indexAddress
)
{
return
this
.
baseMapper
.
getEquipmentSpeIndexByIndexAddress
(
indexAddress
);
public
EquipmentSpecificIndex
getEquipmentSpeIndexByIndexAddress
(
String
indexAddress
,
String
gatewayId
)
{
return
this
.
baseMapper
.
getEquipmentSpeIndexByIndexAddress
(
indexAddress
,
gatewayId
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
02175635
This diff is collapsed.
Click to expand it.
amos-boot-system-equip/src/main/resources/changelog/wl-3.6.0.xml
View file @
02175635
...
...
@@ -904,4 +904,15 @@
</sql>
</changeSet>
<changeSet
author=
"LiuLin"
id=
"1686650059"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"wl_equipment_specific_index"
columnName=
"gateway_id"
/>
</not>
</preConditions>
<comment>
新增属性字段 gateway_id
</comment>
<sql>
alter table `wl_equipment_specific_index` add column `gateway_id` varchar(50) COMMENT '网关标识ID';
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificIndexMapper.xml
View file @
02175635
...
...
@@ -558,6 +558,8 @@
LEFT JOIN wl_equipment_index AS wei ON wei.id = wesi.equipment_index_id
WHERE
wesi.index_address = #{indexAddress}
AND wei.is_iot = true
<if
test=
"gatewayId != null"
>
AND wesi.gateway_id = #{gatewayId}
</if>
</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