package com.yhy.module.core.controller.admin.workbench.vo.price;

import io.swagger.v3.oas.annotations.media.Schema;
import java.math.BigDecimal;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 工料机价格明细（调试用）
 * 
 * 用于定额单价计算中的第1层：工料机合价计算明细
 * 
 * @author yhy
 */
@Schema(description = "工作台 - 工料机价格明细")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ResourcePriceDetail {

    @Schema(description = "工料机ID", example = "1")
    private Long resourceId;

    @Schema(description = "工料机编码", example = "R001")
    private String resourceCode;

    @Schema(description = "工料机名称", example = "人工")
    private String resourceName;

    @Schema(description = "工料机类型", example = "labor")
    private String resourceType;

    @Schema(description = "机类ID", example = "1")
    private Long categoryId;

    @Schema(description = "机类代码", example = "人")
    private String categoryCode;

    @Schema(description = "原始消耗量", example = "100.00")
    private BigDecimal dosage;

    @Schema(description = "调整消耗量", example = "110.00")
    private BigDecimal adjustedDosage;

    @Schema(description = "有效消耗量（adjustedDosage ?? dosage）", example = "110.00")
    private BigDecimal effectiveDosage;

    @Schema(description = "除税基价", example = "10.00")
    private BigDecimal taxExclBasePrice;

    @Schema(description = "含税基价", example = "11.30")
    private BigDecimal taxInclBasePrice;

    @Schema(description = "除税编制价", example = "10.50")
    private BigDecimal taxExclCompilePrice;

    @Schema(description = "含税编制价", example = "11.87")
    private BigDecimal taxInclCompilePrice;

    @Schema(description = "除税基价合价", example = "11.00")
    private BigDecimal taxExclBaseTotalSum;

    @Schema(description = "含税基价合价", example = "12.43")
    private BigDecimal taxInclBaseTotalSum;

    @Schema(description = "除税编制价合价", example = "11.55")
    private BigDecimal taxExclCompileTotalSum;

    @Schema(description = "含税编制价合价", example = "13.06")
    private BigDecimal taxInclCompileTotalSum;

    @Schema(description = "调整公式（如 '(x)*1.1'）", example = "(x)*1.1")
    private String adjustmentFormula;

    @Schema(description = "是否为复合工料机", example = "false")
    private Boolean isMerged;

    @Schema(description = "是否为单位%工料机", example = "false")
    private Boolean isPercentUnit;

    @Schema(description = "计算基数（单位为%的工料机使用）")
    private java.util.Map<String, Object> calcBase;
}
