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
eb593662
Commit
eb593662
authored
Dec 10, 2021
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户告知书关联保单号后添加到附件
parent
2f22b370
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
10 deletions
+75
-10
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+43
-9
yd-api/src/main/java/com/yd/dal/mapper/customer/AgPoInformedMapper.java
+6
-0
yd-api/src/main/resources/mapper/customer/AclCustomerMapper.xml
+8
-1
yd-api/src/main/resources/mapper/customer/AgPoInformedMapper.xml
+18
-0
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
eb593662
...
...
@@ -913,7 +913,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
Long
practitionerId
=
requestVO
.
getPractitionerId
();
AclCustomer
customer
=
aclCustomerDALService
.
findByCustomerId
(
customerId
);
info
.
setOpportunityId
(
customerId
);
info
.
setName
(
customer
.
getName
());
String
customerName
=
customer
.
getName
();
info
.
setName
(
customerName
);
info
.
setAge
(
customer
.
getAge
());
info
.
setGender
(
customer
.
getGender
());
info
.
setMobileNo
(
customer
.
getMobileNo
());
...
...
@@ -963,6 +964,12 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
mktLeadsAssigneds
.
setAssignedPractitionerId
(
practitionerId
);
List
<
MktLeadsAssigneds
>
mktLeadsAssignedsList
=
mktLeadsAssignedsDALService
.
findByMktLeadsAssigneds
(
mktLeadsAssigneds
);
mktLeadsAssigneds
=
mktLeadsAssignedsList
.
get
(
0
);
String
leadsAssignedsCustomerName
=
mktLeadsAssigneds
.
getCustomerName
();
if
(
customerName
!=
null
&&
leadsAssignedsCustomerName
!=
null
)
{
if
(!
customerName
.
equals
(
leadsAssignedsCustomerName
))
{
info
.
setName
(
leadsAssignedsCustomerName
);
}
}
info
.
setFyc
(
mktLeadsAssigneds
.
getFyc
());
info
.
setFyp
(
mktLeadsAssigneds
.
getFyp
());
info
.
setPieces
(
mktLeadsAssigneds
.
getPieces
());
...
...
@@ -3651,9 +3658,16 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
AclCustomer
oldCustomer
=
aclCustomerDALService
.
findById
(
requestVO
.
getCustomerId
());
String
newName
=
requestVO
.
getCustomerName
();
String
newMobile
=
requestVO
.
getCustomerMobile
();
// 数据库实体
AclCustomer
newerCustomer
=
aclCustomerDALService
.
findByMobileNo
(
newMobile
);
if
(
newerCustomer
==
null
)
{
// 查询客户是否存在
AclCustomer
customerParams
=
new
AclCustomer
();
customerParams
.
setMobileNo
(
newMobile
);
customerParams
.
setRole
(
2
);
customerParams
.
setIsActive
(
1
);
List
<
AclCustomer
>
customerList
=
aclCustomerDALService
.
findByObj
(
customerParams
);
AclCustomer
newerCustomer
=
null
;
if
(
CollectionUtils
.
isNotEmpty
(
customerList
))
{
newerCustomer
=
customerList
.
get
(
0
);
}
else
{
//此人为第一次进来
//帮其进行注册
newerCustomer
=
new
AclCustomer
();
...
...
@@ -3675,7 +3689,22 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
Long
mdMkCampaignId
=
systemConfigService
.
getMdMkCampaignId
(
"leadaddedbypractioner"
);
newerCustomer
.
setMktCampaign
(
String
.
valueOf
(
mdMkCampaignId
));
aclCustomerDALService
.
save
(
newerCustomer
);
newerCustomer
.
setId
(
newerCustomer
.
getId
());
Long
newerCustomerId
=
newerCustomer
.
getId
();
//查询此customer是否在pool中
MktLeadsPool
pool
=
mktLeadsPoolDALService
.
findByCustomerId
(
newerCustomerId
);
if
(
pool
==
null
)
{
//线索池为空时,保存线索池
pool
=
new
MktLeadsPool
();
pool
.
setMktCampaign
(
String
.
valueOf
(
mdMkCampaignId
));
pool
.
setCustomerId
(
newerCustomerId
);
pool
.
setHasAssigned
(
1
);
pool
.
setIsActive
(
1
);
pool
.
setAddedAt
(
new
Date
());
pool
.
setAddedBy
(
requestVO
.
getPractitionerId
());
pool
.
setAdderType
(
2
);
mktLeadsPoolDALService
.
save
(
pool
);
}
}
if
(!
newMobile
.
equals
(
oldCustomer
.
getMobileNo
())
||
!
newName
.
equals
(
oldCustomer
.
getName
()))
{
// 如果电话不一样,就更新商机的电话
MktLeadsAssigneds
mktLeadsAssigneds
=
new
MktLeadsAssigneds
();
...
...
@@ -3685,7 +3714,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
mktLeadsAssigneds
.
setCustomerId
(
newerCustomer
.
getId
());
mktLeadsAssignedsMapper
.
updateByPrimaryKeySelective
(
mktLeadsAssigneds
);
}
// 数据库实体
AgPoInformed
informed
=
new
AgPoInformed
();
informed
.
setCustomerName
(
newName
);
informed
.
setCustomerMobile
(
newMobile
);
...
...
@@ -3765,13 +3794,18 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
return
resp
;
}
// 更新保单号
AgPoInformed
informed
=
informedMapper
.
selectByPrimaryKey
(
requestVO
.
getId
());
BeanUtils
.
copyProperties
(
requestVO
,
informed
);
// 删除旧保单号关联的客户告知书保单附件
if
(
informed
.
getPolicyNo
()
!=
null
)
{
informedMapper
.
deletePoPolicyOfflineUploadByPolicyNo
(
informed
.
getPolicyNo
());
}
// 更新保单号
informed
.
setPolicyNo
(
policyNo
);
informed
.
setUpdatedBy
(
requestVO
.
getLoginId
());
informed
.
setUpdatedAt
(
new
Date
());
informedMapper
.
updateByPrimaryKeySelective
(
informed
);
// 新保单号新增客户告知书到保单附件
informedMapper
.
insertInformedSheet
(
informed
);
resp
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
resp
.
setId
(
informed
.
getId
());
...
...
yd-api/src/main/java/com/yd/dal/mapper/customer/AgPoInformedMapper.java
View file @
eb593662
...
...
@@ -20,4 +20,9 @@ public interface AgPoInformedMapper {
List
<
AgPoInformed
>
selectByRecord
(
AgPoInformed
record
);
String
getNextInformedNo
();
void
insertInformedSheet
(
AgPoInformed
record
);
void
deletePoPolicyOfflineUploadByPolicyNo
(
String
policyNo
);
}
\ No newline at end of file
yd-api/src/main/resources/mapper/customer/AclCustomerMapper.xml
View file @
eb593662
...
...
@@ -797,5 +797,11 @@
and id = #{id,jdbcType=BIGINT}
</if>
<if
test=
"role != null"
>
and `role` = #{role,jdbcType=INTEGER}
</if>
<if
test=
"isActive != null"
>
and is_active = #{isActive,jdbcType=INTEGER}
</if>
</select>
</mapper>
</mapper>
\ No newline at end of file
yd-api/src/main/resources/mapper/customer/AgPoInformedMapper.xml
View file @
eb593662
...
...
@@ -259,4 +259,21 @@
<select
id=
"getNextInformedNo"
resultType=
"java.lang.String"
statementType=
"CALLABLE"
>
select f_getNextInformedNo()
</select>
<insert
id=
"insertInformedSheet"
parameterType=
"com.yd.dal.entity.customer.AgPoInformed"
>
INSERT INTO ag_po_policy_offline_upload
(`policy_offline_id`,
`policy_no`, `file_type`, `file_name`, `file_path`,`file_size`,
`uploaded_at`, `uploaded_by`, `attachment_type`)
VALUES (
(select id from ag_po_policy_offline where policy_no = #{policyNo,jdbcType=VARCHAR}),
#{policyNo,jdbcType=VARCHAR}, 'pdf', #{informedNo,jdbcType=VARCHAR}, #{informedOssPath,jdbcType=VARCHAR},'0',
now(), -1, 2)
</insert>
<delete
id=
"deletePoPolicyOfflineUploadByPolicyNo"
parameterType=
"java.lang.String"
>
delete from ag_po_policy_offline_upload
where policy_no = #{policyNo,jdbcType=VARCHAR} and attachment_type=2
</delete>
</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