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
c5ab6c47
Commit
c5ab6c47
authored
May 15, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/test' into test
parents
d53aac5d
8f319c81
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
21 deletions
+40
-21
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
+2
-0
yd-csf-feign/src/main/java/com/yd/csf/feign/response/expectedfortune/ApiExpectedFortunePageResponse.java
+0
-6
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/ExpectedFortuneServiceImpl.java
+14
-4
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
+20
-7
yd-csf-service/src/main/resources/mappers/ExpectedFortuneMapper.xml
+4
-4
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
View file @
c5ab6c47
...
@@ -1049,6 +1049,8 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -1049,6 +1049,8 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
expectedFortune
.
setUpdaterId
(
authUserDto
.
getUserBizId
());
expectedFortune
.
setUpdaterId
(
authUserDto
.
getUserBizId
());
expectedFortune
.
setCreateTime
(
now
);
expectedFortune
.
setCreateTime
(
now
);
expectedFortune
.
setUpdateTime
(
now
);
expectedFortune
.
setUpdateTime
(
now
);
// 是否拆分
expectedFortune
.
setIsPart
(
0
);
if
(
"R"
.
equals
(
expectedFortuneDto
.
getFortuneBizType
()))
{
if
(
"R"
.
equals
(
expectedFortuneDto
.
getFortuneBizType
()))
{
Policy
policy
=
policyMap
.
get
(
expectedFortuneDto
.
getPolicyNo
());
Policy
policy
=
policyMap
.
get
(
expectedFortuneDto
.
getPolicyNo
());
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/response/expectedfortune/ApiExpectedFortunePageResponse.java
View file @
c5ab6c47
...
@@ -42,12 +42,6 @@ public class ApiExpectedFortunePageResponse {
...
@@ -42,12 +42,6 @@ public class ApiExpectedFortunePageResponse {
private
String
payableNo
;
private
String
payableNo
;
/**
/**
* 关联业务编号
*/
@Schema
(
description
=
"关联业务编号"
)
private
String
associatedPayableNo
;
/**
* 保单号
* 保单号
*/
*/
@Schema
(
description
=
"policy no"
)
@Schema
(
description
=
"policy no"
)
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/ExpectedFortuneServiceImpl.java
View file @
c5ab6c47
...
@@ -93,7 +93,7 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
...
@@ -93,7 +93,7 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
return
expectedFortuneVOPage
;
return
expectedFortuneVOPage
;
}
}
// 调整数据顺序
// 调整数据顺序
、格式
processData
(
expectedFortuneList
);
processData
(
expectedFortuneList
);
// 1. 转介人职级信息
// 1. 转介人职级信息
...
@@ -158,8 +158,12 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
...
@@ -158,8 +158,12 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
// 查找对应的实际发佣
// 查找对应的实际发佣
List
<
ApiExpectedFortunePageResponse
>
matchedList
=
actualMap
.
get
(
expected
.
getExpectedFortuneBizId
());
List
<
ApiExpectedFortunePageResponse
>
matchedList
=
actualMap
.
get
(
expected
.
getExpectedFortuneBizId
());
if
(
CollUtil
.
isNotEmpty
(
matchedList
))
{
if
(
CollUtil
.
isNotEmpty
(
matchedList
))
{
// 设置实际发佣的关联业务编号
// 设置实际出账记录的字段:待出账金额(估)、已出账比例、未出账比例
matchedList
.
forEach
(
actual
->
actual
.
setAssociatedPayableNo
(
expected
.
getPayableNo
()));
matchedList
.
forEach
(
actual
->
{
actual
.
setUnpaidAmount
(
expected
.
getHkdAmount
());
actual
.
setPaidRatio
(
expected
.
getPaidRatio
());
actual
.
setUnpaidRatio
(
expected
.
getUnpaidRatio
());
});
sortedList
.
addAll
(
matchedList
);
sortedList
.
addAll
(
matchedList
);
matchedActualPayableNos
.
add
(
expected
.
getExpectedFortuneBizId
());
matchedActualPayableNos
.
add
(
expected
.
getExpectedFortuneBizId
());
...
@@ -173,7 +177,13 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
...
@@ -173,7 +177,13 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
}
}
}
}
// 6. 将排序后的结果写回原列表
// 6.设置实际出账记录的字段:待出账金额(估)
for
(
ApiExpectedFortunePageResponse
item
:
sortedList
)
{
if
(
item
.
getType
()
==
2
)
{
item
.
setCurrentPaymentHkdAmount
(
item
.
getHkdAmount
());
}
}
// 7. 将排序后的结果写回原列表
expectedFortuneList
.
clear
();
expectedFortuneList
.
clear
();
expectedFortuneList
.
addAll
(
sortedList
);
expectedFortuneList
.
addAll
(
sortedList
);
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
View file @
c5ab6c47
...
@@ -385,22 +385,34 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -385,22 +385,34 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
StringBuilder
validateMsg
=
new
StringBuilder
();
StringBuilder
validateMsg
=
new
StringBuilder
();
for
(
Fortune
fortune
:
fortuneList
)
{
for
(
Fortune
fortune
:
fortuneList
)
{
if
(
StringUtils
.
isNotBlank
(
fortune
.
getFortuneAccountBizId
()))
{
if
(
StringUtils
.
isNotBlank
(
fortune
.
getFortuneAccountBizId
()))
{
validateMsg
.
append
(
fortune
.
getPolicyNo
()).
append
(
"-"
).
append
(
fortune
.
getBroker
()).
append
(
"已发薪资,不能重复生成薪资记录; "
);
validateMsg
.
append
(
"保单"
).
append
(
fortune
.
getPolicyNo
()).
append
(
"-"
).
append
(
fortune
.
getBroker
())
.
append
(
":已发薪资,不能重复生成"
);
break
;
}
}
if
(
StringUtils
.
equals
(
fortune
.
getStatus
(),
FortuneStatusEnum
.
WAIT
.
getItemValue
()))
{
if
(
StringUtils
.
equals
(
fortune
.
getStatus
(),
FortuneStatusEnum
.
WAIT
.
getItemValue
()))
{
validateMsg
.
append
(
fortune
.
getPolicyNo
()).
append
(
"-"
).
append
(
fortune
.
getBroker
()).
append
(
"待出账状态不能直接改为'可出账, 检核完成',不能生成出账记录; "
);
validateMsg
.
append
(
"保单"
).
append
(
fortune
.
getPolicyNo
()).
append
(
"-"
).
append
(
fortune
.
getBroker
())
.
append
(
":待出账状态不能直接改为'可出账, 检核完成'"
);
break
;
}
}
if
(
StringUtils
.
equals
(
fortune
.
getStatus
(),
FortuneStatusEnum
.
SENT
.
getItemValue
()))
{
if
(
StringUtils
.
equals
(
fortune
.
getStatus
(),
FortuneStatusEnum
.
SENT
.
getItemValue
()))
{
validateMsg
.
append
(
fortune
.
getPolicyNo
()).
append
(
"-"
).
append
(
fortune
.
getBroker
()).
append
(
"已完成出账,不能生成出账记录; "
);
validateMsg
.
append
(
"保单"
).
append
(
fortune
.
getPolicyNo
()).
append
(
"-"
).
append
(
fortune
.
getBroker
())
.
append
(
":已完成出账"
);
break
;
}
}
if
(
fortune
.
getActualPayoutDate
()
==
null
)
{
if
(
fortune
.
getActualPayoutDate
()
==
null
)
{
validateMsg
.
append
(
fortune
.
getPolicyNo
()).
append
(
"-"
).
append
(
fortune
.
getBroker
()).
append
(
"未设置出账年月(实),不能生成出账记录; "
);
validateMsg
.
append
(
"保单"
).
append
(
fortune
.
getPolicyNo
()).
append
(
"-"
).
append
(
fortune
.
getBroker
())
.
append
(
":未设置出账年月(实)"
);
break
;
}
}
if
(
ObjectUtils
.
isEmpty
(
fortune
.
getPayoutCurrency
()))
{
if
(
ObjectUtils
.
isEmpty
(
fortune
.
getPayoutCurrency
()))
{
validateMsg
.
append
(
fortune
.
getPolicyNo
()).
append
(
"-"
).
append
(
fortune
.
getBroker
()).
append
(
"未设置发放币种,不能生成出账记录; "
);
validateMsg
.
append
(
"保单"
).
append
(
fortune
.
getPolicyNo
()).
append
(
"-"
).
append
(
fortune
.
getBroker
())
.
append
(
":未设置发放币种"
);
break
;
}
}
if
(
ObjectUtils
.
isEmpty
(
fortune
.
getPayoutAmount
()))
{
if
(
ObjectUtils
.
isEmpty
(
fortune
.
getPayoutAmount
()))
{
validateMsg
.
append
(
fortune
.
getPolicyNo
()).
append
(
"-"
).
append
(
fortune
.
getBroker
()).
append
(
"未设置发放币种金额,不能生成出账记录; "
);
validateMsg
.
append
(
"保单"
).
append
(
fortune
.
getPolicyNo
()).
append
(
"-"
).
append
(
fortune
.
getBroker
())
.
append
(
":未设置发放币种金额"
);
break
;
}
}
}
}
if
(
StringUtils
.
isNotBlank
(
validateMsg
.
toString
()))
{
if
(
StringUtils
.
isNotBlank
(
validateMsg
.
toString
()))
{
...
@@ -809,12 +821,13 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -809,12 +821,13 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
.
set
(
ExpectedFortune:
:
getPayableNo
,
payableNo
)
.
set
(
ExpectedFortune:
:
getPayableNo
,
payableNo
)
.
eq
(
ExpectedFortune:
:
getId
,
expectedFortune
.
getId
())
.
eq
(
ExpectedFortune:
:
getId
,
expectedFortune
.
getId
())
.
update
();
.
update
();
// 关联应付款编号
fortune
.
setPayableNo
(
payableNo
);
}
else
{
}
else
{
// 如果有预计出账记录,提示去应付款管理页面修改金额,而不是在出账页面新增
// 如果有预计出账记录,提示去应付款管理页面修改金额,而不是在出账页面新增
throw
new
BusinessException
(
ResultCode
.
FAIL
.
getCode
(),
fortuneAddRequest
.
getFortuneName
()
+
" 已存在应付记录,请在应付款管理页面修改金额"
);
throw
new
BusinessException
(
ResultCode
.
FAIL
.
getCode
(),
fortuneAddRequest
.
getFortuneName
()
+
" 已存在应付记录,请在应付款管理页面修改金额"
);
}
}
fortune
.
setPayableNo
(
expectedFortune
.
getPayableNo
());
fortune
.
setExpectedFortuneBizId
(
expectedFortune
.
getExpectedFortuneBizId
());
fortune
.
setExpectedFortuneBizId
(
expectedFortune
.
getExpectedFortuneBizId
());
fortune
.
setPolicyCurrency
(
expectedFortune
.
getPolicyCurrency
());
fortune
.
setPolicyCurrency
(
expectedFortune
.
getPolicyCurrency
());
fortune
.
setCurrentPaymentRatio
(
BigDecimal
.
valueOf
(
100
));
fortune
.
setCurrentPaymentRatio
(
BigDecimal
.
valueOf
(
100
));
...
...
yd-csf-service/src/main/resources/mappers/ExpectedFortuneMapper.xml
View file @
c5ab6c47
...
@@ -169,7 +169,7 @@
...
@@ -169,7 +169,7 @@
ef.status_desc,
ef.status_desc,
ef.payout_date,
ef.payout_date,
ef.actual_payout_date,
ef.actual_payout_date,
ef.default_exchange_rate,
ef.default_exchange_rate
as exchangeRate
,
ef.original_currency,
ef.original_currency,
ef.original_amount,
ef.original_amount,
ef.original_to_hkd_rate,
ef.original_to_hkd_rate,
...
@@ -178,7 +178,7 @@
...
@@ -178,7 +178,7 @@
ef.hkd_to_payout_rate,
ef.hkd_to_payout_rate,
ef.hkd_amount,
ef.hkd_amount,
NULL as current_payment_hkd_amount,
NULL as current_payment_hkd_amount,
NULL
as exchange_rate,
ef.default_exchange_rate
as exchange_rate,
ef.paid_amount,
ef.paid_amount,
ef.unpaid_amount,
ef.unpaid_amount,
ef.paid_ratio,
ef.paid_ratio,
...
@@ -241,8 +241,8 @@
...
@@ -241,8 +241,8 @@
f.hkd_amount,
f.hkd_amount,
f.current_payment_amount,
f.current_payment_amount,
f.exchange_rate,
f.exchange_rate,
NULL
as paid_amount,
IF(f.status = 2, f.hkd_amount, 0)
as paid_amount,
NULL
as unpaid_amount,
IF(f.status != 2 and f.status != 5, f.hkd_amount, 0)
as unpaid_amount,
NULL as paid_ratio,
NULL as paid_ratio,
NULL as unpaid_ratio,
NULL as unpaid_ratio,
f.is_tax,
f.is_tax,
...
...
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