lyh
2 天以前 0d06048c5d560e301bf17fad476975c8ffffcb56
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamInspectionOrder.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.eam.entity;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
@@ -8,6 +9,7 @@
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.common.system.base.entity.JeecgEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
@@ -25,35 +27,9 @@
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="eam_inspection_order对象", description="点检工单")
public class EamInspectionOrder implements Serializable {
public class EamInspectionOrder extends JeecgEntity implements Serializable {
    private static final long serialVersionUID = 1L;
   /**主键*/
   @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
   /**创建人*/
    @ApiModelProperty(value = "创建人")
    @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname")
    private String createBy;
   /**创建时间*/
   @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
   /**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
   /**更新时间*/
   @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
   /**删除标记*/
   @Excel(name = "删除标记", width = 15)
    @ApiModelProperty(value = "删除标记")
    @TableLogic
    private Integer delFlag;
   /**工单号*/
   @Excel(name = "工单号", width = 15)
    @ApiModelProperty(value = "工单号")
@@ -122,22 +98,94 @@
   @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注-点检工单创建备注")
    private String remark;
   /**照片文件ids;id以逗号分隔*/
   @Excel(name = "照片文件ids;id以逗号分隔-执行时", width = 15)
    @ApiModelProperty(value = "照片文件ids;id以逗号分隔")
    private String imageFiles;
    /**标准名称*/
    @ApiModelProperty(value = "标准名称")
    private transient String standardName;
    /**保养周期;单位:天*/
    @ApiModelProperty(value = "保养周期;单位:天")
    private transient Integer maintenancePeriod;
    /**设备编号*/
    @ApiModelProperty(value = "设备编号")
    private transient String equipmentCode;
    /**删除标记*/
    @Excel(name = "删除标记", width = 15)
    @ApiModelProperty(value = "删除标记")
    @TableLogic
    private Integer delFlag;
    @ApiModelProperty(value = "设备名称")
    @TableField(exist = false)
    private String equipmentName;
    @ApiModelProperty(value = "设备型号")
    @TableField(exist = false)
    private String equipmentModel;
    /**HF编码*/
    @Excel(name = "HF编码", width = 15)
    @ApiModelProperty(value = "HF编码")
    private String hfCode;
    //流转节点使用查询
    @TableField(exist = false)
    private String procInstId;
    /**流程定义key 一个key会有多个版本的id*/
    @TableField(exist = false)
    private String processDefinitionKey;
    /**流程定义id 一个流程定义唯一*/
    @TableField(exist = false)
    private String processDefinitionId;
    /**流程业务实例id 一个流程业务唯一,本表中也唯一*/
    @TableField(exist = false)
    private String processInstanceId;
    /**
     * 公司
     */
    @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);
            }
        }
    }
}