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
e3578e94
Commit
e3578e94
authored
Apr 08, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新单跟进保单重复提示
parent
e6c3561e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
14 deletions
+19
-14
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiPolicyFollowController.java
+17
-1
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
+2
-13
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiPolicyFollowController.java
View file @
e3578e94
...
@@ -54,6 +54,7 @@ import org.slf4j.Logger;
...
@@ -54,6 +54,7 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.dao.DataIntegrityViolationException
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -63,6 +64,7 @@ import javax.servlet.ServletOutputStream;
...
@@ -63,6 +64,7 @@ import javax.servlet.ServletOutputStream;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.sql.SQLIntegrityConstraintViolationException
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -577,7 +579,21 @@ public class ApiPolicyFollowController {
...
@@ -577,7 +579,21 @@ public class ApiPolicyFollowController {
}
}
// 修改逻辑
// 修改逻辑
policyFollowService
.
changePolicyFollowStatus
(
changePolicyFollowStatusRequest
,
policyFollow
);
try
{
policyFollowService
.
changePolicyFollowStatus
(
changePolicyFollowStatusRequest
,
policyFollow
);
}
catch
(
DataIntegrityViolationException
e
)
{
log
.
info
(
"修改跟进状态失败:{}"
,
e
.
getMessage
());
// 判断是否为唯一索引冲突
String
message
=
e
.
getMessage
();
if
(
StringUtils
.
isNotBlank
(
message
)
&&
message
.
contains
(
"idx_policy_no"
))
{
return
Result
.
fail
(
"保单号已存在,请勿重复添加"
);
}
else
{
return
Result
.
fail
(
"修改跟进状态失败"
);
}
}
catch
(
Exception
e
)
{
log
.
info
(
"修改跟进状态失败:{}"
,
e
.
getMessage
());
return
Result
.
fail
(
"修改跟进状态失败"
);
}
// 修改为生效时需要同步预计发佣
// 修改为生效时需要同步预计发佣
if
(
PolicyFollowStatusEnum
.
EFFECTIVE
.
equals
(
currentStatusEnum
))
{
if
(
PolicyFollowStatusEnum
.
EFFECTIVE
.
equals
(
currentStatusEnum
))
{
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
View file @
e3578e94
...
@@ -205,20 +205,9 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -205,20 +205,9 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
totalFortune
(
fortune
,
expectedFortune
,
loginUserId
,
fortuneUpdateRequest
);
totalFortune
(
fortune
,
expectedFortune
,
loginUserId
,
fortuneUpdateRequest
);
}
}
// 同步 expected_fortune
// 更新 expected_fortune 出账状态
// 统一使用港币金额
BigDecimal
newPaid
=
calculateExpectedFortunePaidAmount
(
expectedFortune
);
BigDecimal
newUnpaid
=
expectedFortune
.
getHkdAmount
().
subtract
(
newPaid
);
String
newStatus
=
newUnpaid
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
"6"
:
"3"
;
expectedFortuneService
.
lambdaUpdate
()
expectedFortuneService
.
lambdaUpdate
()
.
set
(
ExpectedFortune:
:
getPaidAmount
,
newPaid
)
.
set
(
ExpectedFortune:
:
getStatus
,
fortuneUpdateRequest
.
getStatus
())
.
set
(
ExpectedFortune:
:
getUnpaidAmount
,
newUnpaid
)
.
set
(
ExpectedFortune:
:
getPaidRatio
,
newPaid
.
divide
(
expectedFortune
.
getHkdAmount
(),
4
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
)))
.
set
(
ExpectedFortune:
:
getUnpaidRatio
,
newUnpaid
.
divide
(
expectedFortune
.
getHkdAmount
(),
4
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
)))
.
set
(
ExpectedFortune:
:
getStatus
,
newStatus
)
.
eq
(
ExpectedFortune:
:
getId
,
expectedFortune
.
getId
())
.
eq
(
ExpectedFortune:
:
getId
,
expectedFortune
.
getId
())
.
update
();
.
update
();
...
...
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