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
c955318d
Commit
c955318d
authored
Jul 29, 2019
by
zhuangzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复firefox英文状态下的下载失败的问题
parent
9418b702
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
14 deletions
+20
-14
WarehouseExcel.java
src/main/java/com/example/tdl/common/WarehouseExcel.java
+17
-11
AliyunOSSClientUtil.java
src/main/java/com/example/tdl/util/AliyunOSSClientUtil.java
+1
-1
messages_en.properties
src/main/resources/i18n/messages_en.properties
+2
-2
No files found.
src/main/java/com/example/tdl/common/WarehouseExcel.java
View file @
c955318d
...
@@ -45,8 +45,8 @@ public class WarehouseExcel {
...
@@ -45,8 +45,8 @@ public class WarehouseExcel {
}
}
/*
/*
* 导出数据
* 导出数据
* */
* */
public
HSSFWorkbook
downloadExcel
()
throws
Exception
{
public
HSSFWorkbook
downloadExcel
()
throws
Exception
{
// 创建工作簿对象
// 创建工作簿对象
HSSFWorkbook
workbook
=
new
HSSFWorkbook
();
HSSFWorkbook
workbook
=
new
HSSFWorkbook
();
...
@@ -55,8 +55,8 @@ public class WarehouseExcel {
...
@@ -55,8 +55,8 @@ public class WarehouseExcel {
HSSFCellStyle
style
=
getStyle
(
workbook
);
HSSFCellStyle
style
=
getStyle
(
workbook
);
/*
/*
* 创建第一行(标题行)
* 创建第一行(标题行)
* */
* */
HSSFRow
row1
=
sheet
.
createRow
((
short
)
0
);
HSSFRow
row1
=
sheet
.
createRow
((
short
)
0
);
HSSFCell
cell1
=
null
;
HSSFCell
cell1
=
null
;
//设置单元格格式
//设置单元格格式
...
@@ -67,7 +67,13 @@ public class WarehouseExcel {
...
@@ -67,7 +67,13 @@ public class WarehouseExcel {
//设置列的格式
//设置列的格式
cell1
.
setCellStyle
(
rowStyle1
);
cell1
.
setCellStyle
(
rowStyle1
);
//将标题添加到列中
//将标题添加到列中
cell1
.
setCellValue
(
new
HSSFRichTextString
(
resultWarehouseNoAndTDLSNAndTimeVo
.
getWarehouseNo
()+
"仓库温湿度观测记录表-"
+
resultWarehouseNoAndTDLSNAndTimeVo
.
getTDLSN
()));
if
(
request
.
getHeader
(
"AccountLanguage"
).
equals
(
"en"
)){
cell1
.
setCellValue
(
new
HSSFRichTextString
(
resultWarehouseNoAndTDLSNAndTimeVo
.
getWarehouseNo
()+
"Warehouse temperature and humidity historic data -"
+
resultWarehouseNoAndTDLSNAndTimeVo
.
getTDLSN
()));
}
else
if
(
request
.
getHeader
(
"AccountLanguage "
).
equals
(
"jp"
)){
cell1
.
setCellValue
(
new
HSSFRichTextString
(
resultWarehouseNoAndTDLSNAndTimeVo
.
getWarehouseNo
()+
"倉庫の温度および湿度の観測記録-"
+
resultWarehouseNoAndTDLSNAndTimeVo
.
getTDLSN
()));
}
else
{
cell1
.
setCellValue
(
new
HSSFRichTextString
(
resultWarehouseNoAndTDLSNAndTimeVo
.
getWarehouseNo
()+
"仓库温湿度观测记录表-"
+
resultWarehouseNoAndTDLSNAndTimeVo
.
getTDLSN
()));
}
}
}
//设置行高
//设置行高
row1
.
setHeight
((
short
)
(
30
*
20
));
row1
.
setHeight
((
short
)
(
30
*
20
));
...
@@ -76,8 +82,8 @@ public class WarehouseExcel {
...
@@ -76,8 +82,8 @@ public class WarehouseExcel {
int
rowCount
=
1
;
int
rowCount
=
1
;
/*
/*
* 创建第二行
* 创建第二行
* */
* */
HSSFRow
row2
=
sheet
.
createRow
((
short
)
rowCount
);
HSSFRow
row2
=
sheet
.
createRow
((
short
)
rowCount
);
HSSFCell
cell2
=
null
;
HSSFCell
cell2
=
null
;
HSSFCellStyle
rowStyle2
=
getStyle
(
workbook
);
HSSFCellStyle
rowStyle2
=
getStyle
(
workbook
);
...
@@ -106,8 +112,8 @@ public class WarehouseExcel {
...
@@ -106,8 +112,8 @@ public class WarehouseExcel {
row2
.
setHeight
((
short
)
(
26
*
20
));
row2
.
setHeight
((
short
)
(
26
*
20
));
/*
/*
* 创建第三行
* 创建第三行
* */
* */
rowCount
=
rowCount
+
1
;
rowCount
=
rowCount
+
1
;
HSSFRow
row3
=
sheet
.
createRow
((
short
)
rowCount
);
HSSFRow
row3
=
sheet
.
createRow
((
short
)
rowCount
);
HSSFCell
cell3
=
null
;
HSSFCell
cell3
=
null
;
...
@@ -239,8 +245,8 @@ public class WarehouseExcel {
...
@@ -239,8 +245,8 @@ public class WarehouseExcel {
}
}
/*
/*
* 标题单元格样式
* 标题单元格样式
*/
*/
public
static
HSSFCellStyle
getTitleStyle
(
HSSFWorkbook
workbook
)
{
public
static
HSSFCellStyle
getTitleStyle
(
HSSFWorkbook
workbook
)
{
HSSFFont
font
=
workbook
.
createFont
();
HSSFFont
font
=
workbook
.
createFont
();
font
.
setFontHeightInPoints
((
short
)
18
);
font
.
setFontHeightInPoints
((
short
)
18
);
...
...
src/main/java/com/example/tdl/util/AliyunOSSClientUtil.java
View file @
c955318d
...
@@ -390,7 +390,7 @@ public class AliyunOSSClientUtil {
...
@@ -390,7 +390,7 @@ public class AliyunOSSClientUtil {
putResult
=
ossClient
.
putObject
(
BACKET_NAME
,
FOLDER3
+
fileName
,
is
,
metadata
);
putResult
=
ossClient
.
putObject
(
BACKET_NAME
,
FOLDER3
+
fileName
,
is
,
metadata
);
}
else
if
(
fileName
.
contains
(
"CHN"
)){
}
else
if
(
fileName
.
contains
(
"CHN"
)){
putResult
=
ossClient
.
putObject
(
BACKET_NAME
,
FOLDER6
+
fileName
,
is
,
metadata
);
putResult
=
ossClient
.
putObject
(
BACKET_NAME
,
FOLDER6
+
fileName
,
is
,
metadata
);
}
else
if
(
fileName
.
contains
(
"仓库温湿度观测记录"
)
||
fileName
.
contains
(
"Warehouse
temperature and humidity historic d
ata"
)||
fileName
.
contains
(
"倉庫の温度および湿度の観測記録"
)){
}
else
if
(
fileName
.
contains
(
"仓库温湿度观测记录"
)
||
fileName
.
contains
(
"Warehouse
D
ata"
)||
fileName
.
contains
(
"倉庫の温度および湿度の観測記録"
)){
putResult
=
ossClient
.
putObject
(
BACKET_NAME
,
FOLDER5
+
fileName
,
is
,
metadata
);
putResult
=
ossClient
.
putObject
(
BACKET_NAME
,
FOLDER5
+
fileName
,
is
,
metadata
);
}
else
if
(
fileName
.
contains
(
"报警日志数据"
)){
}
else
if
(
fileName
.
contains
(
"报警日志数据"
)){
putResult
=
ossClient
.
putObject
(
BACKET_NAME
,
FOLDER7
+
fileName
,
is
,
metadata
);
putResult
=
ossClient
.
putObject
(
BACKET_NAME
,
FOLDER7
+
fileName
,
is
,
metadata
);
...
...
src/main/resources/i18n/messages_en.properties
View file @
c955318d
...
@@ -276,8 +276,8 @@ wrongThemeColors=The format of the theme color is incorrect
...
@@ -276,8 +276,8 @@ wrongThemeColors=The format of the theme color is incorrect
comPictureDimension
=
Width*Height150*200
comPictureDimension
=
Width*Height150*200
warePictureDimension
=
Width*Height150*120
warePictureDimension
=
Width*Height150*120
truckPictureDimension
=
Width*Height90*60
truckPictureDimension
=
Width*Height90*60
data
=
Transport
d
ata
data
=
Transport
D
ata
warehousedata
=
Warehouse
temperature and humidity historic d
ata
warehousedata
=
Warehouse
D
ata
temMaxLimit
=
The upper temperature limit is 85
\u2103
temMaxLimit
=
The upper temperature limit is 85
\u2103
temMinLimit
=
The lower temperature limit is -25
\u2103
temMinLimit
=
The lower temperature limit is -25
\u2103
humidityMaxLimit
=
The upper humidity limit is 100%
humidityMaxLimit
=
The upper humidity limit is 100%
...
...
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