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
e3dacb2f
Commit
e3dacb2f
authored
Jul 13, 2022
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出运营报表2-经纪人日程管理,销售目标,活动量
parent
c5ce9fa2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsFortuneServiceImpl.java
+7
-2
yd-api/src/main/resources/mapper/agms/AgmsPractitionerMapper.xml
+10
-8
No files found.
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsFortuneServiceImpl.java
View file @
e3dacb2f
...
@@ -911,7 +911,7 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
...
@@ -911,7 +911,7 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
payIds
[
i
]
=
withdraws
.
get
(
i
).
getPayId
();
payIds
[
i
]
=
withdraws
.
get
(
i
).
getPayId
();
}
}
List
<
FortunePayToOrderInfo
>
fortunePayToOrderInfos
=
agmsFortuneDalService
.
fortunePayToOrder
(
payIds
);
List
<
FortunePayToOrderInfo
>
fortunePayToOrderInfos
=
agmsFortuneDalService
.
fortunePayToOrder
(
payIds
);
createCSV
(
fortunePayToOrderInfos
,
response
);
createCSV
(
fortunePayToOrderInfos
,
response
,
requestVO
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
return
responseVO
;
return
responseVO
;
}
}
...
@@ -1287,9 +1287,14 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
...
@@ -1287,9 +1287,14 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
}
}
}
}
private
void
createCSV
(
List
<
FortunePayToOrderInfo
>
fortunePayToOrderInfos
,
HttpServletResponse
response
)
{
private
void
createCSV
(
List
<
FortunePayToOrderInfo
>
fortunePayToOrderInfos
,
HttpServletResponse
response
,
ExportFortunePayRequestVO
requestVO
)
{
String
charset
=
"UTF-8"
;
// 读取字符编码
String
charset
=
"UTF-8"
;
// 读取字符编码
String
[]
columnName
=
new
String
[]{
"序号"
,
"预计发佣年月"
,
"所属渠道"
,
"经纪人"
,
"佣金"
,
"应发佣金"
,
"首年销售佣金(fyc)"
,
"保单号"
,
"保费"
,
"佣金率"
,
"发佣状态"
,
"佣金类型"
,
"手机号"
,
"职级"
,
"分公司"
,
"营业部"
,
"体系"
,
"购买方案"
};
String
[]
columnName
=
new
String
[]{
"序号"
,
"预计发佣年月"
,
"所属渠道"
,
"经纪人"
,
"佣金"
,
"应发佣金"
,
"首年销售佣金(fyc)"
,
"保单号"
,
"保费"
,
"佣金率"
,
"发佣状态"
,
"佣金类型"
,
"手机号"
,
"职级"
,
"分公司"
,
"营业部"
,
"体系"
,
"购买方案"
};
// 如果是渠道到处报表,用不同的表头
if
(
requestVO
.
getChannelId
()
!=
null
)
{
columnName
=
new
String
[]{
"序号"
,
"发佣年月"
,
"所属渠道"
,
"经纪人"
,
"佣金"
,
"应发佣金"
,
"首年销售佣金(fyc)"
,
"保单号"
,
"保费"
,
"佣金率"
,
"发佣状态"
,
"佣金类型"
,
"手机号"
,
"职级"
,
"分公司"
,
"营业部"
,
"体系"
,
"购买方案"
};
}
String
tableName
=
"YD_Export_Fortune_Pay"
;
String
tableName
=
"YD_Export_Fortune_Pay"
;
String
CSV_COLUMN_SEPARATOR
=
","
;
//CSV文件列分隔符
String
CSV_COLUMN_SEPARATOR
=
","
;
//CSV文件列分隔符
String
CSV_ROW_SEPARATOR
=
"\r\n"
;
//CSV文件行分隔符
String
CSV_ROW_SEPARATOR
=
"\r\n"
;
//CSV文件行分隔符
...
...
yd-api/src/main/resources/mapper/agms/AgmsPractitionerMapper.xml
View file @
e3dacb2f
...
@@ -151,10 +151,10 @@
...
@@ -151,10 +151,10 @@
<when
test=
"type != null and date != null"
>
<when
test=
"type != null and date != null"
>
AND t.statistic_time_unit = #{type,jdbcType=BIGINT}
AND t.statistic_time_unit = #{type,jdbcType=BIGINT}
<if
test=
"type == 1"
>
<if
test=
"type == 1"
>
AND year(t.created_at) = year(
#{date,jdbcType=VARCHAR}
)
AND year(t.created_at) = year(
str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m')
)
</if>
</if>
<if
test=
"type == 3"
>
<if
test=
"type == 3"
>
AND DATE_FORMAT(t.created_at, '%Y
%m') = DATE_FORMAT(#{date,jdbcType=VARCHAR}, '%Y
%m')
AND DATE_FORMAT(t.created_at, '%Y
-%m') = DATE_FORMAT(str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m'), '%Y-
%m')
</if>
</if>
</when>
</when>
<when
test=
"type != null and date == null"
>
<when
test=
"type != null and date == null"
>
...
@@ -162,7 +162,8 @@
...
@@ -162,7 +162,8 @@
</when>
</when>
<otherwise>
<otherwise>
<if
test=
"date != null"
>
<if
test=
"date != null"
>
AND date_format(t.created_at, '%Y-%m-%d')
>
= #{date,jdbcType=VARCHAR} AND date_format(t.created_at, '%Y-%m-%d')
<
= #{date,jdbcType=VARCHAR}
AND date_format(t.created_at, '%Y-%m')
>
= DATE_FORMAT(str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m'), '%Y-%m')
AND date_format(t.created_at, '%Y-%m')
<
= DATE_FORMAT(str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m'), '%Y-%m')
</if>
</if>
</otherwise>
</otherwise>
</choose>
</choose>
...
@@ -188,10 +189,10 @@
...
@@ -188,10 +189,10 @@
<when
test=
"type != null and date != null"
>
<when
test=
"type != null and date != null"
>
AND t.statistic_time_unit = #{type,jdbcType=BIGINT}
AND t.statistic_time_unit = #{type,jdbcType=BIGINT}
<if
test=
"type == 1"
>
<if
test=
"type == 1"
>
AND year(t.created_at) = year(
#{date,jdbcType=VARCHAR}
)
AND year(t.created_at) = year(
str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m')
)
</if>
</if>
<if
test=
"type == 3"
>
<if
test=
"type == 3"
>
AND DATE_FORMAT(t.created_at, '%Y
%m') = DATE_FORMAT(#{date,jdbcType=VARCHAR}, '%Y
%m')
AND DATE_FORMAT(t.created_at, '%Y
-%m') = DATE_FORMAT(str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m'), '%Y-
%m')
</if>
</if>
</when>
</when>
<when
test=
"type != null and date == null"
>
<when
test=
"type != null and date == null"
>
...
@@ -199,7 +200,8 @@
...
@@ -199,7 +200,8 @@
</when>
</when>
<otherwise>
<otherwise>
<if
test=
"date != null"
>
<if
test=
"date != null"
>
AND date_format(t.created_at, '%Y-%m-%d')
>
= #{date,jdbcType=VARCHAR} AND date_format(t.created_at, '%Y-%m-%d')
<
= #{date,jdbcType=VARCHAR}
AND date_format(t.created_at, '%Y-%m')
>
= DATE_FORMAT(str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m'), '%Y-%m')
AND date_format(t.created_at, '%Y-%m')
<
= DATE_FORMAT(str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m'), '%Y-%m')
</if>
</if>
</otherwise>
</otherwise>
</choose>
</choose>
...
@@ -226,10 +228,10 @@
...
@@ -226,10 +228,10 @@
WHERE t.practitioner_id = p.id AND o.id = t.md_drop_option_id
WHERE t.practitioner_id = p.id AND o.id = t.md_drop_option_id
AND (o.drop_master_id IN(14,16) OR o.id IN(226,227,229))
AND (o.drop_master_id IN(14,16) OR o.id IN(226,227,229))
<if
test=
"startDate != null"
>
<if
test=
"startDate != null"
>
AND
t.track_time
>
= DATE
#{startDate,jdbcType=VARCHAR}
AND
date_format(t.track_time, '%Y-%m-%d')
>
=
#{startDate,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"endDate != null"
>
<if
test=
"endDate != null"
>
AND
t.track_time
<
= DATE
#{endDate,jdbcType=VARCHAR}
AND
date_format(t.track_time, '%Y-%m-%d')
<
=
#{endDate,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"practitionerId != null"
>
<if
test=
"practitionerId != null"
>
AND t.practitioner_id = #{practitionerId,jdbcType=BIGINT}
AND t.practitioner_id = #{practitionerId,jdbcType=BIGINT}
...
...
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