From d175d9c401fb97ebe6a580005a8c9ad5fedccb6b Mon Sep 17 00:00:00 2001
From: Fancy <Fancy.fx@outlook.com>
Date: 星期一, 29 七月 2024 17:02:41 +0800
Subject: [PATCH] add other method
---
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