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
6ec54a2d
Commit
6ec54a2d
authored
Mar 26, 2021
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
土工平台修改
parent
89a034b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
2 deletions
+38
-2
SoilExperimentServiceImpl.java
...ice/lims/soil/service/impl/SoilExperimentServiceImpl.java
+38
-2
No files found.
src/main/java/com/patzn/cloud/service/lims/soil/service/impl/SoilExperimentServiceImpl.java
View file @
6ec54a2d
...
...
@@ -1054,11 +1054,28 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
mapReplace
.
put
(
"#{sampleCode}"
,
vo
.
getSampleCode
());
mapReplace
.
put
(
"#{siteNo}"
,
vo
.
getSiteNo
());
mapReplace
.
put
(
"#{sampleDepth}"
,
vo
.
getSampleDepth
());
HSSFWorkbookUtil
.
replaceModel
(
mapReplace
,
xssfWorkbook
,
sheet
);
String
midu
=
mapReplace
.
get
(
"#{密度}"
);
if
(
StringUtils
.
isNotBlank
(
midu
)){
try
{
BigDecimal
bigDecimal
=
new
BigDecimal
(
midu
);
BigDecimal
mul
=
new
BigDecimal
(
"9.81"
);
BigDecimal
rz981
=
bigDecimal
.
multiply
(
mul
);
mapReplace
.
put
(
"#{密度9.81}"
,
rz981
.
toString
());
}
catch
(
Exception
e
){
logger
.
error
(
"密度9.81失败"
+
e
.
getMessage
());
mapReplace
.
put
(
"#{密度9.81}"
,
""
);
}
}
else
{
mapReplace
.
put
(
"#{密度9.81}"
,
""
);
}
// HSSFWorkbookUtil.replaceModel(mapReplace,xssfWorkbook,sheet);
nextSample
++;
}
List
<
SoilItemVO
>
itemVOList
=
sampleSoilItemVOMap
.
get
(
firstVO
.
getSampleId
());
if
(
CollectionUtils
.
isNotEmpty
(
itemVOList
)){
for
(
SoilItemVO
itemVO:
itemVOList
)
{
...
...
@@ -1087,8 +1104,27 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
mapReplace
.
put
(
"#{sampleCode}"
,
firstVO
.
getSampleCode
());
mapReplace
.
put
(
"#{siteNo}"
,
firstVO
.
getSiteNo
());
mapReplace
.
put
(
"#{sampleDepth}"
,
firstVO
.
getSampleDepth
());
HSSFWorkbookUtil
.
replaceModel
(
mapReplace
,
xssfWorkbook
,
xssfSheet
);
String
midu
=
mapReplace
.
get
(
"#{密度}"
);
if
(
StringUtils
.
isNotBlank
(
midu
)){
try
{
BigDecimal
bigDecimal
=
new
BigDecimal
(
midu
);
BigDecimal
mul
=
new
BigDecimal
(
"9.81"
);
BigDecimal
rz981
=
bigDecimal
.
multiply
(
mul
);
mapReplace
.
put
(
"#{密度9.81}"
,
rz981
.
toString
());
}
catch
(
Exception
e
){
logger
.
error
(
"密度9.81失败"
+
e
.
getMessage
());
mapReplace
.
put
(
"#{密度9.81}"
,
""
);
}
}
else
{
mapReplace
.
put
(
"#{密度9.81}"
,
""
);
}
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++) {
...
...
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