From 2ed7fe7716b62586acd5298aceccc12798933eee Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Tue, 07 Mar 2023 14:48:35 +0800
Subject: [PATCH] 对讲设备字段修改读取数据修改
---
src/main/java/com/genersoft/iot/vmp/netty/business/entity/TalkBackEquipmentRecord.java | 24 --------
.idea/workspace.xml | 86 +++++++++++++++-------------
src/main/java/com/genersoft/iot/vmp/netty/handle/UdpServerHandler.java | 25 +-------
src/main/java/com/genersoft/iot/vmp/netty/business/mapper/TalkBackEquipmentMapper.xml | 20 +-----
src/main/java/com/genersoft/iot/vmp/netty/business/entity/TalkBackEquipment.java | 24 --------
5 files changed, 53 insertions(+), 126 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 5f4a894..72d0832 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -17,19 +17,7 @@
</component>
<component name="ChangeListManager">
<list default="true" id="208daac0-1abd-465d-abf2-6a0414be019b" name="默认的" comment="配置提交">
- <change afterPath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/config/MyDecoder.java" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/util/Hex.java" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/util/HexStringTool.java" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/util/Utils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/business/entity/TalkBackEquipment.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/business/entity/TalkBackEquipment.java" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/business/entity/TalkBackEquipmentRecord.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/business/entity/TalkBackEquipmentRecord.java" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/business/mapper/TalkBackEquipmentMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/business/mapper/TalkBackEquipmentMapper.java" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/business/mapper/TalkBackEquipmentMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/business/mapper/TalkBackEquipmentMapper.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/business/service/impl/TalkBackEquipmentServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/business/service/impl/TalkBackEquipmentServiceImpl.java" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/handle/UdpServerHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/handle/UdpServerHandler.java" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/server/UdpServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/netty/server/UdpServer.java" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -175,7 +163,7 @@
<workItem from="1677651650908" duration="1778000" />
<workItem from="1677660534432" duration="58000" />
<workItem from="1677726051229" duration="38096000" />
- <workItem from="1678063078799" duration="34014000" />
+ <workItem from="1678063078799" duration="35272000" />
</task>
<task id="LOCAL-00001" summary="默认的">
<created>1676691639632</created>
@@ -226,7 +214,14 @@
<option name="project" value="LOCAL" />
<updated>1677899968353</updated>
</task>
- <option name="localTasksCounter" value="8" />
+ <task id="LOCAL-00008" summary="对讲设备读取数据修改">
+ <created>1678169349329</created>
+ <option name="number" value="00008" />
+ <option name="presentableId" value="LOCAL-00008" />
+ <option name="project" value="LOCAL" />
+ <updated>1678169349330</updated>
+ </task>
+ <option name="localTasksCounter" value="9" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@@ -264,7 +259,8 @@
<MESSAGE value="udp 接收修改" />
<MESSAGE value="手台,执法记录仪基础接口新增(新增,修改,查询接口) 集成lombok" />
<MESSAGE value="执法记录仪移动位置插入新增" />
- <option name="LAST_COMMIT_MESSAGE" value="执法记录仪移动位置插入新增" />
+ <MESSAGE value="对讲设备读取数据修改" />
+ <option name="LAST_COMMIT_MESSAGE" value="对讲设备读取数据修改" />
</component>
<component name="WindowStateProjectService">
<state x="414" y="174" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1678100334007">
@@ -291,54 +287,62 @@
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="740" y="275" key="FileChooserDialogImpl/0.0.1920.1040@0.0.1920.1040" timestamp="1677835225799" />
- <state width="1877" height="437" key="GridCell.Tab.0.bottom" timestamp="1678169159490">
+ <state width="1877" height="244" key="GridCell.Tab.0.bottom" timestamp="1678169317801">
<screen x="0" y="0" width="1920" height="1040" />
</state>
- <state width="1877" height="437" key="GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1678169159490" />
- <state width="1877" height="437" key="GridCell.Tab.0.center" timestamp="1678169159490">
+ <state width="1877" height="244" key="GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1678169317801" />
+ <state width="1877" height="244" key="GridCell.Tab.0.center" timestamp="1678169317801">
<screen x="0" y="0" width="1920" height="1040" />
</state>
- <state width="1877" height="437" key="GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040" timestamp="1678169159490" />
- <state width="1877" height="437" key="GridCell.Tab.0.left" timestamp="1678169159490">
+ <state width="1877" height="244" key="GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040" timestamp="1678169317801" />
+ <state width="1877" height="244" key="GridCell.Tab.0.left" timestamp="1678169317801">
<screen x="0" y="0" width="1920" height="1040" />
</state>
- <state width="1877" height="437" key="GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040" timestamp="1678169159490" />
- <state width="1877" height="437" key="GridCell.Tab.0.right" timestamp="1678169159490">
+ <state width="1877" height="244" key="GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040" timestamp="1678169317801" />
+ <state width="1877" height="244" key="GridCell.Tab.0.right" timestamp="1678169317801">
<screen x="0" y="0" width="1920" height="1040" />
</state>
- <state width="1877" height="437" key="GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040" timestamp="1678169159490" />
- <state width="1877" height="437" key="GridCell.Tab.1.bottom" timestamp="1678169159490">
+ <state width="1877" height="244" key="GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040" timestamp="1678169317801" />
+ <state width="1877" height="437" key="GridCell.Tab.1.bottom" timestamp="1678169313836">
<screen x="0" y="0" width="1920" height="1040" />
</state>
- <state width="1877" height="437" key="GridCell.Tab.1.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1678169159490" />
- <state width="1877" height="437" key="GridCell.Tab.1.center" timestamp="1678169159490">
+ <state width="1877" height="437" key="GridCell.Tab.1.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1678169313836" />
+ <state width="1877" height="437" key="GridCell.Tab.1.center" timestamp="1678169313836">
<screen x="0" y="0" width="1920" height="1040" />
</state>
- <state width="1877" height="437" key="GridCell.Tab.1.center/0.0.1920.1040@0.0.1920.1040" timestamp="1678169159490" />
- <state width="1877" height="437" key="GridCell.Tab.1.left" timestamp="1678169159490">
+ <state width="1877" height="437" key="GridCell.Tab.1.center/0.0.1920.1040@0.0.1920.1040" timestamp="1678169313836" />
+ <state width="1877" height="437" key="GridCell.Tab.1.left" timestamp="1678169313836">
<screen x="0" y="0" width="1920" height="1040" />
</state>
- <state width="1877" height="437" key="GridCell.Tab.1.left/0.0.1920.1040@0.0.1920.1040" timestamp="1678169159490" />
- <state width="1877" height="437" key="GridCell.Tab.1.right" timestamp="1678169159490">
+ <state width="1877" height="437" key="GridCell.Tab.1.left/0.0.1920.1040@0.0.1920.1040" timestamp="1678169313836" />
+ <state width="1877" height="437" key="GridCell.Tab.1.right" timestamp="1678169313836">
<screen x="0" y="0" width="1920" height="1040" />
</state>
- <state width="1877" height="437" key="GridCell.Tab.1.right/0.0.1920.1040@0.0.1920.1040" timestamp="1678169159490" />
- <state width="1877" height="437" key="GridCell.Tab.2.bottom" timestamp="1678169159490">
+ <state width="1877" height="437" key="GridCell.Tab.1.right/0.0.1920.1040@0.0.1920.1040" timestamp="1678169313836" />
+ <state width="1877" height="437" key="GridCell.Tab.2.bottom" timestamp="1678169313836">
<screen x="0" y="0" width="1920" height="1040" />
</state>
- <state width="1877" height="437" key="GridCell.Tab.2.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1678169159490" />
- <state width="1877" height="437" key="GridCell.Tab.2.center" timestamp="1678169159490">
+ <state width="1877" height="437" key="GridCell.Tab.2.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1678169313836" />
+ <state width="1877" height="437" key="GridCell.Tab.2.center" timestamp="1678169313836">
<screen x="0" y="0" width="1920" height="1040" />
</state>
- <state width="1877" height="437" key="GridCell.Tab.2.center/0.0.1920.1040@0.0.1920.1040" timestamp="1678169159490" />
- <state width="1877" height="437" key="GridCell.Tab.2.left" timestamp="1678169159490">
+ <state width="1877" height="437" key="GridCell.Tab.2.center/0.0.1920.1040@0.0.1920.1040" timestamp="1678169313836" />
+ <state width="1877" height="437" key="GridCell.Tab.2.left" timestamp="1678169313836">
<screen x="0" y="0" width="1920" height="1040" />
</state>
- <state width="1877" height="437" key="GridCell.Tab.2.left/0.0.1920.1040@0.0.1920.1040" timestamp="1678169159490" />
- <state width="1877" height="437" key="GridCell.Tab.2.right" timestamp="1678169159490">
+ <state width="1877" height="437" key="GridCell.Tab.2.left/0.0.1920.1040@0.0.1920.1040" timestamp="1678169313836" />
+ <state width="1877" height="437" key="GridCell.Tab.2.right" timestamp="1678169313836">
<screen x="0" y="0" width="1920" height="1040" />
</state>
- <state width="1877" height="437" key="GridCell.Tab.2.right/0.0.1920.1040@0.0.1920.1040" timestamp="1678169159490" />
+ <state width="1877" height="437" key="GridCell.Tab.2.right/0.0.1920.1040@0.0.1920.1040" timestamp="1678169313836" />
+ <state x="184" y="86" key="MergeDialog" timestamp="1678169634470">
+ <screen x="0" y="0" width="1920" height="1040" />
+ </state>
+ <state x="184" y="86" key="MergeDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1678169634470" />
+ <state x="595" y="280" key="MultipleFileMergeDialog" timestamp="1678169636516">
+ <screen x="0" y="0" width="1920" height="1040" />
+ </state>
+ <state x="595" y="280" key="MultipleFileMergeDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1678169636516" />
<state x="698" y="221" key="RollbackChangesDialog" timestamp="1671415751049">
<screen x="0" y="0" width="1920" height="1040" />
</state>
@@ -347,10 +351,10 @@
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="461" y="164" key="SettingsEditor/0.0.1920.1040@0.0.1920.1040" timestamp="1676692121637" />
- <state x="552" y="252" key="Vcs.Push.Dialog.v2" timestamp="1677899969721">
+ <state x="552" y="252" key="Vcs.Push.Dialog.v2" timestamp="1678169653397">
<screen x="0" y="0" width="1920" height="1040" />
</state>
- <state x="552" y="252" key="Vcs.Push.Dialog.v2/0.0.1920.1040@0.0.1920.1040" timestamp="1677899969721" />
+ <state x="552" y="252" key="Vcs.Push.Dialog.v2/0.0.1920.1040@0.0.1920.1040" timestamp="1678169653397" />
<state x="92" y="92" width="1736" height="856" key="com.intellij.history.integration.ui.views.FileHistoryDialog" timestamp="1673925442539">
<screen x="0" y="0" width="1920" height="1040" />
</state>
diff --git a/src/main/java/com/genersoft/iot/vmp/netty/business/entity/TalkBackEquipment.java b/src/main/java/com/genersoft/iot/vmp/netty/business/entity/TalkBackEquipment.java
index 3c4cb44..bb0a154 100644
--- a/src/main/java/com/genersoft/iot/vmp/netty/business/entity/TalkBackEquipment.java
+++ b/src/main/java/com/genersoft/iot/vmp/netty/business/entity/TalkBackEquipment.java
@@ -45,30 +45,6 @@
private Integer status;
/**
- * 单位名称
- */
- @ApiModelProperty(value = "单位名称")
- private String unitName;
-
- /**
- * 单位编号
- */
- @ApiModelProperty(value = "单位编号")
- private String unitCode;
-
- /**
- * 民警姓名
- */
- @ApiModelProperty(value = "民警姓名")
- private String policeName;
-
- /**
- * 民警编号
- */
- @ApiModelProperty(value = "民警编号")
- private String policeCode;
-
- /**
* 终端编号
*/
@ApiModelProperty(value = "终端编号")
diff --git a/src/main/java/com/genersoft/iot/vmp/netty/business/entity/TalkBackEquipmentRecord.java b/src/main/java/com/genersoft/iot/vmp/netty/business/entity/TalkBackEquipmentRecord.java
index 97242e2..c45be1a 100644
--- a/src/main/java/com/genersoft/iot/vmp/netty/business/entity/TalkBackEquipmentRecord.java
+++ b/src/main/java/com/genersoft/iot/vmp/netty/business/entity/TalkBackEquipmentRecord.java
@@ -41,30 +41,6 @@
private Integer status;
/**
- * 单位名称
- */
- @ApiModelProperty(value = "单位名称")
- private String unitName;
-
- /**
- * 单位编号
- */
- @ApiModelProperty(value = "单位编号")
- private String unitCode;
-
- /**
- * 民警姓名
- */
- @ApiModelProperty(value = "民警姓名")
- private String policeName;
-
- /**
- * 民警编号
- */
- @ApiModelProperty(value = "民警编号")
- private String policeCode;
-
- /**
* 终端编号
*/
@ApiModelProperty(value = "终端编号")
diff --git a/src/main/java/com/genersoft/iot/vmp/netty/business/mapper/TalkBackEquipmentMapper.xml b/src/main/java/com/genersoft/iot/vmp/netty/business/mapper/TalkBackEquipmentMapper.xml
index 6e78794..a372daf 100644
--- a/src/main/java/com/genersoft/iot/vmp/netty/business/mapper/TalkBackEquipmentMapper.xml
+++ b/src/main/java/com/genersoft/iot/vmp/netty/business/mapper/TalkBackEquipmentMapper.xml
@@ -6,12 +6,12 @@
<insert id="saveTalkBackEquipment" useGeneratedKeys="true" keyProperty="id">
insert into sys_talk_back_equipment
(
- name,code,status,unit_name,unit_code,police_name,police_code,terminal_number,longitude,latitude,
+ name,code,status,terminal_number,longitude,latitude,
speed,direction,elevation,precisions,receive_time,create_time,update_time
)
values
(
- #{name},#{code},#{status},#{unitName},#{unitCode},#{policeName},#{policeCode},#{terminalNumber},#{longitude},#{latitude},
+ #{name},#{code},#{status},#{terminalNumber},#{longitude},#{latitude},
#{speed},#{direction},#{elevation},#{precisions},#{receiveTime},#{createTime},#{updateTime}
)
</insert>
@@ -20,12 +20,12 @@
<insert id="saveTalkBackEquipmentRecord">
insert into sys_talk_back_equipment_record
(
- talk_back_equipment_id,status,unit_name,unit_code,police_name,police_code,terminal_number,
+ talk_back_equipment_id,status,terminal_number,
longitude,latitude,speed,direction,elevation,precisions,receive_time,create_time
)
values
(
- #{talkBackEquipmentId},#{status},#{unitName},#{unitCode},#{policeName},#{policeCode},#{terminalNumber},
+ #{talkBackEquipmentId},#{status},#{terminalNumber},
#{longitude},#{latitude},#{speed},#{direction},#{elevation},#{precisions},#{receiveTime},#{createTime}
)
</insert>
@@ -37,18 +37,6 @@
code = #{code},
name = #{name},
status = #{status},
- <if test="null!=unitName and unitName!=''">
- unit_name = #{unitName},
- </if>
- <if test="null!=unitCode and unitCode!=''">
- unit_code = #{unitCode},
- </if>
- <if test="null!=policeName and policeName!=''">
- police_name = #{policeName},
- </if>
- <if test="null!=policeCode and policeCode!=''">
- police_code = #{policeCode},
- </if>
<if test="null!=terminalNumber and terminalNumber!=''">
terminal_number = #{terminalNumber},
</if>
diff --git a/src/main/java/com/genersoft/iot/vmp/netty/handle/UdpServerHandler.java b/src/main/java/com/genersoft/iot/vmp/netty/handle/UdpServerHandler.java
index 9389b39..095466a 100644
--- a/src/main/java/com/genersoft/iot/vmp/netty/handle/UdpServerHandler.java
+++ b/src/main/java/com/genersoft/iot/vmp/netty/handle/UdpServerHandler.java
@@ -55,12 +55,12 @@
buf.readBytes(req);
String body = new String(req, CharsetUtil.UTF_8);
- System.out.println("【UDP】>>>>>> 收到客户端的数据:"+body);
+// System.out.println("【UDP】>>>>>> 收到客户端的数据:"+body);
String s = bytesToHexString(req);
- System.out.println("s111111 = " + s);
+// System.out.println("s111111 = " + s);
//获取字符串的长度
int length = s.length();
- System.out.println("数据长度>>>>>> = " + length);
+// System.out.println("数据长度>>>>>> = " + length);
//数据解析
dataHandler(s);
}
@@ -115,7 +115,6 @@
second = "0" + second;
}
String time = year + "-" + month + "-" + day +" " + hour+ ":"+minute + ":" + second;
- System.out.println("接收时间: time = " + time);
//时间拼接
try {
backEquipment.setReceiveTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(time));
@@ -151,23 +150,7 @@
@Async
public void saveTalkBackEquipmentInfo(String body) {
TalkBackEquipment equipmentRecord = new TalkBackEquipment();
- equipmentRecord.setName("ces");
- equipmentRecord.setCode("cs123456");
- equipmentRecord.setStatus(1);
- equipmentRecord.setUnitName("CSDW");
- equipmentRecord.setUnitCode("CSDW123456");
- equipmentRecord.setPoliceName("JINGYUAN");
- equipmentRecord.setPoliceCode("JINGYUAN123456");
- equipmentRecord.setTerminalNumber("788888888888");
- equipmentRecord.setLongitude("128.124124412");
- equipmentRecord.setLatitude("27.1224521421");
- equipmentRecord.setSpeed("10");
- equipmentRecord.setDirection("10");
- equipmentRecord.setElevation("10");
- equipmentRecord.setPrecisions("10");
- equipmentRecord.setReceiveTime(new Date());
- equipmentRecord.setCreateTime(new Date());
- equipmentRecord.setUpdateTime(new Date());
+
}
--
Gitblit v1.9.3