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
73dd209b
Commit
73dd209b
authored
Jan 09, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
前端对接问题修复105
parent
d68a8580
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
42 deletions
+23
-42
yd-csf-service/src/main/java/com/yd/csf/service/dto/FortuneStatisticsVO.java
+0
-5
yd-csf-service/src/main/java/com/yd/csf/service/model/ExpectedFortune.java
+6
-0
yd-csf-service/src/main/java/com/yd/csf/service/model/Fortune.java
+5
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionServiceImpl.java
+6
-26
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
+4
-10
yd-csf-service/src/main/resources/mappers/FortuneMapper.xml
+2
-1
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/dto/FortuneStatisticsVO.java
View file @
73dd209b
...
@@ -37,9 +37,4 @@ public class FortuneStatisticsVO {
...
@@ -37,9 +37,4 @@ public class FortuneStatisticsVO {
@Schema
(
description
=
"可出账金额"
)
@Schema
(
description
=
"可出账金额"
)
private
BigDecimal
availableOutAmount
;
private
BigDecimal
availableOutAmount
;
/**
* 差额
*/
@Schema
(
description
=
"差额(待出账金额 - 可出账金额)"
)
private
BigDecimal
differenceAmount
;
}
}
yd-csf-service/src/main/java/com/yd/csf/service/model/ExpectedFortune.java
View file @
73dd209b
...
@@ -65,6 +65,12 @@ public class ExpectedFortune implements Serializable {
...
@@ -65,6 +65,12 @@ public class ExpectedFortune implements Serializable {
private
BigDecimal
premium
;
private
BigDecimal
premium
;
/**
/**
* 保单币种
*/
@TableField
(
"policy_currency"
)
private
String
policyCurrency
;
/**
* 保险公司 ID
* 保险公司 ID
*/
*/
@TableField
(
"insurance_company_biz_id"
)
@TableField
(
"insurance_company_biz_id"
)
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/Fortune.java
View file @
73dd209b
...
@@ -69,6 +69,11 @@ public class Fortune implements Serializable {
...
@@ -69,6 +69,11 @@ public class Fortune implements Serializable {
private
String
policyNo
;
private
String
policyNo
;
/**
/**
* 保单币种
*/
private
String
policyCurrency
;
/**
* 出账期数(1=第一年; 2=第二年; 3=第三年; 4=第四年; 5=第五年)
* 出账期数(1=第一年; 2=第二年; 3=第三年; 4=第四年; 5=第五年)
*/
*/
private
Integer
fortunePeriod
;
private
Integer
fortunePeriod
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionServiceImpl.java
View file @
73dd209b
...
@@ -228,7 +228,7 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
...
@@ -228,7 +228,7 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
QueryWrapper
<
Policy
>
queryWrapper
=
new
QueryWrapper
<
Policy
>();
QueryWrapper
<
Policy
>
queryWrapper
=
new
QueryWrapper
<
Policy
>();
queryWrapper
.
in
(
"policy_no"
,
policyNoSet
);
queryWrapper
.
in
(
"policy_no"
,
policyNoSet
);
queryWrapper
.
select
(
queryWrapper
.
select
(
"policy_no"
,
"payment_premium"
,
"policy_no"
,
"payment_premium"
,
"currency"
,
"product_launch_biz_id"
,
"product_name"
,
"product_launch_biz_id"
,
"product_name"
,
"insurance_company_biz_id"
,
"insurance_company"
,
"insurance_company_biz_id"
,
"insurance_company"
,
"reconciliation_company"
,
"reconciliation_company_code"
,
"reconciliation_company_biz_id"
);
"reconciliation_company"
,
"reconciliation_company_code"
,
"reconciliation_company_biz_id"
);
...
@@ -255,6 +255,7 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
...
@@ -255,6 +255,7 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
if
(
policy
!=
null
)
{
if
(
policy
!=
null
)
{
// 填充保费、产品名称、保险公司、对账公司
// 填充保费、产品名称、保险公司、对账公司
commission
.
setPremium
(
String
.
valueOf
(
policy
.
getPaymentPremium
()));
commission
.
setPremium
(
String
.
valueOf
(
policy
.
getPaymentPremium
()));
commission
.
setCurrency
(
policy
.
getCurrency
());
commission
.
setProductLaunchBizId
(
policy
.
getProductLaunchBizId
());
commission
.
setProductLaunchBizId
(
policy
.
getProductLaunchBizId
());
commission
.
setInsuranceCompanyBizId
(
policy
.
getInsuranceCompanyBizId
());
commission
.
setInsuranceCompanyBizId
(
policy
.
getInsuranceCompanyBizId
());
commission
.
setReconciliationCompany
(
policy
.
getReconciliationCompany
());
commission
.
setReconciliationCompany
(
policy
.
getReconciliationCompany
());
...
@@ -568,32 +569,10 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
...
@@ -568,32 +569,10 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
filteredExpectedFortuneList2
.
add
(
expectedFortune
);
filteredExpectedFortuneList2
.
add
(
expectedFortune
);
}
}
// 2.2 过滤掉 is_part = 1 的 fortune 记录
// 3. 构建实际的初始发佣记录
// List<Fortune> filteredFortuneList = fortuneList.stream()
// .filter(fortune -> Integer.valueOf(0).equals(fortune.getIsPart()))
// .collect(Collectors.toList());
// 5. 构建实际的初始发佣记录
List
<
Fortune
>
newFortuneList
=
buildNewFortunes
(
filteredExpectedFortuneList2
,
commissions
);
List
<
Fortune
>
newFortuneList
=
buildNewFortunes
(
filteredExpectedFortuneList2
,
commissions
);
// List<Fortune> newFortuneList = new ArrayList<>();
// for (ExpectedFortune expectedFortune : filteredExpectedFortuneList) {
// 4. 保存发佣记录
// Fortune fortune = new Fortune();
// BeanUtils.copyProperties(expectedFortune, fortune);
//
// fortune.setFortuneBizId(RandomStringGenerator.generateBizId16(CommonEnum.UID_TYPE_FORTUNE.getCode()));
// fortune.setStatus(FortuneStatusEnum.WAIT.getItemValue());
// // 关联来佣业务ID
// matchCommission(fortune, commissionList);
// // 扣减已发薪资
// calculateCurrentFortune(fortune, policyPaidFortuneList);
//
// fortune.setCreateTime(new Date());
// fortune.setUpdateTime(new Date());
//
// newFortuneList.add(fortune);
// }
// 10. 保存发佣记录
saveNewFortunes
(
newFortuneList
);
saveNewFortunes
(
newFortuneList
);
return
true
;
return
true
;
...
@@ -797,6 +776,7 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
...
@@ -797,6 +776,7 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
commission
.
setProductLaunchBizId
(
policy
.
getProductLaunchBizId
());
commission
.
setProductLaunchBizId
(
policy
.
getProductLaunchBizId
());
commission
.
setInsuranceCompanyBizId
(
policy
.
getInsuranceCompanyBizId
());
commission
.
setInsuranceCompanyBizId
(
policy
.
getInsuranceCompanyBizId
());
commission
.
setPremium
(
Convert
.
toStr
(
policy
.
getPaymentPremium
()));
commission
.
setPremium
(
Convert
.
toStr
(
policy
.
getPaymentPremium
()));
commission
.
setCurrency
(
policy
.
getCurrency
());
}
else
{
}
else
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"保单不存在, policyNo: "
+
request
.
getPolicyNo
());
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"保单不存在, policyNo: "
+
request
.
getPolicyNo
());
}
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
View file @
73dd209b
...
@@ -256,7 +256,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -256,7 +256,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
* 拆分发放(按本次发放金额拆)
* 拆分发放(按本次发放金额拆)
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
splitFortune
(
Fortune
main
,
BigDecimal
currentPaymentAmount
,
ExpectedFortune
expectedFortune
,
String
loginUserId
,
FortuneUpdateRequest
fortuneUpdateRequest
)
{
public
void
splitFortune
(
Fortune
main
,
BigDecimal
currentPaymentAmount
,
ExpectedFortune
expectedFortune
,
String
loginUserId
,
FortuneUpdateRequest
fortuneUpdateRequest
)
{
if
(
currentPaymentAmount
==
null
||
currentPaymentAmount
.
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
if
(
currentPaymentAmount
==
null
||
currentPaymentAmount
.
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
throw
new
BusinessException
(
"本次发放金额必须大于0"
);
throw
new
BusinessException
(
"本次发放金额必须大于0"
);
...
@@ -341,7 +341,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -341,7 +341,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
response
.
setContentType
(
"application/vnd.ms-excel;charset=UTF-8"
);
response
.
setContentType
(
"application/vnd.ms-excel;charset=UTF-8"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setCharacterEncoding
(
"utf-8"
);
String
encode
=
URLEncoder
.
encode
(
"保单发佣.xlsx"
,
"UTF-8"
);
String
encode
=
URLEncoder
.
encode
(
"保单发佣.xlsx"
,
"UTF-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
"fortune_"
+
System
.
currentTimeMillis
()
+
".xlsx"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
"fortune_"
+
System
.
currentTimeMillis
()
+
".xlsx"
);
// 导出
// 导出
try
{
try
{
...
@@ -531,12 +531,13 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -531,12 +531,13 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
/**
/**
* 查询单个对象
* 查询单个对象
*
* @param fortuneBizId
* @param fortuneBizId
* @return
* @return
*/
*/
@Override
@Override
public
Fortune
queryOne
(
String
fortuneBizId
)
{
public
Fortune
queryOne
(
String
fortuneBizId
)
{
return
this
.
getOne
(
new
LambdaQueryWrapper
<
Fortune
>().
eq
(
Fortune:
:
getFortuneBizId
,
fortuneBizId
));
return
this
.
getOne
(
new
LambdaQueryWrapper
<
Fortune
>().
eq
(
Fortune:
:
getFortuneBizId
,
fortuneBizId
));
}
}
@Override
@Override
...
@@ -548,7 +549,6 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -548,7 +549,6 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
fortuneStatisticsVO
.
setTotalPremium
(
BigDecimal
.
ZERO
);
fortuneStatisticsVO
.
setTotalPremium
(
BigDecimal
.
ZERO
);
fortuneStatisticsVO
.
setPendingOutAmount
(
BigDecimal
.
ZERO
);
fortuneStatisticsVO
.
setPendingOutAmount
(
BigDecimal
.
ZERO
);
fortuneStatisticsVO
.
setAvailableOutAmount
(
BigDecimal
.
ZERO
);
fortuneStatisticsVO
.
setAvailableOutAmount
(
BigDecimal
.
ZERO
);
fortuneStatisticsVO
.
setDifferenceAmount
(
BigDecimal
.
ZERO
);
return
fortuneStatisticsVO
;
return
fortuneStatisticsVO
;
}
}
// 自定义查询
// 自定义查询
...
@@ -573,12 +573,6 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -573,12 +573,6 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
if
(
fortuneStatistics
.
getAvailableOutAmount
()
==
null
)
{
if
(
fortuneStatistics
.
getAvailableOutAmount
()
==
null
)
{
fortuneStatistics
.
setAvailableOutAmount
(
BigDecimal
.
ZERO
);
fortuneStatistics
.
setAvailableOutAmount
(
BigDecimal
.
ZERO
);
}
}
// 计算差额
if
(
fortuneStatistics
.
getPendingOutAmount
()
!=
null
&&
fortuneStatistics
.
getAvailableOutAmount
()
!=
null
)
{
fortuneStatistics
.
setDifferenceAmount
(
fortuneStatistics
.
getPendingOutAmount
().
subtract
(
fortuneStatistics
.
getAvailableOutAmount
()));
}
else
{
fortuneStatistics
.
setDifferenceAmount
(
BigDecimal
.
ZERO
);
}
return
fortuneStatistics
;
return
fortuneStatistics
;
}
}
...
...
yd-csf-service/src/main/resources/mappers/FortuneMapper.xml
View file @
73dd209b
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<result
property=
"commissionBizId"
column=
"commission_biz_id"
/>
<result
property=
"commissionBizId"
column=
"commission_biz_id"
/>
<result
property=
"commissionExpectedBizId"
column=
"commission_expected_biz_id"
/>
<result
property=
"commissionExpectedBizId"
column=
"commission_expected_biz_id"
/>
<result
property=
"policyNo"
column=
"policy_no"
/>
<result
property=
"policyNo"
column=
"policy_no"
/>
<result
property=
"policyCurrency"
column=
"policy_currency"
/>
<result
property=
"fortunePeriod"
column=
"fortune_period"
/>
<result
property=
"fortunePeriod"
column=
"fortune_period"
/>
<result
property=
"fortuneTotalPeriod"
column=
"fortune_total_period"
/>
<result
property=
"fortuneTotalPeriod"
column=
"fortune_total_period"
/>
<result
property=
"brokerBizId"
column=
"broker_biz_id"
/>
<result
property=
"brokerBizId"
column=
"broker_biz_id"
/>
...
@@ -51,7 +52,7 @@
...
@@ -51,7 +52,7 @@
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id,fortune_biz_id,expected_fortune_biz_id,reconciliation_year_month,fortune_biz_type,batch_biz_id,
id,fortune_biz_id,expected_fortune_biz_id,reconciliation_year_month,fortune_biz_type,batch_biz_id,
commission_biz_id,commission_expected_biz_id,policy_no,fortune_period,fortune_total_period,broker_biz_id,
commission_biz_id,commission_expected_biz_id,policy_no,
policy_currency,
fortune_period,fortune_total_period,broker_biz_id,
team_biz_id,grade_commission_rate,share_rate,fortune_name,fortune_type,is_part,
team_biz_id,grade_commission_rate,share_rate,fortune_name,fortune_type,is_part,
amount,currency,exchange_rate,hkd_amount,current_payment_amount,current_payment_hkd_amount,current_payment_ratio,status,payout_date,actual_payout_date,is_tax,
amount,currency,exchange_rate,hkd_amount,current_payment_amount,current_payment_hkd_amount,current_payment_ratio,status,payout_date,actual_payout_date,is_tax,
tax_amount,net_amount,salary_biz_id,base_rule_biz_id,settlement_biz_id,reconciliation_operator,
tax_amount,net_amount,salary_biz_id,base_rule_biz_id,settlement_biz_id,reconciliation_operator,
...
...
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