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
6a24545e
Commit
6a24545e
authored
Apr 08, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/test' into test
parents
ebae537a
d9a5b15c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
21 deletions
+24
-21
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiPolicyFollowController.java
+1
-15
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
+2
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
+20
-5
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiPolicyFollowController.java
View file @
6a24545e
...
...
@@ -579,21 +579,7 @@ public class ApiPolicyFollowController {
}
// 修改逻辑
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
(
"修改跟进状态失败"
);
}
policyFollowService
.
changePolicyFollowStatus
(
changePolicyFollowStatusRequest
,
policyFollow
);
// 修改为生效时需要同步预计发佣
if
(
PolicyFollowStatusEnum
.
EFFECTIVE
.
equals
(
currentStatusEnum
))
{
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
View file @
6a24545e
...
...
@@ -460,7 +460,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
p
rivate
void
updateHkdAmountBatch
(
List
<
ExpectedFortune
>
expectedFortuneList
,
String
policyCurrency
,
List
<
ApiAnnouncementCommissionRatioListResponse
>
announcementRatioList
)
{
p
ublic
void
updateHkdAmountBatch
(
List
<
ExpectedFortune
>
expectedFortuneList
,
String
policyCurrency
,
List
<
ApiAnnouncementCommissionRatioListResponse
>
announcementRatioList
)
{
log
.
info
(
"------------------------开始计算默认结算汇率、港币金额----------------------"
);
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
View file @
6a24545e
...
...
@@ -770,6 +770,8 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
ExpectedFortune
updateObj
=
new
ExpectedFortune
();
updateObj
.
setId
(
expectedFortune
.
getId
());
updateObj
.
setHkdAmount
(
expectedFortune
.
getHkdAmount
().
add
(
hkdAmount
));
updateObj
.
setUnpaidAmount
(
hkdAmount
.
add
(
expectedFortune
.
getUnpaidAmount
()));
updateObj
.
setUnpaidRatio
(
updateObj
.
getUnpaidAmount
().
divide
(
updateObj
.
getHkdAmount
(),
4
,
RoundingMode
.
HALF_UP
));
// 根据预计出账币种计算 expectedFortune.getAmount() 字段
BigDecimal
originalAmount
=
fortune
.
getAmount
();
// 原始币种金额
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
View file @
6a24545e
...
...
@@ -40,6 +40,7 @@ import org.apache.commons.lang3.ObjectUtils;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.dao.DataIntegrityViolationException
;
import
org.springframework.dao.DuplicateKeyException
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -194,12 +195,12 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
public
Boolean
updatePolicyFollowDto
(
PolicyFollowDto
policyFollowDto
)
{
// 校验参数
if
(
StringUtils
.
isBlank
(
policyFollowDto
.
getPolicyBizId
()))
{
throw
new
BusinessException
(
Error
Code
.
PARAMS_ERROR
.
getCode
(),
"policyBizId不能为空"
);
throw
new
BusinessException
(
Result
Code
.
PARAMS_ERROR
.
getCode
(),
"policyBizId不能为空"
);
}
String
policyBizId
=
policyFollowDto
.
getPolicyBizId
();
PolicyFollow
policyFollow
=
getByPolicyBizId
(
policyBizId
);
if
(
policyFollow
==
null
)
{
throw
new
BusinessException
(
ErrorCode
.
NOT_FOUND
_ERROR
.
getCode
(),
"新单跟进记录不存在"
);
throw
new
BusinessException
(
ResultCode
.
NULL
_ERROR
.
getCode
(),
"新单跟进记录不存在"
);
}
// 复制属性,排除系统字段
...
...
@@ -224,17 +225,31 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
policyFollow
.
setUpdaterId
(
loginUserId
);
policyFollow
.
setUpdateTime
(
new
Date
());
boolean
result
=
updateById
(
policyFollow
);
try
{
boolean
result
=
updateById
(
policyFollow
);
}
catch
(
DataIntegrityViolationException
e
)
{
log
.
info
(
"修改跟进信息失败:{}"
,
e
.
getMessage
());
// 判断是否为唯一索引冲突
String
message
=
e
.
getMessage
();
if
(
StringUtils
.
isNotBlank
(
message
)
&&
message
.
contains
(
"idx_policy_no"
))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"保单号已存在,请勿重复添加"
);
}
else
{
throw
new
BusinessException
(
ResultCode
.
FAIL
.
getCode
(),
"修改跟进信息失败"
);
}
}
catch
(
Exception
e
)
{
log
.
info
(
"修改跟进信息失败:{}"
,
e
.
getMessage
());
throw
new
BusinessException
(
ResultCode
.
FAIL
.
getCode
(),
"修改跟进信息失败"
);
}
// 如果保单号从空变为有值,更新关联的FNA状态为"签单完成"
if
(
isPolicyNoUpdated
&&
result
)
{
if
(
isPolicyNoUpdated
)
{
fnaService
.
lambdaUpdate
()
.
eq
(
Fna:
:
getFnaBizId
,
policyFollow
.
getFnaBizId
())
.
set
(
Fna:
:
getStatus
,
FnaStatusEnum
.
SIGNED_COMPLETED
.
getItemValue
())
.
update
();
}
return
result
;
return
true
;
}
private
void
setPolicyMailing
(
PolicyFollow
policyFollow
,
PolicyMailing
policyMailing
)
{
...
...
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