Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-service-soil
Overview
Overview
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
wangweidong
patzn-cloud-service-soil
Commits
e4526a9d
Commit
e4526a9d
authored
Apr 09, 2021
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
土工平台修改
parent
19410f06
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
27 deletions
+17
-27
SoilExperimentServiceImpl.java
...ice/lims/soil/service/impl/SoilExperimentServiceImpl.java
+4
-13
Test.java
src/test/java/com/patzn/cloud/service/lims/test/Test.java
+13
-14
No files found.
src/main/java/com/patzn/cloud/service/lims/soil/service/impl/SoilExperimentServiceImpl.java
View file @
e4526a9d
...
@@ -979,7 +979,6 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
...
@@ -979,7 +979,6 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
}
else
{
}
else
{
mapReplace
.
put
(
"#{密度9.81}"
,
""
);
mapReplace
.
put
(
"#{密度9.81}"
,
""
);
}
}
// HSSFWorkbookUtil.replaceModel(mapReplace,xssfWorkbook,sheet);
nextSample
++;
nextSample
++;
HSSFWorkbookUtil
.
replaceModel
(
mapReplace
,
xssfWorkbook
,
sheet
);
HSSFWorkbookUtil
.
replaceModel
(
mapReplace
,
xssfWorkbook
,
sheet
);
}
}
...
@@ -1031,22 +1030,13 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
...
@@ -1031,22 +1030,13 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
mapReplace
.
put
(
"#{密度9.81}"
,
""
);
mapReplace
.
put
(
"#{密度9.81}"
,
""
);
}
}
HSSFWorkbookUtil
.
replaceModel
(
mapReplace
,
xssfWorkbook
,
xssfSheet
);
HSSFWorkbookUtil
.
replaceModel
(
mapReplace
,
xssfWorkbook
,
xssfSheet
);
// int numSheet = xssfWorkbook.getNumberOfSheets();
// for (int i = 0; i < numSheet; i++) {
// HSSFWorkbookUtil.replaceModel(mapReplace,xssfWorkbook,xssfWorkbook.getSheetAt(i));
// }
int
length
=
voList
.
size
();
// for (int i = 0; i < length; i++) {
//
//
// }
}
else
{
}
else
{
List
<
List
<
SoilExperimentVO
>>
relList
=
ListUtils
.
partition
(
voList
,
templateSampleNum
);
List
<
List
<
SoilExperimentVO
>>
relList
=
ListUtils
.
partition
(
voList
,
templateSampleNum
);
int
templateSheetMum
=
xssfWorkbook
.
getNumberOfSheets
();
int
templateSheetMum
=
xssfWorkbook
.
getNumberOfSheets
();
XSSFSheet
sheetMy
=
xssfWorkbook
.
getSheetAt
(
0
);
XSSFSheet
sheetMy
=
xssfWorkbook
.
getSheetAt
(
0
);
PrintSetup
printSetup
=
sheetMy
.
getPrintSetup
();
boolean
printRound
=
printSetup
.
getLandscape
();
boolean
first
=
true
;
boolean
first
=
true
;
List
<
SoilExperimentVO
>
firstList
=
null
;
List
<
SoilExperimentVO
>
firstList
=
null
;
...
@@ -1060,7 +1050,8 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
...
@@ -1060,7 +1050,8 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
continue
;
continue
;
}
else
{
}
else
{
sheet
=
xssfWorkbook
.
cloneSheet
(
0
,
sheetMy
.
getSheetName
()+(
templateSheetMum
));
sheet
=
xssfWorkbook
.
cloneSheet
(
0
,
sheetMy
.
getSheetName
()+(
templateSheetMum
));
}
sheet
.
getPrintSetup
().
setLandscape
(
printRound
);
}
Map
<
String
,
String
>
mapReplaceMy
=
new
HashMap
<>();
Map
<
String
,
String
>
mapReplaceMy
=
new
HashMap
<>();
mapReplaceMy
.
put
(
"#{reportCode}"
,
entrust
.
getEntrustCode
());
mapReplaceMy
.
put
(
"#{reportCode}"
,
entrust
.
getEntrustCode
());
...
...
src/test/java/com/patzn/cloud/service/lims/test/Test.java
View file @
e4526a9d
...
@@ -11,24 +11,23 @@ import java.math.BigDecimal;
...
@@ -11,24 +11,23 @@ import java.math.BigDecimal;
public
class
Test
{
public
class
Test
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
try
{
try
{
Workbook
workbook1
=
new
Workbook
(
"D://excel//封面.xlsx"
);
Workbook
workbook2
=
new
Workbook
(
"D://excel//检测报告(力学试验)三轴.xlsx"
);
Workbook
workbook3
=
new
Workbook
(
"D://excel//检测报告(力学试验)手动十字板.xlsx"
);
XSSFWorkbook
workbook2
=
new
XSSFWorkbook
(
new
File
(
"D://颗粒分析实验(甲种)2.xlsx"
)
);
Workbook
workbook4
=
new
Workbook
(
"D://excel//检测报告(力学试验)休止角.xlsx"
);
XSSFWorkbook
workbook3
=
new
XSSFWorkbook
(
new
File
(
"D://颗粒分析实验(甲种)3.xlsx"
)
);
Workbook
workbook5
=
new
Workbook
(
"D://excel//检测报告(力学试验)袖珍贯入仪.xlsx"
);
Workbook
workbook6
=
new
Workbook
(
"D://excel//检测报告(力学试验)直剪.xlsx"
);
Workbook
workbook7
=
new
Workbook
(
"D://excel//附件.xlsx"
);
workbook1
.
combine
(
workbook2
);
int
num
=
workbook3
.
getNumberOfSheets
(
);
workbook1
.
combine
(
workbook3
);
workbook1
.
combine
(
workbook4
);
for
(
int
i
=
0
;
i
<
num
;
i
++)
{
workbook1
.
combine
(
workbook5
);
//workbook2.cloneSheet()
workbook1
.
combine
(
workbook6
);
}
workbook1
.
combine
(
workbook7
);
FileOutputStream
fileOut
=
null
;
FileOutputStream
fileOut
=
null
;
String
allFileName
=
"d:/excel/0.xlsx"
;
String
allFileName
=
"d:/excel/0.xlsx"
;
fileOut
=
new
FileOutputStream
(
allFileName
);
fileOut
=
new
FileOutputStream
(
allFileName
);
workbook1
.
save
(
fileOut
,
SaveFormat
.
XLSX
);
File
file
=
new
File
(
allFileName
);
File
file
=
new
File
(
allFileName
);
XSSFWorkbook
workbook
=
new
XSSFWorkbook
(
file
);
XSSFWorkbook
workbook
=
new
XSSFWorkbook
(
file
);
...
...
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