package cn.iocoder.yudao.module.pms.controller.admin.iotmainworkorder.vo;

import cn.iocoder.yudao.module.pms.controller.admin.iotmainworkorderbom.vo.IotMainWorkOrderBomRespVO;
import cn.iocoder.yudao.module.pms.dal.dataobject.iotattachment.IotAttachmentDO;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 保养工单 Response VO")
@Data
@ExcelIgnoreUnannotated
public class IotMainWorkOrderRespVO {

    @Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "18795")
    private Long id;

    @Schema(description = "保养计划id", example = "28145")
    private Long planId;

    @Schema(description = "保养计划编号")
    private String planSerialNumber;

    @Schema(description = "组织id", example = "8684")
    private Long deptId;

    @Schema(description = "分组工单id  多个责任人操作相同设备内容的工单 关联关系 uuid")
    private String orderGroupId;

    @Schema(description = "工单号")
    @ExcelProperty("工单号")
    private String orderNumber;

    @Schema(description = "工单名称 (吐哈-C14-保养计划)", example = "张三")
    @ExcelProperty("工单名称")
    private String name;

    @Schema(description = "距离保养时间 单位可能是 H D KM")
    @ExcelProperty("距离保养")
    private String mainDistance;

    @Schema(description = "工单类型(1计划生成  2临时新建)", example = "1")
    private Integer type;

    @Schema(description = "工单类型(1计划生成  2临时新建)", example = "1")
    @ExcelProperty("工单类型")
    private String typeName;

    @Schema(description = "负责人id 多个以逗号分隔")
    private String responsiblePerson;

    @Schema(description = "负责人id 多个以逗号分隔", example = "王五")
    @ExcelProperty("负责人")
    private String responsiblePersonName;

    @Schema(description = "保养费用")
    @ExcelProperty("保养费用(元)")
    private BigDecimal cost;

    @Schema(description = "保养结果(1待执行 2已执行)")
    private Integer result;

    @Schema(description = "保养结果(1待执行 2已执行)")
    @ExcelProperty("保养结果")
    private String resultName;

    @Schema(description = "其他费用")
    private BigDecimal otherCost;

    @Schema(description = "人工费用")
    private BigDecimal laborCost;

    @Schema(description = "是否委外 0否  1是")
    private Integer outsourcingFlag;

    @Schema(description = "实际保养开始时间")
    @ExcelProperty("保养开始时间")
    private LocalDateTime actualStartTime;

    @Schema(description = "实际保养结束时间")
    @ExcelProperty("保养结束时间")
    private LocalDateTime actualEndTime;

    @Schema(description = "填报人", example = "张三")
    @ExcelProperty("填报人")
    private String applicant;

    @Schema(description = "备注", example = "你说的对")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "延期保养原因", example = "缺少物料")
    @ExcelProperty("延期保养原因")
    private String delayReason;

    @Schema(description = "状态 0启用  1停用", example = "2")
    private Integer status;

    @Schema(description = "流程实例id", example = "12662")
    private String processInstanceId;

    @Schema(description = "审批状态 未提交、审批中、审批通过、审批不通过、已取消", example = "1")
    private Integer auditStatus;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "创建时间")
    @ExcelProperty("创建时间")
    private String createTimeStr;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "更新时间 格式化 yyyy-MM-dd")
    @ExcelProperty("填写时间")
    private String updateTimeStr;

    /**
     * 扩展字段
     */
    @Schema(description = "部门名称")
    private String deptName;

    @Schema(description = "距离保养时间 单位 H D KM")
    private String mainDistanceUnit;

    @Schema(description = "筛选了指定设备的保养工单bom")
    private List<IotMainWorkOrderBomRespVO> workOrderBomS;

    @Schema(description = "附件列表")
    private List<IotAttachmentDO> attachments;
}