lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamTechnicalStatusEvaluationOrder.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.eam.entity;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@@ -11,6 +12,7 @@
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@@ -27,7 +29,7 @@
@Accessors(chain = true)
@ApiModel(value="eam_technical_status_evaluation_order对象", description="技术状态鉴定工单")
public class EamTechnicalStatusEvaluationOrder {
   /**主键*/
   @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
@@ -81,8 +83,9 @@
   @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "实际结束时间")
   private Date actualEndTime;
   /**鉴定人*/
    @ApiModelProperty(value = "鉴定人")
   /**领取人*/
    @ApiModelProperty(value = "领取人")
   @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname")
   private String evaluator;
   /**鉴定状态;待鉴定、鉴定中、维修室主任签字、工艺人员签字、使用单位技术主管签字、设备检验员签字、已完成、已锁定、变更中、已过期*/
    @ApiModelProperty(value = "鉴定状态;待鉴定、鉴定中、维修室主任签字、工艺人员签字、使用单位技术主管签字、设备检验员签字、已完成、已锁定、变更中、已过期")
@@ -103,7 +106,7 @@
   private String otherCheckCompleted;
   /**安全装置检查确认人*/
    @ApiModelProperty(value = "安全装置检查确认人")
   @Dict(dicCode = "sys_user, realname, username")
   @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname")
   private String safetyCheckConfirm;
   /**安全装置检查确认时间*/
    @ApiModelProperty(value = "安全装置检查确认时间")
@@ -119,7 +122,7 @@
   private String safetyCheckConfirmComment;
   /**设备精度检查确认人*/
    @ApiModelProperty(value = "设备精度检查确认人")
   @Dict(dicCode = "sys_user, realname, username")
   @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname")
   private String precisionCheckConfirm;
   /**设备精度检查确认时间*/
    @ApiModelProperty(value = "设备精度检查确认时间")
@@ -135,7 +138,7 @@
   private String precisionCheckConfirmComment;
   /**其他检查确认人*/
    @ApiModelProperty(value = "其他检查确认人")
   @Dict(dicCode = "sys_user, realname, username")
   @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname")
   private String otherCheckConfirm;
   /**其他检查确认时间*/
    @ApiModelProperty(value = "其他检查确认时间")
@@ -167,7 +170,7 @@
   private String otherCheckResult;
   /**维修人签字*/
    @ApiModelProperty(value = "维修人签字")
   @Dict(dicCode = "sys_user, realname, username")
   @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname")
   private String repairerSignature;
   /**维修人签字时间*/
    @ApiModelProperty(value = "维修人签字时间")
@@ -176,7 +179,7 @@
   private Date repairerSignatureTime;
   /**维修室主任签字*/
    @ApiModelProperty(value = "维修室主任签字")
   @Dict(dicCode = "sys_user, realname, username")
   @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname")
   private String repairManagerSignature;
   /**维修室主任签字时间*/
    @ApiModelProperty(value = "维修室主任签字时间")
@@ -195,7 +198,7 @@
   private String sampleCheckResult;
   /**工艺员签字*/
    @ApiModelProperty(value = "工艺员签字")
   @Dict(dicCode = "sys_user, realname, username")
   @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname")
   private String processTechnicianSignature;
   /**工艺员签字时间*/
    @ApiModelProperty(value = "工艺员签字时间")
@@ -207,7 +210,7 @@
   private String processTechnicianComment;
   /**使用单位技术主管签字*/
    @ApiModelProperty(value = "使用单位技术主管签字")
   @Dict(dicCode = "sys_user, realname, username")
   @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname")
   private String departTechnicalLeaderSignature;
   /**使用单位技术主管签字时间*/
    @ApiModelProperty(value = "使用单位技术主管签字时间")
@@ -231,7 +234,7 @@
   private String evaluationReason;
   /**设备检查人签字*/
    @ApiModelProperty(value = "设备检查人签字")
   @Dict(dicCode = "sys_user, realname, username")
   @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname")
   private String inspectorSignature;
   /**设备检查人签字时间*/
    @ApiModelProperty(value = "设备检查人签字时间")
@@ -264,4 +267,56 @@
   private String equipmentName;
   @TableField(exist = false)
   private String equipmentModel;
   /**
    * 公司
    */
   @ApiModelProperty(value = "公司")
   @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
   @TableField(exist = false)
   private transient String gsfactoryOrgCode;
   /**
    * 中心
    */
   @ApiModelProperty(value = "中心")
   @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
   @TableField(exist = false)
   private transient String zxfactoryOrgCode;
   /**
    * 工区
    */
   @ApiModelProperty(value = "工区")
   @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
   @TableField(exist = false)
   private transient String gqfactoryOrgCode;
   /**
    * 工段
    */
   @ApiModelProperty(value = "中心/工区/工段")
   @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
   @TableField(exist = false)
   private String factoryOrgCode;
   public void setFactoryOrgCode(String factoryOrgCode){
      this.factoryOrgCode = factoryOrgCode;
      if(StrUtil.isNotEmpty(factoryOrgCode)){
         if(factoryOrgCode.length()==12){
            this.gqfactoryOrgCode = factoryOrgCode.substring(0,9);
            this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
            this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
         }
         if(factoryOrgCode.length()==9){
            this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
            this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
         }
         if(factoryOrgCode.length()==6){
            this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
         }
      }
   }
}