package com.jwipc.tender.dto;

import com.jwipc.aggregation.annotation.RelationAggregationField;
import com.jwipc.supplier.client.SupplierClient;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@Data
public class TenderBidDetailAllDTO extends TenderScoreDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = -9000297690783562182L;
    private Long id;
    private Long priceInfoId;
    /**
     * 招标id
     */
    private Long tenderId;

    /**
     * 行号编号
     */
    private Integer rowNo;

    /**
     * 行项目名称
     */
    private String rowName;

    private Long supplierId;
    @RelationAggregationField(
            masterIdField = "supplierId",
            relationIdField = "id",
            relationNameField = "supplierCode",
            relationClientClass = SupplierClient.class,
            relationMethod = "getSupplierByIds"
    )
    private String supplierCode;

    @RelationAggregationField(
            masterIdField = "supplierId",
            relationIdField = "id",
            relationNameField = "supplierName",
            relationClientClass = SupplierClient.class,
            relationMethod = "getSupplierByIds"
    )
    private String supplierName;

    private Long materialId;
    /**
     * 物料编号
     */
    private String materialCode;

    /**
     * 物料名称
     */
    private String materialName;
    private String materialDesc;

    /**
     * 品牌
     */
    private String materialBrand;

    /**
     * 当前价
     */
    private BigDecimal currentPrice;

    /**
     * 门槛价
     */
    private BigDecimal doorPrice;

    /**
     * 期望价
     */
    private BigDecimal expectedPrice;

    /**
     * 基准价税码
     */
    private String baseTaxRateCode;

    /**
     * 基准价税率
     */
    private BigDecimal baseTaxRate;

    /**
     * 税码
     */
    private String taxRateCode;

    /**
     * 税率
     */
    private BigDecimal taxRate;

    /**
     * 基准价币种
     */
    private String baseCurrency;

    /**
     * 币种
     */
    private String currency;

    /**
     * 采购数量
     */
    private BigDecimal count;

    /**
     * 订单单位
     */
    private String unit;

    /**
     * 交货日期
     */
    private LocalDate deliveryDate;
    private LocalDate priceStartDate;
    private LocalDate priceValidityDate;

    /**
     * 采购组织
     */
    private String purchaseOrg;

    /**
     * 采购组
     */
    private String purchaseGroup;

    /**
     * 工厂编码
     */
    private String factoryCode;

    /**
     * 投标表主键
     */
    private Long bidId;

    /**
     * 招标单明细表id
     */
    private Long tenderDetailId;

    /**
     * 含税报价
     */
    private BigDecimal taxPrice;

    /**
     * 供应商看到的状态(1.已中标;)
     */
    private Integer supplierStatus;

    /**
     * 状态(1:中标;2:议价中;3:淘汰;)
     */
    private Integer status;
    private String statusStr;

    /**
     * 上轮排名
     */
    private Integer lastRanking;

    /**
     * 排名
     */
    private Integer ranking;

    /**
     * 报价状态(1:已投;0:未投)
     */
    private Integer offerStatus;

    /**
     * 最终的供应商报价，如果没有议价，就是含税报价，如果有议价就是议价
     */
    private BigDecimal finalPrice;
    private BigDecimal finalNoTaxPrice;
    /**
     * 备注
     */
    private String remark;

    private Integer createUserid;

    private LocalDateTime createTime;

    private Integer updateUserid;

    private LocalDateTime updateTime;

    /**
     * 小类名称
     */
    private String accelinkTypeName;


    /**
     * 物料组编码
     */
    private String materialGroupCode;

    /**
     * 物料组名称
     */
    private String materialGroupName;

    /**
     * 二级采购编码
     */
    private String secondPurchaseCode;

    /**
     * 二级采购名称
     */
    private String secondPurchaseName;

    /**
     * 货号
     */
    private String materialNo;

    /**
     * 规格
     */
    private String materialSpecification;

    /**
     * 计量单位
     */
    private String meteringUnit;

    /**
     * 制造商
     */
    private String manufacturer;

    /**
     * 采购单位
     */
    private String purchaseUnit;

    /**
     * 汇总计划单id
     */
    private Long summaryPlanId;

    /**
     * 汇总单号
     */
    private String sumOrderCode;

    /**
     * 汇总行号
     */
    private String sumItemNo;

    /**
     * 目标单价类型
     */
    private Integer targetPriceType;

    /**
     * 目标单价
     */
    private BigDecimal targetPrice;

    /**
     * 需求数量
     */
    private BigDecimal number;

    /**
     * 拓展字段1
     */
    private String k1;

    /**
     * 拓展字段2
     */
    private String k2;

    /**
     * 拓展字段3
     */
    private String k3;

    /**
     * 拓展字段4
     */
    private String k4;

    /**
     * 拓展字段5
     */
    private String k5;

    /**
     * 拓展字段6
     */
    private String k6;

    /**
     * 拓展字段7
     */
    private String k7;

    /**
     * 拓展字段8
     */
    private String k8;

    /**
     * 拓展字段9
     */
    private String k9;

    /**
     * 拓展字段10
     */
    private String k10;

    private BigDecimal k11;

    private BigDecimal k12;

    private BigDecimal k13;

    private BigDecimal k14;

    private BigDecimal k15;

    private BigDecimal k16;

    private BigDecimal k17;

    private BigDecimal k18;

    private BigDecimal k19;

    private BigDecimal k20;

    private BigDecimal k21;

    private BigDecimal k22;

    private BigDecimal k23;

    private BigDecimal k24;

    private BigDecimal k25;

    private BigDecimal k26;

    private BigDecimal k27;

    private BigDecimal k28;

    private BigDecimal k29;

    private BigDecimal k30;

    private String k31;

    private String k32;

    private String k33;

    private String k34;

    private String k35;

    private String k36;

    private String k37;

    private String k38;

    private String k39;

    private String k40;

    private String k41;

    private String k42;

    private String k43;

    private String k44;

    private String k45;

    private BigDecimal k46;

    private BigDecimal k47;

    private String k48;

    private String k49;

    private String k50;

    private String k51;

    private String k52;

    private BigDecimal k53;

    private BigDecimal k54;

    private String k55;

    private String k56;

    private String k57;

    private String k58;

    private String k59;
    /**
     * 定标页面的排名
     */
    private Integer benchmarksRank;

    /**
     * 议价
     */
    private BigDecimal bargaining;
    /**
     * 供应商填写的议价
     */
    private BigDecimal bargainingSupplier;
    /**
     * 议价状态(1:议价中;2:已确定)
     */
    private Integer bargainingStatus;
    /**
     * 供应商回复议价备注
     */
    private String bargainingSupplierRemark;
    /**
     * 议价备注
     */
    private String bargainingRemark;


    /**
     * 配额
     */
    private BigDecimal quota;

    private String bidRemark;

    /**
     * 定标数量
     */
    private BigDecimal bidNum;

    /**
     * bid中的总金额
     */
    private BigDecimal totalAmount;


    /**
     * 来源行Id（采购申请明细Id）t_purchase_apply_bill_detail
     */
    private Long sourceRowId;
    /**
     * 来源类型 1.采购申请
     */
    private Integer sourceType;

    private BigDecimal finalCnyAmount;
    private BigDecimal finalCnyTaxAmount;

    private BigDecimal exchangeRate;
    /**
     * 制造商型号
     */
    private String mpn;

    /**
     * 制造商英文
     */
    private String manufacturerEn;

    /**
     * 国系
     */
    private String countryName;

    /**
     * 潮湿等级
     */
    private String msl;

    /**
     * 取消窗
     */
    private String cancelWindow;

    /**
     * 推迟窗
     */
    private String delayWindow;

    /**
     * 风险等级
     */
    private String riskLevel;

    /**
     * 物流代理费
     */
    private BigDecimal logisticsAgencyFee;

    /**
     * 关税
     */
    private BigDecimal tariff;

    private Long moq;
    private Long mpq;
    private String eccn;
    /**
     * 这个供应商的总不含税人民币报价是否等于每个明细行的不含税人民币报价
     */
    private Integer ok;
    private BigDecimal sumAmount;
    /**
     * 上次中标价id
     */
    private Long lastBidPriceId;
    /**
     * 上次中标价
     */
    private BigDecimal lastBidPrice;
    /**
     * 历史最低价id
     */
    private Long historyPriceId;
    /**
     * 历史最低价
     */
    private BigDecimal historyPrice;

    /**
     * 降幅
     */
    private String decline;

    /**
     * bid中的行总金额 =换算后未税单价（CNY)finalCnyAmount *定标数量（bidNum）
     */
    private BigDecimal detailTotalAmount;

    private BigDecimal detailSumAmount;

    /**
     * 发票类型
     */
    private String invoiceType;
}
