From 4c7296d45efe849dc70a3b2e2240c905481a91c9 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期一, 29 九月 2025 17:44:46 +0800
Subject: [PATCH] 工控网涉密网联调

---
 blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/entity/NcNode.java |   74 +++++++++++++++++++++++++++++++++++--
 1 files changed, 70 insertions(+), 4 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 06af7c3..9e7d424 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
@@ -1,5 +1,6 @@
 package org.springblade.mdm.program.entity;
 
+import com.alibaba.excel.util.StringUtils;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Getter;
 import lombok.Setter;
@@ -42,7 +43,11 @@
 	/**
 	 * 鍔犲伐鏈哄簥
 	 */
-	public static final String TYPE_MACHINE_CODE = "50";
+	//public static final String TYPE_MACHINE_CODE = "50";
+	/**
+	 * 鍔犲伐鏈哄簥
+	 */
+	public static final String TYPE_MACHINE_GROUP = "50";
 	/**
 	 * 绋嬪簭鍖呭悕
 	 */
@@ -52,6 +57,15 @@
 	 * 绋嬪簭鏂囦欢
 	 */
 	public static final String TYPE_PROGRAM_FILE = "70";
+
+	/**
+	 * 鏈攣瀹�
+	 */
+	public static final int UNLOCK = 0;
+	/**
+	 * 宸查攣瀹�
+	 */
+	public static final int LOCKED = 1;
 
 	/**
 	 * 鏂囦欢鑺傜偣鏂囦欢绫诲瀷锛氱▼搴�
@@ -79,9 +93,9 @@
 	private String machineCode;
 
 	/**
-	 * 鏂囦欢绫诲瀷锛屽彧鏈�
+	 * 鏈哄簥缁勫瓧鍏稿悧
 	 */
-	//private String fileCategory;
+	private String machineGroupCode;
 	/**
 	 * 宸ュ簭锛屽鈥滅簿閾b��
 	 */
@@ -144,6 +158,11 @@
 	private String programNo;
 
 	/**
+	 * 鍘嗗彶搴忓垪鍙�
+	 */
+	private Long hisSerial;
+
+	/**
 	 * 娴佺▼绋嬪簭鏂囦欢id锛屽彧鏈夌▼搴忔枃浠讹紙70锛夌被鍨嬬殑鑺傜偣鏈夋鍊�
 	 */
 	private Long flowProgramFileId;
@@ -163,6 +182,13 @@
 
 	transient FlowProgramFile flowProgramFile;
 
+	/**
+	 * 鏄惁鏄亸绂荤▼搴�
+	 * @return 鏄惁鍋忕
+	 */
+	public boolean isDeviationProgram(){
+		return StringUtils.isNotBlank(this.deviation);
+	}
 	/**
 	 * 鏍规嵁褰撳墠鐗堟湰鍙凤紝鑾峰彇鏂板鐗堟湰鍙�
 	 * @return 鍗囩骇鍚庣殑鐗堟湰鍙�
@@ -194,7 +220,47 @@
 		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;
+    }
+
+	public String subNodeParentIds(){
+		return this.parentIds+","+this.getId();
+	}
+
+	/**
+	 * 缁勮绋嬪簭鍚嶇О
+	 * @return 绋嬪簭鍚嶇О
+	 */
+	public String programName(){
+		return this.drawingNo+"-"+this.getProcessNo()+"-"+this.getProcessEdition();
+	}
 }

--
Gitblit v1.9.3