Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
tianjin-cement
Project
Project
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
竹天卫
tianjin-cement
Commits
d1290be8
Commit
d1290be8
authored
Oct 26, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
未校核的 计算结果字段 返回jsonarray类型
parent
6a2b08fd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
2 deletions
+24
-2
TeamMapper.java
...in/java/cn/wise/sc/cement/business/mapper/TeamMapper.java
+6
-0
TeamMapper.xml
...java/cn/wise/sc/cement/business/mapper/xml/TeamMapper.xml
+6
-0
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+12
-2
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/TeamMapper.java
View file @
d1290be8
...
...
@@ -32,4 +32,10 @@ public interface TeamMapper extends BaseMapper<Team> {
List
<
String
>
getByGroup
(
Integer
groupId
);
List
<
Map
<
String
,
String
>>
getListByGroup
(
Integer
groupId
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/TeamMapper.xml
View file @
d1290be8
...
...
@@ -92,6 +92,12 @@
WHERE t.group_id = #{groupId} and t.status = 1
</select>
<!--根据检测组id 获取所有检测项信息-->
<select
id=
"getListByGroup"
resultType=
"java.util.Map"
>
SELECT t.name
FROM team t
WHERE t.group_id = #{groupId} and t.status = 1
</select>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
d1290be8
...
...
@@ -1748,8 +1748,18 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
return
BaseResponse
.
errorMsg
(
"检测组信息错误"
);
}
//根据检测组id返回检测组对应的所有检测项信息
List
<
String
>
checkResutlList
=
teamMapper
.
getByGroup
(
teamGroup
.
getId
());
sampleCheckVo
.
setCountResults
(
checkResutlList
.
toString
());
// List<String> checkResutlList = teamMapper.getByGroup(teamGroup.getId());
List
<
Map
<
String
,
String
>>
checkResutlList2
=
teamMapper
.
getListByGroup
(
teamGroup
.
getId
());
JSONArray
jsonArray
=
new
JSONArray
();
for
(
Map
<
String
,
String
>
cr
:
checkResutlList2
){
jsonArray
.
add
(
cr
);
}
String
checkResut_String
=
JSON
.
toJSON
(
jsonArray
).
toString
();
System
.
out
.
println
(
checkResut_String
);
sampleCheckVo
.
setCountResults
(
checkResut_String
);
sampleCheckVo
.
setIsParallel
(
sampleOne
.
getIsParallel
());
List
<
SampleCheckTeamVo
>
sctVoList
=
new
ArrayList
<>();
for
(
Sample
sample
:
sampleList
)
{
...
...
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