perf: 优化财务数据的采集和显示
This commit is contained in:
@@ -1,95 +0,0 @@
|
||||
package com.lanyuanxiaoyao.leopard.core.entity;
|
||||
|
||||
import com.lanyuanxiaoyao.leopard.core.Constants;
|
||||
import com.lanyuanxiaoyao.service.template.entity.SimpleEntity;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.EntityListeners;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.FieldNameConstants;
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
/**
|
||||
* 资产负债表
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@ToString(callSuper = true)
|
||||
@FieldNameConstants
|
||||
@Entity
|
||||
@DynamicUpdate
|
||||
@DynamicInsert
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
@Table(name = Constants.DATABASE_PREFIX + "balance_sheet")
|
||||
public class BalanceSheet extends SimpleEntity {
|
||||
@ManyToOne
|
||||
private Stock stock;
|
||||
@Comment("年报年度")
|
||||
private Integer year;
|
||||
@Comment("原始名称:total_share,描述:期末总股本")
|
||||
private Double endingTotalShares;
|
||||
@Comment("原始名称:cap_rese,描述:资本公积金")
|
||||
private Double capitalSurplus;
|
||||
@Comment("原始名称:undistr_porfit,描述:未分配利润")
|
||||
private Double undistributedProfit;
|
||||
@Comment("原始名称:money_cap,描述:货币资金")
|
||||
private Double monetaryFunds;
|
||||
@Comment("原始名称:accounts_receiv,描述:应收账款")
|
||||
private Double accountsReceivable;
|
||||
@Comment("原始名称:inventories,描述:存货")
|
||||
private Double inventories;
|
||||
@Comment("原始名称:total_cur_assets,描述:流动资产合计")
|
||||
private Double totalCurrentAssets;
|
||||
@Comment("原始名称:lt_eqt_invest,描述:长期股权投资")
|
||||
private Double longTermEquityInvestments;
|
||||
@Comment("原始名称:lt_rec,描述:长期应收款")
|
||||
private Double longTermReceivables;
|
||||
@Comment("原始名称:fix_assets,描述:固定资产")
|
||||
private Double fixedAssets;
|
||||
@Comment("原始名称:r_and_d,描述:研发支出")
|
||||
private Double researchAndDevelopmentExpenditures;
|
||||
@Comment("原始名称:goodwill,描述:商誉")
|
||||
private Double goodwill;
|
||||
@Comment("原始名称:total_nca,描述:非流动资产合计")
|
||||
private Double totalNonCurrentAssets;
|
||||
@Comment("原始名称:total_assets,描述:资产总计")
|
||||
private Double totalAssets;
|
||||
@Comment("原始名称:lt_borr,描述:长期借款")
|
||||
private Double longTermBorrowings;
|
||||
@Comment("原始名称:st_borr,描述:短期借款")
|
||||
private Double shortTermBorrowings;
|
||||
@Comment("原始名称:acct_payable,描述:应付账款")
|
||||
private Double accountsPayable;
|
||||
@Comment("原始名称:adv_receipts,描述:预收款项")
|
||||
private Double advancesReceived;
|
||||
@Comment("原始名称:total_cur_liab,描述:流动负债合计")
|
||||
private Double totalCurrentLiabilities;
|
||||
@Comment("原始名称:total_ncl,描述:非流动负债合计")
|
||||
private Double totalNonCurrentLiabilities;
|
||||
@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_liab_hldr_eqy,描述:负债及股东权益总计")
|
||||
private Double totalLiabilitiesAndShareholdersEquity;
|
||||
@Comment("原始名称:acc_receivable,描述:应收款项")
|
||||
private Double receivables;
|
||||
@Comment("原始名称:payables,描述:应付款项")
|
||||
private Double payables;
|
||||
@Comment("原始名称:accounts_receiv_bill,描述:应收票据及应收账款")
|
||||
private Double notesAndAccountsReceivable;
|
||||
@Comment("原始名称:accounts_pay,描述:应付票据及应付账款")
|
||||
private Double notesAndAccountsPayable;
|
||||
@Comment("原始名称:oth_rcv_total,描述:其他应收款(合计)(元)")
|
||||
private Double otherReceivablesTotal;
|
||||
@Comment("原始名称:fix_assets_total,描述:固定资产(合计)(元)")
|
||||
private Double fixedAssetsTotal;
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
package com.lanyuanxiaoyao.leopard.core.entity;
|
||||
|
||||
import com.lanyuanxiaoyao.leopard.core.Constants;
|
||||
import com.lanyuanxiaoyao.service.template.entity.SimpleEntity;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.EntityListeners;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.FieldNameConstants;
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
/**
|
||||
* 现金流量表
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@ToString(callSuper = true)
|
||||
@FieldNameConstants
|
||||
@Entity
|
||||
@DynamicUpdate
|
||||
@DynamicInsert
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
@Table(name = Constants.DATABASE_PREFIX + "cash_flow")
|
||||
public class CashFlow extends SimpleEntity {
|
||||
@ManyToOne
|
||||
private Stock stock;
|
||||
@Comment("年报年度")
|
||||
private Integer year;
|
||||
@Comment("原始名称:net_profit,描述:净利润")
|
||||
private Double netProfit;
|
||||
@Comment("原始名称:finan_exp,描述:财务费用")
|
||||
private Double financialExpense;
|
||||
@Comment("原始名称:c_fr_sale_sg,描述:销售商品、提供劳务收到的现金")
|
||||
private Double cashReceivedFromSalesAndServices;
|
||||
@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("原始名称:n_cashflow_act,描述:经营活动产生的现金流量净额")
|
||||
private Double netCashFlowFromOperatingActivities;
|
||||
@Comment("原始名称:stot_inflows_inv_act,描述:投资活动现金流入小计")
|
||||
private Double subtotalOfCashInflowsFromInvestingActivities;
|
||||
@Comment("原始名称:c_pay_acq_const_fiolta,描述:购置固定资产、无形资产和其他长期资产支付的现金")
|
||||
private Double cashPaidForLongTermAssets;
|
||||
@Comment("原始名称:stot_out_inv_act,描述:投资活动现金流出小计")
|
||||
private Double subtotalOfCashOutflowsFromInvestingActivities;
|
||||
@Comment("原始名称:stot_cashout_fnc_act,描述:筹资活动现金流出小计")
|
||||
private Double subtotalOfCashOutflowsFromFinancingActivities;
|
||||
@Comment("原始名称:c_cash_equ_beg_period,描述:期初现金及现金等价物余额")
|
||||
private Double beginningBalanceOfCashAndCashEquivalents;
|
||||
@Comment("原始名称:c_cash_equ_end_period,描述:期末现金及现金等价物余额")
|
||||
private Double endingBalanceOfCashAndCashEquivalents;
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
package com.lanyuanxiaoyao.leopard.core.entity;
|
||||
|
||||
import com.lanyuanxiaoyao.leopard.core.Constants;
|
||||
import com.lanyuanxiaoyao.service.template.entity.SimpleEntity;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.EntityListeners;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.FieldNameConstants;
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
/**
|
||||
* 利润表
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@ToString(callSuper = true)
|
||||
@FieldNameConstants
|
||||
@Entity
|
||||
@DynamicUpdate
|
||||
@DynamicInsert
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
@Table(name = Constants.DATABASE_PREFIX + "income")
|
||||
public class Income extends SimpleEntity {
|
||||
@ManyToOne
|
||||
private Stock stock;
|
||||
@Comment("年报年度")
|
||||
private Integer year;
|
||||
@Comment("原始名称:basic_eps,描述:基本每股收益")
|
||||
private Double basicEarningsPerShare;
|
||||
@Comment("原始名称:diluted_eps,描述:稀释每股收益")
|
||||
private Double dilutedEarningsPerShare;
|
||||
@Comment("原始名称:total_revenue,描述:营业总收入")
|
||||
private Double totalOperatingRevenue;
|
||||
@Comment("原始名称:revenue,描述:营业收入")
|
||||
private Double operatingRevenue;
|
||||
@Comment("原始名称:total_cogs,描述:营业总成本")
|
||||
private Double totalOperatingCost;
|
||||
@Comment("原始名称:oper_cost,描述:减:营业成本")
|
||||
private Double operatingCost;
|
||||
@Comment("原始名称:sell_exp,描述:减:销售费用")
|
||||
private Double sellingExpense;
|
||||
@Comment("原始名称:admin_exp,描述:减:管理费用")
|
||||
private Double administrativeExpense;
|
||||
@Comment("原始名称:fin_exp,描述:减:财务费用")
|
||||
private Double financialExpense;
|
||||
@Comment("原始名称:oper_exp,描述:营业支出")
|
||||
private Double operatingExpense;
|
||||
@Comment("原始名称:operate_profit,描述:营业利润")
|
||||
private Double operatingProfit;
|
||||
@Comment("原始名称:non_oper_income,描述:加:营业外收入")
|
||||
private Double addNonOperatingIncome;
|
||||
@Comment("原始名称:non_oper_exp,描述:减:营业外支出")
|
||||
private Double lessNonOperatingExpense;
|
||||
@Comment("原始名称:total_profit,描述:利润总额")
|
||||
private Double totalProfit;
|
||||
@Comment("原始名称:income_tax,描述:所得税费用")
|
||||
private Double incomeTaxExpense;
|
||||
@Comment("原始名称:n_income,描述:净利润(含少数股东损益)")
|
||||
private Double netProfitIncludingMinorityInterest;
|
||||
@Comment("原始名称:n_income_attr_p,描述:净利润(不含少数股东损益)")
|
||||
private Double netProfitExcludingMinorityInterest;
|
||||
@Comment("原始名称:compr_inc_attr_p,描述:归属于母公司(或股东)的综合收益总额")
|
||||
private Double comprehensiveIncomeAttributableToParent;
|
||||
@Comment("原始名称:compr_inc_attr_m_s,描述:归属于少数股东的综合收益总额")
|
||||
private Double comprehensiveIncomeAttributableToMinorityShareholders;
|
||||
@Comment("原始名称:ebit,描述:息税前利润")
|
||||
private Double earningsBeforeInterestAndTax;
|
||||
@Comment("原始名称:undist_profit,描述:年初未分配利润")
|
||||
private Double beginningUndistributedProfit;
|
||||
@Comment("原始名称:distable_profit,描述:可分配利润")
|
||||
private Double distributableProfit;
|
||||
@Comment("原始名称:rd_exp,描述:研发费用")
|
||||
private Double researchAndDevelopmentExpense;
|
||||
@Comment("原始名称:fin_exp_int_exp,描述:财务费用-利息费用")
|
||||
private Double financialExpenseInterestExpense;
|
||||
@Comment("原始名称:continued_net_profit,描述:持续经营净利润")
|
||||
private Double netProfitFromContinuingOperations;
|
||||
@Comment("原始名称:end_net_profit,描述:终止经营净利润")
|
||||
private Double netProfitFromDiscontinuedOperations;
|
||||
}
|
||||
@@ -61,18 +61,6 @@ public class Stock extends SimpleEntity {
|
||||
@ToString.Exclude
|
||||
private Set<Daily> dailies;
|
||||
|
||||
@OneToMany(mappedBy = "stock", cascade = CascadeType.REMOVE)
|
||||
@ToString.Exclude
|
||||
private Set<Income> incomes;
|
||||
|
||||
@OneToMany(mappedBy = "stock", cascade = CascadeType.REMOVE)
|
||||
@ToString.Exclude
|
||||
private Set<BalanceSheet> balanceSheets;
|
||||
|
||||
@OneToMany(mappedBy = "stock", cascade = CascadeType.REMOVE)
|
||||
@ToString.Exclude
|
||||
private Set<CashFlow> cashFlows;
|
||||
|
||||
@OneToMany(mappedBy = "stock", cascade = CascadeType.REMOVE)
|
||||
@ToString.Exclude
|
||||
private Set<FinanceIndicator> indicators;
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.lanyuanxiaoyao.leopard.core.repository;
|
||||
|
||||
import com.lanyuanxiaoyao.leopard.core.entity.BalanceSheet;
|
||||
import com.lanyuanxiaoyao.service.template.repository.SimpleRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author lanyuanxiaoyao
|
||||
* @version 20250911
|
||||
*/
|
||||
@Repository
|
||||
public interface BalanceSheetRepository extends SimpleRepository<BalanceSheet> {
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.lanyuanxiaoyao.leopard.core.repository;
|
||||
|
||||
import com.lanyuanxiaoyao.leopard.core.entity.CashFlow;
|
||||
import com.lanyuanxiaoyao.service.template.repository.SimpleRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author lanyuanxiaoyao
|
||||
* @version 20250911
|
||||
*/
|
||||
@Repository
|
||||
public interface CashFlowRepository extends SimpleRepository<CashFlow> {
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.lanyuanxiaoyao.leopard.core.repository;
|
||||
|
||||
import com.lanyuanxiaoyao.leopard.core.entity.Income;
|
||||
import com.lanyuanxiaoyao.service.template.repository.SimpleRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author lanyuanxiaoyao
|
||||
* @version 20250911
|
||||
*/
|
||||
@Repository
|
||||
public interface IncomeRepository extends SimpleRepository<Income> {
|
||||
}
|
||||
Reference in New Issue
Block a user