فهرست منبع

删除设备关联关系 经纬度清零

lengfaqiang 2 سال پیش
والد
کامیت
c5f8821b55

+ 5 - 0
slope-modules/slope-detection/src/main/java/com/sckw/slope/detection/model/dos/mysql/KwsDevice.java

@@ -1,5 +1,7 @@
 package com.sckw.slope.detection.model.dos.mysql;
 
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
@@ -104,16 +106,19 @@ public class KwsDevice implements Serializable {
     /**
      * 逻辑经度(测点布设的值)
      */
+    @TableField(updateStrategy = FieldStrategy.IGNORED)
     private String logicLng;
 
     /**
      * 逻辑纬度(测点布设的值)
      */
+    @TableField(updateStrategy = FieldStrategy.IGNORED)
     private String logicLat;
 
     /**
      * 逻辑海拔(测点布设的值)
      */
+    @TableField(updateStrategy = FieldStrategy.IGNORED)
     private String logicAlt;
 
     /**

+ 3 - 0
slope-modules/slope-detection/src/main/java/com/sckw/slope/detection/service/ProjectService.java

@@ -1271,6 +1271,9 @@ public class ProjectService {
                     .eq(KwsDevice::getMountainId, headerData.getMountainId())
                     .eq(KwsDevice::getDelFlag, 0)
                     .set(KwsDevice::getRelevanceLevel, 0)
+                    .set(KwsDevice::getLogicAlt, null)
+                    .set(KwsDevice::getLogicLat, null)
+                    .set(KwsDevice::getLogicLng, null)
                     .set(KwsDevice::getStatus, DeviceEnum.NOT_IN_USE.getCode())
                     .set(KwsDevice::getUpdateTime, LocalDateTime.now())
                     .set(KwsDevice::getUpdateBy, headerData.getUpdateBy() == null ? Long.parseLong(headerData.getCreateBy()) : Long.parseLong(headerData.getUpdateBy()))