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
14e45a0c
Commit
14e45a0c
authored
Jul 17, 2020
by
Water Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize
parent
aade45f4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
39 deletions
+37
-39
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsStatisticsServiceImpl.java
+28
-30
yd-api/src/main/java/com/yd/dal/entity/leads/LeadsStatusInfo.java
+5
-5
yd-api/src/main/java/com/yd/dal/service/marketing/Impl/MktLeadsPoolDALServiceImpl.java
+1
-1
yd-api/src/main/resources/mapper/customer/AclPractitionerMapper.xml
+1
-1
yd-api/src/main/resources/mapper/marketing/MktLeadsPoolMapper.xml
+2
-2
No files found.
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsStatisticsServiceImpl.java
View file @
14e45a0c
...
@@ -104,7 +104,7 @@ public class AgmsStatisticsServiceImpl implements AgmsStatisticsService {
...
@@ -104,7 +104,7 @@ public class AgmsStatisticsServiceImpl implements AgmsStatisticsService {
Map
<
Long
,
Long
>
leadsStatusMap
=
mktLeadsPoolDALService
.
findLeadsStatusMap
();
Map
<
Long
,
Long
>
leadsStatusMap
=
mktLeadsPoolDALService
.
findLeadsStatusMap
();
//4、商机状态信息
//4、商机状态信息
List
<
MdDropOptions
>
dropList
=
mdDropOptionsDALService
.
findByDropMasterCodes
(
Arrays
.
asList
(
"leads_manual_blood_type"
,
"leads_manual_zodiac_type"
,
"leads_manual_source"
,
"
action_code
"
));
List
<
MdDropOptions
>
dropList
=
mdDropOptionsDALService
.
findByDropMasterCodes
(
Arrays
.
asList
(
"leads_manual_blood_type"
,
"leads_manual_zodiac_type"
,
"leads_manual_source"
,
"
bizchance_promotion_action
"
));
Map
<
Long
,
String
>
dropMap
=
new
HashMap
<>();
Map
<
Long
,
String
>
dropMap
=
new
HashMap
<>();
if
(
dropList
!=
null
&&
dropList
.
size
()
>
0
){
if
(
dropList
!=
null
&&
dropList
.
size
()
>
0
){
dropList
.
forEach
(
i
->
dropMap
.
put
(
i
.
getId
(),
i
.
getDropOptionName
()));
dropList
.
forEach
(
i
->
dropMap
.
put
(
i
.
getId
(),
i
.
getDropOptionName
()));
...
@@ -145,39 +145,37 @@ public class AgmsStatisticsServiceImpl implements AgmsStatisticsService {
...
@@ -145,39 +145,37 @@ public class AgmsStatisticsServiceImpl implements AgmsStatisticsService {
*/
*/
private
List
<
LeadsStatisticsInfo
>
screenResult
(
List
<
LeadsStatisticsInfo
>
resultList
,
Integer
leadsStatus
,
Integer
expertApplyStatus
)
{
private
List
<
LeadsStatisticsInfo
>
screenResult
(
List
<
LeadsStatisticsInfo
>
resultList
,
Integer
leadsStatus
,
Integer
expertApplyStatus
)
{
List
<
LeadsStatisticsInfo
>
isAssignList
,
unapplyList
,
applyingList
,
isAssignExpertList
;
List
<
LeadsStatisticsInfo
>
isAssignList
,
unapplyList
,
applyingList
,
isAssignExpertList
;
if
(
leadsStatus
==
2
){
isAssignList
=
new
ArrayList
<>();
isAssignList
=
new
ArrayList
<>();
for
(
LeadsStatisticsInfo
item
:
resultList
){
for
(
LeadsStatisticsInfo
item
:
resultList
){
if
(
item
.
getAssignId
()
!=
null
){
if
(
item
.
getAssignId
()
!=
null
){
isAssignList
.
add
(
item
);
isAssignList
.
add
(
item
);
}
}
}
if
(
expertApplyStatus
==
null
||
expertApplyStatus
==
0
){
//已派遣的全部
}
return
isAssignList
;
if
(
expertApplyStatus
==
null
||
expertApplyStatus
==
0
){
//已派遣的全部
}
else
if
(!
isAssignList
.
isEmpty
()){
return
isAssignList
;
unapplyList
=
new
ArrayList
<>();
}
else
if
(!
isAssignList
.
isEmpty
()){
applyingList
=
new
ArrayList
<>();
unapplyList
=
new
ArrayList
<>();
isAssignExpertList
=
new
ArrayList
<>();
applyingList
=
new
ArrayList
<>();
for
(
LeadsStatisticsInfo
item
:
isAssignList
)
{
isAssignExpertList
=
new
ArrayList
<>();
if
(
item
.
getRequestSMEDate
()
==
null
)
{
for
(
LeadsStatisticsInfo
item
:
isAssignList
)
{
unapplyList
.
add
(
item
);
//未申请
if
(
item
.
getRequestSMEDate
()
==
null
)
{
unapplyList
.
add
(
item
);
//未申请
}
else
{
if
(
item
.
getAssignSMEDate
()
==
null
){
applyingList
.
add
(
item
);
//申请中
}
else
{
}
else
{
if
(
item
.
getAssignSMEDate
()
==
null
){
isAssignExpertList
.
add
(
item
);
//已派遣专家
applyingList
.
add
(
item
);
//申请中
}
else
{
isAssignExpertList
.
add
(
item
);
//已派遣专家
}
}
}
}
}
if
(
expertApplyStatus
==
1
){
//未申请
}
return
unapplyList
;
if
(
expertApplyStatus
==
1
){
//未申请
}
else
if
(
expertApplyStatus
==
2
){
//申请中
return
unapplyList
;
return
applyingList
;
}
else
if
(
expertApplyStatus
==
2
){
//申请中
}
else
if
(
expertApplyStatus
==
3
){
//已指派
return
applyingList
;
return
isAssignExpertList
;
}
else
if
(
expertApplyStatus
==
3
){
//已指派
}
else
{
//全部
return
isAssignExpertList
;
return
isAssignList
;
}
else
{
//全部
}
return
isAssignList
;
}
}
}
}
return
resultList
;
return
resultList
;
...
...
yd-api/src/main/java/com/yd/dal/entity/leads/LeadsStatusInfo.java
View file @
14e45a0c
...
@@ -2,7 +2,7 @@ package com.yd.dal.entity.leads;
...
@@ -2,7 +2,7 @@ package com.yd.dal.entity.leads;
public
class
LeadsStatusInfo
{
public
class
LeadsStatusInfo
{
private
Long
leadsCustomerId
;
private
Long
leadsCustomerId
;
private
Long
leadsStatus
;
private
Long
leadsStatus
Id
;
public
Long
getLeadsCustomerId
()
{
public
Long
getLeadsCustomerId
()
{
return
leadsCustomerId
;
return
leadsCustomerId
;
...
@@ -12,11 +12,11 @@ public class LeadsStatusInfo {
...
@@ -12,11 +12,11 @@ public class LeadsStatusInfo {
this
.
leadsCustomerId
=
leadsCustomerId
;
this
.
leadsCustomerId
=
leadsCustomerId
;
}
}
public
Long
getLeadsStatus
()
{
public
Long
getLeadsStatus
Id
()
{
return
leadsStatus
;
return
leadsStatus
Id
;
}
}
public
void
setLeadsStatus
(
Long
leadsStatus
)
{
public
void
setLeadsStatus
Id
(
Long
leadsStatusId
)
{
this
.
leadsStatus
=
leadsStatus
;
this
.
leadsStatus
Id
=
leadsStatusId
;
}
}
}
}
yd-api/src/main/java/com/yd/dal/service/marketing/Impl/MktLeadsPoolDALServiceImpl.java
View file @
14e45a0c
...
@@ -51,7 +51,7 @@ public class MktLeadsPoolDALServiceImpl implements MktLeadsPoolDALService {
...
@@ -51,7 +51,7 @@ public class MktLeadsPoolDALServiceImpl implements MktLeadsPoolDALService {
public
Map
<
Long
,
Long
>
findLeadsStatusMap
()
{
public
Map
<
Long
,
Long
>
findLeadsStatusMap
()
{
Map
<
Long
,
Long
>
leadsMap
=
new
HashMap
<>();
Map
<
Long
,
Long
>
leadsMap
=
new
HashMap
<>();
List
<
LeadsStatusInfo
>
leadsStatusInfoList
=
mktLeadsPoolMapper
.
findLeadsStatusMap
();
List
<
LeadsStatusInfo
>
leadsStatusInfoList
=
mktLeadsPoolMapper
.
findLeadsStatusMap
();
leadsStatusInfoList
.
forEach
(
i
->
leadsMap
.
put
(
i
.
getLeadsCustomerId
(),
i
.
getLeadsStatus
()));
leadsStatusInfoList
.
forEach
(
i
->
leadsMap
.
put
(
i
.
getLeadsCustomerId
(),
i
.
getLeadsStatus
Id
()));
return
leadsMap
;
return
leadsMap
;
}
}
}
}
yd-api/src/main/resources/mapper/customer/AclPractitionerMapper.xml
View file @
14e45a0c
...
@@ -919,7 +919,7 @@
...
@@ -919,7 +919,7 @@
left join ag_mkt_leads_assigneds a on a.assigned_practitioner_id = p.id
left join ag_mkt_leads_assigneds a on a.assigned_practitioner_id = p.id
where a.id = #{leadsAssignedId,jdbcType=BIGINT}
where a.id = #{leadsAssignedId,jdbcType=BIGINT}
</select>
</select>
<select
id=
"findAll"
resultType=
"com.yd.dal.entity.customer.AclPractitioner
"
>
<select
id=
"findAll"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap
"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from ag_acl_practitioner
from ag_acl_practitioner
...
...
yd-api/src/main/resources/mapper/marketing/MktLeadsPoolMapper.xml
View file @
14e45a0c
...
@@ -164,7 +164,7 @@
...
@@ -164,7 +164,7 @@
c.blood_type_id as leadsBloodTypeId,
c.blood_type_id as leadsBloodTypeId,
c.zodiac_type_id as leadsZodiacTypeId,
c.zodiac_type_id as leadsZodiacTypeId,
IF(c.gender = 1, '男', '女') as leadsGender,
IF(c.gender = 1, '男', '女') as leadsGender,
date_format(pool.added_at , '%Y-%m-%d %H:%i:%s') as leadsCreatTime,
date_format(pool.added_at , '%Y-%m-%d %H:%i:%s') as leadsCreat
e
Time,
assign.id as assignId,
assign.id as assignId,
assign.assigned_practitioner_id as practitionerId,
assign.assigned_practitioner_id as practitionerId,
pool.source_from as leadsSourceId,
pool.source_from as leadsSourceId,
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
<select
id=
"findLeadsStatusMap"
resultType=
"com.yd.dal.entity.leads.LeadsStatusInfo"
>
<select
id=
"findLeadsStatusMap"
resultType=
"com.yd.dal.entity.leads.LeadsStatusInfo"
>
SELECT maxt.customer_id as leadsCustomerId,
SELECT maxt.customer_id as leadsCustomerId,
# tr.leads_assigned_id as assignId,
# tr.leads_assigned_id as assignId,
tr.md_drop_option_id as
s
tatusId -- 商机状态id
tr.md_drop_option_id as
leadsS
tatusId -- 商机状态id
FROM(SELECT customer_id,max(updated_at) as track_time FROM ag_mkt_leads_assigned_track tr GROUP BY tr.customer_id) maxt
FROM(SELECT customer_id,max(updated_at) as track_time FROM ag_mkt_leads_assigned_track tr GROUP BY tr.customer_id) maxt
INNER JOIN ag_mkt_leads_assigned_track tr on maxt.customer_id=tr.customer_id AND maxt.track_time = tr.updated_at order by tr.leads_assigned_id;
INNER JOIN ag_mkt_leads_assigned_track tr on maxt.customer_id=tr.customer_id AND maxt.track_time = tr.updated_at order by tr.leads_assigned_id;
...
...
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