package cn.iocoder.lyzsys.module.tjt.controller.admin.project.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

@Schema(description = "管理后台 - 项目 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ProjectRespVO {

    private static final String FORMAT_YEAR_MONTH_DAY = "yyyy-MM-dd";

    @Schema(description = "项目 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty("项目ID")
    private Long id;

    @Schema(description = "项目名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("项目名称")
    private String projectName;

    @Schema(description = "排序")
    @ExcelProperty("排序")
    private Integer sortNo;

    @Schema(description = "是否签订合同", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("是否签订合同")
    private Boolean contractSignedFlag;

    @Schema(description = "合同总产值", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("合同总产值")
    private BigDecimal contractAmount;

    @Schema(description = "建筑面积", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("建筑面积")
    private BigDecimal totalConstructionArea;

    @Schema(description = "建设单位")
    @ExcelProperty("建设单位")
    private String constructionUnitName;

    @Schema(description = "建设单位联系人")
    @ExcelProperty("建设单位联系人")
    private String contactName;

    @Schema(description = "建设单位联系电话")
    @ExcelProperty("建设单位联系电话")
    private String contactPhone;

    @Schema(description = "合同签订日期")
    @ExcelProperty("合同签订日期")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate contractSigningDate;

    @Schema(description = "项目经理")
    @ExcelProperty("项目经理")
    private String projectManagerName;

    @Schema(description = "工程负责人")
    @ExcelProperty("工程负责人")
    private String engineeringPrincipalName;

    @Schema(description = "工程类型")
    @ExcelProperty("工程类型")
    private String projectType;

    @Schema(description = "设计类型")
    @ExcelProperty("设计类型")
    private String projectCategory;

    @Schema(description = "项目开始年度")
    @ExcelProperty("项目开始年度")
    private Integer projectStartYear;

    @Schema(description = "项目状态")
    @ExcelProperty("项目状态")
    private String projectStatus;

    @Schema(description = "是否封档")
    private Boolean archiveFlag;

    @Schema(description = "封档时间")
    private LocalDateTime archiveTime;

    @Schema(description = "暂停原因")
    private String pauseReason;

    @Schema(description = "中止原因")
    private String terminateReason;

    @Schema(description = "结算合同总产值")
    @ExcelProperty("结算合同总产值")
    private BigDecimal finalSettlementAmount;

    @Schema(description = "科创产值比例")
    @ExcelProperty("科创产值比例")
    private BigDecimal innovationOutputRate;

    @Schema(description = "其他成本")
    @ExcelProperty("其他成本")
    private BigDecimal otherCost;

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

    @Schema(description = "项目角色人员列表")
    private List<ProjectRolePersonRespVO> rolePersons;

}
