From e76f0739e647fe8a7e0e2618914e2faff554b1b7 Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期一, 17 十一月 2025 17:33:23 +0800
Subject: [PATCH] 解决冲突

---
 mes-processes/mes-plcSend/src/main/java/com/mes/device/entity/DeviceConfig.java |  128 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 128 insertions(+), 0 deletions(-)

diff --git a/mes-processes/mes-plcSend/src/main/java/com/mes/device/entity/DeviceConfig.java b/mes-processes/mes-plcSend/src/main/java/com/mes/device/entity/DeviceConfig.java
new file mode 100644
index 0000000..3a8900e
--- /dev/null
+++ b/mes-processes/mes-plcSend/src/main/java/com/mes/device/entity/DeviceConfig.java
@@ -0,0 +1,128 @@
+package com.mes.device.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 璁惧閰嶇疆瀹炰綋绫�
+ * 瀵瑰簲鏁版嵁搴撹〃锛歞evice_config
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("device_config")
+@Schema(name = "DeviceConfig", description = "璁惧閰嶇疆淇℃伅")
+public class DeviceConfig {
+
+    @Schema(description = "璁惧ID", example = "1")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    @Schema(description = "璁惧鍞竴鏍囪瘑", example = "DEVICE_001")
+    @TableField("device_id")
+    private String deviceId;
+
+    @Schema(description = "璁惧鍚嶇О", example = "涓婂ぇ杞﹁澶�1")
+    @TableField("device_name")
+    private String deviceName;
+
+    @Schema(description = "璁惧缂栧彿", example = "DEV_001")
+    @TableField("device_code")
+    private String deviceCode;
+
+    @Schema(description = "璁惧绫诲瀷", example = "涓婂ぇ杞�/澶х悊鐗�/鐜荤拑瀛樺偍")
+    @TableField("device_type")
+    private String deviceType;
+
+    @Schema(description = "鎵�灞為」鐩甀D", example = "1")
+    @TableField("project_id")
+    private Long projectId;
+
+    @Schema(description = "PLC IP鍦板潃", example = "192.168.1.100")
+    @TableField("plc_ip")
+    private String plcIp;
+
+    @Schema(description = "PLC绔彛", example = "102")
+    @TableField("plc_port")
+    private Integer plcPort;
+
+    @Schema(description = "璁惧鐘舵��", example = "鍦ㄧ嚎/绂荤嚎/缁存姢涓�/鏁呴殰")
+    @TableField("status")
+    private String status;
+
+    @Schema(description = "PLC绫诲瀷", example = "S7-1200/S7-1500")
+    @TableField("plc_type")
+    private String plcType;
+
+    @Schema(description = "妯″潡鍚嶇О", example = "涓婂ぇ杞︽ā鍧�")
+    @TableField("module_name")
+    private String moduleName;
+
+    @Schema(description = "鏄惁涓绘帶璁惧", example = "true")
+    @TableField("is_primary")
+    private Boolean isPrimary;
+
+    @Schema(description = "鏄惁鍚敤", example = "true")
+    @TableField("enabled")
+    private Boolean enabled;
+
+    @Schema(description = "璁惧鐗瑰畾閰嶇疆JSON", example = "{\"vehicleCapacity\": 6000, \"glassIntervalMs\": 1000}")
+    @TableField("config_json")
+    private String configJson;
+
+    @Schema(description = "璁惧鎻忚堪", example = "涓婂ぇ杞﹁澶�1")
+    @TableField("description")
+    private String description;
+
+    @Schema(description = "鎵╁睍鍙傛暟JSON", example = "{\"timeout\": 5000, \"retries\": 3}")
+    @TableField("extra_params")
+    private String extraParams;
+
+    @Schema(description = "鏄惁鍒犻櫎锛�0-鍚︼紝1-鏄�", example = "0")
+    @TableField("is_deleted")
+    @TableLogic
+    private Integer isDeleted;
+
+    @Schema(description = "鍒涘缓鏃堕棿")
+    @TableField(value = "created_time", fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createdTime;
+
+    @Schema(description = "鏇存柊鏃堕棿")
+    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updatedTime;
+
+    @Schema(description = "鍒涘缓浜�", example = "system")
+    @TableField(value = "created_by", fill = FieldFill.INSERT)
+    private String createdBy;
+
+    @Schema(description = "鏇存柊浜�", example = "system")
+    @TableField(value = "updated_by", fill = FieldFill.INSERT_UPDATE)
+    private String updatedBy;
+
+    // 璁惧绫诲瀷甯搁噺
+    public static final class DeviceType {
+        public static final String LOAD_VEHICLE = "涓婂ぇ杞�";      // 涓婂ぇ杞�
+        public static final String LARGE_GLASS = "澶х悊鐗�";      // 澶х悊鐗�
+        public static final String GLASS_STORAGE = "鐜荤拑瀛樺偍";   // 鐜荤拑瀛樺偍
+    }
+
+    // PLC绫诲瀷甯搁噺
+    public static final class PlcType {
+        public static final String S7_1200 = "S7-1200";  // S7-1200
+        public static final String S7_1500 = "S7-1500";  // S7-1500
+    }
+    
+    // 璁惧鐘舵�佸父閲�
+    public static final class Status {
+        public static final String ONLINE = "鍦ㄧ嚎";        // 鍦ㄧ嚎
+        public static final String OFFLINE = "绂荤嚎";       // 绂荤嚎
+        public static final String MAINTENANCE = "缁存姢涓�";  // 缁存姢涓�
+        public static final String FAULT = "鏁呴殰";         // 鏁呴殰
+    }
+}
\ No newline at end of file

--
Gitblit v1.8.0