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
72070e82
Commit
72070e82
authored
May 14, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/test' into test
parents
22daf3f5
d401ee45
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
13 deletions
+47
-13
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
+41
-13
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
+6
-0
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
View file @
72070e82
...
@@ -1027,6 +1027,11 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -1027,6 +1027,11 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
Map
<
String
,
Policy
>
policyMap
=
policyService
.
queryPolicyMap
(
policyNoSet
);
Map
<
String
,
Policy
>
policyMap
=
policyService
.
queryPolicyMap
(
policyNoSet
);
// 当前登录用户
AuthUserDto
authUserDto
=
SecurityUtil
.
getCurrentLoginUser
();
// 当前时间
LocalDateTime
now
=
LocalDateTime
.
now
();
// 查询最新一条有 payableNo 记录
// 查询最新一条有 payableNo 记录
// int currentSeq = iExpectedFortuneService.getPayableNoCurrentSeq();
// int currentSeq = iExpectedFortuneService.getPayableNoCurrentSeq();
...
@@ -1035,6 +1040,13 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -1035,6 +1040,13 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
ExpectedFortune
expectedFortune
=
new
ExpectedFortune
();
ExpectedFortune
expectedFortune
=
new
ExpectedFortune
();
BeanUtil
.
copyProperties
(
expectedFortuneDto
,
expectedFortune
,
"payoutDate"
,
"actualPayoutDate"
);
BeanUtil
.
copyProperties
(
expectedFortuneDto
,
expectedFortune
,
"payoutDate"
,
"actualPayoutDate"
);
// 设置创建人、更新人
expectedFortune
.
setCreatorId
(
authUserDto
.
getUserBizId
());
expectedFortune
.
setCreatorName
(
authUserDto
.
getRealName
());
expectedFortune
.
setUpdaterId
(
authUserDto
.
getUserBizId
());
expectedFortune
.
setCreateTime
(
now
);
expectedFortune
.
setUpdateTime
(
now
);
if
(
"R"
.
equals
(
expectedFortuneDto
.
getFortuneBizType
()))
{
if
(
"R"
.
equals
(
expectedFortuneDto
.
getFortuneBizType
()))
{
Policy
policy
=
policyMap
.
get
(
expectedFortuneDto
.
getPolicyNo
());
Policy
policy
=
policyMap
.
get
(
expectedFortuneDto
.
getPolicyNo
());
if
(
ObjectUtils
.
isEmpty
(
policy
))
{
if
(
ObjectUtils
.
isEmpty
(
policy
))
{
...
@@ -1053,14 +1065,18 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -1053,14 +1065,18 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
// 预计发佣类型名称
// 预计发佣类型名称
expectedFortune
.
setFortuneName
(
queryByDict
(
expectedFortuneDto
.
getFortuneType
()));
expectedFortune
.
setFortuneName
(
queryByDict
(
expectedFortuneDto
.
getFortuneType
()));
// 预计出账年月
// 预计出账年月
if
(
StringUtils
.
isNotBlank
(
expectedFortuneDto
.
getPayoutDate
()))
{
expectedFortune
.
setPayoutDate
(
LocalDate
.
parse
(
expectedFortuneDto
.
getPayoutDate
()
+
"-01"
));
expectedFortune
.
setPayoutDate
(
LocalDate
.
parse
(
expectedFortuneDto
.
getPayoutDate
()
+
"-01"
));
}
// 实际出账年月
// 实际出账年月
if
(
StringUtils
.
isNotBlank
(
expectedFortuneDto
.
getActualPayoutDate
()))
{
expectedFortune
.
setActualPayoutDate
(
LocalDate
.
parse
(
expectedFortuneDto
.
getActualPayoutDate
()
+
"-01"
));
expectedFortune
.
setActualPayoutDate
(
LocalDate
.
parse
(
expectedFortuneDto
.
getActualPayoutDate
()
+
"-01"
));
}
// 转介人比例默认100%
expectedFortune
.
setBrokerRatio
(
"100"
);
// 已出帐金额、待出帐金额、已出帐比例、待出帐比例
// 已出帐金额、待出帐金额、已出帐比例、待出帐比例
expectedFortune
.
setPaidAmount
(
BigDecimal
.
ZERO
);
expectedFortune
.
setPaidAmount
(
BigDecimal
.
ZERO
);
// 转介人比例默认100%
expectedFortune
.
setBrokerRatio
(
"100"
);
expectedFortune
.
setUnpaidAmount
(
expectedFortune
.
getHkdAmount
());
expectedFortune
.
setUnpaidAmount
(
expectedFortune
.
getHkdAmount
());
expectedFortune
.
setPaidRatio
(
BigDecimal
.
ZERO
);
expectedFortune
.
setPaidRatio
(
BigDecimal
.
ZERO
);
expectedFortune
.
setUnpaidRatio
(
BigDecimal
.
valueOf
(
100
));
expectedFortune
.
setUnpaidRatio
(
BigDecimal
.
valueOf
(
100
));
...
@@ -1373,8 +1389,11 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -1373,8 +1389,11 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
policy
=
policyService
.
getOne
(
new
QueryWrapper
<
Policy
>().
eq
(
"policy_no"
,
request
.
getPolicyNo
()));
policy
=
policyService
.
getOne
(
new
QueryWrapper
<
Policy
>().
eq
(
"policy_no"
,
request
.
getPolicyNo
()));
}
}
// 查询关联 fortune 数据,重新计算:已出帐金额、待出帐金额、已出帐比例、待出帐比例
// 根据保单号、期数查询关联 fortune 数据,重新计算:已出帐金额、待出帐金额、已出帐比例、待出帐比例
List
<
Fortune
>
fortuneList
=
fortuneService
.
lambdaQuery
().
eq
(
Fortune:
:
getExpectedFortuneBizId
,
expectedFortune
.
getExpectedFortuneBizId
()).
list
();
List
<
Fortune
>
fortuneList
=
fortuneService
.
lambdaQuery
()
.
eq
(
Fortune:
:
getPolicyNo
,
request
.
getPolicyNo
())
.
eq
(
Fortune:
:
getFortunePeriod
,
request
.
getFortunePeriod
())
.
list
();
BigDecimal
paidAmount
=
BigDecimal
.
ZERO
;
BigDecimal
paidAmount
=
BigDecimal
.
ZERO
;
BigDecimal
unpaidAmount
=
request
.
getHkdAmount
();
BigDecimal
unpaidAmount
=
request
.
getHkdAmount
();
BigDecimal
paidRatio
=
BigDecimal
.
ZERO
;
BigDecimal
paidRatio
=
BigDecimal
.
ZERO
;
...
@@ -1397,22 +1416,31 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -1397,22 +1416,31 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
String
loginUserId
=
currentLoginUser
.
getId
().
toString
();
String
loginUserId
=
currentLoginUser
.
getId
().
toString
();
ExpectedFortune
updateExpectedFortune
=
new
ExpectedFortune
();
ExpectedFortune
updateExpectedFortune
=
new
ExpectedFortune
();
BeanUtils
.
copyProperties
(
request
,
updateExpectedFortune
);
BeanUtils
.
copyProperties
(
request
,
updateExpectedFortune
,
"payoutDate"
,
"actualPayoutDate"
);
updateExpectedFortune
.
setId
(
expectedFortune
.
getId
());
updateExpectedFortune
.
setId
(
expectedFortune
.
getId
());
// 设置 policy 关联字段
// 设置 policy 关联字段
if
(
policy
!=
null
)
{
if
(
policy
!=
null
)
{
expectedFortune
.
setInsuranceCompanyBizId
(
policy
.
getInsuranceCompanyBizId
());
updateExpectedFortune
.
setInsuranceCompanyBizId
(
policy
.
getInsuranceCompanyBizId
());
expectedFortune
.
setProductLaunchBizId
(
policy
.
getProductLaunchBizId
());
updateExpectedFortune
.
setProductLaunchBizId
(
policy
.
getProductLaunchBizId
());
expectedFortune
.
setPremium
(
policy
.
getPaymentPremium
());
updateExpectedFortune
.
setPremium
(
policy
.
getPaymentPremium
());
expectedFortune
.
setPolicyCurrency
(
policy
.
getCurrency
());
updateExpectedFortune
.
setPolicyCurrency
(
policy
.
getCurrency
());
}
// 处理出账年月字段
if
(
StringUtils
.
isNotBlank
(
request
.
getPayoutDate
()))
{
updateExpectedFortune
.
setPayoutDate
(
LocalDate
.
parse
(
request
.
getPayoutDate
()
+
"-01"
));
}
// 处理实际出账年月字段
if
(
StringUtils
.
isNotBlank
(
request
.
getActualPayoutDate
()))
{
updateExpectedFortune
.
setActualPayoutDate
(
LocalDate
.
parse
(
request
.
getActualPayoutDate
()
+
"-01"
));
}
}
// 已出帐金额、待出帐金额、已出帐比例、待出帐比例
// 已出帐金额、待出帐金额、已出帐比例、待出帐比例
e
xpectedFortune
.
setPaidAmount
(
paidAmount
);
updateE
xpectedFortune
.
setPaidAmount
(
paidAmount
);
e
xpectedFortune
.
setUnpaidAmount
(
unpaidAmount
);
updateE
xpectedFortune
.
setUnpaidAmount
(
unpaidAmount
);
e
xpectedFortune
.
setPaidRatio
(
paidRatio
);
updateE
xpectedFortune
.
setPaidRatio
(
paidRatio
);
e
xpectedFortune
.
setUnpaidRatio
(
unpaidRatio
);
updateE
xpectedFortune
.
setUnpaidRatio
(
unpaidRatio
);
updateExpectedFortune
.
setUpdaterId
(
loginUserId
);
updateExpectedFortune
.
setUpdaterId
(
loginUserId
);
updateExpectedFortune
.
setUpdateTime
(
LocalDateTime
.
now
());
updateExpectedFortune
.
setUpdateTime
(
LocalDateTime
.
now
());
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
View file @
72070e82
...
@@ -581,6 +581,12 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -581,6 +581,12 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
if
(
ObjectUtils
.
isEmpty
(
fortuneAddRequest
.
getFortuneBizType
()))
{
if
(
ObjectUtils
.
isEmpty
(
fortuneAddRequest
.
getFortuneBizType
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK_ERROR
.
getCode
(),
"出账类型不能为空"
);
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK_ERROR
.
getCode
(),
"出账类型不能为空"
);
}
}
if
(
ObjectUtils
.
isEmpty
(
fortuneAddRequest
.
getPayoutDate
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK_ERROR
.
getCode
(),
"出账年月(估)不能为空"
);
}
if
(
ObjectUtils
.
isEmpty
(
fortuneAddRequest
.
getActualPayoutDate
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK_ERROR
.
getCode
(),
"出账年月(实)不能为空"
);
}
if
(
ObjectUtils
.
isEmpty
(
fortuneAddRequest
.
getOriginalCurrency
()))
{
if
(
ObjectUtils
.
isEmpty
(
fortuneAddRequest
.
getOriginalCurrency
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK_ERROR
.
getCode
(),
"原币种不能为空"
);
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK_ERROR
.
getCode
(),
"原币种不能为空"
);
...
...
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