Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
TDLCloud
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WitCloud
TDLCloud
Commits
9f5dd064
Commit
9f5dd064
authored
Aug 06, 2019
by
zhuangzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改仓库数据除英文状态外下载失败的问题
parent
6a8a5513
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
WarehouseExcel.java
src/main/java/com/example/tdl/common/WarehouseExcel.java
+12
-10
DataController.java
src/main/java/com/example/tdl/web/DataController.java
+2
-2
No files found.
src/main/java/com/example/tdl/common/WarehouseExcel.java
View file @
9f5dd064
...
...
@@ -66,14 +66,16 @@ public class WarehouseExcel {
cell1
=
row1
.
createCell
(
n
);
//设置列的格式
cell1
.
setCellStyle
(
rowStyle1
);
//将标题添加到列中
if
(
request
.
getHeader
(
"AccountLanguage"
).
equals
(
"en"
)){
String
language
=
request
.
getHeader
(
"AccountLanguage"
);
if
(
language
.
equals
(
"en"
)){
cell1
.
setCellValue
(
new
HSSFRichTextString
(
resultWarehouseNoAndTDLSNAndTimeVo
.
getWarehouseNo
()+
"Warehouse temperature and humidity historic data -"
+
resultWarehouseNoAndTDLSNAndTimeVo
.
getTDLSN
()));
}
else
if
(
request
.
getHeader
(
"AccountLanguage "
)
.
equals
(
"jp"
)){
}
else
if
(
language
.
equals
(
"jp"
)){
cell1
.
setCellValue
(
new
HSSFRichTextString
(
resultWarehouseNoAndTDLSNAndTimeVo
.
getWarehouseNo
()+
"倉庫の温度および湿度の観測記録-"
+
resultWarehouseNoAndTDLSNAndTimeVo
.
getTDLSN
()));
}
else
{
cell1
.
setCellValue
(
new
HSSFRichTextString
(
resultWarehouseNoAndTDLSNAndTimeVo
.
getWarehouseNo
()+
"仓库温湿度观测记录表-"
+
resultWarehouseNoAndTDLSNAndTimeVo
.
getTDLSN
()));
}
}
//设置行高
row1
.
setHeight
((
short
)
(
30
*
20
));
...
...
@@ -229,13 +231,13 @@ public class WarehouseExcel {
row
.
setHeight
((
short
)
(
26
*
20
));
}
}
sheet
.
setColumnWidth
(
0
,
1
0
*
256
);
sheet
.
setColumnWidth
(
1
,
1
0
*
256
);
sheet
.
setColumnWidth
(
2
,
1
0
*
256
);
sheet
.
setColumnWidth
(
3
,
35
*
256
);
sheet
.
setColumnWidth
(
4
,
35
*
256
);
sheet
.
setColumnWidth
(
5
,
35
*
256
);
sheet
.
setColumnWidth
(
6
,
25
*
256
);
sheet
.
setColumnWidth
(
0
,
1
5
*
256
);
sheet
.
setColumnWidth
(
1
,
1
5
*
256
);
sheet
.
setColumnWidth
(
2
,
1
5
*
256
);
sheet
.
setColumnWidth
(
3
,
43
*
256
);
sheet
.
setColumnWidth
(
4
,
43
*
256
);
sheet
.
setColumnWidth
(
5
,
43
*
256
);
sheet
.
setColumnWidth
(
6
,
30
*
256
);
return
workbook
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
src/main/java/com/example/tdl/web/DataController.java
View file @
9f5dd064
...
...
@@ -656,7 +656,7 @@ public class DataController {
if
(
!
myPath
.
exists
()){
//若此目录不存在,则创建之
myPath
.
mkdir
();
}
File
zipFile
=
new
File
(
"./export/"
+
transportationNo
.
getTransportationNo
()+
i18n
.
getMessage
(
request
,
"data"
)+
".zip"
);
File
zipFile
=
new
File
(
"./export/"
+
transportationNo
.
getTransportationNo
()+
"_"
+
gatewayVo
.
getgSN
()+
i18n
.
getMessage
(
request
,
"data"
)+
".zip"
);
if
(
queryResult
.
getResults
().
get
(
0
).
getSeries
().
get
(
0
)
!=
null
)
{
for
(
int
i
=
0
;
i
<
devList
.
size
();
i
++){
String
address
=
"./export/"
;
...
...
@@ -699,7 +699,7 @@ public class DataController {
}
zipFile
.
delete
();
fb
.
setCode
(
1
);
fb
.
setMessage
(
"https://tdlcloud.oss-cn-shanghai.aliyuncs.com/circuit/"
+
transportationNo
.
getTransportationNo
()+
i18n
.
getMessage
(
request
,
"data"
)+
".zip"
);
fb
.
setMessage
(
"https://tdlcloud.oss-cn-shanghai.aliyuncs.com/circuit/"
+
transportationNo
.
getTransportationNo
()
+
"_"
+
gatewayVo
.
getgSN
()
+
i18n
.
getMessage
(
request
,
"data"
)+
".zip"
);
return
gson
.
toJson
(
fb
);
}
else
{
fb
.
setCode
(
0
);
...
...
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