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
d64b5853
Commit
d64b5853
authored
Oct 28, 2021
by
hongzhong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_20210330' into dev_20210330
parents
6e8c844f
38ef5764
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
106 additions
and
29 deletions
+106
-29
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+40
-25
yd-api/src/main/java/com/yd/api/practitioner/vo/informed/QueryInformedSheetListRequestVO.java
+7
-0
yd-api/src/main/java/com/yd/dal/entity/marketing/MktLeadsAssignedTrack.java
+11
-1
yd-api/src/main/java/com/yd/dal/entity/marketing/MktLeadsAssigneds.java
+10
-1
yd-api/src/main/java/com/yd/dal/entity/meta/MdDropOptions.java
+4
-2
yd-api/src/main/java/com/yd/dal/mapper/marketing/MktLeadsAssignedTrackMapper.java
+3
-0
yd-api/src/main/java/com/yd/dal/service/marketing/Impl/MktLeadsAssignedTrackDALServiceImpl.java
+5
-0
yd-api/src/main/java/com/yd/dal/service/marketing/MktLeadsAssignedTrackDALService.java
+2
-0
yd-api/src/main/resources/mapper/customer/AgPoInformedMapper.xml
+3
-0
yd-api/src/main/resources/mapper/marketing/MktLeadsAssignedTrackMapper.xml
+13
-0
yd-api/src/main/resources/mapper/marketing/MktLeadsAssignedsMapper.xml
+8
-0
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
d64b5853
...
...
@@ -3612,16 +3612,33 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
CommonResultIDResponseVO
resp
=
new
CommonResultIDResponseVO
();
try
{
// 先判断传入的客户姓名和客户电话与传入的customerId是否一致
AclCustomer
aclCustomer
=
aclCustomerDALService
.
findById
(
requestVO
.
getCustomerId
());
String
customerName
=
requestVO
.
getCustomerName
();
String
customerMobile
=
requestVO
.
getCustomerMobile
();
if
(!
customerMobile
.
equals
(
aclCustomer
.
getMobileNo
()))
{
}
AclCustomer
oldCustomer
=
aclCustomerDALService
.
findById
(
requestVO
.
getCustomerId
());
String
newName
=
requestVO
.
getCustomerName
();
String
newMobile
=
requestVO
.
getCustomerMobile
();
// 数据库实体
AclCustomer
newerCustomer
=
aclCustomerDALService
.
findByMobileNo
(
newMobile
);
if
(
newerCustomer
==
null
)
{
// 注册
RegisterRequestVO
registerRequestVO
=
new
RegisterRequestVO
();
registerRequestVO
.
setMobileNo
(
newName
);
registerRequestVO
.
setName
(
newMobile
);
//将增员对象进行注册
RegisterResponseVO
registerResp
=
customerService
.
register
(
registerRequestVO
);
newerCustomer
=
new
AclCustomer
();
newerCustomer
.
setId
(
registerResp
.
getCustomerId
());
}
if
(!
newMobile
.
equals
(
oldCustomer
.
getMobileNo
())
||
!
newName
.
equals
(
oldCustomer
.
getName
()))
{
// 如果电话不一样,就更新商机的电话
MktLeadsAssigneds
mktLeadsAssigneds
=
new
MktLeadsAssigneds
();
mktLeadsAssigneds
.
setId
(
requestVO
.
getLeadsAssignedId
());
mktLeadsAssigneds
.
setCustomerMobile
(
newMobile
);
mktLeadsAssigneds
.
setCustomerName
(
newName
);
mktLeadsAssigneds
.
setCustomerId
(
newerCustomer
.
getId
());
mktLeadsAssignedsMapper
.
updateByPrimaryKeySelective
(
mktLeadsAssigneds
);
}
AgPoInformed
informed
=
new
AgPoInformed
();
BeanUtils
.
copyProperties
(
requestVO
,
informed
);
informed
.
setCustomerId
(
acl
Customer
.
getId
());
informed
.
setCustomerId
(
newer
Customer
.
getId
());
informed
.
setStatus
(
"0"
);
informed
.
setIsActive
(
1
);
...
...
@@ -3637,7 +3654,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
// 商机更新一条告知书待签署的记录
MktLeadsAssignedTrack
track
=
new
MktLeadsAssignedTrack
();
track
.
setCustomerId
(
requestVO
.
getLeadsAssignedId
());
track
.
setCustomerId
(
newerCustomer
.
getId
());
// 商机的id还是得用旧的customerId
track
.
setLeadsAssignedId
(
requestVO
.
getLeadsAssignedId
());
track
.
setTrackTime
(
curDate
);
track
.
setCreatedBy
(
loginId
);
track
.
setCreatedAt
(
new
Date
());
...
...
@@ -3645,20 +3663,12 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
track
.
setUpdatedBy
(
loginId
);
track
.
setUpdatorType
(
1
);
track
.
setUpdatedAt
(
new
Date
());
MdDropOptions
dropOption
=
systemConfigService
.
getDropOption
(
"
action_code
"
,
"customerNotice_0"
);
MdDropOptions
dropOption
=
systemConfigService
.
getDropOption
(
"
bizchance_promotion_action
"
,
"customerNotice_0"
);
track
.
setMdDropOptionId
(
dropOption
.
getId
());
track
.
setTrackScore
(
dropOption
.
getDropOptionScore
());
//保存
mktLeadsAssignedTrackDALService
.
saveTrack
(
track
);
// 如果名字不一样,就更新商机的名字
// if () {
// AclCustomer customer = aclCustomerDALService.findById(requestVO.getCustomerId());
// }
// MktLeadsAssigneds mktLeadsAssigneds = new MktLeadsAssigneds();
// mktLeadsAssigneds
// mktLeadsAssignedsMapper.updateByPrimaryKeySelective();
resp
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
resp
.
setId
(
informed
.
getId
());
}
catch
(
Exception
e
)
{
...
...
@@ -3742,17 +3752,18 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
informed
.
setStatus
(
"1"
);
informedMapper
.
updateByPrimaryKeySelective
(
informed
);
// 商机更新一条告知书
待
签署的记录
// 商机更新一条告知书
已
签署的记录
MktLeadsAssignedTrack
track
=
new
MktLeadsAssignedTrack
();
track
.
setCustomerId
(
informed
.
getLeadsId
());
track
.
setInformedId
(
id
);
track
.
setCustomerId
(
informed
.
getCustomerId
());
track
.
setTrackTime
(
curDate
);
track
.
setCreatedBy
(
informed
.
getLeadsId
()
);
track
.
setCreatedBy
(
-
1L
);
track
.
setCreatedAt
(
curDate
);
track
.
setCreatorType
(
1
);
track
.
setUpdatedBy
(
informed
.
getLeadsId
()
);
track
.
setUpdatedBy
(
-
1L
);
track
.
setUpdatorType
(
1
);
track
.
setUpdatedAt
(
new
Date
());
MdDropOptions
dropOption
=
systemConfigService
.
getDropOption
(
"
action_code
"
,
"customerNotice_1"
);
MdDropOptions
dropOption
=
systemConfigService
.
getDropOption
(
"
bizchance_promotion_action
"
,
"customerNotice_1"
);
track
.
setMdDropOptionId
(
dropOption
.
getId
());
track
.
setTrackScore
(
dropOption
.
getDropOptionScore
());
//保存
...
...
@@ -3765,15 +3776,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
@Override
public
void
run
()
{
AgPoInformed
informed
=
informedMapper
.
selectByPrimaryKey
(
requestVO
.
getId
());
if
(
informed
!=
null
)
{
Long
informedId
=
informed
.
getId
();
String
templatePDF
=
PDFConfiguration
.
getProperty
(
"informed.pdf.template"
);
//模板文件生成临时文件目录
String
tmpPathPDF
=
PDFConfiguration
.
getProperty
(
"informed.pdf.temp.path"
);
//PDF模板输出结果文件
String
templateResultPDF
=
tmpPathPDF
+
informed
.
getId
()
+
"-signedInformed.pdf"
;
String
templateResultPDF
=
tmpPathPDF
+
informed
Id
+
"-signedInformed.pdf"
;
//填充数据
Map
<
String
,
String
>
initDatas
=
new
HashMap
<>();
...
...
@@ -3788,12 +3799,16 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
//按模板填充数据生成结果PDF
PDFTemplate
.
generatePDF
(
templatePDF
,
templateResultPDF
,
initDatas
,
initImages
);
try
{
//上传至oss ossService
String
ossPath
=
this
.
putContractFileToOSS
(
"informed"
,
templateResultPDF
,
informed
.
getId
()
);
String
ossPath
=
this
.
putContractFileToOSS
(
"informed"
,
templateResultPDF
,
informed
Id
);
informed
.
setInformedOssPath
(
ossPath
);
informedMapper
.
updateByPrimaryKeySelective
(
informed
);
//更新track
mktLeadsAssignedTrackDALService
.
updateInformedOssPathByInformedId
(
ossPath
,
informedId
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
yd-api/src/main/java/com/yd/api/practitioner/vo/informed/QueryInformedSheetListRequestVO.java
View file @
d64b5853
...
...
@@ -9,4 +9,11 @@ public class QueryInformedSheetListRequestVO {
private
String
customerMobile
;
private
String
policyNo
;
private
String
signDate
;
/**
* 系统标志,区分公司营业部和体系,1,分公司,2营业部,3,S1分部,4,S2体系,5,S3纵队
*/
private
String
systemFlag
;
private
Long
s3Id
;
private
Long
s2Id
;
private
Long
s1Id
;
}
yd-api/src/main/java/com/yd/dal/entity/marketing/MktLeadsAssignedTrack.java
View file @
d64b5853
package
com
.
yd
.
dal
.
entity
.
marketing
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* ag_mkt_leads_assigned_track
...
...
@@ -96,6 +97,14 @@ public class MktLeadsAssignedTrack implements Serializable {
* 关联ag_mkt_schedule_task_tracking.id 日程表
*/
private
Long
scheduleTaskTrackingId
;
/**
* 告知书记录Id
*/
private
Long
informedId
;
/**
* 告知书url
*/
private
String
informedOssPath
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/entity/marketing/MktLeadsAssigneds.java
View file @
d64b5853
package
com
.
yd
.
dal
.
entity
.
marketing
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 商机线索指派表
...
...
@@ -24,6 +25,14 @@ public class MktLeadsAssigneds {
* 经纪人商机对应的客户id
*/
private
Long
customerId
;
/**
* 客户姓名
*/
private
String
customerName
;
/**
* 客户电话
*/
private
String
customerMobile
;
/**
* 首年保费
...
...
yd-api/src/main/java/com/yd/dal/entity/meta/MdDropOptions.java
View file @
d64b5853
package
com
.
yd
.
dal
.
entity
.
meta
;
import
java.util.Date
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
@Data
public
class
MdDropOptions
{
public
class
MdDropOptions
implements
Serializable
{
/**
* 选项编号
*/
...
...
yd-api/src/main/java/com/yd/dal/mapper/marketing/MktLeadsAssignedTrackMapper.java
View file @
d64b5853
...
...
@@ -33,4 +33,6 @@ public interface MktLeadsAssignedTrackMapper {
List
<
SalesScoreDetail
>
getSalesScoreDetailByPractitionerId
(
@Param
(
"practitionerId"
)
Long
practitionerId
,
@Param
(
"time"
)
String
time
);
void
deleteScheduleTrackById
(
Long
scheduleTrackId
);
int
updateInformedOssPathByInformedId
(
@Param
(
"informedOssPath"
)
String
InformedOssPath
,
@Param
(
"informedId"
)
Long
informedId
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/service/marketing/Impl/MktLeadsAssignedTrackDALServiceImpl.java
View file @
d64b5853
...
...
@@ -60,4 +60,9 @@ public class MktLeadsAssignedTrackDALServiceImpl implements MktLeadsAssignedTrac
public
void
deleteScheduleTrackById
(
Long
scheduleTrackId
)
{
mktLeadsAssignedTrackMapper
.
deleteScheduleTrackById
(
scheduleTrackId
);
}
@Override
public
int
updateInformedOssPathByInformedId
(
String
ossPath
,
Long
informedId
)
{
return
mktLeadsAssignedTrackMapper
.
updateInformedOssPathByInformedId
(
ossPath
,
informedId
);
}
}
yd-api/src/main/java/com/yd/dal/service/marketing/MktLeadsAssignedTrackDALService.java
View file @
d64b5853
...
...
@@ -34,4 +34,6 @@ public interface MktLeadsAssignedTrackDALService {
List
<
SalesScoreDetail
>
getSalesScoreDetailByPractitionerId
(
Long
practitionerId
,
String
time
);
void
deleteScheduleTrackById
(
Long
scheduleTrackId
);
int
updateInformedOssPathByInformedId
(
String
ossPath
,
Long
informedId
);
}
yd-api/src/main/resources/mapper/customer/AgPoInformedMapper.xml
View file @
d64b5853
...
...
@@ -182,6 +182,9 @@
<if
test=
"signDate != null"
>
sign_date = #{signDate,jdbcType=VARCHAR},
</if>
<if
test=
"signOssPath != null"
>
sign_oss_path = #{signOssPath,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
`status` = #{status,jdbcType=VARCHAR},
</if>
...
...
yd-api/src/main/resources/mapper/marketing/MktLeadsAssignedTrackMapper.xml
View file @
d64b5853
...
...
@@ -19,6 +19,7 @@
<result
column=
"track_score"
jdbcType=
"INTEGER"
property=
"trackScore"
/>
<result
column=
"leads_assigned_id"
jdbcType=
"BIGINT"
property=
"leadsAssignedId"
/>
<result
column=
"track_time"
jdbcType=
"TIMESTAMP"
property=
"trackTime"
/>
<result
column=
"informed_oss_path"
jdbcType=
"VARCHAR"
property=
"informedOssPath"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, order_id, order_no, sales_notice, is_active, created_at, created_by, creator_type,
...
...
@@ -104,6 +105,9 @@
<if
test=
"scheduleTaskTrackingId != null"
>
schedule_task_tracking_id,
</if>
<if
test=
"informedId != null"
>
informed_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"orderId != null"
>
...
...
@@ -157,6 +161,9 @@
<if
test=
"scheduleTaskTrackingId != null"
>
#{scheduleTaskTrackingId,jdbcType=BIGINT},
</if>
<if
test=
"informedId != null"
>
#{informedId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.marketing.MktLeadsAssignedTrack"
>
...
...
@@ -383,4 +390,9 @@
delete from ag_mkt_leads_assigned_track
where schedule_task_tracking_id = #{scheduleTrackId,jdbcType=BIGINT}
</delete>
<update
id=
"updateInformedOssPathByInformedId"
>
update ag_mkt_leads_assigned_track
set informed_oss_path = #{informedOssPath,jdbcType=VARCHAR}
where informed_id = #{informedId,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
yd-api/src/main/resources/mapper/marketing/MktLeadsAssignedsMapper.xml
View file @
d64b5853
...
...
@@ -12,6 +12,8 @@
<result
column=
"time_to_close"
jdbcType=
"TIMESTAMP"
property=
"timeToClose"
/>
<result
column=
"pieces"
jdbcType=
"INTEGER"
property=
"pieces"
/>
<result
column=
"remark"
jdbcType=
"LONGVARCHAR"
property=
"remark"
/>
<result
column=
"customer_name"
jdbcType=
"VARCHAR"
property=
"customerName"
/>
<result
column=
"customer_mobile"
jdbcType=
"VARCHAR"
property=
"customerMobile"
/>
<result
column=
"is_active"
jdbcType=
"INTEGER"
property=
"isActive"
/>
<result
column=
"created_at"
jdbcType=
"TIMESTAMP"
property=
"createdAt"
/>
<result
column=
"created_by"
jdbcType=
"BIGINT"
property=
"createdBy"
/>
...
...
@@ -168,6 +170,12 @@
<if
test=
"updatedBy != null"
>
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
<if
test=
"customerName != null"
>
customer_name = #{customerName,jdbcType=VARCHAR},
</if>
<if
test=
"customerMobile != null"
>
customer_mobile = #{customerMobile,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
...
...
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