package com.ruoyi.common.importExcel.excel.tempInfo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.ruoyi.common.importExcel.excel.validation.ExcelVerify;
import com.ruoyi.common.utils.StringUtils;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import lombok.Data;

@Data
public class ProjectFromInfo extends ExcelVerify {

    // @Excel(name = "区域", fixedIndex = 0, width = 10)
    // private String area;

    private Long areaId;

    // @Excel(name = "国家", fixedIndex = 1, width = 10)
    // private String country;

    private Long countryId;

    @Excel(name = "城市", fixedIndex = 0, width = 10)
    private String city;

    /* 计划成交月份 -> 客户决定日期 */
    @Excel(name = "客户决定日期", fixedIndex = 1, width = 10)
    private String planDealMonth;

    private Date planDealMonthDate;

    @Excel(name = "负责人", fixedIndex = 2, width = 10)
    private String owner;

    private Long ownerId;

    // @Excel(name = "所属代理商", fixedIndex = 5, width = 10)
    // private String agent;

    private Long agentId;

    @Excel(name = "项目名称", fixedIndex = 3, width = 10)
    private String projectName;

    @Excel(name = "项目类型", fixedIndex = 4, width = 10)
    private String type;

    private String typeValue;

    @Excel(name = "标杆项目", fixedIndex = 5, width = 10)
    private String modelFlag;

    private String modelFlagValue;

    @Excel(name = "产品系列", fixedIndex = 6, width = 10)
    private String segmentedMarket;

    private String segmentedMarketValue;

    // @Excel(name = "项目交期", fixedIndex = 7, width = 10)
    // private String completionYear;

    // private Date completionYearDate;

    @Excel(name = "关联客户", fixedIndex = 7, width = 10)
    private String accountName;

    private Long accountId;

    @Excel(name = "项目状态", fixedIndex = 8, width = 10)
    private String progress;

    private String progressValue;

    @Excel(name = "预期安装日期", fixedIndex = 9, width = 10)
    private String expectedInstallStartDateStr;

    private Date expectedInstallStartDate;

    // @Excel(name = "审批状态", fixedIndex = 9, width = 10)
    // private String status;

    // private String statusValue;


    @Excel(name = "币种", fixedIndex = 10, width = 10)
    private String currency;

    private String currencyValue;

    @Excel(name = "项目地址", fixedIndex = 11, width = 10)
    private String address;

    @Excel(name = "关键决策人", fixedIndex = 12, width = 10)
    private String keyContactPerson;

    @Excel(name = "关键决策人职位", fixedIndex = 13, width = 10)
    private String keyJobTitle;

    @Excel(name = "关键决策人电话", fixedIndex = 14, width = 10)
    private String keyContact;

    @Excel(name = "关键决策人邮箱", fixedIndex = 15, width = 10)
    private String keyEmail;

    @Excel(name = "联系人", fixedIndex = 16, width = 10)
    private String contactPerson;

    @Excel(name = "职位", fixedIndex = 17, width = 10)
    private String jobTitle;

    @Excel(name = "联系方式", fixedIndex = 18, width = 10)
    private String contact;

    @Excel(name = "邮箱", fixedIndex = 19, width = 10)
    private String email;

    @Excel(name = "解决方案", fixedIndex = 20, width = 10)
    private String solution;

    @Excel(name = "特殊需求", fixedIndex = 21, width = 10)
    private String specialRemark;

    @Excel(name = "备注", fixedIndex = 22, width = 10)
    private String remark;

    @Excel(name = "规格", fixedIndex = 23, width = 10)
    private String stand;

    @Excel(name = "梯形", fixedIndex = 24, width = 10)
    private String elevatorModel;

    @Excel(name = "设备类型", fixedIndex = 25, width = 10)
    private String equipmentType;

    @Excel(name = "设备数量", fixedIndex = 26, width = 10)
    private String equipmentQuantityStr;

    private Long equipmentQuantity;

    @Excel(name = "金额", fixedIndex = 27, width = 10)
    private String amountStr;

    private BigDecimal amount;

    private List<ProjectEquipmentInfo> equipmentInfoList;


    public ProjectFromInfo trimAll() {
        this.city = trim(this.getCity());
        this.planDealMonth = trim(this.planDealMonth);
        this.owner = trim(this.owner);
        this.projectName = trim(this.projectName);
        this.type = trim(this.type);
        this.modelFlag = trim(this.modelFlag);
        this.segmentedMarket = trim(this.segmentedMarket);
        this.accountName = trim(this.accountName);
        this.progress = trim(this.progress);
        this.expectedInstallStartDateStr = trim(this.expectedInstallStartDateStr);
        this.currency = trim(this.currency);
        this.address = trim(this.address);
        this.keyContactPerson = trim(this.keyContactPerson);
        this.keyContact = trim(this.keyContact);
        this.keyEmail = trim(this.keyEmail);
        this.keyJobTitle = trim(this.keyJobTitle);
        this.contactPerson = trim(this.contactPerson);
        this.contact = trim(this.contact);
        this.jobTitle = trim(this.jobTitle);
        this.email = trim(this.email);
        this.solution = trim(this.solution);
        this.specialRemark = trim(this.specialRemark);
        this.remark = trim(this.remark);
        this.stand = trim(this.stand);
        this.elevatorModel = trim(this.elevatorModel);
        this.equipmentType = trim(this.equipmentType);
        return this;
    }

    private String trim(String str) {
        return StringUtils.isBlank(str) ? str : str.trim();
    }


}
