package com.qmth.sop.business.bean.result;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.qmth.sop.common.enums.InOutTypeEnum;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Objects;

/**
 * @Description: 异常已审核result
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2023/8/10
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class DingApplyDoneResult extends WorkTaskResult implements Serializable {

    @ApiModelProperty(value = "异常审核类型")
    InOutTypeEnum dingExceptionType;

    @ApiModelProperty(value = "异常审核类型str")
    String dingExceptionTypeStr;

    @ApiModelProperty(value = "异常日期")
    String exceptionTime;

    @ApiModelProperty(value = "补卡时间")
    Long applyTime;

    @ApiModelProperty(value = "理由")
    String reason;

    @ApiModelProperty(value = "附件/截图")
    String attachmentPaths;

    @ApiModelProperty(value = "申请时间")
    Long createTime;

    @ApiModelProperty(value = "审核结果")
    String dingExceptionApprove;

    @ApiModelProperty(value = "审核人")
    String approveUsersName = "--";

    @ApiModelProperty(value = "审核信息")
    String approveInfo;

    @ApiModelProperty(value = "审核时间")
    Long approveTime;

    @ApiModelProperty(value = "供应商名称")
    String supplierName;

    @ApiModelProperty(value = "供应商编码")
    String supplierCode;

    @ApiModelProperty(value = "sop单号")
    String sopNo;

    public String getSopNo() {
        return sopNo;
    }

    public void setSopNo(String sopNo) {
        this.sopNo = sopNo;
    }

    public Long getApproveTime() {
        return approveTime;
    }

    public void setApproveTime(Long approveTime) {
        this.approveTime = approveTime;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public String getSupplierCode() {
        return supplierCode;
    }

    public void setSupplierCode(String supplierCode) {
        this.supplierCode = supplierCode;
    }

    public String getApproveInfo() {
        return approveInfo;
    }

    public void setApproveInfo(String approveInfo) {
        this.approveInfo = approveInfo;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public InOutTypeEnum getDingExceptionType() {
        return dingExceptionType;
    }

    public void setDingExceptionType(InOutTypeEnum dingExceptionType) {
        this.dingExceptionType = dingExceptionType;
    }

    public String getDingExceptionTypeStr() {
        if (Objects.nonNull(dingExceptionType)) {
            String[] strs = dingExceptionType.getTitle().split("｜");
            return strs[1];
        } else {
            return dingExceptionTypeStr;
        }
    }

    public void setDingExceptionTypeStr(String dingExceptionTypeStr) {
        this.dingExceptionTypeStr = dingExceptionTypeStr;
    }

    public String getExceptionTime() {
        return exceptionTime;
    }

    public void setExceptionTime(String exceptionTime) {
        this.exceptionTime = exceptionTime;
    }

    public Long getApplyTime() {
        return applyTime;
    }

    public void setApplyTime(Long applyTime) {
        this.applyTime = applyTime;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getAttachmentPaths() {
        return attachmentPaths;
    }

    public void setAttachmentPaths(String attachmentPaths) {
        this.attachmentPaths = attachmentPaths;
    }

    public String getDingExceptionApprove() {
        return dingExceptionApprove;
    }

    public void setDingExceptionApprove(String dingExceptionApprove) {
        this.dingExceptionApprove = dingExceptionApprove;
    }

    public String getApproveUsersName() {
        return approveUsersName;
    }

    public void setApproveUsersName(String approveUsersName) {
        this.approveUsersName = approveUsersName;
    }
}
