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

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Collections;
import java.util.List;

@Schema(description = "管理后台 - 项目考核产值预算表预览 Response VO")
@Data
public class ProjectBudgetPreviewRespVO {

    @Schema(description = "年度", example = "2026")
    private Integer year;

    @Schema(description = "工程编号")
    private String projectCode;

    @Schema(description = "项目名称")
    private String projectName;

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

    @Schema(description = "建筑（装饰）工程项目考核产值预算表")
    private List<BudgetRow> budgetRows = Collections.emptyList();

    @Schema(description = "项目考核产值年度季度预算计取表")
    private List<QuarterBudgetRow> quarterBudgetRows = Collections.emptyList();

    @Schema(description = "建筑（装饰）工程项目考核产值预算表行")
    @Data
    public static class BudgetRow {

        @Schema(description = "行类型")
        private String rowType;

        @Schema(description = "规划 ID")
        private Long planningId;

        @Schema(description = "规划内容")
        private String planningContent;

        @Schema(description = "设计部位")
        private String displayDesignPart;

        @Schema(description = "设计内容/设计类型")
        private String displayBuildingType;

        @Schema(description = "内部指导单价")
        private BigDecimal internalGuidanceUnitPrice;

        @Schema(description = "设计面积")
        private BigDecimal designArea;

        @Schema(description = "栋数/户型数")
        private Integer buildingOrUnitCount;

        @Schema(description = "套图系数")
        private BigDecimal drawingSetFactor;

        @Schema(description = "规模系数")
        private BigDecimal scaleFactor;

        @Schema(description = "修改系数")
        private BigDecimal modificationFactor;

        @Schema(description = "复杂系数/复杂等级")
        private BigDecimal complexityFactor;

        @Schema(description = "小计")
        private BigDecimal subtotalArea;

        @Schema(description = "设计阶段占比")
        private BigDecimal currentDesignStageRatio;

        @Schema(description = "考核产值小计，单位：万元")
        private BigDecimal assessmentOutputValueWan;

    }

    @Schema(description = "项目考核产值年度季度预算计取表行")
    @Data
    public static class QuarterBudgetRow {

        @Schema(description = "序号")
        private Integer serialNo;

        @Schema(description = "是否合计行")
        private Boolean totalRow = false;

        @Schema(description = "产值类型")
        private String outputType;

        @Schema(description = "设计内容")
        private String designContent;

        @Schema(description = "预算年度")
        private Integer budgetYear;

        @Schema(description = "总建筑（精装）设计面积")
        private BigDecimal totalDesignArea;

        @Schema(description = "总考核产值面积")
        private BigDecimal totalAssessmentArea;

        @Schema(description = "总考核产值，单位：万元")
        private BigDecimal totalAssessmentOutputWan;

        @Schema(description = "阶段占比")
        private BigDecimal designStageRatio;

        @Schema(description = "设计阶段考核产值，单位：万元")
        private BigDecimal designStageOutputWan;

        @Schema(description = "往年已发放比例")
        private BigDecimal historicalIssuedRatio;

        @Schema(description = "一季度发放比例")
        private BigDecimal quarterOneRatio;

        @Schema(description = "二季度发放比例")
        private BigDecimal quarterTwoRatio;

        @Schema(description = "三季度发放比例")
        private BigDecimal quarterThreeRatio;

        @Schema(description = "四季度发放比例")
        private BigDecimal quarterFourRatio;

        @Schema(description = "本年度小计比例")
        private BigDecimal currentYearRatio;

        @Schema(description = "未发放比例")
        private BigDecimal pendingRatio;

        @Schema(description = "一季度金额，单位：万元")
        private BigDecimal quarterOneAmountWan;

        @Schema(description = "二季度金额，单位：万元")
        private BigDecimal quarterTwoAmountWan;

        @Schema(description = "三季度金额，单位：万元")
        private BigDecimal quarterThreeAmountWan;

        @Schema(description = "四季度金额，单位：万元")
        private BigDecimal quarterFourAmountWan;

        @Schema(description = "本年度小计金额，单位：万元")
        private BigDecimal yearTotalAmountWan;

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

    }

}
