From fe5f303241095a5228585bb1ab639408b477e4b5 Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Fri, 12 Sep 2025 00:20:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=B4=A2=E5=8A=A1?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E7=9A=84=E6=8E=A5=E5=8F=A3=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../leopard/core/entity/BalanceSheet.java | 10 ++-- .../leopard/core/entity/CashFlow.java | 18 +++---- .../leopard/core/entity/Income.java | 2 - .../server/service/TuShareService.java | 27 +++++----- .../src/test/resources/tushare.http | 54 ++++++++++++++++--- 5 files changed, 74 insertions(+), 37 deletions(-) diff --git a/leopard-core/src/main/java/com/lanyuanxiaoyao/leopard/core/entity/BalanceSheet.java b/leopard-core/src/main/java/com/lanyuanxiaoyao/leopard/core/entity/BalanceSheet.java index e1239b4..d688da3 100644 --- a/leopard-core/src/main/java/com/lanyuanxiaoyao/leopard/core/entity/BalanceSheet.java +++ b/leopard-core/src/main/java/com/lanyuanxiaoyao/leopard/core/entity/BalanceSheet.java @@ -36,7 +36,7 @@ public class BalanceSheet extends SimpleEntity { private Double endingTotalShares; @Comment("原始名称:cap_rese,描述:资本公积金") private Double capitalSurplus; - @Comment("原始名称:undist_profit,描述:未分配利润") + @Comment("原始名称:undistr_porfit,描述:未分配利润") private Double undistributedProfit; @Comment("原始名称:money_cap,描述:货币资金") private Double monetaryFunds; @@ -68,17 +68,17 @@ public class BalanceSheet extends SimpleEntity { private Double accountsPayable; @Comment("原始名称:adv_receipts,描述:预收款项") private Double advancesReceived; - @Comment("原始名称:total_cur_lab,描述:流动负债合计") + @Comment("原始名称:total_cur_liab,描述:流动负债合计") private Double totalCurrentLiabilities; @Comment("原始名称:total_ncl,描述:非流动负债合计") private Double totalNonCurrentLiabilities; - @Comment("原始名称:total_lab,描述:负债合计") + @Comment("原始名称:total_liab,描述:负债合计") private Double totalLiabilities; @Comment("原始名称:total_hldr_eqy_exc_min_int,描述:股东权益合计(不含少数股东权益)") private Double totalShareholdersEquityExcludingMinorityInterest; @Comment("原始名称:total_hldr_eqy_inc_min_int,描述:股东权益合计(含少数股东权益)") private Double totalShareholdersEquityIncludingMinorityInterest; - @Comment("原始名称:total_lab_hldr_eqy,描述:负债及股东权益总计") + @Comment("原始名称:total_liab_hldr_eqy,描述:负债及股东权益总计") private Double totalLiabilitiesAndShareholdersEquity; @Comment("原始名称:acc_receivable,描述:应收款项") private Double receivables; @@ -86,7 +86,7 @@ public class BalanceSheet extends SimpleEntity { private Double payables; @Comment("原始名称:accounts_receiv_bill,描述:应收票据及应收账款") private Double notesAndAccountsReceivable; - @Comment("原始名称:accounts_pay_bill,描述:应付票据及应付账款") + @Comment("原始名称:accounts_pay,描述:应付票据及应付账款") private Double notesAndAccountsPayable; @Comment("原始名称:oth_rcv_total,描述:其他应收款(合计)(元)") private Double otherReceivablesTotal; diff --git a/leopard-core/src/main/java/com/lanyuanxiaoyao/leopard/core/entity/CashFlow.java b/leopard-core/src/main/java/com/lanyuanxiaoyao/leopard/core/entity/CashFlow.java index ca7a8ec..d9e84b9 100644 --- a/leopard-core/src/main/java/com/lanyuanxiaoyao/leopard/core/entity/CashFlow.java +++ b/leopard-core/src/main/java/com/lanyuanxiaoyao/leopard/core/entity/CashFlow.java @@ -34,25 +34,25 @@ public class CashFlow extends SimpleEntity { private Integer year; @Comment("原始名称:net_profit,描述:净利润") private Double netProfit; - @Comment("原始名称:fin_exp,描述:财务费用") + @Comment("原始名称:finan_exp,描述:财务费用") private Double financialExpense; - @Comment("原始名称:c_f_sale_sg,描述:销售商品、提供劳务收到的现金") + @Comment("原始名称:c_fr_sale_sg,描述:销售商品、提供劳务收到的现金") private Double cashReceivedFromSalesAndServices; - @Comment("原始名称:c_f_oth_oper_a,描述:经营活动现金流入小计") + @Comment("原始名称:c_inf_fr_operate_a,描述:经营活动现金流入小计") private Double subtotalOfCashInflowsFromOperatingActivities; @Comment("原始名称:c_paid_to_for_empl,描述:支付给职工以及为职工支付的现金") private Double cashPaidToAndForEmployees; @Comment("原始名称:c_paid_for_taxes,描述:支付的各项税费") private Double cashPaidForVariousTaxes; - @Comment("原始名称:st_cashflow_act,描述:经营活动产生的现金流量净额") + @Comment("原始名称:n_cashflow_act,描述:经营活动产生的现金流量净额") private Double netCashFlowFromOperatingActivities; - @Comment("原始名称:stoc_inflows_inv_act,描述:投资活动现金流入小计") + @Comment("原始名称:stot_inflows_inv_act,描述:投资活动现金流入小计") private Double subtotalOfCashInflowsFromInvestingActivities; - @Comment("原始名称:c_paid_subs_oth_biz,描述:购置固定资产、无形资产和其他长期资产支付的现金") - private Double cashPaidForAcquisitionOfFixedIntangibleAndOtherLongTermAssets; - @Comment("原始名称:stoc_cashout_inv_act,描述:投资活动现金流出小计") + @Comment("原始名称:c_pay_acq_const_fiolta,描述:购置固定资产、无形资产和其他长期资产支付的现金") + private Double cashPaidForLongTermAssets; + @Comment("原始名称:stot_out_inv_act,描述:投资活动现金流出小计") private Double subtotalOfCashOutflowsFromInvestingActivities; - @Comment("原始名称:stoc_cashout_fin_act,描述:筹资活动现金流出小计") + @Comment("原始名称:stot_cashout_fnc_act,描述:筹资活动现金流出小计") private Double subtotalOfCashOutflowsFromFinancingActivities; @Comment("原始名称:c_cash_equ_beg_period,描述:期初现金及现金等价物余额") private Double beginningBalanceOfCashAndCashEquivalents; diff --git a/leopard-core/src/main/java/com/lanyuanxiaoyao/leopard/core/entity/Income.java b/leopard-core/src/main/java/com/lanyuanxiaoyao/leopard/core/entity/Income.java index 0d46182..8415134 100644 --- a/leopard-core/src/main/java/com/lanyuanxiaoyao/leopard/core/entity/Income.java +++ b/leopard-core/src/main/java/com/lanyuanxiaoyao/leopard/core/entity/Income.java @@ -72,8 +72,6 @@ public class Income extends SimpleEntity { private Double comprehensiveIncomeAttributableToMinorityShareholders; @Comment("原始名称:ebit,描述:息税前利润") private Double earningsBeforeInterestAndTax; - @Comment("原始名称:ebida,描述:息税折旧摊销前利润") - private Double earningsBeforeInterestTaxDepreciationAndAmortization; @Comment("原始名称:undist_profit,描述:年初未分配利润") private Double beginningUndistributedProfit; @Comment("原始名称:distable_profit,描述:可分配利润") diff --git a/leopard-server/src/main/java/com/lanyuanxiaoyao/leopard/server/service/TuShareService.java b/leopard-server/src/main/java/com/lanyuanxiaoyao/leopard/server/service/TuShareService.java index a453651..2bce51e 100644 --- a/leopard-server/src/main/java/com/lanyuanxiaoyao/leopard/server/service/TuShareService.java +++ b/leopard-server/src/main/java/com/lanyuanxiaoyao/leopard/server/service/TuShareService.java @@ -134,7 +134,6 @@ public class TuShareService { "compr_inc_attr_p", "compr_inc_attr_m_s", "ebit", - "ebida", "undist_profit", "distable_profit", "rd_exp", @@ -159,7 +158,7 @@ public class TuShareService { "ts_code", "total_share", "cap_rese", - "undist_profit", + "undistr_porfit", "money_cap", "accounts_receiv", "inventories", @@ -175,16 +174,16 @@ public class TuShareService { "st_borr", "acct_payable", "adv_receipts", - "total_cur_lab", + "total_cur_liab", "total_ncl", - "total_lab", + "total_liab", "total_hldr_eqy_exc_min_int", "total_hldr_eqy_inc_min_int", - "total_lab_hldr_eqy", + "total_liab_hldr_eqy", "acc_receivable", "payables", "accounts_receiv_bill", - "accounts_pay_bill", + "accounts_pay", "oth_rcv_total", "fix_assets_total" ) @@ -204,16 +203,16 @@ public class TuShareService { List.of( "ts_code", "net_profit", - "fin_exp", - "c_f_sale_sg", - "c_f_oth_oper_a", + "finan_exp", + "c_fr_sale_sg", + "c_inf_fr_operate_a", "c_paid_to_for_empl", "c_paid_for_taxes", - "st_cashflow_act", - "stoc_inflows_inv_act", - "c_paid_subs_oth_biz", - "stoc_cashout_inv_act", - "stoc_cashout_fin_act", + "n_cashflow_act", + "stot_inflows_inv_act", + "c_pay_acq_const_fiolta", + "stot_out_inv_act", + "stot_cashout_fnc_act", "c_cash_equ_beg_period", "c_cash_equ_end_period" ) diff --git a/leopard-server/src/test/resources/tushare.http b/leopard-server/src/test/resources/tushare.http index 94507c4..2aaa3be 100644 --- a/leopard-server/src/test/resources/tushare.http +++ b/leopard-server/src/test/resources/tushare.http @@ -171,8 +171,20 @@ Content-Type: application/json "period": "20231231" }, "fields": [ - "ann_date", - "n_cashflow_act" + "ts_code", + "net_profit", + "finan_exp", + "c_fr_sale_sg", + "c_inf_fr_operate_a", + "c_paid_to_for_empl", + "c_paid_for_taxes", + "n_cashflow_act", + "stot_inflows_inv_act", + "c_pay_acq_const_fiolta", + "stot_out_inv_act", + "stot_cashout_fnc_act", + "c_cash_equ_beg_period", + "c_cash_equ_end_period" ] } @@ -181,16 +193,44 @@ POST {{api_url}} Content-Type: application/json { - "api_name": "balancesheet", + "api_name": "balancesheet_vip", "token": "{{api_key}}", "params": { - "ts_code": "000002.SZ", - "period": "20231231" + "ts_code": "000001.SZ", + "period": "20241231" }, "fields": [ - "ann_date", + "ts_code", + "total_share", + "cap_rese", + "undistr_porfit", + "money_cap", + "accounts_receiv", + "inventories", + "total_cur_assets", + "lt_eqt_invest", + "lt_rec", + "fix_assets", + "r_and_d", + "goodwill", + "total_nca", + "total_assets", + "lt_borr", + "st_borr", + "acct_payable", + "adv_receipts", "total_cur_liab", - "oth_cur_liab" + "total_ncl", + "total_liab", + "total_hldr_eqy_exc_min_int", + "total_hldr_eqy_inc_min_int", + "total_liab_hldr_eqy", + "acc_receivable", + "payables", + "accounts_receiv_bill", + "accounts_pay", + "oth_rcv_total", + "fix_assets_total" ] }