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
c7157f8d
Commit
c7157f8d
authored
Dec 23, 2020
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
土工平台修改
parent
d0cfbd30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
30 deletions
+41
-30
SoilExperimentServiceImpl.java
...ice/lims/soil/service/impl/SoilExperimentServiceImpl.java
+41
-30
No files found.
src/main/java/com/patzn/cloud/service/lims/soil/service/impl/SoilExperimentServiceImpl.java
View file @
c7157f8d
...
...
@@ -230,7 +230,7 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
List
<
SoilExperimentVO
>
voList
=
soilExperimentService
.
listVOByIds
(
ids
);
boolean
teShu
=
"界限含水率 (碟式液限仪多点法)试验记录表"
.
equals
(
template
.
getName
());
if
(
CollectionUtils
.
isEmpty
(
voList
)){
logger
.
error
(
"----------------------1"
);
...
...
@@ -390,25 +390,6 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
int
insertCount
=
voList
.
size
()-
templateSampleNum
;
List
<
Integer
>
integerList
=
new
ArrayList
<>();
logger
.
error
(
"---------------------11"
);
for
(
SoilOriginalTemplateConfig
config:
configList
)
{
Integer
a
=
config
.
getMergeBegin
();
Integer
b
=
config
.
getMergeEnd
();
if
(
null
==
a
||
b
==
null
){
continue
;
}
for
(
int
i
=
a
;
i
<=
b
;
i
++)
{
integerList
.
add
(
i
)
;
}
}
logger
.
error
(
"----------------------12"
);
for
(
int
m
=
0
;
m
<
insertCount
;
m
++)
{
for
(
int
i
=
0
;
i
<
sampleMergerNum
;
i
++)
{
sheetOne
.
shiftRows
(
insertRow
,
sheetOne
.
getLastRowNum
(),
1
,
true
,
false
);
...
...
@@ -421,10 +402,6 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
}
}
logger
.
error
(
"----------------------14"
);
int
sn
=
1
;
for
(
SoilExperimentVO
vo:
voList
)
{
XSSFRow
xssfRow
=
sheetOne
.
getRow
(
beginRow
);
...
...
@@ -516,20 +493,54 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
continue
;
}
int
step
=
config
.
getMergeRowNum
();
if
(
step
==
1
&&
config
.
getMergeEnd
()
==
config
.
getMergeBegin
()){
if
(
step
==
1
&&
config
.
getMergeEnd
()
==
config
.
getMergeBegin
()){
continue
;
}
if
(
null
!=
config
.
getColumnPlace
()
&&
null
!=
config
.
getMergeRowNum
()){
Integer
sampleBgMum
=
template
.
getSampleBeginRow
()+
templateSampleNum
*
sampleMergerNum
;
Integer
sampleEnMum
=
template
.
getSampleBeginRow
()+
voList
.
size
()*
sampleMergerNum
-
1
;
if
(!
teShu
){
Integer
sampleBgMum
=
template
.
getSampleBeginRow
()+
templateSampleNum
*
sampleMergerNum
;
Integer
sampleEnMum
=
template
.
getSampleBeginRow
()+
voList
.
size
()*
sampleMergerNum
-
1
;
while
(
sampleBgMum
<=
sampleEnMum
)
{
sheetOne
.
addMergedRegion
(
new
CellRangeAddress
(
sampleBgMum
,
sampleBgMum
+
step
-
1
,
config
.
getMergeBegin
(),
config
.
getMergeEnd
()));
sampleBgMum
=
sampleBgMum
+
step
;
}
}
else
{
if
(
config
.
getColumnPlace
()
!=
10
&&
config
.
getColumnPlace
()
!=
12
){
Integer
sampleBgMum
=
template
.
getSampleBeginRow
()+
templateSampleNum
*
sampleMergerNum
;
Integer
sampleEnMum
=
template
.
getSampleBeginRow
()+
voList
.
size
()*
sampleMergerNum
-
1
;
while
(
sampleBgMum
<=
sampleEnMum
)
{
sheetOne
.
addMergedRegion
(
new
CellRangeAddress
(
sampleBgMum
,
sampleBgMum
+
step
-
1
,
config
.
getMergeBegin
(),
config
.
getMergeEnd
()));
sampleBgMum
=
sampleBgMum
+
step
;
}
}
else
{
Integer
sampleBgMum
=
template
.
getSampleBeginRow
()+
templateSampleNum
*
sampleMergerNum
;
Integer
sampleEnMum
=
template
.
getSampleBeginRow
()+
voList
.
size
()*
sampleMergerNum
-
1
;
int
indexJishu
=
0
;
while
(
sampleBgMum
<=
sampleEnMum
)
{
if
(
indexJishu
%
2
==
0
){
sheetOne
.
addMergedRegion
(
new
CellRangeAddress
(
sampleBgMum
,
sampleBgMum
+
3
-
1
,
config
.
getMergeBegin
(),
config
.
getMergeEnd
()));
sampleBgMum
=
sampleBgMum
+
3
;
}
else
{
sheetOne
.
addMergedRegion
(
new
CellRangeAddress
(
sampleBgMum
,
sampleBgMum
+
2
-
1
,
config
.
getMergeBegin
(),
config
.
getMergeEnd
()));
sampleBgMum
=
sampleBgMum
+
2
;
}
indexJishu
++;
}
}
while
(
sampleBgMum
<=
sampleEnMum
)
{
sheetOne
.
addMergedRegion
(
new
CellRangeAddress
(
sampleBgMum
,
sampleBgMum
+
step
-
1
,
config
.
getMergeBegin
(),
config
.
getMergeEnd
()));
sampleBgMum
=
sampleBgMum
+
step
;
}
}
}
logger
.
error
(
"----------------------15"
);
...
...
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