Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 830b9844
authored
May 20, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
开发试驾数据
1 parent
d7edeb1b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
src/main/java/cn/com/glsx/admin/modules/controller/TrialDriveReportController.java
src/main/java/cn/com/glsx/admin/modules/model/param/TrialDriveReportSearch.java
src/main/java/cn/com/glsx/admin/modules/service/TrialDriveReportService.java
src/main/resources/mapper/TrialDriveReportMapper.xml
src/main/java/cn/com/glsx/admin/modules/controller/TrialDriveReportController.java
View file @
830b984
...
@@ -37,6 +37,9 @@ public class TrialDriveReportController {
...
@@ -37,6 +37,9 @@ public class TrialDriveReportController {
@Autowired
@Autowired
private
TrialDriveReportService
trialDriveReportService
;
private
TrialDriveReportService
trialDriveReportService
;
@Autowired
private
HttpServletResponse
response
;
@GetMapping
(
"/search"
)
@GetMapping
(
"/search"
)
@SysLog
(
"查询试驾数据"
)
@SysLog
(
"查询试驾数据"
)
@ApiOperation
(
value
=
"试驾报表查询"
)
@ApiOperation
(
value
=
"试驾报表查询"
)
...
@@ -56,9 +59,9 @@ public class TrialDriveReportController {
...
@@ -56,9 +59,9 @@ public class TrialDriveReportController {
}
}
@GetMapping
(
value
=
"/export"
)
@GetMapping
(
value
=
"/export"
)
@SysLog
(
"导出试驾车辆数据"
)
@ApiOperation
(
value
=
"试驾报表导出"
)
@ApiOperation
(
value
=
"试驾报表导出"
)
public
void
exportTrialDriveReport
(
HttpServletResponse
response
,
TrialDriveReportSearch
search
)
throws
Exception
{
public
void
exportTrialDriveReport
(
TrialDriveReportSearch
search
)
throws
Exception
{
log
.
info
(
"试驾报表导出===start"
);
String
fileName
=
"有效试驾次数统计(按日"
+
DateFormatUtils
.
format
(
new
Date
(),
"yyyy-MM-dd"
)
+
")表"
;
String
fileName
=
"有效试驾次数统计(按日"
+
DateFormatUtils
.
format
(
new
Date
(),
"yyyy-MM-dd"
)
+
")表"
;
// 优先查询试驾 d_electric_fence_drive 表获取分页页数
// 优先查询试驾 d_electric_fence_drive 表获取分页页数
List
<
TrialDriveReportExport
>
testDrivePageList
=
trialDriveReportService
.
search
(
search
);
List
<
TrialDriveReportExport
>
testDrivePageList
=
trialDriveReportService
.
search
(
search
);
...
@@ -66,6 +69,7 @@ public class TrialDriveReportController {
...
@@ -66,6 +69,7 @@ public class TrialDriveReportController {
List
<
TrialDriveReportExport
>
testDriveReportExcels
=
trialDriveReportService
.
exportEffectiveTestDriveReport
(
search
,
testDrivePageList
);
List
<
TrialDriveReportExport
>
testDriveReportExcels
=
trialDriveReportService
.
exportEffectiveTestDriveReport
(
search
,
testDrivePageList
);
// 调用公用方法导出 excel表格
// 调用公用方法导出 excel表格
EasyExcelUtils
.
writeExcel
(
response
,
testDriveReportExcels
,
fileName
,
"有效试驾次数统计(按日)表"
,
TrialDriveReportExport
.
class
);
EasyExcelUtils
.
writeExcel
(
response
,
testDriveReportExcels
,
fileName
,
"有效试驾次数统计(按日)表"
,
TrialDriveReportExport
.
class
);
log
.
info
(
"试驾报表导出===end"
);
}
}
@GetMapping
(
value
=
"/years"
)
@GetMapping
(
value
=
"/years"
)
...
...
src/main/java/cn/com/glsx/admin/modules/model/param/TrialDriveReportSearch.java
View file @
830b984
...
@@ -2,11 +2,13 @@ package cn.com.glsx.admin.modules.model.param;
...
@@ -2,11 +2,13 @@ package cn.com.glsx.admin.modules.model.param;
import
cn.hutool.db.Page
;
import
cn.hutool.db.Page
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Set
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@Data
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
public
class
TrialDriveReportSearch
extends
Page
{
public
class
TrialDriveReportSearch
extends
Page
{
...
...
src/main/java/cn/com/glsx/admin/modules/service/TrialDriveReportService.java
View file @
830b984
...
@@ -96,12 +96,7 @@ public class TrialDriveReportService {
...
@@ -96,12 +96,7 @@ public class TrialDriveReportService {
return
null
;
return
null
;
}
}
// 将数据集合按照店代码排序
// 将数据集合按照店代码排序
testDrivePageList
.
sort
(
new
Comparator
<
TrialDriveReportExport
>()
{
testDrivePageList
.
sort
((
o1
,
o2
)
->
o1
.
getShopCode
().
compareToIgnoreCase
(
o2
.
getShopCode
()));
@Override
public
int
compare
(
TrialDriveReportExport
o1
,
TrialDriveReportExport
o2
)
{
return
o1
.
getShopCode
().
compareToIgnoreCase
(
o2
.
getShopCode
());
}
});
return
testDrivePageList
;
return
testDrivePageList
;
}
}
...
...
src/main/resources/mapper/TrialDriveReportMapper.xml
View file @
830b984
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
left join t_user tu on tu.id = tef.created_by
left join t_user tu on tu.id = tef.created_by
left join t_vehicle tv on tv.vin = tefs.vin
left join t_vehicle tv on tv.vin = tefs.vin
where tefs.fence_id = tef.id
where tefs.fence_id = tef.id
and tef.biz_fence_type = 1
and tef.biz_fence_type = 1
2
<if
test=
"shopCode!=null and shopCode!=''"
>
<if
test=
"shopCode!=null and shopCode!=''"
>
and tu.account like '%${shopCode}%'
and tu.account like '%${shopCode}%'
</if>
</if>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment