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
461c5ad0
Commit
461c5ad0
authored
Apr 13, 2022
by
wenyang
Committed by
akexiu
Apr 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.团队成员活动量得分排序【 1:天;2:周;3:月(不传默认2:周)】
2.团队业绩完成率统计根据该团队下经纪人设置的目标fyc计算
parent
fd8c3139
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
2 deletions
+44
-2
yd-api/src/main/resources/mapper/customer/AclCustomerFortuneMapper.xml
+44
-2
No files found.
yd-api/src/main/resources/mapper/customer/AclCustomerFortuneMapper.xml
View file @
461c5ad0
...
...
@@ -1001,8 +1001,50 @@
</otherwise>
</choose>
) targetFyc,
0 targetFyp,
0 targetCount
(select ifnull(sum(t.premium),0) from ag_mkt_leads_goals t where t.practitioner_id=p.id and t.goals_type=1 and t.is_active=1
<choose>
<when
test=
"time == 1"
>
and t.statistic_time_unit=3
and t.current_year=year(now())
and t.seq_time=month(now())
</when>
<when
test=
"time == 3"
>
and t.statistic_time_unit=3
and t.current_year=year(now())
and quarter(concat(t.current_year,'-',t.seq_time,'-01'))=quarter(now())
</when>
<when
test=
"time == 4"
>
and t.statistic_time_unit=1
and t.current_year=year(now())-1
</when>
<otherwise>
and t.statistic_time_unit=1
and t.current_year=year(now())
</otherwise>
</choose>
) targetFyp,
(select ifnull(sum(t.pieces),0) from ag_mkt_leads_goals t where t.practitioner_id=p.id and t.goals_type=1 and t.is_active=1
<choose>
<when
test=
"time == 1"
>
and t.statistic_time_unit=3
and t.current_year=year(now())
and t.seq_time=month(now())
</when>
<when
test=
"time == 3"
>
and t.statistic_time_unit=3
and t.current_year=year(now())
and quarter(concat(t.current_year,'-',t.seq_time,'-01'))=quarter(now())
</when>
<when
test=
"time == 4"
>
and t.statistic_time_unit=1
and t.current_year=year(now())-1
</when>
<otherwise>
and t.statistic_time_unit=1
and t.current_year=year(now())
</otherwise>
</choose>
) targetCount
FROM
((ag_acl_practitioner_setting s LEFT JOIN ag_acl_practitioner p ON s.practitioner_id = p.id)
INNER JOIN ag_acl_customer_fortune f ON f.customer_id = p.customer_id and f.drop_option_code in('S01','C01') )
...
...
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