Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
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
竹天卫
tianjin-cement
Commits
ae9bfa35
Commit
ae9bfa35
authored
Apr 01, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出优化
parent
529867a9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
81 additions
and
122 deletions
+81
-122
SampleServiceImpl.java
...se/sc/cement/business/service/impl/SampleServiceImpl.java
+1
-1
ExcelUtil.java
.../main/java/cn/wise/sc/cement/business/util/ExcelUtil.java
+3
-14
checkTeam.ftl
cement-business/src/main/resources/templates/checkTeam.ftl
+7
-77
handleSample.ftl
...nt-business/src/main/resources/templates/handleSample.ftl
+35
-12
sampleFlow.ftl
cement-business/src/main/resources/templates/sampleFlow.ftl
+35
-18
原料存放、销毁记录.ftl
cement-business/src/main/resources/templates/原料存放、销毁记录.ftl
+0
-0
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/SampleServiceImpl.java
View file @
ae9bfa35
...
...
@@ -292,7 +292,7 @@ public class SampleServiceImpl extends ServiceImpl<SampleMapper, Sample> impleme
Map
<
String
,
Object
>
map
=
new
HashMap
<>(
3
);
map
.
put
(
"start"
,
start
);
map
.
put
(
"end"
,
end
);
map
.
put
(
"
n
ame"
,
sampleName
);
map
.
put
(
"
sampleN
ame"
,
sampleName
);
map
.
put
(
"cementCode"
,
cementCode
);
List
<
SampleWord
>
list
=
sampleMapper
.
exportWordList
(
map
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/util/ExcelUtil.java
View file @
ae9bfa35
...
...
@@ -47,7 +47,7 @@ public class ExcelUtil {
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
workbook
.
write
(
byteArrayOutputStream
);
String
suffix
=
".xls"
;
String
suffix
=
".xls
x
"
;
response
.
setContentType
(
"application/vnd.ms-excel;charset=utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
new
String
((
fileName
+
suffix
).
getBytes
(),
"iso-8859-1"
));
...
...
@@ -84,7 +84,7 @@ public class ExcelUtil {
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
workbook
.
write
(
byteArrayOutputStream
);
String
suffix
=
".xls"
;
String
suffix
=
".xls
x
"
;
response
.
setContentType
(
"application/vnd.ms-excel;charset=utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
new
String
((
fileName
+
suffix
).
getBytes
(),
"iso-8859-1"
));
...
...
@@ -120,7 +120,7 @@ public class ExcelUtil {
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
workbook
.
write
(
byteArrayOutputStream
);
String
suffix
=
".xls"
;
String
suffix
=
".xls
x
"
;
response
.
setContentType
(
"application/vnd.ms-excel;charset=utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
new
String
((
fileName
+
suffix
).
getBytes
(),
"iso-8859-1"
));
...
...
@@ -464,7 +464,6 @@ public class ExcelUtil {
@SuppressWarnings
(
"resource"
)
public
static
List
<
Map
<
Integer
,
String
>>
readData
(
FileInputStream
fis
)
throws
Exception
{
XSSFWorkbook
hwb
=
new
XSSFWorkbook
(
fis
);
List
<
Map
<
Integer
,
String
>>
usermap
=
new
ArrayList
<>();
// 获取第一个sheet页
XSSFSheet
sheetAt
=
hwb
.
getSheetAt
(
0
);
...
...
@@ -507,16 +506,6 @@ public class ExcelUtil {
public
static
void
main
(
String
[]
args
)
throws
IOException
{
//指定数据存放的位置
OutputStream
outputStream
=
new
FileOutputStream
(
"D:\\test.xlsx"
);
...
...
cement-business/src/main/resources/templates/checkTeam.ftl
View file @
ae9bfa35
This diff is collapsed.
Click to expand it.
cement-business/src/main/resources/templates/handleSample.ftl
View file @
ae9bfa35
This diff is collapsed.
Click to expand it.
cement-business/src/main/resources/templates/sampleFlow.ftl
View file @
ae9bfa35
This diff is collapsed.
Click to expand it.
cement-business/src/main/resources/templates/原料存放、销毁记录.ftl
View file @
ae9bfa35
This diff is collapsed.
Click to expand it.
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