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
1fb1e3c5
Commit
1fb1e3c5
authored
Aug 24, 2021
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【ydlife】-【客户管理】-补全客户信息
parent
c7299c35
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
0 deletions
+38
-0
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+16
-0
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPolicyholderMapper.java
+4
-0
yd-api/src/main/resources/mapper/customer/AclPolicyholderMapper.xml
+18
-0
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
1fb1e3c5
...
...
@@ -2112,6 +2112,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
orderIdList
.
addAll
(
vehiclePolicyOrderIdList
);
if
(
CollectionUtils
.
isNotEmpty
(
orderIdList
))
{
List
<
CustomerHolder
>
list
=
aclPolicyholderMapper
.
queryThisPractitiionerAllPolicyHolderList
(
orderIdList
);
// 如果姓名,出生日期为空就去查ag_acl_policyholder表的记录
this
.
completeCustomerHolder
(
list
);
resp
.
setList
(
list
);
resp
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
...
...
@@ -2127,6 +2129,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
resp
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"820001"
)));
if
(
customerId
!=
null
)
{
List
<
CustomerHolder
>
list
=
aclPolicyholderMapper
.
queryInsuredListByHolderCustomerId
(
customerId
);
// 如果姓名,出生日期为空就去查ag_acl_policyholder表的记录
this
.
completeCustomerHolder
(
list
);
resp
.
setList
(
list
);
resp
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
...
...
@@ -2135,6 +2139,18 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
return
resp
;
}
private
void
completeCustomerHolder
(
List
<
CustomerHolder
>
list
)
{
CustomerHolder
info
;
for
(
CustomerHolder
holder:
list
)
{
if
(
holder
.
getName
()
==
null
||
holder
.
getBirthDate
()
==
null
)
{
info
=
aclPolicyholderMapper
.
queryUsefulInfo
(
holder
.
getCustomerId
(),
2
);
if
(
info
!=
null
)
{
BeanUtils
.
copyProperties
(
info
,
holder
);
}
}
}
}
@Override
public
QueryPolicyListByHolderCustomerIdResponesVO
queryPolicyListByHolderCustomerId
(
Long
customerId
)
{
QueryPolicyListByHolderCustomerIdResponesVO
resp
=
new
QueryPolicyListByHolderCustomerIdResponesVO
();
...
...
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPolicyholderMapper.java
View file @
1fb1e3c5
...
...
@@ -3,6 +3,7 @@ package com.yd.dal.mapper.customer;
import
com.yd.api.practitioner.vo.practitionerCustomer.CustomerHolder
;
import
com.yd.dal.entity.customer.AclPolicyholder
;
import
com.yd.dal.entity.order.CustomerPolicyInfo
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -28,4 +29,6 @@ public interface AclPolicyholderMapper {
List
<
CustomerHolder
>
queryThisPractitiionerAllPolicyHolderList
(
List
<
Long
>
orderIdList
);
List
<
CustomerPolicyInfo
>
queryPolicyListByHolderCustomerId
(
Long
customerId
);
CustomerHolder
queryUsefulInfo
(
@Param
(
"customerId"
)
Long
customerId
,
@Param
(
"type"
)
int
type
);
}
\ No newline at end of file
yd-api/src/main/resources/mapper/customer/AclPolicyholderMapper.xml
View file @
1fb1e3c5
...
...
@@ -999,4 +999,21 @@
and p.customer_id = #{customerId,jdbcType=BIGINT}
</select>
<select
id=
"queryUsefulInfo"
resultMap=
"customerHolder"
>
select h.customer_id id,
h.name,
h.mobile_no ,
IF(h.gender = 1,'男','女') gender,
h.birth_date
from ag_acl_policyholder h
where h.name is not null and h.birth_date is not null
<if
test=
"customerId != null"
>
and h.customer_id = #{customerId,jdbcType=BIGINT}
</if>
<if
test=
"type != null"
>
and h.type = #{type,jdbcType=INTEGER}
</if>
limit 0,1
</select>
</mapper>
\ No newline at end of file
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