yangys
2025-09-23 3baca21e0e6563f8379359ef2ba78c224eb4bc80
blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/entity/NcNode.java
@@ -43,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";
   /**
    * 程序包名
    */
@@ -53,6 +57,15 @@
    * 程序文件
    */
   public static final String TYPE_PROGRAM_FILE = "70";
   /**
    * 未锁定
    */
   public static final int UNLOCK = 0;
   /**
    * 已锁定
    */
   public static final int LOCKED = 1;
   /**
    * 文件节点文件类型:程序
@@ -80,9 +93,9 @@
   private String machineCode;
   /**
    * 文件类型,只有
    * 机床组字典吗
    */
   //private String fileCategory;
   private String machineGroupCode;
   /**
    * 工序,如“精铣”
    */
@@ -145,6 +158,11 @@
   private String programNo;
   /**
    * 历史序列号
    */
   private Long hisSerial;
   /**
    * 流程程序文件id,只有程序文件(70)类型的节点有此值
    */
   private Long flowProgramFileId;
@@ -168,7 +186,7 @@
    * 是否是偏离程序
    * @return 是否偏离
    */
   public boolean isDeviation(){
   public boolean isDeviationProgram(){
      return StringUtils.isNotBlank(this.deviation);
   }
   /**
@@ -202,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();
   }
}