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
9902ced9
Commit
9902ced9
authored
Mar 09, 2021
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
土工平台修改
parent
e53b7120
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
8 deletions
+71
-8
SoilExperimentServiceImpl.java
...ice/lims/soil/service/impl/SoilExperimentServiceImpl.java
+71
-8
No files found.
src/main/java/com/patzn/cloud/service/lims/soil/service/impl/SoilExperimentServiceImpl.java
View file @
9902ced9
...
@@ -1352,6 +1352,8 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
...
@@ -1352,6 +1352,8 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
List
<
SoilExperimentVO
>
voList
=
soilExperimentService
.
listVOByIds
(
ids
);
List
<
SoilExperimentVO
>
voList
=
soilExperimentService
.
listVOByIds
(
ids
);
boolean
chong
=
"检测报告(力学试验)落锥"
.
equals
(
template
.
getName
())||
"检测报告(力学试验)实验室微型十字板"
.
equals
(
template
.
getName
());
if
(
CollectionUtils
.
isEmpty
(
voList
)){
if
(
CollectionUtils
.
isEmpty
(
voList
)){
RestAssert
.
fail
(
"试验项目不存在"
);
RestAssert
.
fail
(
"试验项目不存在"
);
...
@@ -1368,21 +1370,82 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
...
@@ -1368,21 +1370,82 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
return
e
.
getId
();
return
e
.
getId
();
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
List
<
SoilItem
>
soilItemList
=
soilItemService
.
list
(
Condition
.
create
().
in
(
"experiment_id"
,
expIdsList
));
List
<
SoilItem
>
soilItemList
=
soilItemService
.
list
(
Condition
.
create
().
in
(
"experiment_id"
,
expIdsList
));
for
(
SoilExperimentVO
vo:
voList
)
{
for
(
SoilExperimentVO
vo:
voList
)
{
if
(
StringUtils
.
isNotBlank
(
vo
.
getShortName
())){
if
(
StringUtils
.
isNotBlank
(
vo
.
getShortName
())){
if
(
"CD"
.
equals
(
vo
.
getShortName
())||
"CU"
.
equals
(
vo
.
getShortName
())){
if
(
"CD"
.
equals
(
vo
.
getShortName
())||
"CU"
.
equals
(
vo
.
getShortName
())){
SoilItem
item
=
new
SoilItem
();
SoilItem
item
=
new
SoilItem
();
item
.
setName
(
"破坏类型"
);
item
.
setName
(
"破坏类型"
);
item
.
setTestValue
(
"AB"
);
item
.
setTestValue
(
"AB"
);
item
.
setExperimentId
(
vo
.
getId
());
item
.
setExperimentId
(
vo
.
getId
());
soilItemList
.
add
(
item
);
soilItemList
.
add
(
item
);
}
}
}
if
(
chong
){
Map
<
String
,
Integer
>
checkChongSuMap
=
new
HashMap
<>();
for
(
SoilExperimentVO
vo
:
voList
)
{
String
name
=
vo
.
getName
().
replace
(
"-重塑"
,
""
);
if
(
checkChongSuMap
.
containsKey
(
name
)){
Integer
num
=
checkChongSuMap
.
get
(
name
);
num
=
num
+
1
;
checkChongSuMap
.
put
(
name
,
num
);
}
else
{
checkChongSuMap
.
put
(
name
,
1
);
}
}
}
}
List
<
SoilExperimentVO
>
newVOList
=
new
ArrayList
<>();
Map
<
String
,
SoilExperimentVO
>
newChongSuMap
=
new
HashMap
<>();
for
(
SoilExperimentVO
vo:
voList
)
{
String
name
=
vo
.
getName
().
replace
(
"-重塑"
,
""
);
if
(!
vo
.
getName
().
contains
(
"重塑"
)){
newVOList
.
add
(
vo
);
}
else
{
Integer
num
=
checkChongSuMap
.
get
(
name
);
if
(
null
==
num
||
num
==
1
)
{
newVOList
.
add
(
vo
);
}
newChongSuMap
.
put
(
vo
.
getName
(),
vo
);
}
}
voList
=
newVOList
;
for
(
SoilExperimentVO
vo:
voList
)
{
SoilExperimentVO
chongSu
=
newChongSuMap
.
get
(
vo
.
getName
()+
"-重塑"
);
if
(
null
!=
chongSu
){
for
(
SoilItem
item
:
soilItemList
)
{
if
(
item
.
getExperimentId
().
equals
(
chongSu
)){
SoilItem
soilItem
=
item
.
convert
(
SoilItem
.
class
);
soilItem
.
setExperimentId
(
vo
.
getId
());
soilItemList
.
add
(
soilItem
);
}
}
}
}
}
}
Map
<
Long
,
List
<
SoilItem
>>
expItemMap
=
new
HashMap
<>();
Map
<
Long
,
List
<
SoilItem
>>
expItemMap
=
new
HashMap
<>();
for
(
SoilItem
item:
soilItemList
)
{
for
(
SoilItem
item:
soilItemList
)
{
if
(!
expItemMap
.
containsKey
(
item
.
getExperimentId
())){
if
(!
expItemMap
.
containsKey
(
item
.
getExperimentId
())){
...
...
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