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
813c5563
Commit
813c5563
authored
Sep 07, 2022
by
查济
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-zhaji' into 'develop'
Feature zhaji See merge request fangxinjiang/yifu!245
parents
4ec4186c
0afe9a3c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
218 additions
and
30 deletions
+218
-30
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+18
-0
TInsuranceEkp.java
...u/cloud/plus/v1/yifu/insurances/entity/TInsuranceEkp.java
+6
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+152
-3
TInsuranceEkpServiceImpl.java
...nces/service/insurance/impl/TInsuranceEkpServiceImpl.java
+38
-24
TInsuranceEkpMapper.xml
.../main/resources/mapper/insurances/TInsuranceEkpMapper.xml
+4
-3
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
813c5563
...
@@ -1076,7 +1076,25 @@ public class InsurancesConstants {
...
@@ -1076,7 +1076,25 @@ public class InsurancesConstants {
*/
*/
public
static
final
String
IMPORT_TOO_LONG
=
"一次性导入不可超过20000条,请分批导入"
;
public
static
final
String
IMPORT_TOO_LONG
=
"一次性导入不可超过20000条,请分批导入"
;
/**
* 结算类型不一致
*/
public
static
final
String
SETTLE_TYPE_ATYPISM
=
"结算类型不一致"
;
/**
* 预估已推送
*/
public
static
final
String
ESTIMATE_IS_PUSH
=
"预估已推送"
;
/**
* 实缴已推送,请分批导入
*/
public
static
final
String
ACTUAL_IS_PUSH
=
"实缴已推送"
;
/**
* 结算id不一致,请分批导入
*/
public
static
final
String
SETTLE_ID_ATYPISM
=
"结算id不一致"
;
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceEkp.java
View file @
813c5563
...
@@ -161,6 +161,12 @@ public class TInsuranceEkp implements Serializable {
...
@@ -161,6 +161,12 @@ public class TInsuranceEkp implements Serializable {
@Schema
(
description
=
"推送类型(1推送预估费用,2推送实缴费用,3变更结算信息,4推送作废信息,5推送预估红冲信息,6推送实缴红冲信息)"
)
@Schema
(
description
=
"推送类型(1推送预估费用,2推送实缴费用,3变更结算信息,4推送作废信息,5推送预估红冲信息,6推送实缴红冲信息)"
)
private
Integer
pushType
;
private
Integer
pushType
;
/**
* 不重发原因
*/
private
String
notResendMessage
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
}
}
\ No newline at end of file
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
813c5563
...
@@ -1436,6 +1436,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1436,6 +1436,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
detail
.
setUpdateBy
(
user
.
getId
());
detail
.
setUpdateBy
(
user
.
getId
());
detail
.
setUpdateTime
(
LocalDateTime
.
now
());
detail
.
setUpdateTime
(
LocalDateTime
.
now
());
//如果当前为合并结算,判断预估是否已发送
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())
&&
detail
.
getSettleType
()
==
CommonConstants
.
ZERO_INT
){
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
Integer
isEstimatePush
=
settle
.
getIsEstimatePush
();
//如果未推送则推送预估新增
if
(
isEstimatePush
==
CommonConstants
.
ZERO_INT
){
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
ONE_INT
);
if
(
StringUtils
.
isNotBlank
(
s
)){
settle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
settle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
settle
);
}
}
}
if
(
StringUtils
.
isNotBlank
(
success
.
getPolicyNo
())){
if
(
StringUtils
.
isNotBlank
(
success
.
getPolicyNo
())){
detail
.
setPolicyNo
(
success
.
getPolicyNo
());
detail
.
setPolicyNo
(
success
.
getPolicyNo
());
//如果保单号不为空,将替换类型的保单号也全部更新
//如果保单号不为空,将替换类型的保单号也全部更新
...
@@ -1499,7 +1514,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1499,7 +1514,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
});
});
}
else
if
(
settle
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
}
else
if
(
settle
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
&&
(
new
BigDecimal
(
success
.
getActualPremium
()).
compareTo
(
detail
.
getActualPremium
())
==
0
)){
&&
(
new
BigDecimal
(
success
.
getActualPremium
()).
compareTo
(
detail
.
getActualPremium
())
==
0
)){
//推送保费更新
//推送保费更新
settle
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
settle
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
...
@@ -1572,7 +1586,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1572,7 +1586,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
boolean
booleanInvoiceNo
=
StringUtils
.
isNotBlank
(
invoiceNo
)
&&
!
invoiceNo
.
equals
(
detail
.
getInvoiceNo
());
boolean
booleanInvoiceNo
=
StringUtils
.
isNotBlank
(
invoiceNo
)
&&
!
invoiceNo
.
equals
(
detail
.
getInvoiceNo
());
boolean
booleanPolicyNo
=
StringUtils
.
isNotBlank
(
policyNo
)
&&
!
policyNo
.
equals
(
detail
.
getPolicyNo
());
boolean
booleanPolicyNo
=
StringUtils
.
isNotBlank
(
policyNo
)
&&
!
policyNo
.
equals
(
detail
.
getPolicyNo
());
//如果当前保费为空,且保单号或发票号不一样
//如果当前保费为空,且保单号或发票号不一样
if
((
StringUtils
.
isBlank
(
success
.
getActualPremium
())
||
new
BigDecimal
(
success
.
getActualPremium
()).
compareTo
(
detail
.
getActualPremium
())
==
0
)
&&
(
!
booleanInvoiceNo
||
!
booleanPolicyNo
)){
if
((
StringUtils
.
isBlank
(
success
.
getActualPremium
())
||
new
BigDecimal
(
success
.
getActualPremium
()).
compareTo
(
detail
.
getActualPremium
())
==
0
)
&&
(
booleanInvoiceNo
||
booleanPolicyNo
)){
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
...
@@ -3833,8 +3847,54 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3833,8 +3847,54 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
}
else
{
//异常处理
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
//推送实缴单
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
}
}
else
{
//保存作废信息
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
FOUR_INT
);
//保存预估信息
//变更后为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
)
{
//推送新的结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
//保存实缴信息
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
//变更后为单独结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
)
{
//先推送预估,再推送实际
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
//保存预估信息
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
//保存实缴信息
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
}
else
{
}
else
{
//变更后为单独结算
//变更后为单独结算
...
@@ -3898,6 +3958,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3898,6 +3958,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
}
else
{
//异常处理
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
//推送实缴单
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
}
}
}
...
@@ -4057,11 +4122,52 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -4057,11 +4122,52 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
}
else
{
//异常处理
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
//推送实缴单
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
}
}
else
{
}
else
{
//异常处理
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
FOUR_INT
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
FOUR_INT
);
//变更为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
){
//推送新的结算信息至EKP,推实际保费
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
//变更为单独结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
// 推送新的结算信息
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
//推送实缴单
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
}
}
//如果预估已推送和实缴未推送
//如果预估已推送和实缴未推送
...
@@ -4113,7 +4219,30 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -4113,7 +4219,30 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
}
else
{
//异常处理
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
//推送实缴单
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
else
{
//保存预估推送失败的数据
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
//保存实缴推送失败的数据
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
}
//如果预估和实缴均未推送
//如果预估和实缴均未推送
...
@@ -4154,6 +4283,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -4154,6 +4283,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
}
else
{
//异常处理
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
}
}
}
}
...
@@ -4182,7 +4315,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -4182,7 +4315,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//变更为合并结算
//变更为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
//新增新的结算信息
//新增新的结算信息
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
newInsuranceSettle
.
setSettleType
(
newSettleType
);
newInsuranceSettle
.
setSettleType
(
newSettleType
);
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
...
@@ -4218,6 +4350,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -4218,6 +4350,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
else
{
}
else
{
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
FOUR_INT
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
FOUR_INT
);
//变更为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
//推送新的结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
}
}
}
}
else
{
}
else
{
//推送新的结算信息至EKP
//推送新的结算信息至EKP
...
@@ -5749,6 +5896,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -5749,6 +5896,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ekp
.
setId
(
null
);
ekp
.
setId
(
null
);
ekp
.
setCreateTime
(
LocalDateTime
.
now
());
ekp
.
setCreateTime
(
LocalDateTime
.
now
());
ekp
.
setPushType
(
pushType
);
ekp
.
setPushType
(
pushType
);
TInsuranceDetail
byId
=
getById
(
param
.
getDetailId
());
ekp
.
setSettleType
(
byId
.
getSettleType
().
toString
());
tInsuranceEkpService
.
save
(
ekp
);
tInsuranceEkpService
.
save
(
ekp
);
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceEkpServiceImpl.java
View file @
813c5563
...
@@ -65,15 +65,10 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
...
@@ -65,15 +65,10 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
String
defaultSettleId
=
byId
.
getDefaultSettleId
();
String
defaultSettleId
=
byId
.
getDefaultSettleId
();
String
s
=
null
;
String
s
=
null
;
String
settleType
=
tInsuranceEkp
.
getSettleType
();
String
settleType
=
tInsuranceEkp
.
getSettleType
();
if
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
.
equals
(
settleType
)){
settleType
=
CommonConstants
.
ONE_STRING
;
}
if
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
.
equals
(
settleType
)){
settleType
=
CommonConstants
.
ZERO_STRING
;
}
Integer
pushType
=
tInsuranceEkp
.
getPushType
();
Integer
pushType
=
tInsuranceEkp
.
getPushType
();
//商险结算信息
//商险结算信息
TInsuranceSettle
insuranceSettle
=
tInsuranceSettleService
.
getById
(
tInsuranceEkp
.
getDefaultSettleId
());
TInsuranceSettle
insuranceSettle
=
tInsuranceSettleService
.
getById
(
tInsuranceEkp
.
getDefaultSettleId
());
//结算id是否一致
boolean
settleIdEquals
=
tInsuranceEkp
.
getDefaultSettleId
().
equals
(
defaultSettleId
);
boolean
settleIdEquals
=
tInsuranceEkp
.
getDefaultSettleId
().
equals
(
defaultSettleId
);
//预估是否已发送
//预估是否已发送
boolean
estimatePush
=
Common
.
isEmpty
(
insuranceSettle
)
||
insuranceSettle
.
getIsEstimatePush
()
==
CommonConstants
.
ZERO_INT
;
boolean
estimatePush
=
Common
.
isEmpty
(
insuranceSettle
)
||
insuranceSettle
.
getIsEstimatePush
()
==
CommonConstants
.
ZERO_INT
;
...
@@ -89,6 +84,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
...
@@ -89,6 +84,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
detailUpdate
.
eq
(
TInsuranceDetail
::
getId
,
tInsuranceEkp
.
getDetailId
());
detailUpdate
.
eq
(
TInsuranceDetail
::
getId
,
tInsuranceEkp
.
getDetailId
());
LambdaUpdateWrapper
<
TInsuranceEkp
>
ekpUpdate
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
TInsuranceEkp
>
ekpUpdate
=
new
LambdaUpdateWrapper
<>();
ekpUpdate
.
eq
(
TInsuranceEkp
::
getId
,
tInsuranceEkp
.
getId
());
ekpUpdate
.
eq
(
TInsuranceEkp
::
getId
,
tInsuranceEkp
.
getId
());
//ekp结算信息
SettleVo
settleVo
=
tInsuranceDetailService
.
getInsuranceDetailSettleStatus
(
tInsuranceEkp
.
getDetailId
(),
tInsuranceEkp
.
getDefaultSettleId
());
if
(
settleType
.
equals
(
CommonConstants
.
ZERO_STRING
)){
if
(
settleType
.
equals
(
CommonConstants
.
ZERO_STRING
)){
ekpParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
ekpParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
}
else
{
}
else
{
...
@@ -96,12 +93,26 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
...
@@ -96,12 +93,26 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
}
}
//预估新增重发
//预估新增重发
if
(
CommonConstants
.
ONE_INT
==
pushType
){
if
(
CommonConstants
.
ONE_INT
==
pushType
){
//如果结算类型不一致,结算类型不为空且已预估发送,结算id不一致
//如果结算类型不一致,预估已推送,结算id不一致,结算信息不为空
if
(!
settleTypeEquals
||
!
estimatePush
||
!
settleIdEquals
){
if
(!
settleTypeEquals
||
!
settleIdEquals
||
!
estimatePush
){
if
(!
settleTypeEquals
){
ekpUpdate
.
set
(
TInsuranceEkp
::
getNotResendMessage
,
CommonConstants
.
TWO_INT
);
}
if
(!
settleIdEquals
){
ekpUpdate
.
set
(
TInsuranceEkp
::
getNotResendMessage
,
CommonConstants
.
TWO_INT
);
}
if
(!
estimatePush
){
ekpUpdate
.
set
(
TInsuranceEkp
::
getNotResendMessage
,
CommonConstants
.
TWO_INT
);
}
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
TWO_INT
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
TWO_INT
);
update
(
ekpUpdate
);
update
(
ekpUpdate
);
if
(!
Common
.
isEmpty
(
settleVo
)){
settleUpdate
.
set
(
TInsuranceSettle
::
getEstimatePushTime
,
LocalDateTime
.
now
())
.
set
(
TInsuranceSettle
::
getIsEstimatePush
,
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
update
(
settleUpdate
);
}
continue
;
continue
;
}
else
{
}
else
{
ekpParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
ekpParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
ekpParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
ekpParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
...
@@ -109,7 +120,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
...
@@ -109,7 +120,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
settleUpdate
.
set
(
TInsuranceSettle
::
getEstimatePushTime
,
LocalDateTime
.
now
())
settleUpdate
.
set
(
TInsuranceSettle
::
getEstimatePushTime
,
LocalDateTime
.
now
())
.
set
(
TInsuranceSettle
::
getIsEstimatePush
,
CommonConstants
.
ONE_INT
);
.
set
(
TInsuranceSettle
::
getIsEstimatePush
,
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
update
(
settleUpdate
);
tInsuranceSettleService
.
update
(
settleUpdate
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ONE_INT
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceEkp
::
getPushTime
,
LocalDateTime
.
now
());
update
(
ekpUpdate
);
update
(
ekpUpdate
);
}
else
{
}
else
{
break
;
break
;
...
@@ -118,7 +130,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
...
@@ -118,7 +130,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
}
}
//实缴新增重发
//实缴新增重发
if
(
CommonConstants
.
TWO_INT
==
pushType
){
if
(
CommonConstants
.
TWO_INT
==
pushType
){
//如果结算类型不一致,
结算类型不为空且已发送,结算id不一致
//如果结算类型不一致,
实缴已推送,结算id不一致,则不再推送
if
(!
settleTypeEquals
||
!
actualPush
||
!
settleIdEquals
){
if
(!
settleTypeEquals
||
!
actualPush
||
!
settleIdEquals
){
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
TWO_INT
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
TWO_INT
);
update
(
ekpUpdate
);
update
(
ekpUpdate
);
...
@@ -131,15 +143,14 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
...
@@ -131,15 +143,14 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
settleUpdate
.
set
(
TInsuranceSettle
::
getActualPushTime
,
LocalDateTime
.
now
())
settleUpdate
.
set
(
TInsuranceSettle
::
getActualPushTime
,
LocalDateTime
.
now
())
.
set
(
TInsuranceSettle
::
getIsActualPush
,
CommonConstants
.
ONE_INT
);
.
set
(
TInsuranceSettle
::
getIsActualPush
,
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
update
(
settleUpdate
);
tInsuranceSettleService
.
update
(
settleUpdate
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ONE_INT
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceEkp
::
getPushTime
,
LocalDateTime
.
now
());
update
(
ekpUpdate
);
update
(
ekpUpdate
);
}
else
{
}
else
{
break
;
break
;
}
}
}
}
}
}
//ekp结算信息
SettleVo
settleVo
=
tInsuranceDetailService
.
getInsuranceDetailSettleStatus
(
tInsuranceEkp
.
getDetailId
(),
tInsuranceEkp
.
getDefaultSettleId
());
//实缴结算状态
//实缴结算状态
String
actualStatus
=
null
;
String
actualStatus
=
null
;
//预缴结算状态
//预缴结算状态
...
@@ -153,7 +164,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
...
@@ -153,7 +164,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
//变更结算信息
//变更结算信息
if
(
CommonConstants
.
THREE_INT
==
pushType
){
if
(
CommonConstants
.
THREE_INT
==
pushType
){
//如果结算类型不一致,结算类型不为空且已发送,结算id不一致
//如果结算类型不一致,结算类型不为空且已发送,结算id不一致
if
(!
settle
TypeEquals
||
!
settle
IdEquals
||
!
eStatus
||
!
aStatus
){
if
(!
settleIdEquals
||
!
eStatus
||
!
aStatus
){
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
TWO_INT
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
TWO_INT
);
update
(
ekpUpdate
);
update
(
ekpUpdate
);
continue
;
continue
;
...
@@ -161,7 +172,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
...
@@ -161,7 +172,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
ekpParam
.
setInteractiveType
(
InsurancesConstants
.
UPDATE_SETTLE_BILL
);
ekpParam
.
setInteractiveType
(
InsurancesConstants
.
UPDATE_SETTLE_BILL
);
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
if
(
StringUtils
.
isNotBlank
(
s
)){
if
(
StringUtils
.
isNotBlank
(
s
)){
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ONE_INT
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceEkp
::
getPushTime
,
LocalDateTime
.
now
());
update
(
ekpUpdate
);
update
(
ekpUpdate
);
}
else
{
}
else
{
break
;
break
;
...
@@ -176,9 +188,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
...
@@ -176,9 +188,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
ekpParam
.
setInteractiveType
(
InsurancesConstants
.
ABOLISH_SETTLE_BILL
);
ekpParam
.
setInteractiveType
(
InsurancesConstants
.
ABOLISH_SETTLE_BILL
);
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
if
(
StringUtils
.
isNotBlank
(
s
)){
if
(
StringUtils
.
isNotBlank
(
s
)){
detailUpdate
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
null
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ONE_INT
)
tInsuranceDetailService
.
update
(
detailUpdate
);
.
set
(
TInsuranceEkp
::
getPushTime
,
LocalDateTime
.
now
());
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ONE_INT
);
update
(
ekpUpdate
);
update
(
ekpUpdate
);
}
else
{
}
else
{
break
;
break
;
...
@@ -193,7 +204,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
...
@@ -193,7 +204,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
ekpParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
ekpParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
if
(
StringUtils
.
isNotBlank
(
s
)){
if
(
StringUtils
.
isNotBlank
(
s
)){
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ONE_INT
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceEkp
::
getPushTime
,
LocalDateTime
.
now
());
update
(
ekpUpdate
);
update
(
ekpUpdate
);
}
else
{
}
else
{
break
;
break
;
...
@@ -206,7 +218,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
...
@@ -206,7 +218,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
ekpParam
.
setActualPremium
(
actualPremium
.
negate
());
ekpParam
.
setActualPremium
(
actualPremium
.
negate
());
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
if
(
StringUtils
.
isNotBlank
(
s
)){
if
(
StringUtils
.
isNotBlank
(
s
)){
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ONE_INT
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceEkp
::
getPushTime
,
LocalDateTime
.
now
());
update
(
ekpUpdate
);
update
(
ekpUpdate
);
}
else
{
}
else
{
break
;
break
;
...
@@ -224,7 +237,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
...
@@ -224,7 +237,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
ekpParam
.
setInteractiveType
(
InsurancesConstants
.
CORRECT_SETTLE_BILL
);
ekpParam
.
setInteractiveType
(
InsurancesConstants
.
CORRECT_SETTLE_BILL
);
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
if
(
StringUtils
.
isNotBlank
(
s
)){
if
(
StringUtils
.
isNotBlank
(
s
)){
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ONE_INT
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceEkp
::
getPushTime
,
LocalDateTime
.
now
());
update
(
ekpUpdate
);
update
(
ekpUpdate
);
}
else
{
}
else
{
break
;
break
;
...
@@ -236,13 +250,13 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
...
@@ -236,13 +250,13 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
ekpParam
.
setInteractiveType
(
InsurancesConstants
.
CORRECT_SETTLE_BILL
);
ekpParam
.
setInteractiveType
(
InsurancesConstants
.
CORRECT_SETTLE_BILL
);
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
if
(
StringUtils
.
isNotBlank
(
s
)){
if
(
StringUtils
.
isNotBlank
(
s
)){
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ONE_INT
);
ekpUpdate
.
set
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceEkp
::
getPushTime
,
LocalDateTime
.
now
());
update
(
ekpUpdate
);
update
(
ekpUpdate
);
}
else
{
}
else
{
break
;
break
;
}
}
}
}
}
}
return
R
.
ok
(
"发送成功"
);
return
R
.
ok
(
"发送成功"
);
}
else
{
}
else
{
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceEkpMapper.xml
View file @
813c5563
...
@@ -32,8 +32,8 @@
...
@@ -32,8 +32,8 @@
<result
property=
"createTime"
column=
"CREATE_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"pushTime"
column=
"PUSH_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"pushTime"
column=
"PUSH_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"pushType"
column=
"PUSH_TYPE"
jdbcType=
"TINYINT"
/>
<result
property=
"pushType"
column=
"PUSH_TYPE"
jdbcType=
"TINYINT"
/>
<result
property=
"settleType"
column=
"SETTLE_TYPE"
jdbcType=
"TINYINT
"
/>
<result
property=
"settleType"
column=
"SETTLE_TYPE"
jdbcType=
"VARCHAR
"
/>
<result
property=
"notResendMessage"
column=
"NOT_RESEND_MESSAGE"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
POLICY_END,BUY_STANDARD,MEDICAL_QUOTA,
POLICY_END,BUY_STANDARD,MEDICAL_QUOTA,
DIE_DISABLE_QUOTA,ACTUAL_PREMIUM,ESTIMATE_PREMIUM,
DIE_DISABLE_QUOTA,ACTUAL_PREMIUM,ESTIMATE_PREMIUM,
SETTLE_MONTH,INTERACTIVE_TYPE,RESEND_FLAG,
SETTLE_MONTH,INTERACTIVE_TYPE,RESEND_FLAG,
CREATE_TIME,PUSH_TIME,PUSH_TYPE,SETTLE_TYPE
CREATE_TIME,PUSH_TIME,PUSH_TYPE,SETTLE_TYPE
,NOT_RESEND_MESSAGE
</sql>
</sql>
<select
id=
"getEkpRefundList"
resultMap=
"BaseResultMap"
>
<select
id=
"getEkpRefundList"
resultMap=
"BaseResultMap"
>
...
@@ -55,6 +55,7 @@
...
@@ -55,6 +55,7 @@
t_insurance_ekp
t_insurance_ekp
where
where
RESEND_FLAG = 0
RESEND_FLAG = 0
order by CREATE_TIME asc
</select>
</select>
...
...
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