From 6fa0eca8982af6a45b65477a232de3e3e2c972d7 Mon Sep 17 00:00:00 2001
From: ynhfasrs <ynhfasrs@qq.com>
Date: 星期五, 02 五月 2025 18:22:09 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/common/model/LocTypeDto.java |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/main/java/com/zy/common/model/LocTypeDto.java b/src/main/java/com/zy/common/model/LocTypeDto.java
index bf782d9..e768cad 100644
--- a/src/main/java/com/zy/common/model/LocTypeDto.java
+++ b/src/main/java/com/zy/common/model/LocTypeDto.java
@@ -10,6 +10,7 @@
 @Data
 public class LocTypeDto {
 
+
     // 楂樹綆绫诲瀷{0:鏈煡,1:浣庡簱浣�,2:楂樺簱浣峿
     private Short locType1;
 
@@ -19,18 +20,22 @@
     // 杞婚噸绫诲瀷{0:鏈煡,1:杞诲簱浣�,2:閲嶅簱浣峿
     private Short locType3;
 
+    private Integer siteId;
+
     public LocTypeDto() {
     }
 
+    public LocTypeDto(Short locType1, Short locType2, Short locType3) {
+        this.locType1 = locType1;
+        this.locType2 = locType2;
+        this.locType3 = locType3;
+    }
+
     public LocTypeDto(StaProtocol staProtocol) {
-//        if (staProtocol.isHigh() == staProtocol.isLow()) {
-//            throw new CoolException("plc楂樹綆妫�娴嬪紓甯�");
-//        }
-//        if (staProtocol.isLow()) {
-//            this.locType1 = 1; // 浣庡簱浣�
-//        } else {
-//            this.locType1 = 2; // 楂樺簱浣�
-//        }
+        if (staProtocol.locType.id.shortValue()!=1 && staProtocol.locType.id.shortValue()!=2 && staProtocol.locType.id.shortValue()!=3) {
+            throw new CoolException("plc楂樹綆妫�娴嬪紓甯�");
+        }
+        this.locType1 = staProtocol.locType.id.shortValue();
     }
 
     /**
@@ -48,5 +53,4 @@
 //        }
         return dto;
     }
-
 }

--
Gitblit v1.9.1