Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zhny
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
王夏晖
zhny
Commits
9470d64f
Commit
9470d64f
authored
May 11, 2018
by
jichao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备维护--设备报表--下载文件,改bug
parent
2d925f71
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
ReportServiceImpl.java
...usiness/device/report/service/impl/ReportServiceImpl.java
+2
-2
SysCityController.java
...rcisoft/business/manage/controller/SysCityController.java
+1
-1
No files found.
src/main/java/org/rcisoft/business/device/report/service/impl/ReportServiceImpl.java
View file @
9470d64f
...
@@ -45,9 +45,9 @@ public class ReportServiceImpl implements ReportService {
...
@@ -45,9 +45,9 @@ public class ReportServiceImpl implements ReportService {
//如果有文件
//如果有文件
String
fileName
=
filePath
+
proId
+
File
.
separator
+
year
+
File
.
separator
+
month
+
File
.
separator
+
day
+
".xls"
;
String
fileName
=
filePath
+
proId
+
File
.
separator
+
year
+
File
.
separator
+
month
+
File
.
separator
+
day
+
".xls"
;
File
file
=
new
File
(
fileName
);
File
file
=
new
File
(
fileName
);
if
(!
file
.
getParentFile
().
exists
())
file
.
getParentFile
().
mkdirs
();
try
(
OutputStream
outputStream
=
response
.
getOutputStream
())
{
try
(
OutputStream
outputStream
=
response
.
getOutputStream
())
{
//如果不存在
file
=
this
.
createExcel
(
proId
,
year
,
month
,
day
,
file
);
if
(!
file
.
exists
())
file
=
this
.
createExcel
(
proId
,
year
,
month
,
day
,
file
);
//转成字节
//转成字节
bytes
=
FileUtils
.
readFileToByteArray
(
file
);
bytes
=
FileUtils
.
readFileToByteArray
(
file
);
//设置下载头
//设置下载头
...
...
src/main/java/org/rcisoft/business/manage/controller/SysCityController.java
View file @
9470d64f
...
@@ -32,7 +32,7 @@ public class SysCityController {
...
@@ -32,7 +32,7 @@ public class SysCityController {
@ApiOperation
(
value
=
"查询城市"
,
notes
=
"查询城市"
)
@ApiOperation
(
value
=
"查询城市"
,
notes
=
"查询城市"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"pid"
,
value
=
"城市主键"
,
required
=
true
,
dataType
=
"字符串"
)})
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"pid"
,
value
=
"城市主键"
,
required
=
true
,
dataType
=
"字符串"
)})
@RequestMapping
(
"/city"
)
@RequestMapping
(
"/city
/{pid:\\w+}
"
)
public
Result
city
(
@PathVariable
String
pid
)
{
public
Result
city
(
@PathVariable
String
pid
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
sysCityServiceImpl
.
city
(
pid
));
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
sysCityServiceImpl
.
city
(
pid
));
}
}
...
...
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