




class EnglishName(object):

    def __init__(self):
        pass

    def account_name_english_name(self):

        dic = {
            "CashEquivalents": "货币资金",
            "SettlementProvi": "结算备付金",
            "LendCapital": "拆出资金",
            "TradingAssets": "以公允价值计量且其变动计入当期损益的金融资产",
            "DerivativeFinancialAsset": "衍生金融资产",
            "BillReceivable": "应收票据",
            "AccountReceivable": "应收账款",
            "AdvancePayment": "预付款项",
            "InsuranceReceivables": "应收保费",
            "ReinsuranceReceivables": "应收分保账款",
            "ReinsuranceContractReservesReceivable": "应收分保合同准备金",
            "InterestReceivable": "应收利息",
            "DividendReceivable": "应收股利",
            "OtherReceivable": "其他应收款",
            "BoughtSellbackAssets": "买入返售金融资产",
            "Inventories": "存货",
            "ContractAssets": "合同资产",
            "HoldAssetsForSale": "持有待售资产",
            "NonCurrentAssetInOneYear": "一年内到期的非流动资产",
            "OtherCurrentAssets": "其他流动资产",
            "TotalCurrentAssets": "流动资产合计",
            "LoanAndAdvance": "发放贷款和垫款",
            "HoldForSaleAssets": "可供出售金融资产",
            "HoldToMaturityInvestments": "持有至到期投资",
            "LongtermReceivableAccount": "长期应收款",
            "LongtermEquityInvest": "长期股权投资",
            "InvestmentProperty": "投资性房地产",
            "FixedAssets": "固定资产",
            "ConstruInProcess": "在建工程",
            "BiologicalAssets": "生产性生物资产",
            "OilGasAssets": "油气资产",
            "IntangibleAssets": "无形资产",
            "DevelopmentExpenditure": "开发支出",
            "GoodWill": "商誉",
            "LongDeferredExpense": "长期待摊费用",
            "DeferredTaxAssets": "递延所得税资产",
            "OtherNoncurrentAssets": "其他非流动资产",
            "TotalNonCurrentAssets": "非流动资产合计",
            "TotalAssets": "资产总计",
            "ShorttermLoan": "短期借款",
            "BorrowingFromCentralbank": "向中央银行借款",
            "DepositInInterbank": "吸收存款及同业存放",
            "BorrowingCapital": "拆入资金",
            "TradingLiability": "以公允价值计量且其变动计入当期损益的金融负债",
            "DerivativeFinancialLiability": "衍生金融负债",
            "NotesPayable": "应付票据",
            "AccountsPayable": "应付账款",
            "AdvancePeceipts": "预收款项",
            "ContractLiabilities": "合同负债",
            "SoldBuybackSecuProceeds": "卖出回购金融资产款",
            "CommissionPayable": "应付手续费及佣金",
            "SalariesPayable": "应付职工薪酬",
            "TaxsPayable": "应交税费",
            "InterestPayable": "应付利息",
            "DividendPayable": "应付股利",
            "OtherPayable": "其他应付款",
            "ReinsurancePayables": "应付分保账款",
            "InsuranceContractReserves": "保险合同准备金",
            "ProxySecuProceeds": "代理买卖证券款",
            "ReceivingsFromVicariouslySoldSecurities": "代理承销证券款",
            "HoldLiabilitiesForSale": "持有待售负债",
            "NonCurrentLiabilityInOneYear": "一年内到期的非流动负债",
            "OtherCurrentLiabilities": "其他流动负债",
            "TotalCurrentLiability": "流动负债合计",
            "LongtermLoan": "长期借款",
            "BondsPayable": "应付债券",
            "PreferredSharesNoncurrent": "其中：优先股",
            "PepertualLiabilityNoncurrent": "永续债",
            "LongtermAccountPayable": "长期应付款",
            "LongtermSalariesPayable": "长期应付职工薪酬",
            "EstimateLiability": "预计负债",
            "DeferredEarning": "递延收益",
            "DeferredTaxLiability": "递延所得税负债",
            "OtherNoncurrentLiabilities": "其他非流动负债",
            "TotalNonCurrentLiability": "非流动负债合计",
            "TotalLiability": "负债合计",
            "TotalOwnerEquities": "股东权益合计",
            "OtherComprehesiveIncome": "其他综合收益",
            "TotalSheetOwnerEquities": "负债和股东权益合计",
            "TotalOperatingRevenue": "营业总收入",
            "OperatingRevenue": "其中：营业收入",
            "InterestIncome(TotalOperatingRevenue)": "利息收入",
            "PremiumsEarned": "已赚保费",
            "CommissionIncome": "手续费及佣金收入",
            "TotalOperatingCost": "营业总成本",
            "OperatingCost": "其中：营业成本",
            "InterestExpense": "利息支出",
            "CommissionExpense": "手续费及佣金支出",
            "RefundedPremiums": "退保金",
            "NetPayInsuranceClaims": "赔付支出净额",
            "WithdrawInsuranceContractReserve": "提取保险合同准备金净额",
            "PolicyDividendPayout": "保单红利支出",
            "ReinsuranceCost": "分保费用",
            "OperatingTaxSurcharges": "税金及附加",
            "SaleExpense": "销售费用",
            "AdministrationExpense": "管理费用",
            "RdExpenses": "研发费用",
            "FinancialExpense": "财务费用",
            "InterestCharges": "其中：利息费用",
            "InterestIncome": "利息收入",
            "AssetImpairmentLoss": "资产减值损失",
            "OtherEarnings": "加：其他收益",
            "InvestmentIncome": "投资收益",
            "InvestIncomeAssociates": "其中：对联营企业和合营企业的投资收益",
            "FairValueVariableIncome": "公允价值变动收益",
            "ExchangeIncome": "汇兑收益",
            "AssetDealIncome": "资产处置收益",
            "OperatingProfit": "营业利润",
            "NonOperatingRevenue": "加：营业外收入",
            "NonOperatingExpense": "减：营业外支出",
            "TotalProfit": "利润总额",
            "IncomeTax": "减：所得税费用",
            "NetProfit": "净利润",
            "NetProfitFromGoingConcern": "持续经营净利润",
            "NetProfitAfterOperation": "终止经营净利润",
            "NpParentCompanyOwners": "归属于母公司所有者的净利润",
            "MinorityProfit": "少数股东损益",
            "NetAfterTaxOfOtherComprehensiveIncome": "其他综合收益的税后净额",
            "TotalCompositeIncome": "综合收益总额",
            "CiParentCompanyOwners": "归属于母公司所有者的综合收益总额",
            "CiMinorityOwners": "归属于少数股东的综合收益总额",
            "GoodsSaleAndServiceRenderCash": "销售商品、提供劳务收到的现金",
            "NetDepositIncrease": "客户存款和同业存放款项净增加额",
            "NetBorrowingFromCentralBank": "向中央银行借款净增加额",
            "NetBorrowingFromFinanceCo": "向其他金融机构拆入资金净增加额",
            "NetOriginalInsuranceCash": "收到原保险合同保费取得的现金",
            "NetCashReceivedFromReinsuranceBusiness": "收到再保险业务现金净额",
            "NetInsurerDepositInvestment": "保户储金及投资款净增加额",
            "NetDealTradingAssets": "处置以公允价值计量且其变动计入当期损益的金融资产净增加额",
            "InterestAndCommissionCashin": "收取利息、手续费及佣金的现金",
            "NetIncreaseInPlacements": "拆入资金净增加额",
            "NetBuyback": "回购业务资金净增加额",
            "TaxLevyRefund": "收到的税费返还",
            "OtherCashInRelatedOperate": "收到其他与经营活动有关的现金",
            "SubtotalOperateCashInflow": "经营活动现金流入小计",

            # "NetOperateCashFlow": "经营活动产生的现金流量净额",
            "InvestWithdrawalCash": "收回投资收到的现金",
            "InvestProceeds": "取得投资收益收到的现金",
            "FixIntanOtherAssetDispoCash": "处置固定资产、无形资产和其他长期资产收回的现金净额",
            "NetCashDealSubcompany": "处置子公司及其他营业单位收到的现金净额",
            "OtherCashInRelatedInvest": "收到的其他与投资活动有关的现金",
            "SubtotalInvestCashInflow": "投资活动现金流入小计",

            # "NetInvestCashFlow": "投资活动产生的现金流量净额",
            "CashFromInvest": "吸收投资收到的现金",
            "CashFromMinoSInvestSub": "其中：子公司吸收少数股东投资收到的现金",
            "CashFromBorrowing": "取得借款收到的现金",
            "CashFromBondsIssue": "发行债券收到的现金",
            "OtherCashInRelatedFinance": "收到其他与筹资活动有关的现金",
            "SubtotalFinanceCashInflow": "筹资活动现金流入小计",

            "GoodsAndServicesCashPaid": "购买商品、接受劳务支付的现金",
            "NetLoanAndAdvanceIncrease": "客户贷款及垫款净增加额",
            "NetDepositInCbAndIb": "存放中央银行和同业款项净增加额",
            "OriginalCompensationPaid": "支付原保险合同赔付款项的现金",
            "HandlingChargesAndCommission": "支付利息、手续费及佣金的现金",
            "PolicyDividendCashPaid": "支付保单红利的现金",
            "StaffBehalfPaid": "支付给职工以及为职工支付的现金",
            "TaxPayments": "支付的各项税费",
            "OtherOperateCashPaid": "支付的其他与经营活动有关的现金",
            "SubtotalOperateCashOutflow": "经营活动现金流出小计",

            "FixIntanOtherAssetAcquiCash": "购建固定资产、无形资产和其他长期资产支付的现金",
            "InvestCashPaid": "投资支付的现金",
            "ImpawnedLoanNetIncrease": "质押贷款净增加额",
            "NetCashFromSubCompany": "取得子公司及其他营业单位支付的现金净额",
            "OtherInvestCashPaid": "支付的其他与投资活动有关的现金",
            "SubtotalInvestCashOutflow": "投资活动现金流出小计",

            "BorrowingRepayment": "偿还债务支付的现金",
            "DividendInterestPayment": "分配股利、利润或偿付利息支付的现金",
            "ProceedsFromSubToMinoS": "其中：子公司支付给少数股东的股利、利润",
            "OtherFinanceCashPaid": "支付的其他与筹资活动有关的现金",
            "SubtotalFinanceCashOutflow": "筹资活动现金流出小计",

            # "NetFinanceCashFlow": "筹资活动产生的现金流量净额",
            # "ExchangeRateChangeEffect": "汇率变动对现金及现金等价物的影响",
            # "CashEquivalentIncrease": "现金及现金等价物净增加额",
            # "CashEquivalentsAtBeginning": "加：年初现金及现金等价物余额",
            # "CashAndEquivalentsAtEnd": "期末现金及现金等价物余额",

        }
        return dic

    def fiance_ratio_english_name(self):

        dic = {
            "CurrentRatio": "流动比率",
            "QuickRatio": "速动比率",
            "SuperQuickRatio": "超速动比率",
            "DebtAssetsRatio": "资产负债率(%)",
            "DebtEquityRatio": "产权比率",
            "SEWithoutMIToTL": "归属母公司股东产权比率",
            "SEWMIToInterestBearDebt": "归属母公司股东的权益带息债务率",
            "DebtTangibleEquityRatio": "有形净值债务率",
            "InterestCover": "利息保障倍数",
            "LongDebtToWorkingCapital": "长期负债与营运资金比率",
            "OperCashInToCurrentDebt": "现金流动负债比",
            "CurrentAssetsToTA": "流动资产／总资产(%)",
            "NonCurrentAssetsToTA": "非流动资产／总资产(%)",
            "FixAssetRatio": "固定资产比率(%)",
            "IntangibleAssetRatio": "无形资产比率(%)",
            "LongDebtToAsset": "长期借款/总资产(%)",
            "BondsPayableToAsset": "应付债券/总资产(%)",
            "CurrentLiabilityToTL": "流动负债／负债合计(%)",
            "NonCurrentLiabilityToTL": "非流动负债／负债合计(%)",
            "EquityToAsset": "股东权益比率(%)",
            "EquityMultipler": "权益乘数",
            "LongDebtToEquity": "长期负债/股东权益合计",
            "NetAssetGrowRate": "净资产增长率",
            "TotalAssetGrowRate": "总资产增长率",
            "SEWithoutMIGrowRateYTD": "归属母公司股东的权益增长率",
             "TotalAssetTRate": "总资产周转率",
            "ARTRate": "应收账款周转率",
            "InventoryTRate": "存货周转率",
            "AccountsPayablesTRate": "应付账款周转率",
            "ARTDays": "应收账款周转天数",
            "InventoryTDays": "存货周转天数",
            "AccountsPayablesTDays": "应付账款周转天数",
            "OperCycle": "营业周期",
            "CurrentAssetsTRate": "流动资产周转率",
            "FixedAssetTRate": "固定资产周转率",
            "EquityTRate": "股东权益周转率",
            "NPToTOR": "净利润率",
            "NPToTORTTM": "净利润率(TTM)",
            "NetProfitRatio": "销售净利率",
            "NetProfitRatioTTM": "销售净利率TTM",
            "GrossIncomeRatio": "销售毛利率",
            "GrossIncomeRatioTTM": "销售毛利率(TTM)",
            "OperatingProfitToTOR": "营业利润率",
            "OperatingProfitToTORTTM": "营业利润率TTM",
            "EBITToTOR": "息税前利润率",
            "EBITToTORTTM": "息税前利润率TTM",
            "ROEAvg": "净资产收益率_平均",
            "ROE": "净资产收益率_摊薄",
            "ROETTM": "净资产收益率(TTM)",
            "NAORYOY": "净资产收益率(摊薄)同比增长",
            "ROA_EBIT": "总资产报酬率(EBIT)",
            "ROA_EBITTTM": "总资产报酬率(EBIT_TTM)",
            "OperatingRevenueGrowRate": "营业收入同比增长(%)",
            "NPParentCompanyYOY": "归属母公司股东的净利润同比增长",
            "ROA": "总资产净利率",
            "SalesCostRatio": "销售成本率",
            "PeriodCostsRate": "销售期间费用率",
            "TOperatingCostToTOR": "营业总成本率",
            "TOperatingCostToTORTTM": "营业总成本率TTM",
            "OperatingExpenseRate": "销售费用率",
            "OperatingExpenseRateTTM": "销售费用率TTM",
            "AdminiExpenseRate": "管理费用率",
            "AdminiExpenseRateTTM": "管理费用率TTM",
            "FinancialExpenseRate": "财务费用率",
            "FinancialExpenseRateTTM": "财务费用率TTM",
            "AssetImpaLossToTOR": "资产减值损失率",
            "AssetImpaLossToTORTTM": "资产减值损失率TTM",
            "OperatingProfitRatio": "营业利润率",
            "TotalProfitCostRatio": "成本费用利润率",
            "NetOperateCashFlowYOY": "经营活动产生的现金流量净额同比增长",
            "SaleServiceCashToOR": "销售商品提供劳务收到的现金/营业收入",
            "SaleServiceCashToORTTM": "销售商品提供劳务收到的现金/营业收入(TTM)",
            "CashRateOfSalesTTM": "经营活动产生的现金流量净额/营业收入(TTM)",
            "NOCFToOperatingNI": "经营活动产生的现金流量净额/经营活动净收益",
            "NOCFToOperatingNITTM": "经营活动产生的现金流量净额/经营活动净收益(TTM)",
            "NetProfitCashCover": "净利润现金含量",
            "OperatingRevenueCashCover": "营业收入现金含量",
            "OperCashInToAsset": "总资产现金回收率",

        }
        return dic

    def merge(self, dict1, dict2):
        res = {**dict1, **dict2}
        return res

    def english_dictionary(self):
        combine = self.merge(self.account_name_english_name(), self.fiance_ratio_english_name())
        dic = {k: v for v, k in combine.items()}  # 键值互换
        return dic

