From 90e54c2f61a1431f78410cf59c71e76988a633c8 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期一, 08 九月 2025 09:17:49 +0800
Subject: [PATCH] 站点转移,出库站点源站点做转换
---
src/main/java/com/zy/common/model/LocTypeDto.java | 39 +++++++++++++++++++++++----------------
1 files changed, 23 insertions(+), 16 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..a4fd352 100644
--- a/src/main/java/com/zy/common/model/LocTypeDto.java
+++ b/src/main/java/com/zy/common/model/LocTypeDto.java
@@ -1,6 +1,5 @@
package com.zy.common.model;
-import com.core.exception.CoolException;
import com.zy.core.model.protocol.StaProtocol;
import lombok.Data;
@@ -19,18 +18,26 @@
// 杞婚噸绫诲瀷{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()) {
+// if (staProtocol.isHigh() == staProtocol.isLow()) {
+// throw new CoolException("plc楂樹綆妫�娴嬪紓甯�");
+// }
+// if (staProtocol.isHigh()) {
+// this.locType1 = 2; // 楂樺簱浣�
+// } else if (staProtocol.isLow()) {
this.locType1 = 1; // 浣庡簱浣�
- } else {
- this.locType1 = 2; // 楂樺簱浣�
- }
+// }
}
/**
@@ -38,14 +45,14 @@
*/
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); // 楂樺簱浣�
- }
+// if (staProtocol.isHigh() == staProtocol.isLow()) {
+// throw new CoolException("plc楂樹綆妫�娴嬪紓甯�");
+// }
+// if (staProtocol.isLow()) {
+// dto.setLocType1((short) 1); // 浣庡簱浣�
+// } else {
+// dto.setLocType1((short) 2); // 楂樺簱浣�
+// }
return dto;
}
--
Gitblit v1.9.1