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
610b93da
Commit
610b93da
authored
Sep 28, 2020
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人得分详情mdDropOptionId通过查询获取
parent
ab855d8d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
14 deletions
+31
-14
yd-api/src/main/java/com/yd/api/practitioner/service/impl/ScheduleTrackServiceImpl.java
+7
-8
yd-api/src/main/java/com/yd/dal/service/meta/MdDropOptionsDALService.java
+4
-0
yd-api/src/main/java/com/yd/dal/service/meta/impl/MdDropOptionsDALServiceImpl.java
+17
-0
yd-api/src/main/resources/mapper/marketing/ScheduleTrackMapper.xml
+3
-6
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/ScheduleTrackServiceImpl.java
View file @
610b93da
...
...
@@ -335,12 +335,11 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
Long
practitionerId
=
requestVO
.
getPractitionerId
();
String
time
=
requestVO
.
getTime
();
Calendar
cal
=
Calendar
.
getInstance
();
// 根据time获取查询起始日期,默认当天
// 根据time获取查询起始日期和结束日期,默认当天
Date
startDate
=
new
Date
();
// 根据time获取查询结束日期,默认当天
Date
endDate
=
new
Date
();
Calendar
cal
=
Calendar
.
getInstance
();
if
(
"w"
.
equalsIgnoreCase
(
time
))
{
cal
.
set
(
Calendar
.
DAY_OF_WEEK
,
Calendar
.
MONDAY
);
cal
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
...
...
@@ -359,8 +358,8 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
// 根据经纪人id查询个人所有日程
List
<
ScheduleTrack
>
scheduleList
=
scheduleTrackMapper
.
queryPersonalScheduleListByTime
(
practitionerId
,
time
);
// 计算增员日程和销售日程的得分
List
<
Integer
>
saleOption
=
Arrays
.
asList
(
95
,
96
,
97
,
98
,
99
,
101
,
228
);
List
<
Integer
>
RecruitOption
=
Arrays
.
asList
(
107
,
108
,
109
,
110
,
111
,
112
);
List
<
Long
>
saleOption
=
mdDropOptionsDALService
.
queryIdByByDropMasterCode
(
"bizchance_promotion_action"
);
List
<
Long
>
RecruitOption
=
mdDropOptionsDALService
.
queryIdByByDropMasterCode
(
"team_building_track"
);
Long
recruitScore
=
0L
;
Long
saleScore
=
0L
;
...
...
@@ -368,11 +367,11 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
Long
trainScore
=
0L
;
Long
meetingScore
=
0L
;
for
(
ScheduleTrack
schedule
:
scheduleList
)
{
if
(
saleOption
.
contains
(
schedule
.
getMdDropOptionId
()
.
intValue
()
))
{
if
(
saleOption
.
contains
(
schedule
.
getMdDropOptionId
()))
{
saleScore
+=
schedule
.
getTrackScore
();
continue
;
}
if
(
RecruitOption
.
contains
(
schedule
.
getMdDropOptionId
()
.
intValue
()
))
{
if
(
RecruitOption
.
contains
(
schedule
.
getMdDropOptionId
()))
{
recruitScore
+=
schedule
.
getTrackScore
();
continue
;
}
...
...
yd-api/src/main/java/com/yd/dal/service/meta/MdDropOptionsDALService.java
View file @
610b93da
...
...
@@ -44,4 +44,8 @@ public interface MdDropOptionsDALService {
List
<
MdDropOptions
>
findByDropMasterCodes
(
List
<
String
>
asList
);
Map
<
Long
,
MdDropOptions
>
queryIdObjMapByByDropMasterCode
(
String
masterCode
);
List
<
Long
>
queryIdByByDropMasterCodes
(
List
<
String
>
masterCodeList
);
List
<
Long
>
queryIdByByDropMasterCode
(
String
masterCode
);
}
yd-api/src/main/java/com/yd/dal/service/meta/impl/MdDropOptionsDALServiceImpl.java
View file @
610b93da
...
...
@@ -11,6 +11,7 @@ import com.yd.util.intercept.annotation.TargetDataSource;
import
com.yd.util.intercept.commons.DataSourceKey
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -121,4 +122,20 @@ public class MdDropOptionsDALServiceImpl implements MdDropOptionsDALService {
dropOptionsList
.
forEach
(
i
->
optMap
.
put
(
i
.
getId
(),
i
));
return
optMap
;
}
@Override
public
List
<
Long
>
queryIdByByDropMasterCodes
(
List
<
String
>
masterCodeList
)
{
List
<
Long
>
idList
=
new
ArrayList
<>();
List
<
MdDropOptions
>
options
=
mdDropOptionsMapper
.
findByDropMasterCodes
(
masterCodeList
);
options
.
forEach
(
i
->
idList
.
add
(
i
.
getId
()));
return
idList
;
}
@Override
public
List
<
Long
>
queryIdByByDropMasterCode
(
String
masterCode
)
{
List
<
Long
>
idList
=
new
ArrayList
<>();
List
<
MdDropOptions
>
options
=
mdDropOptionsMapper
.
findByMasterCode
(
masterCode
);
options
.
forEach
(
i
->
idList
.
add
(
i
.
getId
()));
return
idList
;
}
}
yd-api/src/main/resources/mapper/marketing/ScheduleTrackMapper.xml
View file @
610b93da
...
...
@@ -204,7 +204,6 @@
created_at, created_by, updated_at, updated_by, updator_type, creator_type
from ag_mkt_schedule_task_tracking t
where t.practitioner_id = #{practitionerId,jdbcType=BIGINT}
and md_drop_option_id not in (223,224,225,226,227)
and to_days(t.track_time)
<
= to_days(now())
<if
test=
"time != null"
>
<choose>
...
...
@@ -219,7 +218,7 @@
</when>
</choose>
</if>
union
all
union
select id, notice, task_type, refer_leads_id, refer_potential_id,
task_important_tag, task_routine_at_week7,task_routine_at_week6, task_routine_at_week5,
task_routine_at_week4, task_routine_at_week3, task_routine_at_week2, task_routine_at_week1,
...
...
@@ -228,10 +227,8 @@
from ag_mkt_schedule_task_tracking t
where t.practitioner_id = #{practitionerId,jdbcType=BIGINT}
and md_drop_option_id in
(SELECT o.id
FROM ag_md_drop_options o
LEFT JOIN ag_md_drop_master m ON m.id = o.drop_master_id
WHERE m.scenario_code = ''
(SELECT o.id FROM ag_md_drop_options o LEFT JOIN ag_md_drop_master m ON m.id = o.drop_master_id
WHERE m.scenario_code = 'pep_schedule_task_others'
)
</select>
...
...
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