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

import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

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

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 保养工单分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class IotMainWorkOrderPageReqVO extends PageParam {

    @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 = "工单号")
    private String orderNumber;

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

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

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

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

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

    @Schema(description = "保养结果(1待执行 2已执行 0全部 3延时)")
    private Integer result;

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

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

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

    @Schema(description = "实际保养开始时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] actualStartTime;

    @Schema(description = "实际保养结束时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] actualEndTime;

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

    @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 = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    /**
     * 扩展字段
     */
    @Schema(description = "设备id", example = "8684")
    private Long deviceId;
    @Schema(description = "设备名称", example = "空压机")
    private String deviceName;
    @Schema(description = "设备编码", example = "8684")
    private String deviceCode;
    @Schema(description = "工单id集合", example = "8684")
    private List<Long> workOrderIds;

    private Set<Long> deptIds;

    @Schema(description = "年", example = "2016")
    private Integer year;
}
