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
d8b9a136
Commit
d8b9a136
authored
Jan 05, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
前端对接问题修复46
parent
5837446d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
39 deletions
+51
-39
yd-csf-service/src/main/java/com/yd/csf/service/component/CommissionAsyncService.java
+0
-0
yd-csf-service/src/main/java/com/yd/csf/service/dao/CommissionMapper.java
+2
-0
yd-csf-service/src/main/java/com/yd/csf/service/dto/CommissionUpdateRequest.java
+16
-22
yd-csf-service/src/main/java/com/yd/csf/service/service/CommissionService.java
+2
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionServiceImpl.java
+18
-17
yd-csf-service/src/main/resources/mappers/CommissionMapper.xml
+13
-0
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/component/CommissionAsyncService.java
View file @
d8b9a136
This diff is collapsed.
Click to expand it.
yd-csf-service/src/main/java/com/yd/csf/service/dao/CommissionMapper.java
View file @
d8b9a136
...
@@ -22,6 +22,8 @@ public interface CommissionMapper extends BaseMapper<Commission> {
...
@@ -22,6 +22,8 @@ public interface CommissionMapper extends BaseMapper<Commission> {
List
<
CommissionBindPolicyBrokerDto
>
queryCommissionBindPolicyBrokerList
(
@Param
(
"dto"
)
CommissionDto
dto
);
List
<
CommissionBindPolicyBrokerDto
>
queryCommissionBindPolicyBrokerList
(
@Param
(
"dto"
)
CommissionDto
dto
);
CommissionStatisticsVO
getCommissionStatistics
(
@Param
(
"commissionIdList"
)
List
<
Long
>
commissionIdList
);
CommissionStatisticsVO
getCommissionStatistics
(
@Param
(
"commissionIdList"
)
List
<
Long
>
commissionIdList
);
int
updateStatusBatchById
(
@Param
(
"existingCommissions"
)
List
<
Commission
>
existingCommissions
);
}
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dto/CommissionUpdateRequest.java
View file @
d8b9a136
...
@@ -11,9 +11,9 @@ import java.util.Date;
...
@@ -11,9 +11,9 @@ import java.util.Date;
@Data
@Data
public
class
CommissionUpdateRequest
implements
Serializable
{
public
class
CommissionUpdateRequest
implements
Serializable
{
/**
/**
* 保单
来佣
业务id
* 保单
入账
业务id
*/
*/
@Schema
(
description
=
"保单
来佣
业务id"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
@Schema
(
description
=
"保单
入账
业务id"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
commissionBizId
;
private
String
commissionBizId
;
/**
/**
...
@@ -29,12 +29,6 @@ public class CommissionUpdateRequest implements Serializable {
...
@@ -29,12 +29,6 @@ public class CommissionUpdateRequest implements Serializable {
private
String
policyNo
;
private
String
policyNo
;
/**
/**
* 保费
*/
@Schema
(
description
=
"保费"
)
private
String
premium
;
/**
* 对账公司
* 对账公司
*/
*/
@Schema
(
description
=
"对账公司"
)
@Schema
(
description
=
"对账公司"
)
...
@@ -47,9 +41,9 @@ public class CommissionUpdateRequest implements Serializable {
...
@@ -47,9 +41,9 @@ public class CommissionUpdateRequest implements Serializable {
private
String
reconciliationCompanyBizId
;
private
String
reconciliationCompanyBizId
;
/**
/**
*
来佣
比对状态
*
入账
比对状态
*/
*/
// @Schema(description = "
来佣
比对状态 1=比对成功 2=比对失败")
// @Schema(description = "
入账
比对状态 1=比对成功 2=比对失败")
// private String status;
// private String status;
/**
/**
...
@@ -59,33 +53,33 @@ public class CommissionUpdateRequest implements Serializable {
...
@@ -59,33 +53,33 @@ public class CommissionUpdateRequest implements Serializable {
private
Integer
commissionPeriod
;
private
Integer
commissionPeriod
;
/**
/**
* 总
来佣
期数
* 总
入账
期数
*/
*/
@Schema
(
description
=
"总
来佣
期数"
)
@Schema
(
description
=
"总
入账
期数"
)
private
Integer
totalPeriod
;
private
Integer
totalPeriod
;
/**
/**
*
来佣
名称(1:销售拥金;2:销售奖金;3:销售津贴;4:续期佣金;5:服务津贴;等等)
*
入账项目
名称(1:销售拥金;2:销售奖金;3:销售津贴;4:续期佣金;5:服务津贴;等等)
*/
*/
@Schema
(
description
=
"
来佣
名称(1:销售拥金;2:销售奖金;3:销售津贴;4:续期佣金;5:服务津贴;等等)"
)
@Schema
(
description
=
"
入账项目
名称(1:销售拥金;2:销售奖金;3:销售津贴;4:续期佣金;5:服务津贴;等等)"
)
private
String
commissionName
;
private
String
commissionName
;
/**
/**
*
来佣
类型(1:销售拥金;2:销售奖金;3:销售津贴;4:续期佣金;5:服务津贴;等等)
*
入账项目
类型(1:销售拥金;2:销售奖金;3:销售津贴;4:续期佣金;5:服务津贴;等等)
*/
*/
@Schema
(
description
=
"
来佣
类型(1:销售拥金;2:销售奖金;3:销售津贴;4:续期佣金;5:服务津贴;等等)"
)
@Schema
(
description
=
"
入账项目
类型(1:销售拥金;2:销售奖金;3:销售津贴;4:续期佣金;5:服务津贴;等等)"
)
private
String
commissionType
;
private
String
commissionType
;
/**
/**
*
来佣
金额
*
入账
金额
*/
*/
@Schema
(
description
=
"
来佣
金额"
)
@Schema
(
description
=
"
入账
金额"
)
private
BigDecimal
amount
;
private
BigDecimal
amount
;
/**
/**
*
来佣
币种
*
入账
币种
*/
*/
@Schema
(
description
=
"
来佣
币种"
)
@Schema
(
description
=
"
入账
币种"
)
private
String
currency
;
private
String
currency
;
/**
/**
...
@@ -95,9 +89,9 @@ public class CommissionUpdateRequest implements Serializable {
...
@@ -95,9 +89,9 @@ public class CommissionUpdateRequest implements Serializable {
private
String
exchangeRate
;
private
String
exchangeRate
;
/**
/**
*
来佣
日期
*
入账
日期
*/
*/
@Schema
(
description
=
"
来佣
日期"
)
@Schema
(
description
=
"
入账
日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
commissionDate
;
private
Date
commissionDate
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/CommissionService.java
View file @
d8b9a136
...
@@ -51,4 +51,6 @@ public interface CommissionService extends IService<Commission> {
...
@@ -51,4 +51,6 @@ public interface CommissionService extends IService<Commission> {
List
<
Commission
>
addCommissionBatch
(
List
<
CommissionAddRequest
>
customerAddRequestList
);
List
<
Commission
>
addCommissionBatch
(
List
<
CommissionAddRequest
>
customerAddRequestList
);
Boolean
addToExpected
(
AddToExpectedCommissionRequest
addToExpectedCommissionRequest
);
Boolean
addToExpected
(
AddToExpectedCommissionRequest
addToExpectedCommissionRequest
);
int
updateStatusBatchById
(
List
<
Commission
>
existingCommissions
);
}
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionServiceImpl.java
View file @
d8b9a136
...
@@ -210,11 +210,11 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
...
@@ -210,11 +210,11 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
BigDecimal
amount
=
commission
.
getAmount
();
BigDecimal
amount
=
commission
.
getAmount
();
BigDecimal
requestAmount
=
commissionUpdateRequest
.
getAmount
();
BigDecimal
requestAmount
=
commissionUpdateRequest
.
getAmount
();
// 1. 执行主更新事务(这个方法将在当前事务中执行)
// 计算当前来佣比例
// 计算当前来佣比例
BigDecimal
currentCommissionRatio
=
this
.
calculateCurrentCommissionRatio
(
BigDecimal
currentCommissionRatio
=
this
.
calculateCurrentCommissionRatio
(
commissionUpdateRequest
.
getAmount
(),
commission
.
getPremium
(),
commissionUpdateRequest
.
getPremium
(),
requestAmount
,
commissionUpdateRequest
.
getCurrency
(),
commissionUpdateRequest
.
getExchangeRate
());
commissionUpdateRequest
.
getExchangeRate
());
// 获取当前登录用户
// 获取当前登录用户
...
@@ -261,18 +261,14 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
...
@@ -261,18 +261,14 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
log
.
error
(
"来佣业务id不能为空:{}"
,
commissionUpdateRequest
.
getCommissionBizId
());
log
.
error
(
"来佣业务id不能为空:{}"
,
commissionUpdateRequest
.
getCommissionBizId
());
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"来佣业务id不能为空"
);
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"来佣业务id不能为空"
);
}
}
if
(
ObjectUtils
.
isEmpty
(
commissionUpdateRequest
.
getPremium
()))
{
// if (ObjectUtils.isEmpty(commissionUpdateRequest.getAmount())) {
log
.
error
(
"保费不能为空:{}"
,
commissionUpdateRequest
.
getPremium
());
// log.error("当前入账金额不能为空,来佣业务id:{}", commissionUpdateRequest.getCommissionBizId());
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"保费不能为空"
);
// throw new BusinessException(ResultCode.NULL_ERROR.getCode(), "当前入账金额不能为空");
}
// }
if
(
ObjectUtils
.
isEmpty
(
commissionUpdateRequest
.
getAmount
()))
{
// if (ObjectUtils.isEmpty(commissionUpdateRequest.getExchangeRate())) {
log
.
error
(
"当前入账金额不能为空,来佣业务id:{}"
,
commissionUpdateRequest
.
getCommissionBizId
());
// log.error("当前结算汇率不能为空,来佣业务id:{}", commissionUpdateRequest.getCommissionBizId());
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"当前入账金额不能为空"
);
// throw new BusinessException(ResultCode.NULL_ERROR.getCode(), "当前结算汇率不能为空");
}
// }
if
(
ObjectUtils
.
isEmpty
(
commissionUpdateRequest
.
getExchangeRate
()))
{
log
.
error
(
"当前结算汇率不能为空,来佣业务id:{}"
,
commissionUpdateRequest
.
getCommissionBizId
());
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"当前结算汇率不能为空"
);
}
}
}
...
@@ -570,9 +566,9 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
...
@@ -570,9 +566,9 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
return
this
.
getOne
(
new
QueryWrapper
<
Commission
>().
eq
(
"commission_biz_id"
,
commissionBizId
));
return
this
.
getOne
(
new
QueryWrapper
<
Commission
>().
eq
(
"commission_biz_id"
,
commissionBizId
));
}
}
public
BigDecimal
calculateCurrentCommissionRatio
(
BigDecimal
amount
,
String
premium
,
String
exchangeRate
)
{
public
BigDecimal
calculateCurrentCommissionRatio
(
String
premium
,
BigDecimal
amount
,
String
exchangeRate
,
String
currency
)
{
if
(
ObjectUtils
.
isEmpty
(
premium
))
{
if
(
ObjectUtils
.
isEmpty
(
premium
))
{
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"保费不能为空"
);
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"保
单保
费不能为空"
);
}
}
if
(
ObjectUtils
.
isEmpty
(
amount
))
{
if
(
ObjectUtils
.
isEmpty
(
amount
))
{
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"当前入账金额不能为空"
);
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"当前入账金额不能为空"
);
...
@@ -750,6 +746,11 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
...
@@ -750,6 +746,11 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
return
commissionExpectedService
.
save
(
expected
);
return
commissionExpectedService
.
save
(
expected
);
}
}
@Override
public
int
updateStatusBatchById
(
List
<
Commission
>
existingCommissions
)
{
return
this
.
baseMapper
.
updateStatusBatchById
(
existingCommissions
);
}
/**
/**
* 查询列表
* 查询列表
*
*
...
...
yd-csf-service/src/main/resources/mappers/CommissionMapper.xml
View file @
d8b9a136
...
@@ -48,6 +48,19 @@
...
@@ -48,6 +48,19 @@
updater_id,create_time,update_time
updater_id,create_time,update_time
</sql>
</sql>
<update
id=
"updateStatusBatchById"
>
update commission
set
status = #{item.status},
update_time = now()
where id in
<foreach
collection=
"existingCommissions"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item.id}
</foreach>
</update>
<select
id=
"queryCommissionBindPolicyBrokerList"
<select
id=
"queryCommissionBindPolicyBrokerList"
resultType=
"com.yd.csf.service.dto.CommissionBindPolicyBrokerDto"
>
resultType=
"com.yd.csf.service.dto.CommissionBindPolicyBrokerDto"
>
select c.*,p.*,pb.*
select c.*,p.*,pb.*
...
...
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