package com.aucma.dms.domain;

import com.aucma.common.annotation.Excel;
import com.aucma.framework.web.domain.server.SysFile;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.util.List;



/**
 * 检修工单对象 dms_bills_fault_instance
 *
 * @author Open Platform
 * @date 2024-01-23
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class DmsBillsFaultInstance extends DmsBaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键标识;此表不会长期保存 */
    private Long repairInstanceId;

    /** 报修来源类型(1检修，2点检，3巡检，9其他) */
    @Excel(name = "报修来源类型(1检修，2点检，3巡检，9其他)")
    private String faultSourceType;
    private String confirmer;

    /** 报修来源ID，根据报修来源类型关联来源主键 */
    @Excel(name = "报修来源ID，根据报修来源类型关联来源主键")
    private Long faultSourceId;

    /** 工单流程ID，关联wf_process的wf_process_id - 已废弃审批流功能 */
    // @Excel(name = "工单流程ID，关联wf_process的wf_process_id")
    // private Long wfProcessId;

    /** 工单编号 */
    @Excel(name = "工单编号")
    private String billsFaultCode;

    /** 工单状态：0-待维修，1-维修中，2-维修完成，3-待检修，4-检修中，5-检修完成 */
    @Excel(name = "工单状态：0-待维修，1-维修中，2-维修完成，3-待检修，4-检修中，5-检修完成")
    private String billsStatus;

    /** 申请人 */
    @Excel(name = "申请人")
    private String applyUser;
    
    /** 申请人手机 */
    @Excel(name = "申请人手机")
    private String applyUserPhone;

    /** 申请时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date applyTime;

    /** 实际开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "实际开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date realBeginTime;

    /** 实际完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "实际完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date realEndTime;

    /** 要求完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "要求完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date requireEndTime;

    /** 工单类型（1手工创建,2自动创建） */
    @Excel(name = "工单类型", readConverterExp = "1=手工创建,2自动创建")
    private String instanceType;

    private String deviceCode;

    private String deviceName;

    private String deviceLocation;

    private String deviceSpec;

    private String imgUrl;

    /** 是否标识：1-是；0-否 */
    @Excel(name = "是否标识：1-是；0-否")
    private String isFlag;

    private Long instanceActivityId;

    private String faultType;
    
    /** 故障等级（1一般 2紧急 3严重） */
    private String faultLevel;

    private String faultDescription;

    private String designOperations;

    private Long deviceId;

    private String repairType;

    private Long outsrcId;

    private String processHandleResolution;
    
    /** 关联维修知识库ID */
    private Long knowledgeRepairId;
    
    /** 验证方法 */
    private String verifyMethod;

    private List<String> fileUrls;

    private List<SysFile> sysFiles;

    private List<DmsInstanceFile> dmsInstanceFiles;
    private List<DmsInstanceFile> dmsInstanceFiles1;
    private String checkedFault;
    private String repairContent;
    private String protectedMethod;
    private String repairer;
    private String approveStatus;
    private Integer repairConfirm;
    private Date confirmTime;
    private Long componentsPartsId;
    private List<DmsFaultCompentsParts> parts;

    public Long getInstanceActivityId() {
        return instanceActivityId;
    }

    public void setInstanceActivityId(Long instanceActivityId) {
        this.instanceActivityId = instanceActivityId;
    }

    private List<DmsFaultInstanceActivity> dmsFaultInstanceActivityList;


    public List<SysFile> getSysFiles() {
        return sysFiles;
    }

    public void setSysFiles(List<SysFile> sysFiles) {
        this.sysFiles = sysFiles;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getFaultType() {
        return faultType;
    }

    public void setFaultType(String faultType) {
        this.faultType = faultType;
    }

    public String getFaultDescription() {
        return faultDescription;
    }

    public void setFaultDescription(String faultDescription) {
        this.faultDescription = faultDescription;
    }

    public String getDesignOperations() {
        return designOperations;
    }

    public void setDesignOperations(String designOperations) {
        this.designOperations = designOperations;
    }

    public Long getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }

    public String getRepairType() {
        return repairType;
    }

    public void setRepairType(String repairType) {
        this.repairType = repairType;
    }

    public Long getOutsrcId() {
        return outsrcId;
    }

    public void setOutsrcId(Long outsrcId) {
        this.outsrcId = outsrcId;
    }

    public String getProcessHandleResolution() {
        return processHandleResolution;
    }

    public void setProcessHandleResolution(String processHandleResolution) {
        this.processHandleResolution = processHandleResolution;
    }

    public void setRepairInstanceId(Long repairInstanceId)
    {
        this.repairInstanceId = repairInstanceId;
    }

    public Long getRepairInstanceId()
    {
        return repairInstanceId;
    }
    public void setFaultSourceType(String faultSourceType)
    {
        this.faultSourceType = faultSourceType;
    }

    public String getFaultSourceType()
    {
        return faultSourceType;
    }
    public void setFaultSourceId(Long faultSourceId)
    {
        this.faultSourceId = faultSourceId;
    }

    public Long getFaultSourceId()
    {
        return faultSourceId;
    }
    // 已废弃审批流功能
    // public void setWfProcessId(Long wfProcessId)
    // {
    //     this.wfProcessId = wfProcessId;
    // }

    // public Long getWfProcessId()
    // {
    //     return wfProcessId;
    // }
    public void setBillsFaultCode(String billsFaultCode)
    {
        this.billsFaultCode = billsFaultCode;
    }

    public String getBillsFaultCode()
    {
        return billsFaultCode;
    }
    public void setBillsStatus(String billsStatus)
    {
        this.billsStatus = billsStatus;
    }

    public String getBillsStatus()
    {
        return billsStatus;
    }
    public void setApplyUser(String applyUser)
    {
        this.applyUser = applyUser;
    }

    public String getApplyUser()
    {
        return applyUser;
    }
    public void setApplyTime(Date applyTime)
    {
        this.applyTime = applyTime;
    }

    public Date getApplyTime()
    {
        return applyTime;
    }
    public void setRealBeginTime(Date realBeginTime)
    {
        this.realBeginTime = realBeginTime;
    }

    public Date getRealBeginTime()
    {
        return realBeginTime;
    }
    public void setRealEndTime(Date realEndTime)
    {
        this.realEndTime = realEndTime;
    }

    public Date getRealEndTime()
    {
        return realEndTime;
    }
    public void setRequireEndTime(Date requireEndTime)
    {
        this.requireEndTime = requireEndTime;
    }

    public Date getRequireEndTime()
    {
        return requireEndTime;
    }
    public void setInstanceType(String instanceType)
    {
        this.instanceType = instanceType;
    }

    public String getInstanceType()
    {
        return instanceType;
    }

    public String getDeviceCode() {
        return deviceCode;
    }

    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public String getDeviceLocation() {
        return deviceLocation;
    }

    public void setDeviceLocation(String deviceLocation) {
        this.deviceLocation = deviceLocation;
    }

    public String getDeviceSpec() {
        return deviceSpec;
    }

    public void setDeviceSpec(String deviceSpec) {
        this.deviceSpec = deviceSpec;
    }

    public void setIsFlag(String isFlag)
    {
        this.isFlag = isFlag;
    }

    public String getIsFlag()
    {
        return isFlag;
    }

    public List<String> getFileUrls() {
        return fileUrls;
    }

    public void setFileUrls(List<String> fileUrls) {
        this.fileUrls = fileUrls;
    }

    public List<DmsFaultInstanceActivity> getDmsFaultInstanceActivityList() {
        return dmsFaultInstanceActivityList;
    }

    public void setDmsFaultInstanceActivityList(List<DmsFaultInstanceActivity> dmsFaultInstanceActivityList) {
        this.dmsFaultInstanceActivityList = dmsFaultInstanceActivityList;
    }

    public List<DmsInstanceFile> getDmsInstanceFiles() {
        return dmsInstanceFiles;
    }

    public void setDmsInstanceFiles(List<DmsInstanceFile> dmsInstanceFiles) {
        this.dmsInstanceFiles = dmsInstanceFiles;
    }

    public Long getKnowledgeRepairId() {
        return knowledgeRepairId;
    }

    public void setKnowledgeRepairId(Long knowledgeRepairId) {
        this.knowledgeRepairId = knowledgeRepairId;
    }

    public String getVerifyMethod() {
        return verifyMethod;
    }

    public void setVerifyMethod(String verifyMethod) {
        this.verifyMethod = verifyMethod;
    }

    public String getConfirmer() {
        return confirmer;
    }

    public void setConfirmer(String confirmer) {
        this.confirmer = confirmer;
    }

    public String getApplyUserPhone() {
        return applyUserPhone;
    }

    public void setApplyUserPhone(String applyUserPhone) {
        this.applyUserPhone = applyUserPhone;
    }

    public String getFaultLevel() {
        return faultLevel;
    }

    public void setFaultLevel(String faultLevel) {
        this.faultLevel = faultLevel;
    }

    public List<DmsInstanceFile> getDmsInstanceFiles1() {
        return dmsInstanceFiles1;
    }

    public void setDmsInstanceFiles1(List<DmsInstanceFile> dmsInstanceFiles1) {
        this.dmsInstanceFiles1 = dmsInstanceFiles1;
    }

    public String getCheckedFault() {
        return checkedFault;
    }

    public void setCheckedFault(String checkedFault) {
        this.checkedFault = checkedFault;
    }

    public String getRepairContent() {
        return repairContent;
    }

    public void setRepairContent(String repairContent) {
        this.repairContent = repairContent;
    }

    public String getProtectedMethod() {
        return protectedMethod;
    }

    public void setProtectedMethod(String protectedMethod) {
        this.protectedMethod = protectedMethod;
    }

    public String getRepairer() {
        return repairer;
    }

    public void setRepairer(String repairer) {
        this.repairer = repairer;
    }

    public String getApproveStatus() {
        return approveStatus;
    }

    public void setApproveStatus(String approveStatus) {
        this.approveStatus = approveStatus;
    }

    public Integer getRepairConfirm() {
        return repairConfirm;
    }

    public void setRepairConfirm(Integer repairConfirm) {
        this.repairConfirm = repairConfirm;
    }

    public Date getConfirmTime() {
        return confirmTime;
    }

    public void setConfirmTime(Date confirmTime) {
        this.confirmTime = confirmTime;
    }

    public Long getComponentsPartsId() {
        return componentsPartsId;
    }

    public void setComponentsPartsId(Long componentsPartsId) {
        this.componentsPartsId = componentsPartsId;
    }

    public List<DmsFaultCompentsParts> getParts() {
        return parts;
    }

    public void setParts(List<DmsFaultCompentsParts> parts) {
        this.parts = parts;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("repairInstanceId", getRepairInstanceId())
            .append("faultSourceType", getFaultSourceType())
            .append("faultSourceId", getFaultSourceId())
            // .append("wfProcessId", getWfProcessId()) // 已废弃审批流
            .append("billsFaultCode", getBillsFaultCode())
            .append("billsStatus", getBillsStatus())
            .append("applyUser", getApplyUser())
            .append("applyTime", getApplyTime())
            .append("realBeginTime", getRealBeginTime())
            .append("realEndTime", getRealEndTime())
            .append("requireEndTime", getRequireEndTime())
            .append("instanceType", getInstanceType())
            .append("isFlag", getIsFlag())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
                .append("fileUrls", getFileUrls())
                .append("dmsFaultInstanceActivityList", getDmsFaultInstanceActivityList())
                .append("dmsInstanceFiles", getDmsInstanceFiles())
                .append("knowledgeRepairId", getKnowledgeRepairId())
                .append("verifyMethod", getVerifyMethod())
                .append("confirmer", getConfirmer())
                .append("applyUserPhone", getApplyUserPhone())
                .append("faultLevel", getFaultLevel())
                .append("dmsInstanceFiles1", getDmsInstanceFiles1())
                .append("checkedFault", getCheckedFault())
                .append("repairContent", getRepairContent())
                .append("protectedMethod", getProtectedMethod())
                .append("repairer", getRepairer())
                .append("approveStatus", getApproveStatus())
                .append("repairConfirm", getRepairConfirm())
                .append("confirmTime", getConfirmTime())
                .append("componentsPartsId", getComponentsPartsId())
                .append("parts", getParts())
                .append("deviceCode", getDeviceCode())
                .append("deviceName", getDeviceName())
                .append("deviceLocation",  getDeviceLocation())
                .append("deviceSpec", getDeviceSpec())
                .append("imgUrl", getImgUrl() )
                .append("instanceActivityId", getInstanceActivityId())
                .append("faultType", getFaultType())
                .append("faultDescription", getFaultDescription())
                .append("designOperations", getDesignOperations())
                .append("deviceId", getDeviceId())
                .append("repairType", getRepairType())
                .append("outsrcId", getOutsrcId())
                .append("processHandleResolution", getProcessHandleResolution())
                .append("sysFiles", getSysFiles())
            .toString();
    }
}
