package com.dxhy.common.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * @author Allen
 * @version 1.0.0
 * @ClassName CoreConstants.java
 * @Description core模块常量
 * @createTime 2023年08月16日 09:45:00
 */
@Component
@RefreshScope
public class CoreConstants {

    /**
     * 大企业接口发票全票面采集接口编码
     */
    public static final String invoiceGet = "INVOICE.GET";

    /**
     *大企业接口发票主信息采集接口编码
     */
    public static final String invoiceSelection = "INVOICE.SELECTION";

    /**
     *大企业接口发票状态采集接口编码
     */
    public static final String invoiceState = "INVOICE.STATE";

    /**
     *大企业接口数电发票源文件获取接口编码--武汉地区不支持
     */
    public static final String sourceFileGet = "SOURCE.FILE.GET";

    /**
     * 大企业接口数电发票源文件获取接口新版本--全地区支持
     **/
    public static final String sourceFileGetNew = "SOURCE.FILE.DOWN";

    /**
     *大企业接口增值税发票归集接口编码
     */
    public static final String taxInvoiceGet = "TAX.INVOICE.GET";

    /**
     *大企业 已入账发票采集 接口编码
     */
    public static final String alreadyRzInvoiceGj = "INVOICE.ACCOUNT.GET";

    /**
     *代扣代缴完税凭证采集
     */
    public static final String zzsdkdjwspzcj = "INVOICE.VOUCHER.GET";


    /**
     *代扣代缴完税凭证认证申请
     */
    public static final String zzsdkdjwspzrzsq = "INVOICE.VOUCHER.APPLY";

    /**
     *申请统计信息
     */
    public static final String applyState = "INVOICE.APPLYSTAT";

    /**
     *统计结果信息
     */
    public static final String applyStatResult = "INVOICE.APPLYSTATRES";

    /**
     *申请确认信息
     */
    public static final String applyConfirm = "INVOICE.APPLYCONFIRM";

    /**
     *确认结果信息
     */
    public static final String applyConfirmResult = "INVOICE.APPLYCONFIRMRES";

    /**
     *获取统计信息
     */
    public static final String applyCount = "INVOICE.APPLYCOUNT";

    /**
     *获取企业档案信息
     */
    public static final String taxperiod = "INVOICE.PERIOD.GET";

    /**
     *发票认证请求
     */
    public static final String applyLtgalize = "INVOICE.LEGALIZE";

    /**
     *发票认证结果获取
     */
    public static final String ltgalizeResult = "INVOICE.LEGALIZE_STATUS";

    /**
     *发票单张查验接口
     */
    public static final String invoiceCheckOne = "INVOICE.CHECK_ONE";

    /**
     *发票入账申请
     */
    public static final String invoiceRz = "INVOICE.ACCOUNT.APPLY";

    /**
     *出口转内销发票采集
     */
    public static final String exportInvoiceGet = "EXPORT.INVOICE.GET";

    /**
     *出口转内销发票申请认证
     */
    public static final String exportInvoiceLegalize = "EXPORT.INVOICE.LEGALIZE";

    /**
     *出口转内销发票认证结果获取
     */
    public static final String exportInvoiceLegalizeStatus = "EXPORT.INVOICE.LEGALIZE_STATUS";
    /**
     *出口转内销海关缴款书采集
     */
    public static final String exportCustomsGet = "EXPORT.CUSTOMS.GET";
    /**
     *出口转内销海关缴款书申请认证
     */
    public static final String exportCustomsLegalize = "EXPORT.CUSTOMS.LEGALIZE";
    /**
     *出口转内销海关缴款书认证结果获取
     */
    public static final String exportCustomsLegalizeStatus = "EXPORT.CUSTOMS.LEGALIZE_STATUS";
    /**
     *海关缴款书采集
     */
    public static final String customspcGet = "CUSTOMSPC.GET";
    /**
     *海关缴款书状态采集
     */
    public static final String customspcState = "CUSTOMSPC.STATE";
    /**
     *海关缴款书认证请求
     */
    public static final String customspcLegalize = "CUSTOMSPC.LEGALIZE";
    /**
     *海关缴款书认证结果获取
     */
    public static final String customspcLegalizeStatus = "CUSTOMSPC.LEGALIZE_STATUS";
    /**
     *海关缴款书申请录入
     */
    public static final String customspcEntry = "CUSTOMSPC.ENTRY";
    /**
     *海关缴款书录入结果获取
     */
    public static final String customspcEntryResult = "CUSTOMSPC.ENTRY_RESULT";


    /**
     *获取发票入账结果
     */
    public static final String invoiceRzResult = "INVOICE.ACCOUNT.APPLY.RESULT";

    /**
     *违规信息申请
     */
    public static final String applyViolation = "INVOICE.APPLY.VIOLATION";

    /**
     *违规信息获取
     */
    public static final String violationResult = "INVOICE.VIOLATION.RESULT";
    /**
     *企业票池获取发票下载查询条件
     */
    public static final String invoiceDown = "DOWNLOAD.APPLYQUERYPC";
    /**
     *企业票池获取下载发票数据
     */
    public static final String invoiceDownResult = "DOWNLOAD.APPLYPC";

    /**
     *确认密码设置
     */
    public static final String setPwd = "INVOICE.SET.PWD";

    /**
     *确认密码重置
     */
    public static final String resetPwd = "INVOICE.RESET.PWD";

    /**
     *代扣代缴完税凭证认证结果
     */
    public static final String zzsdkdjwspzrzjgcx = "INVOICE.VOUCHER.APPLY.RESULT";

    /**
     * 退税确认申请（电子税局）
     **/
    public static final String invoiceTsQrSq = "INVOICE.APPLY.REFUND";

    /**
     * 退税确认结果（电子税局）
     **/
    public static final String invoiceTsQrResult = "INVOICE.APPLY.REFUND.GET";


    public static final String reqText = "reqText";
    public static final String reqDate = "reqDate";
    public static final String resDate = "resDate";
    public static final String resText = "resText";

    private String dqyBaseUrl;

    /**
     *大企业接口调用地址
     */
    public static String collectUrl;

    /**
     *大企业发票下载接口调用地址
     */
    public static String invoiceDownUrl;

    /**
     *大企业电子源文件下载接口(新版)调用地址
     */
    public static String invoiceYwjDownUrl;

    /**
     *大企业接口企业平台编码
     */
    public static String enterpriseCode;

    /**
     *大企业接口版本号
     */
    public static String version;

    /**
     *大企业接口appId
     */
    public static String appId;

    /**
     *大企业接口aceId
     */
    public static String aceId;

    /**
     * 大企业接口aceKey
     */
    public static String aceKey;

    /**
     * 是否需要获取数据库企业权限标识  true：是  false：否
     */
    public static boolean enterprisePermissionFlag;
    /**
     * 是否开启lic授权  true：是  false：否
     */
    public static boolean authIsOpen;


    @Value("${jxpt.jxjk.url}")
    public void setDqyBaseUrl(String dqyBaseUrl) {
        this.dqyBaseUrl = dqyBaseUrl;
    }

    @Value("${jxjk.collectUrl}")
    public void setCollectUrl(String collectUrl) {
        this.collectUrl = collectUrl;
    }

    @Value("${jxjk.invoiceDownUrl}")
    public void setInvoiceDownUrl(String invoiceDownUrl) {
        this.invoiceDownUrl = invoiceDownUrl;
    }

    @Value("${jxpt.jxjk.url}")
    public void setInvoiceYwjDownUrl(String dqyBaseUrl) {
        this.invoiceYwjDownUrl = dqyBaseUrl + "/rest/invoice/invoiceDownFile";
    }

    @Value("${jxjk.enterpriseCode}")
    public void setEnterpriseCode(String enterpriseCode) {
        this.enterpriseCode = enterpriseCode;
    }

    @Value("${jxjk.version}")
    public void setVersion(String version) {
        this.version = version;
    }

    @Value("${jxjk.appId}")
    public void setAppId(String appId) {
        this.appId = appId;
    }

    @Value("${jxjk.secretId}")
    public void setAceId(String aceId) {
        this.aceId = aceId;
    }

    @Value("${jxjk.secretKey}")
    public void setAceKey(String aceKey) {
        this.aceKey = aceKey;
    }

    @Value("${jxjk.enterprisePermissionFlag}")
    public void setEnterprisePermissionFlag(boolean enterprisePermissionFlag) {
        this.enterprisePermissionFlag = enterprisePermissionFlag;
    }

    @Value("${auth.isOpen:false}")
    public void setAuthIsOpen(boolean authIsOpen) {
        this.authIsOpen = authIsOpen;
    }
}
