package cn.iocoder.yudao.module.bpm.controller.admin.oa.business.vo;

import cn.iocoder.yudao.framework.common.util.date.DateUtils;
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

@Schema(description = "管理后台 - 出差流程信息 Response VO")
@Data
@ExcelIgnoreUnannotated
public class OaBusinessRespVO {

    @Schema(description = "出差表单主键")
    // @ExcelProperty("出差表单主键")
    private Long id;

    @Schema(description = "出差人id")
    // @ExcelProperty("出差人id")
    private Long employeeId;

    @Schema(description = "出差员工姓名")
    @ExcelProperty("出差人")
    private String employeeName;

    @Schema(description = "用户账号id")
    // @ExcelProperty("用户账号id")
    private Long userId;

    @Schema(description = "部门id")
    // @ExcelProperty("部门id")
    private Long deptId;

    @Schema(description = "部门名称")
    @ExcelProperty("部门")
    private String deptName;

    @Schema(description = "职位id")
    // @ExcelProperty("职位id")
    private Long postId;

    @Schema(description = "职位")
    @ExcelProperty("职位")
    private String position;

    @Schema(description = "出差员工手机号")
    @ExcelProperty("手机号")
    private String employeePhone;

    @Schema(description = "出差事由")
    // @ExcelProperty("出差事由")
    private String reason;

    @Schema(description = "出差目的地")
    @ExcelProperty("出差目的地")
    private String destination;

    @Schema(description = "出差开始日期")
    @ExcelProperty("开始日期")
    private String startDate;

    @Schema(description = "出差结束日期")
    @ExcelProperty("结束日期")
    private String endDate;

    @Schema(description = "出差天数（d）")
    @ExcelProperty("出差天数（d）")
    private String day;

    @Schema(description = "出差预算费用，单位（元）")
    @ExcelProperty("出差预算费用（元）")
    private BigDecimal estimatedCost;

    @Schema(description = "申请人id")
    // @ExcelProperty("申请人id")
    private Long applyEmployeeId;

    @Schema(description = "申请人员工姓名")
    @ExcelProperty("申请人")
    private String applyEmployeeName;

    @Schema(description = "创建时间")
    @ExcelProperty("申请时间")
    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime createTime;

    @Schema(description = "审核状态（0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回、6已撤回）")
    // @ExcelProperty("审核状态（0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回、6已撤回）")
    private String auditStatus;

    @Schema(description = "审核状态（0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回、6已撤回）")
    @ExcelProperty("状态")
    private String auditStatusDesc;

    @Schema(description = "当前审核人员工id")
    // @ExcelProperty("当前审核人员工id")
    private Long currentAuditEmployeeId;

    @Schema(description = "当前审核人员工姓名")
    @ExcelProperty("当前处理人")
    private String currentAuditEmployeeName;

    @Schema(description = "最后审核时间")
    // @ExcelProperty("最后审核时间")
    private LocalDateTime finalAuditDate;

    @Schema(description = "备注")
    // @ExcelProperty("备注")
    private String remarks;

    @Schema(description = "附件列表")
    private List<FileDTO> fileList;

    @Schema(description = "附件id列表")
    private List<Long> fileIdList;

    @Schema(description = "审批记录列表")
    private List<BpmTaskRespVO> auditRecordList;

    @Schema(description = "审批人员列表")
    private List<EmployeeRespDTO> auditUserList;

    @Schema(description = "当前用户待处理的任务id")
    private String taskId;
}