package com.prolog.rdc.tms.model.vo.xlsimport;

import com.alibaba.excel.annotation.ExcelProperty;
import com.prolog.product.core.easyexcel.annotation.ValidationPropertyExt;
import com.prolog.product.core.easyexcel.support.DropdownPropExtConverter;
import com.prolog.product.core.easyexcel.util.ValidationCellEnum;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.apache.poi.ss.usermodel.IndexedColors;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
@ApiModel("运费价格导入VO")
public class FreightPriceImportVO implements Serializable {

    @ValidationPropertyExt(headFontColor = IndexedColors.RED)
    @ExcelProperty(value = "合同编号")
    private String contractNo;

    @ValidationPropertyExt(headFontColor = IndexedColors.RED)
    @ExcelProperty(value = "合同名称")
    private String contractName;

    @ValidationPropertyExt(headFontColor = IndexedColors.RED)
    @ExcelProperty(value = "价格编号")
    private String priceNo;

    @ValidationPropertyExt(headFontColor = IndexedColors.RED)
    @ExcelProperty(value = "价格名称")
    private String priceName;

    @ExcelProperty(value = "计费单据", converter = DropdownPropExtConverter.class)
//    @ValidationPropertyExt(headFontColor = IndexedColors.RED, dropdownValues = { "1", "2", "3" }, dropdownNames = { "运单", "派车单", "运单包裹"}, cellType = ValidationCellEnum.LIST)
    @ValidationPropertyExt(headFontColor = IndexedColors.RED, dropdownValues = { "1", "3" }, dropdownNames = { "运单", "运单包裹"}, cellType = ValidationCellEnum.LIST)
    private String settlementOrderType;

    @ExcelProperty(value = "始发地省")
    private String shipperProvinceName;

    @ExcelProperty(value = "始发地市")
    private String shipperCityName;

    @ExcelProperty(value = "始发地区")
    private String shipperDistrictName;

    @ExcelProperty(value = "目的地省")
    private String consigneeProvinceName;

    @ExcelProperty(value = "目的地市")
    private String consigneeCityName;

    @ExcelProperty(value = "目的地区")
    private String consigneeDistrictName;

    @ExcelProperty(value = "时效(时)")
    private int aging;

    @ExcelProperty(value = "里程(KM)")
    private BigDecimal mileage;

    @ValidationPropertyExt(headFontColor = IndexedColors.RED)
    @ExcelProperty(value = "费用")
    private String expenseName;

    @ExcelProperty(value = "备注")
    private String memo;

    @ExcelProperty(value = "计费模式", converter = DropdownPropExtConverter.class)
    @ValidationPropertyExt(headFontColor = IndexedColors.RED, dropdownValues = { "1", "2", "3", "4", "5", "6" , "7"}, dropdownNames = { "阶梯计费", "一口价", "一口价-合并计费", "按个计费", "比例计费", "按时间计费", "单价-合并计费" }, cellType = ValidationCellEnum.LIST)
    private String settlementModel;

    @ExcelProperty(value = "阶梯方式")
//    @ValidationPropertyExt(dropdownValues = { "1", "2", "3" }, dropdownNames = { "按KG", "按公里", "按体积" }, cellType = ValidationCellEnum.LIST)
    @ValidationPropertyExt(dropdownValues = { "1", "3" }, dropdownNames = { "按KG", "按体积" }, cellType = ValidationCellEnum.LIST)
    private String ladderType;

    @ExcelProperty(value = "计费方式")
//    @ValidationPropertyExt(dropdownValues = { "1", "2", "3", "4", "5", "6", "7" }, dropdownNames = { "元/千克*公里", "元/千克", "元/小时*千克", "元/公里", "元/小时*公里", "元/小时", "元/方" }, cellType = ValidationCellEnum.LIST)
    @ValidationPropertyExt(dropdownValues = { "2", "7" }, dropdownNames = { "元/千克", "元/方" }, cellType = ValidationCellEnum.LIST)
    private String settlementType;

    @ExcelProperty(value = "策略")
    private String strategyName;

    @ExcelProperty(value = "单价")
    private BigDecimal price;

    @ExcelProperty(value = "匹配条件")
    private String matchCondition;

    @ExcelProperty(value = "序号")
    @ValidationPropertyExt(headFontColor = IndexedColors.RED)
    private Integer number;

    @ExcelProperty(value = "区间下限符号")
    @ValidationPropertyExt(dropdownValues = { "1", "2" }, dropdownNames = { "大于", "大于等于" }, cellType = ValidationCellEnum.LIST)
    private String sectionDownSymbol;

    @ExcelProperty(value = "区间下限")
    private BigDecimal sectionDown;

    @ExcelProperty(value = "区间上限符号")
    @ValidationPropertyExt(dropdownValues = { "1", "2" }, dropdownNames = { "小于", "小于等于" }, cellType = ValidationCellEnum.LIST)
    private String sectionUpSymbol;

    @ExcelProperty(value = "区间上限")
    private BigDecimal sectionUp;

    @ExcelProperty(value = "起步价")
    private BigDecimal startingPrice;

    @ExcelProperty(value = "首重")
    private BigDecimal initialLadder;

    @ExcelProperty(value = "阶梯单价")
    private BigDecimal ladderPrice;

    @ExcelProperty(value = "类别")
    private String priceLadderType;
}