From 2728dc8b359aa0a600db8ed73539ec888c454b83 Mon Sep 17 00:00:00 2001
From: Fancy <Fancy.fx@outlook.com>
Date: 星期二, 18 六月 2024 11:15:20 +0800
Subject: [PATCH] PrProductionNode table add node_type

---
 pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionNode.java |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 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..9a282c4 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,27 +39,37 @@
     /**
      * 鎺掑簭
      */
-    @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;
 
     /**
@@ -67,6 +77,11 @@
      */
     public String equipCycleContent;
 
+    @AssertTrue(message = "璇疯緭鍏ヨ褰曡澶囧懆鏈熷唴瀹�")
+    public boolean isEquipCycleContentValid() {
+        return !isRecord || (isRecord && StringUtils.isNotBlank(equipCycleContent));
+    }
+
     /**
      * 鏄惁鍒犻櫎锛�1鏄紝0鍚�
      */

--
Gitblit v1.8.0