package com.jwipc.supplier.dto;

import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.jwipc.util.ExcelDict;
import lombok.Data;

import java.io.Serializable;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@Data
public class SupplierBankDMDTO implements Serializable {
    private static final long serialVersionUID = 207713017734261584L;
    @ExcelProperty(value = "供应商编号")
    private String supplierCode;
    @ExcelProperty(value = "供应商ERP编号")
    private String supplierErpCode;
    @ExcelProperty(value = "供应商名称")
    private String supplierName;
    @ExcelProperty(value = "供应商简称")
    private String shortName;
    @ExcelProperty(value = "联系人")
    private String contactsName;
    @ExcelProperty(value = "联系人邮箱")
    private String email1;
    @ExcelProperty(value = "公司邮箱")
    private String email;
    @ExcelProperty(value = "电话")
    private String contactsTel;
    @ExcelProperty(value = "地址")
    private String address;
    @ExcelProperty(value = "开户行")
    private String openingBankName;
    @ExcelProperty(value = "银行账号")
    private String bankAccount;
    @ExcelProperty(value = "开户人")
    private String cardholderName;
    @ExcelProperty(value = "银行行号")
    private String bankCode;
    @ExcelProperty(value = "银行国际代码")
    @ColumnWidth(20)
    private String bankInterCode;
    @ExcelProperty(value = "收款单位")
    @ColumnWidth(20)
    private String skdw;
    @ExcelProperty(value = "公司代码")
    @ColumnWidth(20)
    private String companyCode;
    @ExcelProperty(value = "供应商区分")
    @ColumnWidth(20)
    private String registerType;

    public String getRegisterType() {
        if (StrUtil.isNotEmpty(this.registerType)) {
            return this.registerType.equals("0") ? "邀请注册" : "自主注册";
        }
        return registerType;
    }

    @ExcelProperty(value = "信息模板")
    @ColumnWidth(20)
    private String templateName;
    @ExcelProperty(value = "供应商类型")
    @ColumnWidth(20)
    @ExcelDict(value = "supplier_classify")
    private String supplierGenre;
    @ExcelProperty(value = "创建人")
    private String recommender;
    @ExcelProperty(value = "对账采购组名称")
    @ExcelDict(value = "purchaseGroupCode")
    private String purchaseGroupCode;
    @ExcelProperty(value = "审批意见")
    private String signUpRemark;

}
