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
211b316e
Commit
211b316e
authored
Jun 11, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into prod
parents
2dbc395a
492c4f21
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
69 additions
and
52 deletions
+69
-52
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiCommissionExpectedController.java
+2
-1
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiSalarySplitServiceImpl.java
+10
-8
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiSalarySplitSummaryExcelDto.java
+13
-13
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/salarysplit/ApiSalarySplitSummaryPageDto.java
+2
-2
yd-csf-service/src/main/java/com/yd/csf/service/dto/FortuneAccountExportDTO.java
+7
-4
yd-csf-service/src/main/java/com/yd/csf/service/model/FortuneAccount.java
+5
-5
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionExpectedServiceImpl.java
+0
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneAccountServiceImpl.java
+3
-2
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
+11
-7
yd-csf-service/src/main/java/com/yd/csf/service/vo/FortuneAccountVO.java
+9
-3
yd-csf-service/src/main/resources/mappers/FortuneAccountMapper.xml
+3
-3
yd-csf-service/src/main/resources/mappers/SalarySplitMapper.xml
+4
-4
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiCommissionExpectedController.java
View file @
211b316e
...
...
@@ -425,7 +425,8 @@ public class ApiCommissionExpectedController {
commissionExpectedQueryRequest
.
setPolicyNoList
(
queryPolicyNoList
);
commissionExpectedQueryRequest
.
setQueryFlag
(
queryFlag
);
QueryWrapper
<
CommissionExpected
>
queryWrapper
=
commissionExpectedService
.
getQueryWrapper
(
commissionExpectedQueryRequest
);
//显式选择需要的字段
queryWrapper
.
select
(
"expected_amount"
,
"paid_amount"
,
"paid_ratio"
,
"commission_ratio"
,
"policy_no"
,
"status"
);
// 先查询所有符合条件的记录ID(用于统计)
List
<
CommissionExpected
>
allCommissionExpectedList
=
commissionExpectedService
.
list
(
queryWrapper
);
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiSalarySplitServiceImpl.java
View file @
211b316e
...
...
@@ -133,8 +133,8 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService {
// 查询统计信息
ApiSalarySplitStatisticsDto
statisticsDto
=
new
ApiSalarySplitStatisticsDto
();
FortuneAccount
fortuneAccount
=
fortuneAccountService
.
queryOne
(
request
.
getFortuneAccountBizId
());
//
出账
币种
statisticsDto
.
setBeSplitCurrency
(
fortuneAccount
!=
null
?
fortuneAccount
.
getCurrency
()
:
""
);
//
发放
币种
statisticsDto
.
setBeSplitCurrency
(
fortuneAccount
!=
null
?
fortuneAccount
.
get
Payout
Currency
()
:
""
);
BigDecimal
beSplitAmount
=
BigDecimal
.
ZERO
;
if
(
fortuneAccount
!=
null
)
{
...
...
@@ -147,7 +147,7 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService {
.
filter
(
Objects:
:
nonNull
)
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
fortuneAmount
=
fortuneAccount
.
get
HkdAmount
()
!=
null
?
fortuneAccount
.
getHkd
Amount
()
:
BigDecimal
.
ZERO
;
BigDecimal
fortuneAmount
=
fortuneAccount
.
get
PayoutAmount
()
!=
null
?
fortuneAccount
.
getPayout
Amount
()
:
BigDecimal
.
ZERO
;
beSplitAmount
=
fortuneAmount
.
subtract
(
splitTotal
);
if
(
beSplitAmount
.
compareTo
(
BigDecimal
.
ZERO
)
<
0
)
{
beSplitAmount
=
BigDecimal
.
ZERO
;
// 防止负数
...
...
@@ -231,7 +231,7 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService {
}
// 3. 计算剩余可拆金额(账户总额 - 本次拟拆分总额)
BigDecimal
fortuneAmount
=
fortuneAccount
.
get
HkdAmount
()
!=
null
?
fortuneAccount
.
getHkd
Amount
()
:
BigDecimal
.
ZERO
;
BigDecimal
fortuneAmount
=
fortuneAccount
.
get
PayoutAmount
()
!=
null
?
fortuneAccount
.
getPayout
Amount
()
:
BigDecimal
.
ZERO
;
BigDecimal
beSplitAmount
=
fortuneAmount
.
subtract
(
splitTotal
);
if
(
beSplitAmount
.
compareTo
(
BigDecimal
.
ZERO
)
<
0
)
{
beSplitAmount
=
BigDecimal
.
ZERO
;
// 防止负数
...
...
@@ -239,7 +239,7 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService {
// 4. 封装响应
ApiQueryRemainingResponse
response
=
new
ApiQueryRemainingResponse
();
response
.
setCurrency
(
fortuneAccount
.
getCurrency
());
response
.
setCurrency
(
fortuneAccount
.
get
Payout
Currency
());
response
.
setFromAmount
(
beSplitAmount
);
return
Result
.
success
(
response
);
}
...
...
@@ -260,7 +260,7 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService {
//原币种金额
convertRequest
.
setAmount
(
request
.
getFromAmount
());
//原币种
convertRequest
.
setFromCurrency
(
fortuneAccount
.
getCurrency
());
convertRequest
.
setFromCurrency
(
fortuneAccount
.
get
Payout
Currency
());
//目标币种
convertRequest
.
setToCurrency
(
request
.
getToCurrency
());
//调用远程转换接口
...
...
@@ -296,11 +296,13 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService {
// 查询数据
List
<
ApiSalarySplitSummaryPageDto
>
dataList
=
iSalarySplitService
.
summaryList
(
request
);
log
.
info
(
"导出-薪资拆分应发信息汇总列表:dataList,{}"
,
JSON
.
toJSONString
(
dataList
));
Map
<
String
,
String
>
map
=
getBillOrgDict
();
List
<
ApiSalarySplitSummaryExcelDto
>
excelDtoList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
dataList
))
{
excelDtoList
=
dataList
.
stream
().
map
(
dto
->
{
ApiSalarySplitSummaryExcelDto
excelDto
=
new
ApiSalarySplitSummaryExcelDto
();
BeanUtils
.
copyProperties
(
dto
,
excelDto
);
excelDto
.
setBillOrg
(
map
!=
null
?
map
.
get
(
dto
.
getBillOrg
())
:
""
);
return
excelDto
;
}).
collect
(
Collectors
.
toList
());
}
...
...
@@ -309,9 +311,9 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService {
ExportParam
exportParam
=
new
ExportParam
();
// 指定需要导出的字段(字段名必须与 DTO 中的属性名一致)
exportParam
.
setFieldNames
(
Arrays
.
asList
(
"salarySplitNo"
,
"businessNo"
,
"brokerName"
,
"team"
,
"fromAmount"
,
"salarySplitNo"
,
"businessNo"
,
"brokerName"
,
"
internalNumber"
,
"
team"
,
"fromAmount"
,
"currency"
,
"exchangeRate"
,
"toAmount"
,
"toCurrency"
,
"fortuneAccountMonth"
,
"billOrg"
,
"
hkdA
mount"
"fortuneAccountMonth"
,
"billOrg"
,
"
a
mount"
));
exportParam
.
setFileName
(
"薪资拆分应发信息汇总"
);
exportParam
.
setUploadToOss
(
true
);
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiSalarySplitSummaryExcelDto.java
View file @
211b316e
...
...
@@ -10,40 +10,40 @@ public class ApiSalarySplitSummaryExcelDto {
@Excel
(
name
=
"发放编号"
,
orderNum
=
"1"
)
private
String
salarySplitNo
;
@Excel
(
name
=
"业务编号"
,
orderNum
=
"
1
"
)
@Excel
(
name
=
"业务编号"
,
orderNum
=
"
2
"
)
private
String
businessNo
;
@Excel
(
name
=
"转介人"
,
orderNum
=
"
2
"
)
@Excel
(
name
=
"转介人"
,
orderNum
=
"
3
"
)
private
String
brokerName
;
@Excel
(
name
=
"内部编号"
,
orderNum
=
"
3
"
)
@Excel
(
name
=
"内部编号"
,
orderNum
=
"
4
"
)
private
String
internalNumber
;
@Excel
(
name
=
"所属团队"
,
orderNum
=
"
4
"
)
@Excel
(
name
=
"所属团队"
,
orderNum
=
"
5
"
)
private
String
team
;
@Excel
(
name
=
"原币种金额"
,
orderNum
=
"
5
"
)
@Excel
(
name
=
"原币种金额"
,
orderNum
=
"
6
"
)
private
BigDecimal
fromAmount
;
@Excel
(
name
=
"原币种"
,
orderNum
=
"
6
"
)
@Excel
(
name
=
"原币种"
,
orderNum
=
"
7
"
)
private
String
currency
;
@Excel
(
name
=
"汇率(原币种->目标币种)"
,
orderNum
=
"
7
"
)
@Excel
(
name
=
"汇率(原币种->目标币种)"
,
orderNum
=
"
8
"
)
private
BigDecimal
exchangeRate
;
@Excel
(
name
=
"目标金额"
,
orderNum
=
"
8
"
)
@Excel
(
name
=
"目标金额"
,
orderNum
=
"
9
"
)
private
BigDecimal
toAmount
;
@Excel
(
name
=
"目标币种"
,
orderNum
=
"
9
"
)
@Excel
(
name
=
"目标币种"
,
orderNum
=
"
10
"
)
private
String
toCurrency
;
@Excel
(
name
=
"出账月(实)"
,
orderNum
=
"1
0
"
)
@Excel
(
name
=
"出账月(实)"
,
orderNum
=
"1
1
"
)
private
String
fortuneAccountMonth
;
@Excel
(
name
=
"出账机构"
,
orderNum
=
"1
1
"
)
@Excel
(
name
=
"出账机构"
,
orderNum
=
"1
2
"
)
private
String
billOrg
;
@Excel
(
name
=
"本期总出账金额(原币种)"
,
orderNum
=
"1
2
"
)
private
BigDecimal
hkdA
mount
;
@Excel
(
name
=
"本期总出账金额(原币种)"
,
orderNum
=
"1
3
"
)
private
BigDecimal
a
mount
;
}
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/salarysplit/ApiSalarySplitSummaryPageDto.java
View file @
211b316e
...
...
@@ -94,7 +94,7 @@ public class ApiSalarySplitSummaryPageDto {
private
String
status
;
/**
* 出账总额
* 出账总额
(发放币种金额总额)
*/
private
BigDecimal
amount
;
...
...
@@ -104,7 +104,7 @@ public class ApiSalarySplitSummaryPageDto {
private
BigDecimal
hkdAmount
;
/**
* 出账币种(
原
币种)
* 出账币种(
发放
币种)
*/
private
String
currency
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dto/FortuneAccountExportDTO.java
View file @
211b316e
...
...
@@ -25,11 +25,14 @@ public class FortuneAccountExportDTO implements Serializable {
private
String
teamBizId
;
@ExcelProperty
(
"
出账
币种"
)
private
String
c
urrency
;
@ExcelProperty
(
"
发放
币种"
)
private
String
payoutC
urrency
;
@ExcelProperty
(
"出账总额"
)
private
BigDecimal
amount
;
@ExcelProperty
(
"发放金额"
)
private
BigDecimal
payoutAmount
;
@ExcelProperty
(
"出账港币总额"
)
private
BigDecimal
hkdAmount
;
private
List
<
Fortune
>
fortuneList
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/FortuneAccount.java
View file @
211b316e
...
...
@@ -54,17 +54,17 @@ public class FortuneAccount implements Serializable {
private
String
teamBizId
;
/**
*
出账
币种
*
发放
币种
*/
private
String
c
urrency
;
private
String
payoutC
urrency
;
/**
*
出账总
额
*
发放金
额
*/
private
BigDecimal
a
mount
;
private
BigDecimal
payoutA
mount
;
/**
* 港币
出账
金额
* 港币金额
*/
private
BigDecimal
hkdAmount
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionExpectedServiceImpl.java
View file @
211b316e
This diff is collapsed.
Click to expand it.
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneAccountServiceImpl.java
View file @
211b316e
...
...
@@ -167,8 +167,9 @@ public class FortuneAccountServiceImpl extends ServiceImpl<FortuneAccountMapper,
fortuneAccount
.
setBrokerBizId
(
accountExportDTO
.
getBrokerBizId
());
fortuneAccount
.
setTeam
(
accountExportDTO
.
getTeam
());
fortuneAccount
.
setTeamBizId
(
accountExportDTO
.
getTeamBizId
());
fortuneAccount
.
setCurrency
(
accountExportDTO
.
getCurrency
());
fortuneAccount
.
setHkdAmount
(
accountExportDTO
.
getAmount
());
fortuneAccount
.
setPayoutCurrency
(
accountExportDTO
.
getPayoutCurrency
());
fortuneAccount
.
setPayoutAmount
(
accountExportDTO
.
getPayoutAmount
());
fortuneAccount
.
setHkdAmount
(
accountExportDTO
.
getHkdAmount
());
fortuneAccount
.
setFortuneAccountDate
(
this
.
getActualPayoutDate
(
accountExportDTO
.
getActualPayoutDate
()));
// 出账状态默认待出账
fortuneAccount
.
setStatus
(
FortuneStatusEnum
.
CHECKED
.
getItemValue
());
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
View file @
211b316e
...
...
@@ -431,7 +431,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
for
(
Map
.
Entry
<
String
,
List
<
Fortune
>>
entry
:
fortuneMap
.
entrySet
())
{
String
broker
=
entry
.
getKey
().
split
(
"_"
)[
0
];
String
actualPayoutDate
=
entry
.
getKey
().
split
(
"_"
)[
1
];
String
c
urrency
=
entry
.
getKey
().
split
(
"_"
)[
2
];
String
payoutC
urrency
=
entry
.
getKey
().
split
(
"_"
)[
2
];
List
<
Fortune
>
brokerFortunes
=
entry
.
getValue
();
FortuneAccountExportDTO
accountDTO
=
new
FortuneAccountExportDTO
();
...
...
@@ -443,15 +443,19 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
if
(
CollUtil
.
isNotEmpty
(
brokerFortunes
))
{
accountDTO
.
setTeam
(
brokerFortunes
.
get
(
0
).
getTeam
());
accountDTO
.
setTeamBizId
(
brokerFortunes
.
get
(
0
).
getTeamBizId
());
accountDTO
.
set
Currency
(
c
urrency
);
accountDTO
.
set
PayoutCurrency
(
payoutC
urrency
);
accountDTO
.
setActualPayoutDate
(
LocalDate
.
parse
(
actualPayoutDate
));
}
// 计算出账总额
BigDecimal
totalAmount
=
brokerFortunes
.
stream
()
.
map
(
Fortune:
:
getCurrentPaymentHkdAmount
)
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
accountDTO
.
setAmount
(
totalAmount
);
// 计算出账港币总额、发放币种总额
BigDecimal
totalHkdAmount
=
BigDecimal
.
ZERO
;
BigDecimal
totalPayoutAmount
=
BigDecimal
.
ZERO
;
for
(
Fortune
fortune
:
brokerFortunes
)
{
totalHkdAmount
=
totalHkdAmount
.
add
(
fortune
.
getCurrentPaymentHkdAmount
());
totalPayoutAmount
=
totalPayoutAmount
.
add
(
fortune
.
getPayoutAmount
());
}
accountDTO
.
setHkdAmount
(
totalHkdAmount
);
accountDTO
.
setPayoutAmount
(
totalPayoutAmount
);
// 按fortune项目分组并累加金额
Map
<
String
,
BigDecimal
>
fortuneAmountMap
=
brokerFortunes
.
stream
()
...
...
yd-csf-service/src/main/java/com/yd/csf/service/vo/FortuneAccountVO.java
View file @
211b316e
...
...
@@ -51,10 +51,16 @@ public class FortuneAccountVO {
private
String
team
;
/**
*
出账
币种
*
发放
币种
*/
@Schema
(
description
=
"出账币种"
)
private
String
currency
;
@Schema
(
description
=
"发放币种"
)
private
String
payoutCurrency
;
/**
* 发放金额
*/
@Schema
(
description
=
"发放金额"
)
private
BigDecimal
payoutAmount
;
/**
* 港币出账金额
...
...
yd-csf-service/src/main/resources/mappers/FortuneAccountMapper.xml
View file @
211b316e
...
...
@@ -11,8 +11,8 @@
<result
property=
"brokerBizId"
column=
"broker_biz_id"
/>
<result
property=
"team"
column=
"team"
/>
<result
property=
"teamBizId"
column=
"team_biz_id"
/>
<result
property=
"
currency"
column=
"
currency"
/>
<result
property=
"
amount"
column=
"
amount"
/>
<result
property=
"
payoutCurrency"
column=
"payout_
currency"
/>
<result
property=
"
payoutAmount"
column=
"payout_
amount"
/>
<result
property=
"hkdAmount"
column=
"hkd_amount"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"fortuneAccountDate"
column=
"fortune_account_date"
/>
...
...
@@ -27,7 +27,7 @@
<sql
id=
"Base_Column_List"
>
id,fortune_account_biz_id,broker,broker_biz_id,team,team_biz_id,
currency,
amount,hkd_amount,status,fortune_account_date,content,remark,
payout_currency,payout_
amount,hkd_amount,status,fortune_account_date,content,remark,
is_deleted,creator_id,updater_id,create_time,update_time
</sql>
</mapper>
yd-csf-service/src/main/resources/mappers/SalarySplitMapper.xml
View file @
211b316e
...
...
@@ -26,9 +26,9 @@
fa.fortune_account_date,
ss.bill_org,
fa.status,
fa.amount,
fa.
payout_amount as
amount,
fa.hkd_amount,
fa.currency,
fa.
payout_currency as
currency,
DATE_FORMAT(fa.fortune_account_date, '%Y%m') as fortune_account_month,
fa.business_no
from salary_split ss
...
...
@@ -109,9 +109,9 @@
fa.fortune_account_date,
ss.bill_org,
fa.status,
fa.amount,
fa.
payout_amount as
amount,
fa.hkd_amount,
fa.currency,
fa.
payout_currency as
currency,
DATE_FORMAT(fa.fortune_account_date, '%Y%m') as fortune_account_month,
fa.business_no
from salary_split ss
...
...
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