Commit d1290be8 authored by 竹天卫's avatar 竹天卫

未校核的 计算结果字段 返回jsonarray类型

parent 6a2b08fd
......@@ -32,4 +32,10 @@ public interface TeamMapper extends BaseMapper<Team> {
List<String> getByGroup(Integer groupId);
List<Map<String,String>> getListByGroup(Integer groupId);
}
......@@ -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>
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment