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
b0c24bbc
Commit
b0c24bbc
authored
Dec 18, 2020
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
土工平台修改
parent
7ebb90ca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletions
+14
-1
SoilExperimentServiceImpl.java
...ice/lims/soil/service/impl/SoilExperimentServiceImpl.java
+14
-1
No files found.
src/main/java/com/patzn/cloud/service/lims/soil/service/impl/SoilExperimentServiceImpl.java
View file @
b0c24bbc
...
@@ -199,6 +199,9 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
...
@@ -199,6 +199,9 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
@Override
@Override
public
SoilOriginalRecord
saveExcelOriginalRecord
(
Long
[]
ids
,
Long
templateId
,
Account
account
)
{
public
SoilOriginalRecord
saveExcelOriginalRecord
(
Long
[]
ids
,
Long
templateId
,
Account
account
)
{
logger
.
error
(
"saveExcelOriginalRecord开始生成"
);
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择试验项目!"
);
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择试验项目!"
);
RestAssert
.
fail
(
null
==
templateId
,
"请选择原始记录模板"
);
RestAssert
.
fail
(
null
==
templateId
,
"请选择原始记录模板"
);
...
@@ -206,17 +209,23 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
...
@@ -206,17 +209,23 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
if
(
null
==
template
){
if
(
null
==
template
){
RestAssert
.
fail
(
"模板不存在"
);
RestAssert
.
fail
(
"模板不存在"
);
}
}
logger
.
error
(
"saveExcelOriginalRecord模板存在"
);
List
<
SoilExperimentVO
>
voList
=
soilExperimentService
.
listVOByIds
(
ids
);
List
<
SoilExperimentVO
>
voList
=
soilExperimentService
.
listVOByIds
(
ids
);
if
(
CollectionUtils
.
isEmpty
(
voList
)){
if
(
CollectionUtils
.
isEmpty
(
voList
)){
return
null
;
return
null
;
}
}
logger
.
error
(
"saveExcelOriginalRecord项目查询存在"
);
SoilEntrust
entrust
=
soilEntrustService
.
getById
(
voList
.
get
(
0
).
getEntrustId
());
SoilEntrust
entrust
=
soilEntrustService
.
getById
(
voList
.
get
(
0
).
getEntrustId
());
logger
.
error
(
"saveExcelOriginalRecord entrust"
);
InputStream
io
=
ossClient
.
download
(
template
.
getObjectKey
());
InputStream
io
=
ossClient
.
download
(
template
.
getObjectKey
());
if
(
null
==
io
){
if
(
null
==
io
){
RestAssert
.
fail
(
"模板不存在"
);
RestAssert
.
fail
(
"模板不存在"
);
}
}
logger
.
error
(
" InputStream io 存在"
);
SoilOriginalRecord
objectKey
=
null
;
SoilOriginalRecord
objectKey
=
null
;
XSSFWorkbook
xssfWorkbook
=
null
;
XSSFWorkbook
xssfWorkbook
=
null
;
try
{
try
{
...
@@ -238,8 +247,10 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
...
@@ -238,8 +247,10 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
if
(
null
!=
template
.
getSampleBeginRow
()
if
(
null
!=
template
.
getSampleBeginRow
()
&&
null
!=
template
.
getSampleMergerNum
()
&&
null
!=
template
.
getSampleMergerNum
()
&&
null
!=
template
.
getTemplateSampleNum
()){
&&
null
!=
template
.
getTemplateSampleNum
()){
List
<
SoilOriginalTemplateConfig
>
configList
=
soilOriginalTemplateConfigService
.
list
(
Condition
.
create
().
eq
(
"template_id"
,
templateId
)
);
logger
.
error
(
"不为空"
);
List
<
SoilOriginalTemplateConfig
>
configList
=
soilOriginalTemplateConfigService
.
list
(
Condition
.
create
().
eq
(
"template_id"
,
templateId
));
logger
.
error
(
"configList"
);
int
templateSampleNum
=
template
.
getTemplateSampleNum
();
int
templateSampleNum
=
template
.
getTemplateSampleNum
();
if
(
voList
.
size
()<
templateSampleNum
){
if
(
voList
.
size
()<
templateSampleNum
){
int
beginRow
=
template
.
getSampleBeginRow
();
int
beginRow
=
template
.
getSampleBeginRow
();
...
@@ -380,6 +391,8 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
...
@@ -380,6 +391,8 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
os
.
flush
();
os
.
flush
();
objectKey
=
soilOriginalRecordService
.
uploadExpGenerate
(
ids
,
template
,
entrust
,
account
,
"原始记录生成"
,
file
);
objectKey
=
soilOriginalRecordService
.
uploadExpGenerate
(
ids
,
template
,
entrust
,
account
,
"原始记录生成"
,
file
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"Exception 报错"
+
e
.
getMessage
());
e
.
printStackTrace
();
e
.
printStackTrace
();
}
finally
{
}
finally
{
try
{
try
{
...
...
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