From b32dba6d0c069e4d1a416358501b441865714ab3 Mon Sep 17 00:00:00 2001
From: Fancy <Fancy.fx@outlook.com>
Date: 星期二, 20 八月 2024 17:22:10 +0800
Subject: [PATCH] order manage

---
 pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionNode.java |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionNode.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionNode.java
index 9fc4736..a33064b 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionNode.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionNode.java
@@ -1,15 +1,15 @@
 package com.dy.pmsGlobal.pojoPr;
 
+import com.alibaba.excel.util.StringUtils;
 import com.alibaba.fastjson2.annotation.JSONField;
 import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
-import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import java.io.Serializable;
-
 import com.dy.common.po.BaseEntity;
+import jakarta.validation.constraints.AssertTrue;
 import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.NotNull;
 import lombok.*;
 
 /**
@@ -39,33 +39,48 @@
     /**
      * 鎺掑簭
      */
-    @NotEmpty(message = "鑺傜偣椤哄簭涓嶈兘涓虹┖")
+    @NotNull(message = "鑺傜偣椤哄簭涓嶈兘涓虹┖")
     public Integer sort;
 
     /**
      * 鑺傜偣浣滀笟鍐呭
      */
+    @NotEmpty(message = "璇疯緭鍏ヨ妭鐐逛綔涓氬唴瀹�")
     public String content;
+
+    /**
+     * 鎺掑簭
+     */
+    //@NotNull(message = "鑺傜偣绫诲瀷涓嶈兘涓虹┖")
+    public Integer nodeType;
 
     /**
      * 鏄惁寮�濮嬭妭鐐癸紝1鏄紝0鍚�
      */
+    @NotNull(message = "璇烽�夋嫨鏄惁鐢熶骇寮�濮�")
     public Boolean isStart;
 
     /**
      * 鏄惁缁撴潫鑺傜偣锛�1鏄紝0鍚�
      */
+    @NotNull(message = "璇烽�夋嫨鏄惁鐢熶骇缁撴潫")
     public Boolean isEnd;
 
     /**
      * 鏄惁璁板綍璁惧鍛ㄦ湡锛�1鏄紝0鍚�
      */
+    @NotNull(message = "璇烽�夋嫨鏄惁璁板綍璁惧鍛ㄦ湡")
     public Boolean isRecord;
 
     /**
      * 璁板綍璁惧鍛ㄦ湡鍐呭
      */
-    public String equipCycleContent;
+    public String deviceCycleContent;
+
+    @AssertTrue(message = "璇疯緭鍏ヨ褰曡澶囧懆鏈熷唴瀹�")
+    public boolean isDeviceCycleContentValid() {
+        return !isRecord || (isRecord && StringUtils.isNotBlank(deviceCycleContent));
+    }
 
     /**
      * 鏄惁鍒犻櫎锛�1鏄紝0鍚�

--
Gitblit v1.8.0