Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
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
AutogeneralShanghai
yd-backend
Commits
c5ba57fd
Commit
c5ba57fd
authored
Aug 26, 2021
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【ydlife】-【客户管理】-6车险保单查询
parent
75ec998a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
19 deletions
+39
-19
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+4
-4
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPolicyholderMapper.java
+2
-1
yd-api/src/main/resources/mapper/customer/AclPolicyholderMapper.xml
+33
-14
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
c5ba57fd
...
...
@@ -2105,7 +2105,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
if
(
CollectionUtils
.
isNotEmpty
(
orderIdList
))
{
List
<
CustomerHolder
>
list
=
aclPolicyholderMapper
.
queryThisPractitiionerAllPolicyHolderList
(
orderIdList
);
// 如果姓名,出生日期为空就去查ag_acl_policyholder表的记录
this
.
completeCustomerHolder
(
list
);
this
.
completeCustomerHolder
(
list
,
2
);
resp
.
setList
(
list
);
resp
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
...
...
@@ -2122,7 +2122,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
if
(
customerId
!=
null
)
{
List
<
CustomerHolder
>
list
=
aclPolicyholderMapper
.
queryInsuredListByHolderCustomerId
(
customerId
);
// 如果姓名,出生日期为空就去查ag_acl_policyholder表的记录
this
.
completeCustomerHolder
(
list
);
this
.
completeCustomerHolder
(
list
,
3
);
resp
.
setList
(
list
);
resp
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
...
...
@@ -2131,11 +2131,11 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
return
resp
;
}
private
void
completeCustomerHolder
(
List
<
CustomerHolder
>
list
)
{
private
void
completeCustomerHolder
(
List
<
CustomerHolder
>
list
,
int
holderType
)
{
CustomerHolder
info
;
for
(
CustomerHolder
holder:
list
)
{
if
(
holder
.
getName
()
==
null
||
holder
.
getBirthDate
()
==
null
)
{
info
=
aclPolicyholderMapper
.
queryUsefulInfo
(
holder
.
getCustomerId
(),
2
);
info
=
aclPolicyholderMapper
.
queryUsefulInfo
(
holder
.
getCustomerId
(),
holderType
);
if
(
info
!=
null
)
{
BeanUtils
.
copyProperties
(
info
,
holder
);
}
...
...
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPolicyholderMapper.java
View file @
c5ba57fd
...
...
@@ -31,5 +31,5 @@ public interface AclPolicyholderMapper {
List
<
CustomerPolicyInfo
>
queryPolicyListByHolderCustomerId
(
QueryPolicyListByHolderCustomerIdRequestVO
requestVO
);
CustomerHolder
queryUsefulInfo
(
@Param
(
"customerId"
)
Long
customerId
,
@Param
(
"type"
)
int
t
ype
);
CustomerHolder
queryUsefulInfo
(
@Param
(
"customerId"
)
Long
customerId
,
@Param
(
"type"
)
int
holderT
ype
);
}
\ No newline at end of file
yd-api/src/main/resources/mapper/customer/AclPolicyholderMapper.xml
View file @
c5ba57fd
...
...
@@ -973,22 +973,25 @@
left join ag_acl_customer c on t.customer_id = c.id
</select>
<sql
id=
"customerPolicyInfoFields"
>
o.id as orderId,
o.order_no as orderNo ,
o.policy_no as policyNo ,
p.name as holderName,
o.destination as destination,
date_format(o.order_date, '%Y-%m-%d %H:%i:%s') as orderDate,
date_format(o.effective_start_date, '%Y-%m-%d %H:%i:%s') as startDate,
date_format(o.effective_end_date, '%Y-%m-%d %H:%i:%s') as endDate,
o.order_price as orderPrice,
o.plan_id as planId,
o.product_id as productId ,
IF(o.effective_start_date
<
= NOW() and o.effective_end_date
>
= NOW(),'有效','无效') isValid,
a.name planName,
b.name productName
</sql>
<select
id=
"queryPolicyListByHolderCustomerId"
resultType=
"com.yd.dal.entity.order.CustomerPolicyInfo"
>
SELECT
o.id as orderId,
o.order_no as orderNo ,
o.policy_no as policyNo ,
p.name as holderName,
o.destination as destination,
date_format(o.order_date, '%Y-%m-%d %H:%i:%s') as orderDate,
date_format(o.effective_start_date, '%Y-%m-%d %H:%i:%s') as startDate,
date_format(o.effective_end_date, '%Y-%m-%d %H:%i:%s') as endDate,
o.order_price as orderPrice,
o.plan_id as planId,
o.product_id as productId ,
IF(o.effective_start_date
<
= NOW() and o.effective_end_date
>
= NOW(),'有效','无效') isValid,
a.name planName,
b.name productName
<include
refid=
"customerPolicyInfoFields"
/>
FROM ag_po_order o
inner JOIN ag_acl_customer_fortune f
ON o.id = f.order_id and f.drop_option_code = 'S01' and o.status = 3 and o.order_price
>
0 and o.insurer_id != 888 and o.policy_no is not null
...
...
@@ -998,6 +1001,22 @@
WHERE 1=1
and p.customer_id = #{holderCustomerId,jdbcType=BIGINT}
and f.customer_id = #{practitionerCustomerId,jdbcType=BIGINT}
UNION ALL
SELECT
<include
refid=
"customerPolicyInfoFields"
/>
FROM
(select o.*
from ag_po_quotation_vehicle_relation v
left join ag_po_order o on o.quotation_id = v.quotation_id
where v.customer_id = #{practitionerCustomerId,jdbcType=BIGINT}
) o
inner JOIN ag_acl_policyholder p ON o.id = p.order_id and p.type = 2
left join ag_product_plan a on o.plan_id = a.id
left join ag_product b on o.product_id = b.id
WHERE 1=1
and p.customer_id = #{holderCustomerId,jdbcType=BIGINT}
</select>
<select
id=
"queryUsefulInfo"
resultMap=
"customerHolder"
>
...
...
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