package cn.iocoder.yudao.module.mes.controller.admin.producereport.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
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;

@Schema(description = "管理后台 - 生产报工单 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ProduceReportRespVO {

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29099")
    @ExcelProperty("ID")
    private Long id;
    @Schema(description = "流程实例编号", example = "12049")
    private String processInstanceId;
    @Schema(description = "编号")
    private String reportCode;

    @Schema(description = "报工日期")
    @ExcelProperty("报工日期")
    private LocalDateTime reportDate;

    @Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19983")
    private Long userId;
    @Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19983")
    @ExcelProperty("用户")
    private String userName;

    @Schema(description = "工序ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28795")
    private Long orgId;
    @Schema(description = "工位", requiredMode = Schema.RequiredMode.REQUIRED, example = "28795")
    @ExcelProperty("工位")
    private String orgName;

    @Schema(description = "工序", example = "2")
    @ExcelProperty(value = "工序", converter = DictConvert.class)
    @DictFormat("mes_org_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String orgType;

    @Schema(description = "计件时段")
    @ExcelProperty("计件时段")
    private String reportTime;

    @Schema(description = "总时长")
    @ExcelProperty("总时长")
    private BigDecimal totalTime;

    @Schema(description = "报工状态", example = "2")
    @ExcelProperty(value = "报工状态", converter = DictConvert.class)
    @DictFormat("mes_record_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer reportStatus;

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

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "班别", example = "1")
    @ExcelProperty(value = "班别", converter = DictConvert.class)
    @DictFormat("mes_group_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer groupType;

    @Schema(description = "报工类型", example = "1")
    @ExcelProperty(value = "报工类型", converter = DictConvert.class)
    @DictFormat("mes_produce_report_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String reportType;

    @Schema(description = "加班时长")
    @ExcelProperty("加班时长")
    private BigDecimal plusTime;
}