Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
cb92410b
Commit
cb92410b
authored
Feb 23, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商险优化修改
parent
6329fa73
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
46 deletions
+11
-46
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+11
-46
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
cb92410b
...
...
@@ -1806,6 +1806,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceSettle
settle
;
TInsurancePolicy
one
;
BigDecimal
bigDecimalAct
;
R
<
TIncomeDetailReturnVo
>
detailInfoList
;
for
(
InsuranceRegisterParam
success
:
listSuccess
)
{
long
d1
=
System
.
currentTimeMillis
();
//登记保单保费
...
...
@@ -1814,7 +1815,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
actualMoney
=
detail
.
getActualPremium
();
boolean
booleanInvoiceNo
=
false
;
if
(
StringUtils
.
isNotBlank
(
success
.
getInvoiceNo
())){
if
(
Common
.
isEmpty
(
detail
.
getInvoiceNo
())
||
success
.
getInvoiceNo
().
equals
(
detail
.
getInvoiceNo
()))
{
if
(
Common
.
isEmpty
(
detail
.
getInvoiceNo
())
||
!
success
.
getInvoiceNo
().
equals
(
detail
.
getInvoiceNo
()))
{
booleanInvoiceNo
=
true
;
}
detail
.
setInvoiceNo
(
success
.
getInvoiceNo
());
...
...
@@ -1843,7 +1844,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
boolean
booleanPolicyNo
=
false
;
if
(
StringUtils
.
isNotBlank
(
success
.
getPolicyNo
())){
if
(
Common
.
isEmpty
(
detail
.
getPolicyNo
())
||
success
.
getPolicyNo
().
equals
(
detail
.
getPolicyNo
()))
{
if
(
Common
.
isEmpty
(
detail
.
getPolicyNo
())
||
!
success
.
getPolicyNo
().
equals
(
detail
.
getPolicyNo
()))
{
booleanPolicyNo
=
true
;
}
detail
.
setPolicyNo
(
success
.
getPolicyNo
());
...
...
@@ -1954,12 +1955,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
if
(
Optional
.
ofNullable
(
settle
).
isPresent
())
{
//如果当前实缴信息未推送,则新增实缴单推送
if
(
StringUtils
.
isNotBlank
(
success
.
getInvoiceNo
()))
{
detail
.
setInvoiceNo
(
success
.
getInvoiceNo
());
}
if
(
StringUtils
.
isNotBlank
(
success
.
getPolicyNo
()))
{
detail
.
setPolicyNo
(
success
.
getPolicyNo
());
}
doJointInsuranceTask
.
asynchronousEkpInfo
(
detail
,
settle
,
CommonConstants
.
FOUR_INT
);
}
}
...
...
@@ -1997,7 +1992,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
incomeDetail
.
setFeeType
(
CommonConstants
.
ONE_STRING
);
//判断是否存在当月的商险收入数据
R
<
TIncomeDetailReturnVo
>
detailInfoList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
detailInfoList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
if
(
Common
.
isNotNull
(
detailInfoList
)
&&
detailInfoList
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
!
detailInfoList
.
getData
().
getDetailList
().
isEmpty
())
{
//生成红冲数据
...
...
@@ -2030,7 +2025,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
incomeDetail
.
setMoney
(
actualMoney
);
}
//判断是否存在当月的商险收入数据
R
<
TIncomeDetailReturnVo
>
detailInfoList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
detailInfoList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
if
(
Common
.
isNotNull
(
detailInfoList
)
&&
detailInfoList
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
!
detailInfoList
.
getData
().
getDetailList
().
isEmpty
())
{
//生成红冲数据
...
...
@@ -3481,7 +3476,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map
<
String
,
String
>
map
=
new
HashMap
<>();
InsuranceRegisterParam
param
;
SettleVo
settleVo
;
List
<
TInsuranceEkp
>
ekpList
;
for
(
int
i
=
0
;
i
<
distinctList
.
size
();
i
++)
{
param
=
distinctList
.
get
(
i
);
// 必填校验
...
...
@@ -3588,7 +3583,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
LambdaQueryWrapper
<
TInsuranceEkp
>
ekpLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
ekpLambdaQueryWrapper
.
eq
(
TInsuranceEkp
::
getDetailId
,
detail
.
getId
()).
eq
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ZERO_INT
);
List
<
TInsuranceEkp
>
ekpList
=
tInsuranceEkpService
.
list
(
ekpLambdaQueryWrapper
);
ekpList
=
tInsuranceEkpService
.
list
(
ekpLambdaQueryWrapper
);
if
(
CollectionUtils
.
isNotEmpty
(
ekpList
)){
param
.
setErrorMessage
(
InsurancesConstants
.
EKP_SEND_ERROR
);
continue
;
...
...
@@ -3671,49 +3666,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Common
.
isNotNull
(
detail
.
getActualPremium
()))
{
booleanActualPremium
=
StringUtils
.
isNotBlank
(
param
.
getActualPremium
())
&&
detail
.
getActualPremium
().
compareTo
(
new
BigDecimal
(
param
.
getActualPremium
()))
!=
0
;
}
//如果当前为合并结算
if
(
CommonConstants
.
ZERO_INT
==
detail
.
getSettleType
()
&&
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
settleVo
=
getInsuranceDetailSettleStatus
(
detail
.
getId
(),
detail
.
getDefaultSettleId
());
if
(!
Common
.
isEmpty
(
settleVo
)){
//保费更新,保单号,发票号不更新
if
(
booleanActualPremium
&&
!
booleanPolicyNo
&&
!
booleanInvoiceNo
){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
settleVo
.
getActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
continue
;
}
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
settleVo
.
getActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
continue
;
}
}
//保单号,发票号更新时
if
(!
booleanPolicyNo
||
!
booleanInvoiceNo
){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
settleVo
.
getEstimateStatus
())
||
InsurancesConstants
.
SETTLE_TWO
.
equals
(
settleVo
.
getActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
continue
;
}
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
settleVo
.
getEstimateStatus
())
||
InsurancesConstants
.
SETTLE_ONE
.
equals
(
settleVo
.
getActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
}
}
}
}
}
else
if
(
CommonConstants
.
ONE_INT
==
detail
.
getSettleType
()
&&
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
//如果当前为单独结算,判断实缴有没有结算
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
settleVo
=
getInsuranceDetailSettleStatus
(
detail
.
getId
(),
detail
.
getDefaultSettleId
());
if
(!
Common
.
isEmpty
(
settleVo
)
&&
booleanActualPremium
&&
!
booleanPolicyNo
&&
!
booleanInvoiceNo
){
//
判断实缴是否结算中
if
(!
Common
.
isEmpty
(
settleVo
)
&&
(
booleanActualPremium
||
booleanPolicyNo
||
booleanInvoiceNo
)
){
//
保费更新或者保单号发票号更新
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
settleVo
.
getActualStatus
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
continue
;
}
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
settleVo
.
getActualStatus
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
continue
;
}
}
}
...
...
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