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 DingApplyUnDoneResult 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 = "当前审核人")
    String approveUserName = "--";

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

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

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

    @ApiModelProperty(value = "是否是自己审核")
    boolean myself = false;

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

    @ApiModelProperty(value = "taskId组合")
    String taskIdArray;

    public String getTaskIdArray() {
        return taskIdArray;
    }

    public void setTaskIdArray(String taskIdArray) {
        this.taskIdArray = taskIdArray;
    }

    public String getSopNo() {
        return sopNo;
    }

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

    public boolean isMyself() {
        return myself;
    }

    public void setMyself(boolean myself) {
        this.myself = myself;
    }

    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 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 getApproveUserName() {
        return approveUserName;
    }

    public void setApproveUserName(String approveUserName) {
        this.approveUserName = approveUserName;
    }

    public Long getCreateTime() {
        return createTime;
    }

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