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
ec412660
Commit
ec412660
authored
Apr 23, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增应付
parent
ae0022b3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
21 deletions
+27
-21
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
+7
-6
yd-csf-feign/src/main/java/com/yd/csf/feign/request/expectedfortune/ExpectedFortuneAddRequest.java
+3
-3
yd-csf-service/src/main/java/com/yd/csf/service/model/ExpectedFortune.java
+0
-6
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneAccountServiceImpl.java
+17
-6
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
View file @
ec412660
...
...
@@ -953,11 +953,12 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
expectedFortune
.
setFortuneName
(
queryByDict
(
expectedFortuneDto
.
getFortuneType
()));
// 应付款编号(序号递增)
expectedFortune
.
setPayableNo
(
this
.
createPayableNo
(
expectedFortune
.
getFortuneBizType
(),
++
currentSeq
));
// 默认结算汇率
expectedFortune
.
setDefaultExchangeRate
(
queryExchangeRateByFeign
(
expectedFortuneDto
.
getCurrency
(),
"HKD"
));
// 计算港币金额
expectedFortune
.
setHkdAmount
(
expectedFortuneDto
.
getAmount
().
multiply
(
expectedFortune
.
getDefaultExchangeRate
()));
// // 默认结算汇率
// expectedFortune.setDefaultExchangeRate(
// queryExchangeRateByFeign(expectedFortuneDto.getCurrency(), "HKD"));
// // 计算港币金额
// expectedFortune.setHkdAmount(expectedFortuneDto.getAmount().multiply(expectedFortune.getDefaultExchangeRate()));
// 已出帐金额、待出帐金额、已出帐比例、待出帐比例
expectedFortune
.
setPaidAmount
(
BigDecimal
.
ZERO
);
// 转介人比例默认100%
...
...
@@ -1013,7 +1014,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
private
void
validateAdd
(
List
<
ExpectedFortuneAddRequest
>
fortuneAddRequestList
)
{
for
(
ExpectedFortuneAddRequest
expectedFortuneDto
:
fortuneAddRequestList
)
{
if
(
Objects
.
isNull
(
expectedFortuneDto
.
getAmount
()))
{
if
(
Objects
.
isNull
(
expectedFortuneDto
.
get
Hkd
Amount
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"预计出账金额不能为空"
);
}
if
(
Objects
.
isNull
(
expectedFortuneDto
.
getCurrency
()))
{
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/request/expectedfortune/ExpectedFortuneAddRequest.java
View file @
ec412660
...
...
@@ -76,10 +76,10 @@ public class ExpectedFortuneAddRequest {
private
String
fortuneType
;
/**
* 出账金额
* 出账金额
单位:港币
*/
@Schema
(
description
=
"出账金额"
)
private
BigDecimal
a
mount
;
@Schema
(
description
=
"出账金额
单位:港币
"
)
private
BigDecimal
hkdA
mount
;
/**
* 出账币种
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/ExpectedFortune.java
View file @
ec412660
...
...
@@ -169,12 +169,6 @@ public class ExpectedFortune implements Serializable {
private
String
statusDesc
;
/**
* 本次出账金额
*/
// @TableField("current_payment_amount")
// private BigDecimal currentPaymentAmount;
/**
* 预计出账日期
*/
@TableField
(
"payout_date"
)
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneAccountServiceImpl.java
View file @
ec412660
...
...
@@ -18,10 +18,7 @@ import com.yd.common.utils.RandomStringGenerator;
import
com.yd.csf.service.dto.*
;
import
com.yd.csf.service.enums.FortuneAccountStatusEnum
;
import
com.yd.csf.service.enums.FortuneStatusEnum
;
import
com.yd.csf.service.model.ExpectedFortune
;
import
com.yd.csf.service.model.Fortune
;
import
com.yd.csf.service.model.FortuneAccount
;
import
com.yd.csf.service.model.FortuneAccountEditRecord
;
import
com.yd.csf.service.model.*
;
import
com.yd.csf.service.service.FortuneAccountEditRecordService
;
import
com.yd.csf.service.service.FortuneAccountService
;
import
com.yd.csf.service.dao.FortuneAccountMapper
;
...
...
@@ -222,7 +219,9 @@ public class FortuneAccountServiceImpl extends ServiceImpl<FortuneAccountMapper,
AuthUserDto
currentLoginUser
=
SecurityUtil
.
getCurrentLoginUser
();
Long
loginUserId
=
currentLoginUser
.
getId
();
FortuneAccount
fortuneAccount
=
this
.
getByFortuneAccountBizId
(
fortuneAccountUpdateRequest
.
getFortuneAccountBizId
());
String
fortuneAccountBizId
=
fortuneAccountUpdateRequest
.
getFortuneAccountBizId
();
FortuneAccount
fortuneAccount
=
this
.
getByFortuneAccountBizId
(
fortuneAccountBizId
);
if
(
fortuneAccount
==
null
)
{
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
ResultCode
.
NULL_ERROR
.
getMessage
());
}
...
...
@@ -235,6 +234,18 @@ public class FortuneAccountServiceImpl extends ServiceImpl<FortuneAccountMapper,
this
.
updateById
(
fortuneAccount
);
// // 更新关联 expected_fortune、fortune的出账日期
// if (fortuneAccountUpdateRequest.getFortuneAccountDate() != null) {
// List<Fortune> fortuneList = fortuneService.lambdaQuery().eq(Fortune::getFortuneAccountBizId, fortuneAccountBizId).list();
// if (CollectionUtils.isNotEmpty(fortuneList)) {
// Set<String> expectedBizIdSet = fortuneList.stream().map(Fortune::getExpectedFortuneBizId).collect(Collectors.toSet());
// // 查询 expected_fortune 列表
// List<ExpectedFortune> expectedList = expectedFortuneService.lambdaQuery()
// .in(ExpectedFortune::getExpectedFortuneBizId, expectedBizIdSet)
// .list();
//
// }
// }
return
true
;
}
...
...
@@ -361,7 +372,7 @@ public class FortuneAccountServiceImpl extends ServiceImpl<FortuneAccountMapper,
.
set
(
ExpectedFortune:
:
getUnpaidRatio
,
unpaid
.
divide
(
totalAmount
,
4
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
)))
.
set
(
ExpectedFortune:
:
getStatus
,
newStatus
)
.
set
(
ExpectedFortune:
:
getActualPayoutDate
,
new
Date
())
//
.set(ExpectedFortune::getActualPayoutDate, new Date())
.
set
(
ExpectedFortune:
:
getUpdaterId
,
loginUserId
.
toString
())
.
set
(
ExpectedFortune:
:
getUpdateTime
,
LocalDateTime
.
now
())
.
eq
(
ExpectedFortune:
:
getId
,
ef
.
getId
())
...
...
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