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
2117d923
Commit
2117d923
authored
May 18, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出账检核-增加币种78
parent
4139092d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
4 deletions
+46
-4
yd-csf-service/src/main/java/com/yd/csf/service/dao/FortuneMapper.java
+2
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/FortuneService.java
+2
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionServiceImpl.java
+27
-4
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
+8
-0
yd-csf-service/src/main/resources/mappers/FortuneMapper.xml
+7
-0
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/dao/FortuneMapper.java
View file @
2117d923
...
@@ -16,6 +16,8 @@ import java.util.List;
...
@@ -16,6 +16,8 @@ import java.util.List;
public
interface
FortuneMapper
extends
BaseMapper
<
Fortune
>
{
public
interface
FortuneMapper
extends
BaseMapper
<
Fortune
>
{
List
<
FortuneStatisticsVO
>
getFortuneStatistics
(
@Param
(
"fortuneIdList"
)
List
<
Long
>
fortuneIdList
);
List
<
FortuneStatisticsVO
>
getFortuneStatistics
(
@Param
(
"fortuneIdList"
)
List
<
Long
>
fortuneIdList
);
void
removeByIdsPhysical
(
List
<
Long
>
collect
);
}
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/FortuneService.java
View file @
2117d923
...
@@ -48,4 +48,6 @@ public interface FortuneService extends IService<Fortune> {
...
@@ -48,4 +48,6 @@ public interface FortuneService extends IService<Fortune> {
Boolean
editExchangeRate
(
EditExchangeRateRequest
editExchangeRateRequest
);
Boolean
editExchangeRate
(
EditExchangeRateRequest
editExchangeRateRequest
);
String
batchEditActualPayoutDate
(
BatchEditActualPayoutDateRequest
editBatchActualPayoutDateRequest
);
String
batchEditActualPayoutDate
(
BatchEditActualPayoutDateRequest
editBatchActualPayoutDateRequest
);
void
removeByIdsPhysical
(
List
<
Long
>
collect
);
}
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionServiceImpl.java
View file @
2117d923
...
@@ -646,12 +646,18 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
...
@@ -646,12 +646,18 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"未找到保单对应的预计发佣记录,请先创建预计发佣记录"
);
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"未找到保单对应的预计发佣记录,请先创建预计发佣记录"
);
}
}
// 2. 根据本次发佣期数,
查询是否有
未出账的记录
// 2. 根据本次发佣期数,
删除
未出账的记录
List
<
Fortune
>
fortuneList
=
fortuneService
.
lambdaQuery
()
List
<
Fortune
>
fortuneList
=
fortuneService
.
lambdaQuery
()
.
eq
(
Fortune:
:
getStatus
,
FortuneStatusEnum
.
CAN_SEND
.
getItemValue
())
.
in
(
Fortune:
:
getExpectedFortuneBizId
,
filteredExpectedFortuneList1
.
stream
().
map
(
ExpectedFortune:
:
getExpectedFortuneBizId
).
collect
(
Collectors
.
toList
()))
.
in
(
Fortune:
:
getExpectedFortuneBizId
,
filteredExpectedFortuneList1
.
stream
().
map
(
ExpectedFortune:
:
getExpectedFortuneBizId
).
collect
(
Collectors
.
toList
()))
.
list
();
.
list
();
// 2.1 校验是否有未出账的记录
// 2.1 物理删除
if
(
CollectionUtils
.
isNotEmpty
(
fortuneList
))
{
fortuneService
.
removeByIdsPhysical
(
fortuneList
.
stream
().
map
(
Fortune:
:
getId
).
collect
(
Collectors
.
toList
()));
}
// 2.2 筛选出未出账的记录
List
<
ExpectedFortune
>
filteredExpectedFortuneList2
=
new
ArrayList
<>();
List
<
ExpectedFortune
>
filteredExpectedFortuneList2
=
new
ArrayList
<>();
for
(
ExpectedFortune
expectedFortune
:
filteredExpectedFortuneList1
)
{
for
(
ExpectedFortune
expectedFortune
:
filteredExpectedFortuneList1
)
{
// 如果有已出账记录,跳过
// 如果有已出账记录,跳过
...
@@ -660,14 +666,14 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
...
@@ -660,14 +666,14 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
}
}
filteredExpectedFortuneList2
.
add
(
expectedFortune
);
filteredExpectedFortuneList2
.
add
(
expectedFortune
);
}
}
// 2.
2
校验预计发佣记录是否有出账币种、默认结算汇率
// 2.
3
校验预计发佣记录是否有出账币种、默认结算汇率
for
(
ExpectedFortune
expectedFortune
:
filteredExpectedFortuneList2
)
{
for
(
ExpectedFortune
expectedFortune
:
filteredExpectedFortuneList2
)
{
if
(
StringUtils
.
isBlank
(
expectedFortune
.
getRuleCurrency
()))
{
if
(
StringUtils
.
isBlank
(
expectedFortune
.
getRuleCurrency
()))
{
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"预计发佣记录"
+
expectedFortune
.
getExpectedFortuneBizId
()
+
"未配置保单币种"
);
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"预计发佣记录"
+
expectedFortune
.
getExpectedFortuneBizId
()
+
"未配置保单币种"
);
}
}
}
}
// 2.
3
根据保单号、期数查询入账检核汇率
// 2.
4
根据保单号、期数查询入账检核汇率
Map
<
String
,
BigDecimal
>
exchangeRateMap
=
this
.
queryCommissionExchangeRateMap
(
policyNoSet
,
commissionPeriodSet
);
Map
<
String
,
BigDecimal
>
exchangeRateMap
=
this
.
queryCommissionExchangeRateMap
(
policyNoSet
,
commissionPeriodSet
);
// 3. 构建实际的初始发佣记录(使用入账检核汇率)
// 3. 构建实际的初始发佣记录(使用入账检核汇率)
...
@@ -756,7 +762,12 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
...
@@ -756,7 +762,12 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
List
<
Fortune
>
newFortuneList
=
new
ArrayList
<>();
List
<
Fortune
>
newFortuneList
=
new
ArrayList
<>();
// 更新预计发佣记录的港币金额
// 更新预计发佣记录的港币金额
List
<
ExpectedFortune
>
updatedExpectedFortuneList
=
new
ArrayList
<>();
List
<
ExpectedFortune
>
updatedExpectedFortuneList
=
new
ArrayList
<>();
// 更新预计发佣记录的状态
List
<
Long
>
updatedExpectedFortuneIdList
=
new
ArrayList
<>();
for
(
ExpectedFortune
expectedFortune
:
expectedFortuneList
)
{
for
(
ExpectedFortune
expectedFortune
:
expectedFortuneList
)
{
updatedExpectedFortuneIdList
.
add
(
expectedFortune
.
getId
());
Fortune
fortune
=
new
Fortune
();
Fortune
fortune
=
new
Fortune
();
BeanUtils
.
copyProperties
(
expectedFortune
,
fortune
);
BeanUtils
.
copyProperties
(
expectedFortune
,
fortune
);
...
@@ -829,6 +840,18 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
...
@@ -829,6 +840,18 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
}
}
}
}
// 更新预计发佣记录的状态
if
(
CollectionUtils
.
isNotEmpty
(
updatedExpectedFortuneIdList
))
{
boolean
updateSuccess
=
iExpectedFortuneService
.
lambdaUpdate
()
.
set
(
ExpectedFortune:
:
getStatus
,
FortuneStatusEnum
.
CAN_SEND
.
getItemValue
())
.
in
(
ExpectedFortune:
:
getId
,
updatedExpectedFortuneIdList
)
.
update
();
if
(!
updateSuccess
)
{
throw
new
BusinessException
(
ResultCode
.
FAIL
.
getCode
(),
"更新预计发佣记录状态失败"
);
}
}
return
newFortuneList
;
return
newFortuneList
;
}
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
View file @
2117d923
...
@@ -1253,6 +1253,14 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -1253,6 +1253,14 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
return
String
.
format
(
"设置成功。已更新 %d 条数据,跳过 %d 条(已有实际出账年月)"
,
updateCount
,
skipCount
);
return
String
.
format
(
"设置成功。已更新 %d 条数据,跳过 %d 条(已有实际出账年月)"
,
updateCount
,
skipCount
);
}
}
@Override
public
void
removeByIdsPhysical
(
List
<
Long
>
collect
)
{
if
(
CollectionUtils
.
isEmpty
(
collect
))
{
return
;
}
this
.
baseMapper
.
removeByIdsPhysical
(
collect
);
}
private
void
validEditExchangeRate
(
EditExchangeRateRequest
editExchangeRateRequest
)
{
private
void
validEditExchangeRate
(
EditExchangeRateRequest
editExchangeRateRequest
)
{
if
(
ObjectUtils
.
isEmpty
(
editExchangeRateRequest
.
getOriginalCurrency
()))
{
if
(
ObjectUtils
.
isEmpty
(
editExchangeRateRequest
.
getOriginalCurrency
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK_ERROR
.
getCode
(),
"原币种不能为空"
);
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK_ERROR
.
getCode
(),
"原币种不能为空"
);
...
...
yd-csf-service/src/main/resources/mappers/FortuneMapper.xml
View file @
2117d923
...
@@ -61,6 +61,13 @@
...
@@ -61,6 +61,13 @@
create_time,update_time
create_time,update_time
</sql>
</sql>
<delete
id=
"removeByIdsPhysical"
>
DELETE FROM fortune WHERE id IN
<foreach
collection=
"ids"
item=
"id"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
</delete>
<select
id=
"getFortuneStatistics"
resultType=
"com.yd.csf.service.dto.FortuneStatisticsVO"
>
<select
id=
"getFortuneStatistics"
resultType=
"com.yd.csf.service.dto.FortuneStatisticsVO"
>
SELECT
SELECT
f.policy_no,
f.policy_no,
...
...
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