package org.dromara.payment.taxRecords.domain.vo;

import cn.hutool.core.util.StrUtil;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.payment.taxRecords.domain.MerTaxRecords;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 完税证明视图对象 mer_tax_records
 *
 * @author LionLi
 * @date 2024-05-06
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = MerTaxRecords.class)
public class MerTaxRecordsVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @ExcelProperty(value = "")
    private Long id;

    /**
     * 结算中心id
     */
    @ExcelProperty(value = "结算中心id")
    private Long sydId;

    /**
     * 结算中心编号
     */
    @ExcelProperty(value = "结算中心编号")
    private String sydNo;

    /**
     * 运营商编号
     */
    @ExcelProperty(value = "运营商编号")
    private String opNo;

    /**
     * 运营商id
     */
    @ExcelProperty(value = "运营商id")
    private Long opId;

    /**
     * 代理商id
     */
    @ExcelProperty(value = "代理商id")
    private Long channelId;

    /**
     * 代理商编号
     */
    @ExcelProperty(value = "代理商编号")
    private String channelNo;

    /**
     * 代理商上下级关系编码
     */
    @ExcelProperty(value = "代理商上下级关系编码")
    private String channelCode;

    /**
     * 商户id
     */
    @ExcelProperty(value = "商户id")
    private Long merId;

    /**
     * 商户编号
     */
    @ExcelProperty(value = "商户编号")
    private String merNo;

    /**
     * 所属月份
     */
    @ExcelProperty(value = "所属月份")
    private String month;

    /**
     * 开票流水号(多个逗号分隔)
     */
    @ExcelProperty(value = "开票流水号(多个逗号分隔)")
    private String invoiceNos;

    /**
     * 账单批次流水号(多个逗号分隔)
     */
    @ExcelProperty(value = "账单批次流水号(多个逗号分隔)")
    private String billNos;

    /**
     * 账单批次id(多个逗号分隔)
     */
    @ExcelProperty(value = "账单批次id(多个逗号分隔)")
    private String billIds;

    /**
     * 完税证明上传状态（0：未上传 1：已上传）
     */
    @ExcelProperty(value = "完税证明上传状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=：未上传,1=：已上传")
    private Integer taxStatus;

    public String getTaxStatusStr() {

        if(this.taxStatus != null){
            if( this.taxStatus == 1){
                taxStatusStr = "未上传";
            }else{
                taxStatusStr = "未上传";
            }
        }else{
            return "--";
        }

        return taxStatusStr;
    }

    private String taxStatusStr;


    /**
     * 完税证明zip文件路径
     */
    @ExcelProperty(value = "完税证明zip文件路径")
    private String taxFile;


    public String getOssId() {
        if(StringUtils.isNotEmpty(this.taxFile)){
            return StringUtils.getOssIdDomainFileName(this.taxFile);
        }else{
            return "";
        }
    }

    private String  ossId;

    /**
     * 完税证明备注
     */
    @ExcelProperty(value = "完税证明备注")
    private String taxRemark;

    private Date createTime;


    private String sydName;


    private String merName;



    private String sfzZip;

    private String hTzip;

    private String payZip;



}
