package com.zt.plat.module.qms.resource.material.controller.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileWithUrlRespDTO;
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

@Schema(description = "管理后台 - 物料通用流程,物料验收、退换货 Response VO")
@Data
@ExcelIgnoreUnannotated
public class MaterialLifecycleRespVO {

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

    @Schema(description = "标题")
    @ExcelProperty("标题")
    private String title;

    @Schema(description = "业务类型,【字典】【jy_material_lifecycle_bsn_type】验收、退换货、配置申请", example = "2")
    @ExcelProperty("业务类型,【字典】【jy_material_lifecycle_bsn_type】验收、退换货、配置申请")
    private String businessType;

    @Schema(description = "业务类型编码")
    @ExcelProperty("业务类型编码")
    private String businessTypeCode;

    @Schema(description = "申请人")
    @ExcelProperty("申请人")
    private String applyUser;

    @Schema(description = "申请人id", example = "4976")
    @ExcelProperty("申请人id")
    private Long applyUserId;

    @Schema(description = "申请部门")
    @ExcelProperty("申请部门")
    private String applyDepartment;

    @Schema(description = "申请部门id", example = "19765")
    @ExcelProperty("申请部门id")
    private Long applyDepartmentId;

    @Schema(description = "申请时间")
    @ExcelProperty("申请时间")
    private LocalDateTime applyTime;

    @Schema(description = "表单数据,表单数据")
    @ExcelProperty("表单数据,表单数据")
    private String formData;

    @Schema(description = "流程实例id", example = "12151")
    @ExcelProperty("流程实例id")
    private String flowInstanceId;

    @Schema(description = "提交状态,提交状态,0-未提交，1-已提交", example = "1")
    @ExcelProperty("提交状态,提交状态,0-未提交，1-已提交")
    @Dict(dicCode = "submit_status")
    private Integer submitStatus;

    @Schema(description = "流程审批状态", example = "1")
    @ExcelProperty("流程审批状态")
    @Dict(dicCode = "flow_status")
    private String flowStatus;

    @Schema(description = "部门ids")
    private List<Long> departmentIds;

    @Schema(description = "库房ids")
    private List<Long> warehouseIds;

    @Schema(description = "盘点项")
    private List<MaterialInventoryCheckItemRespVO> checkItems;

    @Schema(description = "执行人id")
    private Long operatorId;

    @Schema(description = "执行人")
    private String operatorName;

    @Schema(description = "执行进度")
    @Dict(dicCode = "material_inventory_check_progress")
    private String progress;

    @Schema(description = "事由/说明")
    private String reason;

    @Schema(description = "自定义json配置")
    private String customConfig;

    @Schema(description = "是否可进行检验结果判定,1-是，0-否")
    private Integer assayResultAssessment;

    @Schema(description = "所属部门")
    @ExcelProperty("所属部门")
    private String systemDepartmentCode;

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

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

    @Schema(description = "流程明细")
    @ExcelProperty("流程明细")
    private List<MaterialLifecycleDetailRespVO> detailList;

    @Schema(description = "附件对象")
    private CommonResult<List<BusinessFileWithUrlRespDTO>> businessFileRet;

}