From 22e17b6db03ca58bc477a35ca067e55a09cffce7 Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期三, 10 十二月 2025 17:04:08 +0800
Subject: [PATCH] 添加工程表及相关逻辑,防止重复导入Excel表序号重复生成

---
 mes-processes/mes-plcSend/src/main/java/com/mes/device/entity/DeviceConfig.java |   54 ++++++++++++++++++++++++++++--------------------------
 1 files changed, 28 insertions(+), 26 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
index 3a8900e..12734de 100644
--- 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
@@ -2,7 +2,8 @@
 
 import com.baomidou.mybatisplus.annotation.*;
 import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -15,101 +16,102 @@
 @Data
 @EqualsAndHashCode(callSuper = false)
 @TableName("device_config")
-@Schema(name = "DeviceConfig", description = "璁惧閰嶇疆淇℃伅")
+@ApiModel(value = "璁惧閰嶇疆淇℃伅")
 public class DeviceConfig {
 
-    @Schema(description = "璁惧ID", example = "1")
+    @ApiModelProperty(value = "璁惧ID", example = "1")
     @TableId(value = "id", type = IdType.AUTO)
     private Long id;
 
-    @Schema(description = "璁惧鍞竴鏍囪瘑", example = "DEVICE_001")
+    @ApiModelProperty(value = "璁惧鍞竴鏍囪瘑", example = "DEVICE_001")
     @TableField("device_id")
     private String deviceId;
 
-    @Schema(description = "璁惧鍚嶇О", example = "涓婂ぇ杞﹁澶�1")
+    @ApiModelProperty(value = "璁惧鍚嶇О", example = "澶ц溅璁惧1")
     @TableField("device_name")
     private String deviceName;
 
-    @Schema(description = "璁惧缂栧彿", example = "DEV_001")
+    @ApiModelProperty(value = "璁惧缂栧彿", example = "DEV_001")
     @TableField("device_code")
     private String deviceCode;
 
-    @Schema(description = "璁惧绫诲瀷", example = "涓婂ぇ杞�/澶х悊鐗�/鐜荤拑瀛樺偍")
+    @ApiModelProperty(value = "璁惧绫诲瀷", example = "澶ц溅璁惧/澶х悊鐗囩")
     @TableField("device_type")
     private String deviceType;
 
-    @Schema(description = "鎵�灞為」鐩甀D", example = "1")
+    @ApiModelProperty(value = "鎵�灞為」鐩甀D", example = "1")
     @TableField("project_id")
     private Long projectId;
 
-    @Schema(description = "PLC IP鍦板潃", example = "192.168.1.100")
+    @ApiModelProperty(value = "PLC IP鍦板潃", example = "192.168.1.100")
     @TableField("plc_ip")
     private String plcIp;
 
-    @Schema(description = "PLC绔彛", example = "102")
+    @ApiModelProperty(value = "PLC绔彛", example = "102")
     @TableField("plc_port")
     private Integer plcPort;
 
-    @Schema(description = "璁惧鐘舵��", example = "鍦ㄧ嚎/绂荤嚎/缁存姢涓�/鏁呴殰")
+    @ApiModelProperty(value = "璁惧鐘舵��", example = "鍦ㄧ嚎/绂荤嚎/缁存姢涓�/鏁呴殰")
     @TableField("status")
     private String status;
 
-    @Schema(description = "PLC绫诲瀷", example = "S7-1200/S7-1500")
+    @ApiModelProperty(value = "PLC绫诲瀷", example = "S7-1200/S7-1500")
     @TableField("plc_type")
     private String plcType;
 
-    @Schema(description = "妯″潡鍚嶇О", example = "涓婂ぇ杞︽ā鍧�")
+    @ApiModelProperty(value = "妯″潡鍚嶇О", example = "澶ц溅璁惧妯″潡")
     @TableField("module_name")
     private String moduleName;
 
-    @Schema(description = "鏄惁涓绘帶璁惧", example = "true")
+    @ApiModelProperty(value = "鏄惁涓绘帶璁惧", example = "true")
     @TableField("is_primary")
     private Boolean isPrimary;
 
-    @Schema(description = "鏄惁鍚敤", example = "true")
+    @ApiModelProperty(value = "鏄惁鍚敤", example = "true")
     @TableField("enabled")
     private Boolean enabled;
 
-    @Schema(description = "璁惧鐗瑰畾閰嶇疆JSON", example = "{\"vehicleCapacity\": 6000, \"glassIntervalMs\": 1000}")
+    @ApiModelProperty(value = "璁惧鐗瑰畾閰嶇疆JSON", example = "{\"vehicleCapacity\": 6000, \"glassIntervalMs\": 1000}")
     @TableField("config_json")
     private String configJson;
 
-    @Schema(description = "璁惧鎻忚堪", example = "涓婂ぇ杞﹁澶�1")
+    @ApiModelProperty(value = "璁惧鎻忚堪", example = "澶ц溅璁惧1")
     @TableField("description")
     private String description;
 
-    @Schema(description = "鎵╁睍鍙傛暟JSON", example = "{\"timeout\": 5000, \"retries\": 3}")
+    @ApiModelProperty(value = "鎵╁睍鍙傛暟JSON", example = "{\"timeout\": 5000, \"retries\": 3}")
     @TableField("extra_params")
     private String extraParams;
 
-    @Schema(description = "鏄惁鍒犻櫎锛�0-鍚︼紝1-鏄�", example = "0")
+    @ApiModelProperty(value = "鏄惁鍒犻櫎锛�0-鍚︼紝1-鏄�", example = "0")
     @TableField("is_deleted")
     @TableLogic
     private Integer isDeleted;
 
-    @Schema(description = "鍒涘缓鏃堕棿")
+    @ApiModelProperty(value = "鍒涘缓鏃堕棿")
     @TableField(value = "created_time", fill = FieldFill.INSERT)
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date createdTime;
 
-    @Schema(description = "鏇存柊鏃堕棿")
+    @ApiModelProperty(value = "鏇存柊鏃堕棿")
     @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date updatedTime;
 
-    @Schema(description = "鍒涘缓浜�", example = "system")
+    @ApiModelProperty(value = "鍒涘缓浜�", example = "system")
     @TableField(value = "created_by", fill = FieldFill.INSERT)
     private String createdBy;
 
-    @Schema(description = "鏇存柊浜�", example = "system")
+    @ApiModelProperty(value = "鏇存柊浜�", 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 = "鐜荤拑瀛樺偍";   // 鐜荤拑瀛樺偍
+        public static final String LOAD_VEHICLE = "澶ц溅璁惧";      // 澶ц溅璁惧
+        public static final String LARGE_GLASS = "澶х悊鐗囩";      // 澶х悊鐗囩
+        public static final String WORKSTATION_SCANNER = "鍗ц浆绔嬫壂鐮佽澶�"; // 鍗ц浆绔嬫壂鐮佽澶�
+        public static final String WORKSTATION_TRANSFER = "鍗ц浆绔嬭澶�";    // 鍗ц浆绔嬭澶�
     }
 
     // PLC绫诲瀷甯搁噺

--
Gitblit v1.8.0