Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-csf
Commits
e2ed72d4
Commit
e2ed72d4
authored
Apr 28, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出账检核-修改结算汇率2
parent
88bdc465
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
1 deletions
+56
-1
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiFortuneController.java
+3
-0
yd-csf-service/src/main/java/com/yd/csf/service/model/ExpectedFortune.java
+18
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
+35
-1
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiFortuneController.java
View file @
e2ed72d4
...
@@ -464,6 +464,9 @@ public class ApiFortuneController {
...
@@ -464,6 +464,9 @@ public class ApiFortuneController {
if
(
editExchangeRateRequest
.
getExchangeRate
()
==
null
)
{
if
(
editExchangeRateRequest
.
getExchangeRate
()
==
null
)
{
return
Result
.
fail
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
"exchangeRate 不能为空"
);
return
Result
.
fail
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
"exchangeRate 不能为空"
);
}
}
if
(
editExchangeRateRequest
.
getHkdAmount
()
==
null
)
{
return
Result
.
fail
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
"hkdAmount 不能为空"
);
}
return
Result
.
success
(
fortuneService
.
editExchangeRate
(
editExchangeRateRequest
));
return
Result
.
success
(
fortuneService
.
editExchangeRate
(
editExchangeRateRequest
));
}
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/ExpectedFortune.java
View file @
e2ed72d4
...
@@ -193,6 +193,24 @@ public class ExpectedFortune implements Serializable {
...
@@ -193,6 +193,24 @@ public class ExpectedFortune implements Serializable {
private
BigDecimal
defaultExchangeRate
;
private
BigDecimal
defaultExchangeRate
;
/**
/**
* 出账原币种金额
*/
@TableField
(
"payout_amount"
)
private
BigDecimal
payoutAmount
;
/**
* 出账原币种
*/
@TableField
(
"payout_currency"
)
private
String
payoutCurrency
;
/**
* 出账原币种结算汇率(出账原币种 → 港币的结算汇率)
*/
@TableField
(
"payout_exchange_rate"
)
private
BigDecimal
payoutExchangeRate
;
/**
* 港币预计出账金额
* 港币预计出账金额
*/
*/
@TableField
(
"hkd_amount"
)
@TableField
(
"hkd_amount"
)
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
View file @
e2ed72d4
...
@@ -1031,7 +1031,41 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -1031,7 +1031,41 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
@Override
@Override
public
Boolean
editExchangeRate
(
EditExchangeRateRequest
editExchangeRateRequest
)
{
public
Boolean
editExchangeRate
(
EditExchangeRateRequest
editExchangeRateRequest
)
{
return
null
;
String
fortuneBizId
=
editExchangeRateRequest
.
getFortuneBizId
();
Fortune
fortune
=
this
.
getByFortuneBizId
(
fortuneBizId
);
if
(
fortune
==
null
)
{
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK_ERROR
.
getCode
(),
"出账记录不存在"
);
}
if
(
FortuneStatusEnum
.
SENT
.
getItemValue
().
equals
(
fortune
.
getStatus
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK_ERROR
.
getCode
(),
"已完成出账状态的记录不能修改结算汇率"
);
}
ExpectedFortune
originalExpectedFortune
=
expectedFortuneService
.
getByBizId
(
fortune
.
getExpectedFortuneBizId
());
if
(
originalExpectedFortune
==
null
)
{
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"对应的预计出账记录不存在"
);
}
// 获取入参
BigDecimal
exchangeRate
=
editExchangeRateRequest
.
getExchangeRate
();
BigDecimal
hkdAmount
=
editExchangeRateRequest
.
getHkdAmount
();
// 更新 fortune 的结算汇率、港币金额
this
.
lambdaUpdate
()
.
set
(
Fortune:
:
getExchangeRate
,
exchangeRate
)
.
set
(
Fortune:
:
getHkdAmount
,
hkdAmount
)
.
eq
(
Fortune:
:
getId
,
fortune
.
getId
())
.
update
();
// 更新 expected fortune 的出账原币种结算汇率、港币金额
expectedFortuneService
.
lambdaUpdate
()
.
set
(
ExpectedFortune:
:
getPayoutExchangeRate
,
exchangeRate
)
.
set
(
ExpectedFortune:
:
getHkdAmount
,
hkdAmount
)
.
set
(
ExpectedFortune:
:
getUnpaidAmount
,
hkdAmount
)
.
eq
(
ExpectedFortune:
:
getId
,
originalExpectedFortune
.
getId
())
.
update
();
return
true
;
}
}
private
void
validSplitFortune
(
FortuneSplitRequest
fortuneSplitRequest
)
{
private
void
validSplitFortune
(
FortuneSplitRequest
fortuneSplitRequest
)
{
...
...
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