Forráskód Böngészése

+ 终端信息采集程序

chen.cheng 5 hónapja
szülő
commit
d9a96317f2

+ 51 - 0
bd-park/park-backend/park-collect/src/main/java/com/huashe/park/collect/controller/TopicController.java

@@ -0,0 +1,51 @@
+package com.huashe.park.collect.controller;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.huashe.park.collect.core.MqttTemplate;
+import com.huashe.park.collect.model.MqttRequest;
+import com.ruoyi.common.annotation.Anonymous;
+import com.ruoyi.common.core.controller.BaseController;
+
+import cn.hutool.core.util.HexUtil;
+
+/**
+ * 缓存监控
+ * 
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/topic")
+@Anonymous
+public class TopicController extends BaseController {
+
+    @Autowired
+    private MqttTemplate mqttTemplate;
+
+    @PostMapping
+    @Anonymous
+    public void send(@RequestBody MqttRequest jsonObject) {
+        mqttTemplate.send(jsonObject.getTopic(), jsonObject.getTopic() + "/machine/piling/result",
+            jsonObject.getPayload(), jsonObject.getQos(), jsonObject.isRetained());
+    }
+
+    @PostMapping("/byte/process")
+    @Anonymous
+    public void sendByte(@RequestBody MqttRequest jsonObject) {
+        byte[] bytes = HexUtil.decodeHex(jsonObject.getPayload());
+        mqttTemplate.sendByte(jsonObject.getTopic(), jsonObject.getTopic() + "/machine/piling/process", bytes,
+            jsonObject.getQos(), jsonObject.isRetained());
+    }
+
+    @PostMapping("/byte/result")
+    @Anonymous
+    public void sendResultByte(@RequestBody MqttRequest jsonObject) {
+        byte[] bytes = HexUtil.decodeHex(jsonObject.getPayload());
+        mqttTemplate.sendByte(jsonObject.getTopic(), jsonObject.getTopic() + "/machine/piling/result", bytes,
+            jsonObject.getQos(), jsonObject.isRetained());
+    }
+}

+ 4 - 4
bd-park/park-backend/park-collect/src/main/java/com/huashe/park/collect/core/MqttTemplate.java

@@ -127,26 +127,26 @@ public class MqttTemplate {
      * @param qos 消息级别
      * @param retained 回复
      */
-    public void send(String topic, String payload, int qos, boolean retained) {
+    public void send(String clientKey, String topic, String payload, int qos, boolean retained) {
         try {
             MqttMessage message = new MqttMessage();
             message.setPayload(payload.getBytes(StandardCharsets.UTF_8));
             message.setQos(qos);
             message.setRetained(retained);
-            mqttClientMap.get(topic).publish(topic, message);
+            mqttClientMap.get(clientKey).publish(topic, message);
         }
         catch (MqttException e) {
             log.error("[Send]fail!", e);
         }
     }
 
-    public void sendByte(String topic, byte[] payload, int qos, boolean retained) {
+    public void sendByte(String clientKey, String topic, byte[] payload, int qos, boolean retained) {
         try {
             MqttMessage message = new MqttMessage();
             message.setPayload(payload);
             message.setQos(qos);
             message.setRetained(retained);
-            mqttClientMap.get(topic).publish(topic, message);
+            mqttClientMap.get(clientKey).publish(topic, message);
         }
         catch (MqttException e) {
             log.error("[Send]fail!", e);

+ 7 - 13
bd-park/park-backend/park-collect/src/main/java/com/huashe/park/collect/handle/RootMsgHandler.java

@@ -29,6 +29,7 @@ import com.huashe.common.utils.StringUtils;
 import com.huashe.park.collect.config.TopicDataCfg;
 import com.huashe.park.collect.core.TopicMsgEngine;
 import com.huashe.park.common.ByteArrayUtil;
+import com.huashe.park.common.DateTimeUtil;
 import com.huashe.park.core.service.IMachineProcessResultService;
 import com.huashe.park.core.service.IMachineProcessService;
 import com.huashe.park.domain.entity.MachineProcess;
@@ -76,19 +77,6 @@ public class RootMsgHandler extends TopicMsgEngine {
 
     @Override
     public void handle(String topic, byte[] payload) {
-        Map<String, TopicDataCfg.Protocol> resultTopic = topicDataCfg.getResultTopic().getProtocol();
-        // 初始化byte数组
-        log.info("[Receive]Topic:{}, message:{}", topic, payload);
-        // byte[] bytes = DatatypeConverter.parseHexBinary(new String(payload));
-        // // 取前两个字节
-        // byte[] bytes1 = new byte[2];
-        // bytes1[0] = bytes[1];
-        // bytes1[1] = bytes[0];
-        // int value = ((bytes1[1] & 0xFF) << 8) | (bytes[0] & 0xFF);
-        byte[] bytes2 = ByteArrayUtil.hexString2ByteArray(
-            "590200000001951C387150353061623664373875393537343066346D75656466653462FA7E6A04ACCE5041A8C64B37EA401C4163077186A3CE50410F490C00A6401C4163077186A3CE5041FE480C00A6401C41000000000000000000000000000000000000000000000000000001951C37D7CB000001951C38711A00000000643BDF4F8DD72C400000000000000000000000000000000000000000000000000000204100000000000000005902000000000000000000000000000075393537343066345F313130445339383339333230303030325F");
-        // System.out.println(HexUtil.encodeHex(ByteArrayUtil.double2ByteArray_Big_Endian(4405936.0690)));
-        System.out.println(byteFormat(bytes2));
         JSONObject jsonObject = new JSONObject();
         jsonObject.put(TOPIC_NAME, topic);
         jsonObject.put("key", topic);
@@ -104,12 +92,18 @@ public class RootMsgHandler extends TopicMsgEngine {
             byte[] bytes = json.getBytes(TOPIC_PAYLOAD);
             JSONObject jsonObject = byteFormat(bytes, topicDataCfg.getResultTopic().getProtocol());
             MachineProcessResult machineProcess = JSON.parseObject(jsonObject.toString(), MachineProcessResult.class);
+            machineProcess.setRecordTime(DateTimeUtil.getDateFromMills(machineProcess.getDataTime()));
+            machineProcess.setDt(
+                DateTimeUtil.getDateFromMills(machineProcess.getDataTime(), DateTimeUtil.DateFormatter.yyyyMMdd));
             machineProcessResultService.insertMachineProcessResult(machineProcess);
         }
         if (topic.endsWith(topicDataCfg.getProcessTopic().getName())) {
             byte[] bytes = json.getBytes(TOPIC_PAYLOAD);
             JSONObject jsonObject = byteFormat(bytes, topicDataCfg.getProcessTopic().getProtocol());
             MachineProcess machineProcess = JSON.parseObject(jsonObject.toString(), MachineProcess.class);
+            machineProcess.setRecordTime(DateTimeUtil.getDateFromMills(machineProcess.getDataTime()));
+            machineProcess.setDt(
+                DateTimeUtil.getDateFromMills(machineProcess.getDataTime(), DateTimeUtil.DateFormatter.yyyyMMdd));
             machineProcessService.insertMachineProcess(machineProcess);
         }
     }

+ 0 - 124
bd-park/park-backend/park-collect/src/main/java/com/huashe/park/collect/model/MachinePileProcess.java

@@ -1,124 +0,0 @@
-package com.huashe.park.collect.model;
-
-import lombok.Data;
-
-@Data
-public class MachinePileProcess {
-
-    // 基础信息区
-    /** 设备类型 (字节范围: 0-1) */
-    private short consType;
-
-    /** 数据版本 (字节范围: 2-2) */
-    private byte dataVersion;
-
-    /** 数据时间 (字节范围: 3-10, 大端序) */
-    private long dataTime;
-
-    // 设备标识区
-    /** 桩号 (字节范围: 11-18) */
-    private String pileId;
-
-    /** 设计编号 (字节范围: 19-26) */
-    private String designId;
-
-    /** 机器编号 (字节范围: 27-34) */
-    private String machineId;
-
-    // 空间坐标区
-    /** 实际X坐标 (字节范围: 35-42) */
-    private double realX;
-
-    /** 实际Y坐标 (字节范围: 43-50) */
-    private double realY;
-
-    /** 高程 (字节范围: 51-54) */
-    private float realZ;
-
-    /** 纬度 (字节范围: 55-62) */
-    private double latitude;
-
-    /** 经度 (字节范围: 63-70) */
-    private double longitude;
-
-    // 桩体参数区
-    /** 设计桩长 (字节范围: 71-74) */
-    private float pileLength;
-
-    /** 实际桩长 (字节范围: 75-78) */
-    private float realPileLength;
-
-    // 运行参数区
-    /** 速度 (字节范围: 79-82) */
-    private float speed;
-
-    /** 电流 (字节范围: 83-86) */
-    private float current;
-
-    /** 倾侧角 (字节范围: 87-90) */
-    private float tiltAngle;
-
-    /** 前倾角 (字节范围: 91-94) */
-    private float forwardTiltAngle;
-
-    /** 垂直度 (字节范围: 95-98) */
-    private float verticalAngle;
-
-    // 扩展参数区
-    /** 自编号 (字节范围: 99-102) */
-    private int selfNum;
-
-    /** 持力层电流 (字节范围: 103-106) */
-    private float holdCurrent;
-
-    /** 灌浆体积 (字节范围: 107-110) */
-    private float sprayVolume;
-
-    /** 实时钻头高程 (字节范围: 111-114) */
-    private float realDrillHeight;
-
-    // 动力系统参数
-    /** 振动电流 (字节范围: 115-118) */
-    private float vibrationCurrent;
-
-    /** 水泵电流 (字节范围: 119-122) */
-    private float pumpCurrent;
-
-    /** 喷浆压力 (字节范围: 123-126) */
-    private float sprayPressure;
-
-    /** 喷浆速度 (字节范围: 127-130) */
-    private float spraySpeed;
-
-    // 钻杆参数
-    /** 设计桩长 (字节范围: 131-134) */
-    private float designLength;
-
-    /** 当前钻杆节数 (字节范围: 135-138) */
-    private int currentDrillNumber;
-
-    // 时间参数(大端序)
-    /** 每节开始时间 (字节范围: 139-146, 大端序) */
-    private long startTime;
-
-    /** 每节结束时间 (字节范围: 147-154, 大端序) */
-    private long endTime;
-
-    // 地层参数
-    /** 当前机械类型 (字节范围: 155-158) */
-    private int currentMechanicalType;
-
-    /** 当前层 (字节范围: 159-163) */
-    private int currentLayer;
-
-    /** 当前层送土时长 (字节范围: 164-167) */
-    private float currentLayerSendTime;
-
-    /** 当前层夯击次数 (字节范围: 168-171) */
-    private int currentLayerHammerNumber;
-
-    // 唯一标识
-    /** 唯一识别码 (字节起始位置: 172) */
-    private String uuid;
-
-}

+ 0 - 127
bd-park/park-backend/park-collect/src/main/java/com/huashe/park/collect/model/MachinePileResult.java

@@ -1,127 +0,0 @@
-package com.huashe.park.collect.model;
-
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class MachinePileResult {
-    private static final long serialVersionUID = 1L;
-
-    // ------------------- 基础信息 -------------------
-    /** 字节范围:0-1 | 施工类型编码 */
-    private short consType;
-
-    /** 字节范围:2-2 | 数据协议版本 */
-    private byte dataVersion;
-
-    /** 字节范围:3-10 | 数据采集时间戳 */
-    private long dataTime;
-
-    // ------------------- 设备标识 -------------------
-    /** 字节范围:11-18 | 桩体编号 */
-    private String pileId;
-
-    /** 字节范围:19-26 | 设计图纸编号 */
-    private String designId;
-
-    /** 字节范围:27-34 | 施工机械编号 */
-    private String machineId;
-
-    // ------------------- 坐标数据 -------------------
-    /** 字节范围:35-42 | 设计X坐标(单位:米) */
-    private double designX;
-
-    /** 字节范围:43-50 | 设计Y坐标(单位:米) */
-    private double designY;
-
-    /** 字节范围:51-58 | 实际X坐标(单位:米) */
-    private double realX;
-
-    /** 字节范围:59-66 | 实际Y坐标(单位:米) */
-    private double realY;
-
-    /** 字节范围:67-74 | 纬度坐标 */
-    private double latitude;
-
-    /** 字节范围:75-82 | 经度坐标 */
-    private double longitude;
-
-    // ------------------- 施工监测 -------------------
-    /** 字节范围:83-86 | 成桩长度(单位:米) */
-    private float pileLength;
-
-    /** 字节范围:87-90 | 平均钻速(单位:mm/min) */
-    private float avgSpeed;
-
-    /** 字节范围:91-94 | 平均电流(单位:A) */
-    private float avgCurrent;
-
-    /** 字节范围:95-98 | 持力层电流阈值(单位:A) */
-    private float holdCurrent;
-
-    /** 字节范围:99-102 | 垂直度偏差(单位:%) */
-    private float verticalDeviation;
-
-    /** 字节范围:103-106 | 灌浆体积(单位:m³) */
-    private float sprayVolume;
-
-    // ------------------- 时间记录 -------------------
-    /** 字节范围:107-114 | 施工开始时间戳 */
-    private long startTime;
-
-    /** 字节范围:115-122 | 施工结束时间戳 */
-    private long endTime;
-
-    // ------------------- 质量评估 -------------------
-    /** 字节范围:123-126 | 结果评价(0:合格 1:异常) */
-    private int resultEvaluation;
-
-    /** 字节范围:127-134 | 起桩高度(单位:米) */
-    private double startHeight;
-
-    /** 字节范围:135-138 | 入岩深度(单位:米) */
-    private float inDepth;
-
-    /** 字节范围:139-142 | 有效下行深度(单位:米) */
-    private float effectiveDown;
-
-    /** 字节范围:143-146 | 有效桩长(单位:米) */
-    private float effectiveLength;
-
-    // ------------------- 设备状态 -------------------
-    /** 字节范围:147-150 | 桩点编号 */
-    private int pileNumber;
-
-    /** 字节范围:151-154 | 平均喷浆压力(单位:MPa) */
-    private float avgSprayPressure;
-
-    /** 字节范围:155-158 | 平均喷浆速度(单位:L/min) */
-    private float avgSpraySpeed;
-
-    /** 字节范围:159-162 | 设计桩长(单位:米) */
-    private float designLength;
-
-    /** 字节范围:163-166 | 平均上行速度(单位:mm/min) */
-    private float avgUpSpeed;
-
-    /** 字节范围:167-170 | 钻杆总节数 */
-    private int drillTotalNumber;
-
-    /** 字节范围:171-174 | 机械类型(1:旋挖 2:冲击) */
-    private int currentMechanicalType;
-
-    // ------------------- 施工统计 -------------------
-    /** 字节范围:175-178 | 送土次数 */
-    private int sendTotalNumber;
-
-    /** 字节范围:179-182 | 送土总时长(单位:秒) */
-    private float sendTotalTime;
-
-    /** 字节范围:183-186 | 总夯击次数 */
-    private int totalHammerNumber;
-
-    // ------------------- 系统标识 -------------------
-    /** 字节范围:187-194 | 设备唯一标识 */
-    private String uuid;
-}

+ 6 - 6
bd-park/park-backend/park-collect/src/main/resources/application-topic.yml

@@ -391,21 +391,21 @@ aliyun:
         type: int
         range:
           - 159
-          - 163
+          - 162
       # 当前层送土时长
       current_layer_send_time:
         type: float
         range:
-          - 164
-          - 167
+          - 163
+          - 166
       # 当前层夯击次数
       current_layer_hammer_number:
         type: int
         range:
-          - 168
-          - 171
+          - 167
+          - 170
       # uuid
       uuid:
         type: string
         range:
-          - 172
+          - 171

+ 0 - 2
bd-park/park-backend/park-collect/src/main/resources/mybatis/mybatis-config.xml

@@ -15,8 +15,6 @@
         <setting name="logImpl" value="SLF4J"/>
         <!-- 使用驼峰命名法转换字段 -->
         <setting name="mapUnderscoreToCamelCase" value="true"/>
-        <!-- 批处理分片策略 -->
-        <setting name="batchChunkSize" value="1000"/>
     </settings>
 
 </configuration>

+ 1 - 0
bd-park/park-backend/park-common/src/main/java/com/huashe/park/common/thread/ThreadPoolCfg.java

@@ -32,6 +32,7 @@ public class ThreadPoolCfg {
         executor.setKeepAliveSeconds(keepAliveSeconds);
         // 线程池对拒绝任务(无线程可用)的处理策略
         executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
+        executor.setThreadNamePrefix("bdThreadPoolTaskExecutor-");
         return executor;
     }
 

+ 1 - 1
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/impl/MachineProcessResultServiceImpl.java

@@ -49,7 +49,7 @@ public class MachineProcessResultServiceImpl implements IMachineProcessResultSer
      */
     @Override
     public int insertMachineProcessResult(MachineProcessResult machineProcessResult) {
-        return machineProcessResultMapper.insertMachineProcessResult(machineProcessResult);
+        return machineProcessResultMapper.insertMachineProcessResultOnUpdate(machineProcessResult);
     }
 
     /**

+ 45 - 2
bd-park/park-backend/park-core/src/main/resources/mapper/cons/MachineProcessMapper.xml

@@ -42,6 +42,8 @@
         <result property="uuid" column="uuid"/>
         <result property="dt" column="dt"/>
         <result property="id" column="id"/>
+        <result property="createTime" column="create_time"/>
+        <result property="recordTime" column="record_time"/>
     </resultMap>
 
     <sql id="selectMachineProcessVo">
@@ -58,7 +60,31 @@
                longitude,
                pile_length,
                real_pile_length,
-               speed, current, tilt_angle, forward_tilt_angle, vertical_angle, self_num, hold_current, spray_volume, real_drill_height, vibration_current, pump_current, spray_pressure, spray_speed, design_length, current_drill_number, start_time, end_time, current_mechanical_type, current_layer, current_layer_send_time, current_layer_hammer_number, uuid, dt, id
+               speed,
+               tilt_angle,
+               forward_tilt_angle,
+               vertical_angle,
+               self_num,
+               hold_current,
+               spray_volume,
+               real_drill_height,
+               vibration_current,
+               pump_current,
+               spray_pressure,
+               spray_speed,
+               design_length,
+               current_drill_number,
+               start_time,
+               end_time,
+               current_mechanical_type,
+               current_layer,
+               current_layer_send_time,
+               current_layer_hammer_number,
+               uuid,
+               dt,
+               id,
+               create_time,
+               record_time, current
         from cons_machine_process
     </sql>
 
@@ -102,6 +128,9 @@
             </if>
             <if test="uuid != null  and uuid != ''">and uuid = #{uuid}</if>
             <if test="dt != null  and dt != ''">and dt = #{dt}</if>
+            <if test="id != null ">and id = #{id}</if>
+            <if test="recordTime != null">and record_time = #{recordTime}</if>
+            <if test="createTime != null">and create_time #{createTime}</if>
         </where>
     </select>
 
@@ -149,6 +178,8 @@
             <if test="currentLayerHammerNumber != null">current_layer_hammer_number,</if>
             <if test="uuid != null">uuid,</if>
             <if test="dt != null">dt,</if>
+            <if test="recordTime != null">record_time,</if>
+            <if test="createTime != null">create_time,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="consType != null">#{consType},</if>
@@ -187,6 +218,8 @@
             <if test="currentLayerHammerNumber != null">#{currentLayerHammerNumber},</if>
             <if test="uuid != null">#{uuid},</if>
             <if test="dt != null">#{dt},</if>
+            <if test="recordTime != null">#{recordTime},</if>
+            <if test="createTime != null">#{createTime},</if>
         </trim>
     </insert>
 
@@ -229,6 +262,8 @@
             <if test="currentLayerHammerNumber != null">current_layer_hammer_number,</if>
             <if test="uuid != null">uuid,</if>
             <if test="dt != null">dt,</if>
+            <if test="recordTime != null">record_time,</if>
+            <if test="createTime != null">create_time,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="consType != null">#{consType},</if>
@@ -267,6 +302,8 @@
             <if test="currentLayerHammerNumber != null">#{currentLayerHammerNumber},</if>
             <if test="uuid != null">#{uuid},</if>
             <if test="dt != null">#{dt},</if>
+            <if test="recordTime != null">#{recordTime},</if>
+            <if test="createTime != null">now(),</if>
         </trim>
         on duplicate key update
         <trim suffixOverrides=",">
@@ -304,8 +341,12 @@
             <if test="currentMechanicalType != null">current_mechanical_type = VALUES(current_mechanical_type),</if>
             <if test="currentLayer != null">current_layer = VALUES(current_layer),</if>
             <if test="currentLayerSendTime != null">current_layer_send_time = VALUES(current_layer_send_time),</if>
-            <if test="currentLayerHammerNumber != null">current_layer_hammer_number = VALUES(current_layer_hammer_number),</if>
+            <if test="currentLayerHammerNumber != null">current_layer_hammer_number =
+                VALUES(current_layer_hammer_number),
+            </if>
             <if test="dt != null">dt = VALUES(dt),</if>
+            <if test="recordTime != null">record_time = VALUES(record_time),</if>
+            <if test="createTime != null">create_time = NOW(),</if>
         </trim>
     </insert>
 
@@ -348,6 +389,8 @@
             <if test="currentLayerHammerNumber != null">current_layer_hammer_number = #{currentLayerHammerNumber},</if>
             <if test="uuid != null">uuid = #{uuid},</if>
             <if test="dt != null">dt = #{dt},</if>
+            <if test="recordTime != null">record_time = #{recordTime},</if>
+            <if test="createTime != null">create_time = NOW(),</if>
         </trim>
         where id = #{id}
     </update>

+ 28 - 1
bd-park/park-backend/park-core/src/main/resources/mapper/cons/MachineProcessResultMapper.xml

@@ -42,6 +42,9 @@
         <result property="sendTotalTime" column="send_total_time"/>
         <result property="totalHammerNumber" column="total_hammer_number"/>
         <result property="uuid" column="uuid"/>
+        <result property="dt" column="dt"/>
+        <result property="createTime" column="create_time"/>
+        <result property="recordTime" column="record_time"/>
     </resultMap>
 
     <sql id="selectMachineProcessResultVo">
@@ -81,7 +84,10 @@
                send_total_number,
                send_total_time,
                total_hammer_number,
-               uuid
+               uuid,
+               dt,
+               create_time,
+               record_time
         from cons_machine_process_result
     </sql>
 
@@ -118,6 +124,9 @@
             <if test="sendTotalTime != null ">and send_total_time = #{sendTotalTime}</if>
             <if test="totalHammerNumber != null ">and total_hammer_number = #{totalHammerNumber}</if>
             <if test="uuid != null  and uuid != ''">and uuid = #{uuid}</if>
+            <if test="dt != null  and dt != ''">and dt = #{dt}</if>
+            <if test="recordTime != null">and record_time = #{recordTime}</if>
+            <if test="createTime != null">and create_time #{createTime}</if>
         </where>
     </select>
 
@@ -166,6 +175,9 @@
             <if test="sendTotalTime != null">send_total_time,</if>
             <if test="totalHammerNumber != null">total_hammer_number,</if>
             <if test="uuid != null">uuid,</if>
+            <if test="dt != null">dt,</if>
+            <if test="recordTime != null">record_time,</if>
+            <if test="createTime != null">create_time,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="consType != null">#{consType},</if>
@@ -204,6 +216,9 @@
             <if test="sendTotalTime != null">#{sendTotalTime},</if>
             <if test="totalHammerNumber != null">#{totalHammerNumber},</if>
             <if test="uuid != null">#{uuid},</if>
+            <if test="dt != null">#{dt},</if>
+            <if test="recordTime != null">#{recordTime},</if>
+            <if test="createTime != null">#{createTime},</if>
         </trim>
     </insert>
     <insert id="insertMachineProcessResultOnUpdate" parameterType="MachineProcessResult" useGeneratedKeys="true"
@@ -246,6 +261,9 @@
             <if test="sendTotalTime != null">send_total_time,</if>
             <if test="totalHammerNumber != null">total_hammer_number,</if>
             <if test="uuid != null">uuid,</if>
+            <if test="dt != null">dt,</if>
+            <if test="recordTime != null">record_time,</if>
+            <if test="createTime != null">create_time,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="consType != null">#{consType},</if>
@@ -284,6 +302,9 @@
             <if test="sendTotalTime != null">#{sendTotalTime},</if>
             <if test="totalHammerNumber != null">#{totalHammerNumber},</if>
             <if test="uuid != null">#{uuid},</if>
+            <if test="dt != null">#{dt},</if>
+            <if test="recordTime != null">#{recordTime},</if>
+            <if test="createTime != null">now(),</if>
         </trim>
         ON DUPLICATE KEY UPDATE
         <trim suffixOverrides=",">
@@ -322,6 +343,9 @@
             <if test="sendTotalNumber != null">send_total_number = VALUES(send_total_number),</if>
             <if test="sendTotalTime != null">send_total_time = VALUES(send_total_time),</if>
             <if test="totalHammerNumber != null">total_hammer_number = VALUES(total_hammer_number),</if>
+            <if test="dt != null">dt = VALUES(dt),</if>
+            <if test="recordTime != null">record_time = VALUES(record_time),</if>
+            <if test="createTime != null">create_time = NOW(),</if>
         </trim>
 
     </insert>
@@ -365,6 +389,9 @@
             <if test="sendTotalTime != null">send_total_time = #{sendTotalTime},</if>
             <if test="totalHammerNumber != null">total_hammer_number = #{totalHammerNumber},</if>
             <if test="uuid != null">uuid = #{uuid},</if>
+            <if test="dt != null">dt = #{dt},</if>
+            <if test="recordTime != null">record_time = #{recordTime},</if>
+            <if test="createTime != null">create_time = NOW(),</if>
         </trim>
         where id = #{id}
     </update>

+ 14 - 3
bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/entity/MachineProcess.java

@@ -1,10 +1,11 @@
 package com.huashe.park.domain.entity;
 
-import com.huashe.common.annotation.Excel;
-import com.huashe.common.domain.BaseEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
+import com.huashe.common.annotation.Excel;
+import com.huashe.common.domain.BaseEntity;
+
 /**
  * 桩机施工过程数据对象 cons_machine_process
  * 
@@ -161,6 +162,8 @@ public class MachineProcess extends BaseEntity {
     /** 自增主键 */
     private Long id;
 
+    private String recordTime;
+
     public void setConsType(Integer consType) {
         this.consType = consType;
     }
@@ -457,6 +460,14 @@ public class MachineProcess extends BaseEntity {
         return id;
     }
 
+    public String getRecordTime() {
+        return recordTime;
+    }
+
+    public void setRecordTime(String recordTime) {
+        this.recordTime = recordTime;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("consType", getConsType())
@@ -475,6 +486,6 @@ public class MachineProcess extends BaseEntity {
             .append("endTime", getEndTime()).append("currentMechanicalType", getCurrentMechanicalType())
             .append("currentLayer", getCurrentLayer()).append("currentLayerSendTime", getCurrentLayerSendTime())
             .append("currentLayerHammerNumber", getCurrentLayerHammerNumber()).append("uuid", getUuid())
-            .append("dt", getDt()).append("id", getId()).toString();
+            .append("dt", getDt()).append("id", getId()).append("recordTime", getRecordTime()).toString();
     }
 }

+ 21 - 1
bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/entity/MachineProcessResult.java

@@ -162,6 +162,10 @@ public class MachineProcessResult extends BaseEntity {
     @Excel(name = "设备唯一标识", readConverterExp = "U=UID")
     private String uuid;
 
+    private String dt;
+
+    private String recordTime;
+
     public void setId(Long id) {
         this.id = id;
     }
@@ -458,6 +462,22 @@ public class MachineProcessResult extends BaseEntity {
         return uuid;
     }
 
+    public String getDt() {
+        return dt;
+    }
+
+    public void setDt(String dt) {
+        this.dt = dt;
+    }
+
+    public String getRecordTime() {
+        return recordTime;
+    }
+
+    public void setRecordTime(String recordTime) {
+        this.recordTime = recordTime;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId())
@@ -477,6 +497,6 @@ public class MachineProcessResult extends BaseEntity {
             .append("drillTotalNumber", getDrillTotalNumber())
             .append("currentMechanicalType", getCurrentMechanicalType()).append("sendTotalNumber", getSendTotalNumber())
             .append("sendTotalTime", getSendTotalTime()).append("totalHammerNumber", getTotalHammerNumber())
-            .append("uuid", getUuid()).toString();
+            .append("uuid", getUuid()).append("dt", getDt()).append("recordTime", getRecordTime()).toString();
     }
 }