From 035ecbe3a3540011f29a8f2287aead232749aaad Mon Sep 17 00:00:00 2001
From: zc <zc@123>
Date: 星期六, 19 四月 2025 10:38:25 +0800
Subject: [PATCH] qw

---
 src/main/java/com/zy/common/model/LocTypeDto.java |   34 ++++++++++------------------------
 1 files changed, 10 insertions(+), 24 deletions(-)

diff --git a/src/main/java/com/zy/common/model/LocTypeDto.java b/src/main/java/com/zy/common/model/LocTypeDto.java
index ccd52fc..a9f9f93 100644
--- a/src/main/java/com/zy/common/model/LocTypeDto.java
+++ b/src/main/java/com/zy/common/model/LocTypeDto.java
@@ -1,14 +1,19 @@
 package com.zy.common.model;
 
+import com.alibaba.fastjson.JSON;
 import com.core.exception.CoolException;
-import com.zy.core.model.protocol.StaProtocol;
+import com.zy.asrs.entity.BasDevp;
 import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
 
 /**
  * Created by vincent on 2020/10/19
  */
+@Slf4j
 @Data
 public class LocTypeDto {
+
+    private Integer lev1 = null;
 
     // 楂樹綆绫诲瀷{0:鏈煡,1:浣庡簱浣�,2:楂樺簱浣峿
     private Short locType1;
@@ -22,31 +27,12 @@
     public LocTypeDto() {
     }
 
-    public LocTypeDto(StaProtocol staProtocol) {
-        if (staProtocol.isHigh() == staProtocol.isLow()) {
+    public LocTypeDto(BasDevp basDevp) {
+        if (basDevp.getLocType1() == null) {
             throw new CoolException("plc楂樹綆妫�娴嬪紓甯�");
         }
-        if (staProtocol.isLow()) {
-            this.locType1 = 1; // 浣庡簱浣�
-        } else {
-            this.locType1 = 2; // 楂樺簱浣�
-        }
-    }
-
-    /**
-     * 搴撲綅绫诲瀷瑙f瀽
-     */
-    public static LocTypeDto process(StaProtocol staProtocol) {
-        LocTypeDto dto = new LocTypeDto();
-        if (staProtocol.isHigh() == staProtocol.isLow()) {
-            throw new CoolException("plc楂樹綆妫�娴嬪紓甯�");
-        }
-        if (staProtocol.isLow()) {
-            dto.setLocType1((short) 1); // 浣庡簱浣�
-        } else {
-            dto.setLocType1((short) 2); // 楂樺簱浣�
-        }
-        return dto;
+        this.locType1 = basDevp.getLocType1();
+        log.info(JSON.toJSONString(this));
     }
 
 }

--
Gitblit v1.9.1