Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
S
stockPriceTack
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘长帅
stockPriceTack
Commits
35f07c41
Commit
35f07c41
authored
Jun 02, 2022
by
liucx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志输出
parent
f3815b4b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
AssetStockPriceTask.java
...ech/telmarket/task/followAccount/AssetStockPriceTask.java
+10
-9
No files found.
src/main/java/com/zfxftech/telmarket/task/followAccount/AssetStockPriceTask.java
View file @
35f07c41
...
@@ -141,26 +141,27 @@ public class AssetStockPriceTask implements ApplicationRunner {
...
@@ -141,26 +141,27 @@ public class AssetStockPriceTask implements ApplicationRunner {
//资管
//资管
public
void
AccountProductRelationTask
(
AssetAccountProductRelation
accountProductRelation
)
{
public
void
AccountProductRelationTask
(
AssetAccountProductRelation
accountProductRelation
)
{
Date
startTime
=
new
Date
();
try
{
try
{
String
type
=
SIMULATED
.
getCode
();
String
type
=
SIMULATED
.
getCode
();
OptionalUtil
.
checkNull
(
accountProductRelation
,
"当前用户产品关系不存在"
);
OptionalUtil
.
checkNull
(
accountProductRelation
,
"当前用户产品关系不存在"
);
//查询客户信息
//查询客户信息
Long
marketId
=
accountProductRelation
.
getSimulatedMarketId
();
Long
marketId
=
accountProductRelation
.
getSimulatedMarketId
();
//查询持仓信息
//查询持仓信息
BigDecimal
funding
=
null
;
BigDecimal
funding
=
accountProductRelation
.
getSimulatedFunding
()
;
//获取可用资金
//获取可用资金
if
(
REAL
.
getCode
().
equals
(
type
))
{
log
.
info
(
"耗时1"
+
DateUtil
.
calculateTimeGapSecond
(
startTime
,
new
Date
())
+
"秒"
);
return
;
}
if
(
SIMULATED
.
getCode
().
equals
(
type
))
{
funding
=
accountProductRelation
.
getSimulatedFunding
();
}
AssetAccountProductRelation
productRelation
=
new
AssetAccountProductRelation
();
productRelation
.
setId
(
accountProductRelation
.
getId
());
//获取所有买入过的股票
//获取所有买入过的股票
List
<
AssetStockPosition
>
stockPositions
=
stockPositionService
.
queryStockPositions
(
marketId
);
List
<
AssetStockPosition
>
stockPositions
=
stockPositionService
.
queryStockPositions
(
marketId
);
log
.
info
(
"耗时2"
+
DateUtil
.
calculateTimeGapSecond
(
startTime
,
new
Date
())
+
"秒"
);
//汇总数据
//汇总数据
AssetMarketDetailsVO
marketDetailsVO
=
stockPositionService
.
createMarketDetailsVOTask
(
stockPositions
,
funding
,
accountProductRelation
);
AssetMarketDetailsVO
marketDetailsVO
=
stockPositionService
.
createMarketDetailsVOTask
(
stockPositions
,
funding
,
accountProductRelation
);
log
.
info
(
"耗时3"
+
DateUtil
.
calculateTimeGapSecond
(
startTime
,
new
Date
())
+
"秒"
);
AssetAccountProductRelation
productRelation
=
new
AssetAccountProductRelation
();
productRelation
.
setId
(
accountProductRelation
.
getId
());
//示范盈亏比例
//示范盈亏比例
productRelation
.
setSimulatedTotalProfit
(
new
BigDecimal
(
marketDetailsVO
.
getTotalProfitRate
()));
productRelation
.
setSimulatedTotalProfit
(
new
BigDecimal
(
marketDetailsVO
.
getTotalProfitRate
()));
//示范盘总资产
//示范盘总资产
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment