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
c499925c
Commit
c499925c
authored
Dec 14, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-licancan' into 'feature/insurance-1.3.0'
Feature licancan See merge request
!304
parents
a5e52536
a4cd4349
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
106 additions
and
82 deletions
+106
-82
EkpUpdateParam.java
...yifu/cloud/plus/v1/yifu/insurances/vo/EkpUpdateParam.java
+1
-1
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+89
-77
TInsurancePolicyMapper.xml
...in/resources/mapper/insurances/TInsurancePolicyMapper.xml
+16
-4
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/EkpUpdateParam.java
View file @
c499925c
...
@@ -39,7 +39,7 @@ public class EkpUpdateParam implements Serializable {
...
@@ -39,7 +39,7 @@ public class EkpUpdateParam implements Serializable {
private
String
fd_3b5bf031b52314
;
private
String
fd_3b5bf031b52314
;
/**
/**
* 商险ID
* 商险ID
:商险id_结算id
*/
*/
private
String
fd_3b5bf032d7a822
;
private
String
fd_3b5bf032d7a822
;
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
c499925c
...
@@ -2055,12 +2055,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2055,12 +2055,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(
Optional
.
ofNullable
(
detail
).
isPresent
()){
//当两次发票号不一致时才更新
//当两次发票号不一致时才更新
if
(!
success
.
getInvoiceNo
().
equals
(
detail
.
getInvoiceNo
())){
if
(!
success
.
getInvoiceNo
().
equals
(
detail
.
getInvoiceNo
())){
//设置发票号
//设置发票号
detail
.
setInvoiceNo
(
success
.
getInvoiceNo
());
detail
.
setInvoiceNo
(
success
.
getInvoiceNo
());
detailList
.
add
(
detail
);
detailList
.
add
(
detail
);
//只有当结算id存在的时候修改数据才会推给ekp
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
try
{
try
{
//推送修改信息
//推送修改信息
EkpUpdateParam
ekpUpdateParam
=
new
EkpUpdateParam
();
EkpUpdateParam
ekpUpdateParam
=
new
EkpUpdateParam
();
...
@@ -2069,7 +2072,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2069,7 +2072,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ekpUpdateParam
.
setFd_3b5bf02fa14596
(
getBuyType
(
detail
.
getBuyType
()));
ekpUpdateParam
.
setFd_3b5bf02fa14596
(
getBuyType
(
detail
.
getBuyType
()));
ekpUpdateParam
.
setFd_3b5bf030ab1a56
(
success
.
getInvoiceNo
());
ekpUpdateParam
.
setFd_3b5bf030ab1a56
(
success
.
getInvoiceNo
());
ekpUpdateParam
.
setFd_3b5bf031b52314
(
detail
.
getBuyStandard
());
ekpUpdateParam
.
setFd_3b5bf031b52314
(
detail
.
getBuyStandard
());
ekpUpdateParam
.
setFd_3b5bf032d7a822
(
detail
.
get
Id
());
ekpUpdateParam
.
setFd_3b5bf032d7a822
(
detail
.
getId
()
+
"_"
+
detail
.
getDefaultSettle
Id
());
ekpUpdateParam
.
setFd_3b5bf0b7b4c058
(
"操作人:"
+
user
.
getNickname
()
+
";操作时间:"
+
LocalDateTime
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
))
+
";变更前发票号:"
+
detail
.
getInvoiceNo
()
+
";变更后发票号:"
+
success
.
getInvoiceNo
());
ekpUpdateParam
.
setFd_3b5bf0b7b4c058
(
"操作人:"
+
user
.
getNickname
()
+
";操作时间:"
+
LocalDateTime
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
))
+
";变更前发票号:"
+
detail
.
getInvoiceNo
()
+
";变更后发票号:"
+
success
.
getInvoiceNo
());
eKPInsuranceUtil
.
sendUpdateToEkp
(
ekpUpdateParam
);
eKPInsuranceUtil
.
sendUpdateToEkp
(
ekpUpdateParam
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
...
@@ -2078,6 +2081,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2078,6 +2081,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
this
.
updateBatchById
(
detailList
);
this
.
updateBatchById
(
detailList
);
...
@@ -2156,7 +2161,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2156,7 +2161,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(
Optional
.
ofNullable
(
detail
).
isPresent
()){
TInsuranceDetail
oldDetail
=
new
TInsuranceDetail
();
TInsuranceDetail
oldDetail
=
new
TInsuranceDetail
();
BeanCopyUtils
.
copyProperties
(
detail
,
oldDetail
);
BeanCopyUtils
.
copyProperties
(
detail
,
oldDetail
);
if
(
StringUtils
.
isNotBlank
(
success
.
getPolicyStartNew
())){
if
(
StringUtils
.
isNotBlank
(
success
.
getPolicyStartNew
())){
...
@@ -2172,6 +2177,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2172,6 +2177,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//变更记录
//变更记录
tBusinessOperateService
.
saveModificationRecord
(
detail
.
getId
(),
oldDetail
,
detail
,
success
.
getReason
());
tBusinessOperateService
.
saveModificationRecord
(
detail
.
getId
(),
oldDetail
,
detail
,
success
.
getReason
());
//只有当结算id存在的时候修改数据才会推给ekp
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
try
{
try
{
//推送修改信息
//推送修改信息
StringBuilder
sb
=
new
StringBuilder
();
StringBuilder
sb
=
new
StringBuilder
();
...
@@ -2190,7 +2197,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2190,7 +2197,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ekpUpdateParam
.
setFd_3b5bf02e1d47cc
(
success
.
getPolicyEnd
());
ekpUpdateParam
.
setFd_3b5bf02e1d47cc
(
success
.
getPolicyEnd
());
ekpUpdateParam
.
setFd_3b5bf02fa14596
(
getBuyType
(
success
.
getBuyType
()));
ekpUpdateParam
.
setFd_3b5bf02fa14596
(
getBuyType
(
success
.
getBuyType
()));
ekpUpdateParam
.
setFd_3b5bf031b52314
(
detail
.
getBuyStandard
());
ekpUpdateParam
.
setFd_3b5bf031b52314
(
detail
.
getBuyStandard
());
ekpUpdateParam
.
setFd_3b5bf032d7a822
(
detail
.
get
Id
());
ekpUpdateParam
.
setFd_3b5bf032d7a822
(
detail
.
getId
()
+
"_"
+
detail
.
getDefaultSettle
Id
());
ekpUpdateParam
.
setFd_3b5bf0b7b4c058
(
sb
.
toString
());
ekpUpdateParam
.
setFd_3b5bf0b7b4c058
(
sb
.
toString
());
eKPInsuranceUtil
.
sendUpdateToEkp
(
ekpUpdateParam
);
eKPInsuranceUtil
.
sendUpdateToEkp
(
ekpUpdateParam
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
...
@@ -2198,6 +2205,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2198,6 +2205,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
this
.
updateBatchById
(
detailList
);
this
.
updateBatchById
(
detailList
);
...
@@ -2275,6 +2284,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2275,6 +2284,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//变更记录
//变更记录
tBusinessOperateService
.
saveModificationRecord
(
byId
.
getId
(),
old
,
byId
,
param
.
getReason
());
tBusinessOperateService
.
saveModificationRecord
(
byId
.
getId
(),
old
,
byId
,
param
.
getReason
());
//只有当结算id存在的时候修改数据才会推给ekp
if
(
StringUtils
.
isNotBlank
(
byId
.
getDefaultSettleId
())){
try
{
try
{
//推送修改信息
//推送修改信息
StringBuilder
sb
=
new
StringBuilder
();
StringBuilder
sb
=
new
StringBuilder
();
...
@@ -2293,12 +2304,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2293,12 +2304,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ekpUpdateParam
.
setFd_3b5bf02e1d47cc
(
param
.
getPolicyEnd
());
ekpUpdateParam
.
setFd_3b5bf02e1d47cc
(
param
.
getPolicyEnd
());
ekpUpdateParam
.
setFd_3b5bf02fa14596
(
getBuyType
(
param
.
getBuyType
()));
ekpUpdateParam
.
setFd_3b5bf02fa14596
(
getBuyType
(
param
.
getBuyType
()));
ekpUpdateParam
.
setFd_3b5bf031b52314
(
byId
.
getBuyStandard
());
ekpUpdateParam
.
setFd_3b5bf031b52314
(
byId
.
getBuyStandard
());
ekpUpdateParam
.
setFd_3b5bf032d7a822
(
byId
.
get
Id
());
ekpUpdateParam
.
setFd_3b5bf032d7a822
(
byId
.
getId
()
+
"_"
+
byId
.
getDefaultSettle
Id
());
ekpUpdateParam
.
setFd_3b5bf0b7b4c058
(
sb
.
toString
());
ekpUpdateParam
.
setFd_3b5bf0b7b4c058
(
sb
.
toString
());
eKPInsuranceUtil
.
sendUpdateToEkp
(
ekpUpdateParam
);
eKPInsuranceUtil
.
sendUpdateToEkp
(
ekpUpdateParam
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
"pushEkp error updateInsuranceInsuredById:"
,
e
.
getMessage
());
log
.
error
(
"pushEkp error updateInsuranceInsuredById:"
,
e
.
getMessage
());
}
}
}
this
.
updateById
(
byId
);
this
.
updateById
(
byId
);
return
R
.
ok
(
InsurancesConstants
.
OPERATE_SUCCESS
);
return
R
.
ok
(
InsurancesConstants
.
OPERATE_SUCCESS
);
}
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsurancePolicyMapper.xml
View file @
c499925c
...
@@ -35,12 +35,18 @@
...
@@ -35,12 +35,18 @@
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
and POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
and POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != ''"
>
<if
test=
"param.policyStart != null and param.policyStart.trim() != ''
and param.policyEnd == null
"
>
AND DATE(POLICY_START)
<![CDATA[ >= ]]>
#{param.policyStart}
AND DATE(POLICY_START)
<![CDATA[ >= ]]>
#{param.policyStart}
</if>
</if>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != ''"
>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != ''
and param.policyStart == null
"
>
AND DATE(POLICY_END)
<![CDATA[ <= ]]>
#{param.policyEnd}
AND DATE(POLICY_END)
<![CDATA[ <= ]]>
#{param.policyEnd}
</if>
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"
>
and (
(DATE(POLICY_START)
<![CDATA[ >= ]]>
#{param.policyStart} and DATE(POLICY_START)
<![CDATA[ <= ]]>
#{param.policyEnd}) OR
(DATE(POLICY_END)
<![CDATA[ >= ]]>
#{param.policyStart} and DATE(POLICY_END)
<![CDATA[ <= ]]>
#{param.policyEnd})
)
</if>
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
and INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
</if>
...
@@ -61,12 +67,18 @@
...
@@ -61,12 +67,18 @@
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
and POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
and POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != ''"
>
<if
test=
"param.policyStart != null and param.policyStart.trim() != ''
and param.policyEnd == null
"
>
AND DATE(POLICY_START)
<![CDATA[ >= ]]>
#{param.policyStart}
AND DATE(POLICY_START)
<![CDATA[ >= ]]>
#{param.policyStart}
</if>
</if>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != ''"
>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != ''
and param.policyStart == null
"
>
AND DATE(POLICY_END)
<![CDATA[ <= ]]>
#{param.policyEnd}
AND DATE(POLICY_END)
<![CDATA[ <= ]]>
#{param.policyEnd}
</if>
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"
>
and (
(DATE(POLICY_START)
<![CDATA[ >= ]]>
#{param.policyStart} and DATE(POLICY_START)
<![CDATA[ <= ]]>
#{param.policyEnd}) OR
(DATE(POLICY_END)
<![CDATA[ >= ]]>
#{param.policyStart} and DATE(POLICY_END)
<![CDATA[ <= ]]>
#{param.policyEnd})
)
</if>
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
and INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
</if>
...
...
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