Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
d2e40167
Commit
d2e40167
authored
Nov 22, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-vehicle-bg' into dev
parents
f9fee30b
bf8a49e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
BranchCompanyVehicleCountController.java
...hicle/rest/admin/BranchCompanyVehicleCountController.java
+5
-1
BranchCompanyVehicleCountMapper.xml
...main/resources/mapper/BranchCompanyVehicleCountMapper.xml
+2
-4
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/admin/BranchCompanyVehicleCountController.java
View file @
d2e40167
...
...
@@ -45,12 +45,16 @@ public class BranchCompanyVehicleCountController extends BaseController<BranchCo
writer
.
addHeaderAlias
(
"weekEndDate"
,
"结束日期"
);
writer
.
addHeaderAlias
(
"countDate"
,
"日期"
);
writer
.
addHeaderAlias
(
"vehicleNum"
,
"数量"
);
writer
.
setColumnWidth
(
7
,
17
);
writer
.
setColumnWidth
(
5
,
17
);
writer
.
setColumnWidth
(
6
,
17
);
writer
.
setColumnWidth
(
1
,
17
);
// 一次性写出内容,使用默认样式,强制输出标题
writer
.
write
(
pageDataVO
.
getData
(),
true
);
//response为HttpServletResponse对象
response
.
setContentType
(
"application/vnd.ms-excel;charset=utf-8"
);
//test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename=
clxx
.xlsx"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename=
vehicleInfo
.xlsx"
);
//out为OutputStream,需要写出到的目标流
ServletOutputStream
out
=
response
.
getOutputStream
();
writer
.
flush
(
out
,
true
);
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/BranchCompanyVehicleCountMapper.xml
View file @
d2e40167
...
...
@@ -4,10 +4,8 @@
<select
id=
"getAllCountInfo"
parameterType=
"Map"
resultType=
"com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCountVo"
>
SELECT
c.company_id,
c.count_date,
b.`name` AS companyName,
sum(c.vehicle_num) as vehicleNum
c.*,
b.`name` AS companyName
FROM
branch_company_vehicle_count c
LEFT JOIN branch_company b ON b.id = c.company_id
...
...
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