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
110db1b9
Commit
110db1b9
authored
Jul 13, 2022
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出运营报表2-经纪人日程管理,销售目标,活动量
parent
0f4c22d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
9 deletions
+22
-9
yd-api/src/main/resources/mapper/agms/AgmsPractitionerMapper.xml
+22
-9
No files found.
yd-api/src/main/resources/mapper/agms/AgmsPractitionerMapper.xml
View file @
110db1b9
...
@@ -130,7 +130,7 @@
...
@@ -130,7 +130,7 @@
AND t.task_type = #{taskType,jdbcType=BIGINT}
AND t.task_type = #{taskType,jdbcType=BIGINT}
</if>
</if>
<if
test=
"dropOptionName != null"
>
<if
test=
"dropOptionName != null"
>
AND t.
md_drop_option_id = #{dropOptionName,jdbcType=BIGINT}
AND t.
notice like concat(concat('%',#{dropOptionName,jdbcType=VARCHAR}),'%')
</if>
</if>
AND t.is_active = 1
AND t.is_active = 1
</select>
</select>
...
@@ -162,7 +162,7 @@
...
@@ -162,7 +162,7 @@
</when>
</when>
<otherwise>
<otherwise>
<if
test=
"date != null"
>
<if
test=
"date != null"
>
AND t.created_at
>
=
DATE #{date,jdbcType=VARCHAR} AND t.created_at
<
= DATE #{date,jdbcType=VARCHAR}
AND t.created_at
>
=
str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m') AND t.created_at
<
= str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m')
</if>
</if>
</otherwise>
</otherwise>
</choose>
</choose>
...
@@ -176,7 +176,7 @@
...
@@ -176,7 +176,7 @@
SELECT
SELECT
p.name '1',
p.name '1',
(CASE (t.statistic_time_unit) WHEN 1 THEN '年度目标' WHEN 3 THEN '月度目标' ELSE '其他' END) '2',
(CASE (t.statistic_time_unit) WHEN 1 THEN '年度目标' WHEN 3 THEN '月度目标' ELSE '其他' END) '2',
t.seq_time
'3',
if(t.statistic_time_unit = 3, concat(year(t.created_at),'-',t.seq_time), t.seq_time)
'3',
t.premium '4',
t.premium '4',
t.commission '5',
t.commission '5',
t.pieces '6',
t.pieces '6',
...
@@ -184,15 +184,28 @@
...
@@ -184,15 +184,28 @@
date_format(t.created_at, '%Y-%m-%d %H:%i:%s') '8'
date_format(t.created_at, '%Y-%m-%d %H:%i:%s') '8'
FROM ag_mkt_leads_goals t,ag_acl_practitioner p
FROM ag_mkt_leads_goals t,ag_acl_practitioner p
WHERE t.practitioner_id = p.id
WHERE t.practitioner_id = p.id
<if
test=
"date != null"
>
<choose>
AND t.created_at
>
= DATE #{date,jdbcType=VARCHAR} AND t.created_at
<
= DATE #{date,jdbcType=VARCHAR}
<when
test=
"type != null and date != null"
>
</if>
AND t.statistic_time_unit = #{type,jdbcType=BIGINT}
<if
test=
"type == 1"
>
AND year(t.created_at) = year(#{date,jdbcType=VARCHAR})
</if>
<if
test=
"type == 3"
>
AND DATE_FORMAT(t.created_at, '%Y%m') = DATE_FORMAT(#{date,jdbcType=VARCHAR}, '%Y%m')
</if>
</when>
<when
test=
"type != null and date == null"
>
AND t.statistic_time_unit = #{type,jdbcType=BIGINT}
</when>
<otherwise>
<if
test=
"date != null"
>
AND t.created_at
>
= str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m') AND t.created_at
<
= str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m')
</if>
</otherwise>
</choose>
<if
test=
"practitionerId != null"
>
<if
test=
"practitionerId != null"
>
AND t.practitioner_id = #{practitionerId,jdbcType=BIGINT}
AND t.practitioner_id = #{practitionerId,jdbcType=BIGINT}
</if>
</if>
<if
test=
"type != null"
>
AND t.t.statistic_time_unit = #{type,jdbcType=BIGINT}
</if>
AND t.is_active = 1
AND t.is_active = 1
</select>
</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