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.List;

@Schema(description = "管理后台 - 专业内人员年度季度计取预览 Response VO")
@Data
public class SpecialtyPersonOutputPreviewRespVO {

    @Schema(description = "锚点合约规划 ID")
    private Long planningId;

    @Schema(description = "预览年度")
    private Integer year;

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

    @Schema(description = "专业分组")
    private List<GroupRow> groups;

    @Schema(description = "专业分组")
    @Data
    public static class GroupRow {

        @Schema(description = "专业编码")
        private String specialtyCode;

        @Schema(description = "专业名称")
        private String specialtyName;

        @Schema(description = "是否允许导出专业内人员计取表")
        private Boolean exportable;

        @Schema(description = "专业金额（元）")
        private BigDecimal specialtyAmount;

        @Schema(description = "角色比例合计")
        private BigDecimal roleTotal;

        @Schema(description = "已配置人数")
        private Integer personCount;

        @Schema(description = "是否超额")
        private Boolean overRatio;

        @Schema(description = "专业一季度金额（万元）")
        private BigDecimal specialtyQuarterOneAmountWan;

        @Schema(description = "专业二季度金额（万元）")
        private BigDecimal specialtyQuarterTwoAmountWan;

        @Schema(description = "专业三季度金额（万元）")
        private BigDecimal specialtyQuarterThreeAmountWan;

        @Schema(description = "专业四季度金额（万元）")
        private BigDecimal specialtyQuarterFourAmountWan;

        @Schema(description = "专业本年度小计金额（万元）")
        private BigDecimal specialtyYearTotalAmountWan;

        @Schema(description = "角色人员年度季度计取明细")
        private List<RoleRow> rows;

    }

    @Schema(description = "角色人员年度季度计取明细")
    @Data
    public static class RoleRow {

        @Schema(description = "专业编码")
        private String specialtyCode;

        @Schema(description = "专业名称")
        private String specialtyName;

        @Schema(description = "角色编码")
        private String roleCode;

        @Schema(description = "角色名称")
        private String roleName;

        @Schema(description = "角色比例")
        private BigDecimal roleRatio;

        @Schema(description = "角色金额（元）")
        private BigDecimal roleAmount;

        @Schema(description = "人员比例合计")
        private BigDecimal personTotalRatio;

        @Schema(description = "人员明细")
        private List<PersonRow> persons;

    }

    @Schema(description = "人员年度季度计取明细")
    @Data
    public static class PersonRow {

        @Schema(description = "人员唯一键")
        private String personKey;

        @Schema(description = "员工 ID")
        private Long employeeId;

        @Schema(description = "员工姓名")
        private String employeeName;

        @Schema(description = "人员工作量比例")
        private BigDecimal personRatio;

        @Schema(description = "人员金额（元）")
        private BigDecimal personAmount;

        @Schema(description = "参与角色")
        private String roleNames;

        @Schema(description = "占专业比例合计")
        private BigDecimal adjustedPersonRatio;

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

        @Schema(description = "一季度金额（万元）")
        private BigDecimal quarterOneAmountWan;

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

        @Schema(description = "二季度金额（万元）")
        private BigDecimal quarterTwoAmountWan;

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

        @Schema(description = "三季度金额（万元）")
        private BigDecimal quarterThreeAmountWan;

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

        @Schema(description = "四季度金额（万元）")
        private BigDecimal quarterFourAmountWan;

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

        @Schema(description = "本年度小计金额（万元）")
        private BigDecimal yearTotalAmountWan;

    }

}
