From 3907579a69079b5ee462d17799e3995d9cd77fd4 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期三, 17 九月 2025 21:54:38 +0800
Subject: [PATCH] 延时问题
---
blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/entity/NcNode.java | 66 +++++++++++++++++++++++++++++++--
1 files changed, 62 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..1d21dec 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,39 @@
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();
+ }
}
--
Gitblit v1.9.3