From b9dfde3882128f8d7afaeba714b8f14ec8d482cf Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期四, 08 十二月 2022 13:14:51 +0800 Subject: [PATCH] # --- src/main/java/com/zy/common/model/LocTypeDto.java | 32 ++++++++++++++++++++++---------- 1 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/zy/common/model/LocTypeDto.java b/src/main/java/com/zy/common/model/LocTypeDto.java index 60a9a28..2428548 100644 --- a/src/main/java/com/zy/common/model/LocTypeDto.java +++ b/src/main/java/com/zy/common/model/LocTypeDto.java @@ -1,7 +1,6 @@ package com.zy.common.model; import com.alibaba.fastjson.JSON; -import com.core.exception.CoolException; import com.zy.asrs.entity.BasDevp; import lombok.Data; import lombok.extern.slf4j.Slf4j; @@ -11,7 +10,7 @@ */ @Slf4j @Data -public class LocTypeDto { +public class LocTypeDto implements Cloneable { // 楂樹綆绫诲瀷{0:鏈煡,1:浣庡簱浣�,2:楂樺簱浣峿 private Short locType1; @@ -22,16 +21,29 @@ // 杞婚噸绫诲瀷{0:鏈煡,1:杞诲簱浣�,2:閲嶅簱浣峿 private Short locType3; + public LocTypeDto() { + } + public LocTypeDto(BasDevp basDevp) { - if (basDevp.getLocType1() == null || basDevp.getLocType1() == 0) { - throw new CoolException("plc楂樹綆妫�娴嬪紓甯�"); - } - if (basDevp.getLocType1() == 1) { - this.locType1 = 1; // 浣庡簱浣� - } else { - this.locType1 = 2; // 楂樺簱浣� - } +// if (basDevp.getLocType1() == null || basDevp.getLocType1() == 0) { +// throw new CoolException("plc楂樹綆妫�娴嬪紓甯�"); +// } +// if (basDevp.getLocType1() == 1) { +// this.locType1 = 1; // 浣庡簱浣� +// } else { +// this.locType1 = 2; // 楂樺簱浣� +// } log.info(JSON.toJSONString(this)); } + @Override + public LocTypeDto clone() { + try { + return (LocTypeDto) super.clone(); + } catch (CloneNotSupportedException e) { + e.printStackTrace(); + } + return null; + } + } -- Gitblit v1.9.1