lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportAccidentsRegisterQuery.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.eam.request;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
@@ -54,6 +55,10 @@
    @Excel(name = "设备ID", width = 15)
    @ApiModelProperty(value = "设备ID")
    private String equipmentId;
    /**HF编码*/
    @Excel(name = "HF编码", width = 15)
    @ApiModelProperty(value = "HF编码")
    private String hfCode;
    /**登记状态*/
    @ApiModelProperty(value = "登记状态")
    @Dict(dicCode = "eam_report_accidents_register_status")
@@ -333,4 +338,55 @@
    @TableField(exist = false)
    @ApiModelProperty(value = "废品价值")
    private String scrapPartValue;
    /**
     * 公司
     */
    @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);
            }
        }
    }
}