From db22fa669998e1b4c87bb2ea20e99b80ff6b0e9e Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期六, 30 八月 2025 11:53:11 +0800
Subject: [PATCH] 锁定增加原因

---
 blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/entity/NcNode.java |   41 +++++++++++++++++++++++++++++++++++++++--
 1 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/entity/NcNode.java b/blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/entity/NcNode.java
index 7178d5e..057a1ef 100644
--- a/blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/entity/NcNode.java
+++ b/blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/entity/NcNode.java
@@ -55,6 +55,15 @@
 	public static final String TYPE_PROGRAM_FILE = "70";
 
 	/**
+	 * 鏈攣瀹�
+	 */
+	public static final int UNLOCK = 0;
+	/**
+	 * 宸查攣瀹�
+	 */
+	public static final int LOCKED = 1;
+
+	/**
 	 * 鏂囦欢鑺傜偣鏂囦欢绫诲瀷锛氱▼搴�
 	 */
 	public static final String FILE_CATEGOAY_PROGRAM = "program";
@@ -168,7 +177,7 @@
 	 * 鏄惁鏄亸绂荤▼搴�
 	 * @return 鏄惁鍋忕
 	 */
-	public boolean isDeviation(){
+	public boolean isDeviationProgram(){
 		return StringUtils.isNotBlank(this.deviation);
 	}
 	/**
@@ -202,7 +211,35 @@
 		return this.isCured != null && this.isCured == 1;
 	}
 
-	public void upgradeVersionNUmber() {
+	public void upgradeVersionNumber() {
 		this.versionNumber = genNewVersionNumber();
 	}
+
+	/**
+	 * 閿佸畾鑺傜偣
+	 */
+	public void lock() {
+		this.isLocked = LOCKED;
+	}
+
+	/**
+	 * 閿佸畾鑺傜偣
+	 * @param remark 閿佸畾鍘熷洜
+	 */
+	public void lock(String remark) {
+		this.isLocked = LOCKED;
+		this.remark = remark;
+	}
+
+	public void unlock() {
+		this.isLocked = UNLOCK;
+	}
+
+	/**
+	 * 鏄惁宸查攣瀹�
+	 * @return 鏄惁
+	 */
+    public boolean hasLocked() {
+		return this.isLocked != null && this.isLocked == LOCKED;
+    }
 }

--
Gitblit v1.9.3