Commit 8c941a2a authored by 竹天卫's avatar 竹天卫

优化

parent c9c89d36
......@@ -20,6 +20,7 @@ public enum FileExt {
//office后缀名
DOC(".doc"),
DOCX(".docx"),
EXCL(".xls"),
PDF("pdf"),
EXCLX(".xlsx");
......
......@@ -93,7 +93,7 @@
SELECT t.name
FROM team t
WHERE t.group_id = #{groupId} and t.status = 1
and t.remark != 'no_check'
and t.remark is null
</select>
<!--根据检测组id 获取所有检测项信息-->
......
......@@ -624,6 +624,32 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
entrustVo.setEnclosureUrl(entityEnclosure.getPdfUrl());
entrustVo.setExtName(entityEnclosure.getExtName());
}
}else{
QueryWrapper<SampleTmp> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("entrust_id", entrustVo.getId());
List<SampleTmp> sampleTmpList = sampleTmpService.list(queryWrapper);
List<SampleTmpVo> sampleTmpVoList = new ArrayList<>();
if (sampleTmpList != null && sampleTmpList.size() > 0) {
for (SampleTmp sampleTmp : sampleTmpList) {
SampleTmpVo sampleTmpVo = new SampleTmpVo();
BeanUtils.copyProperties(sampleTmp, sampleTmpVo);
String teamIds = sampleTmp.getTeamIds();
String teamName = "";
if (teamIds != null) {
String[] teamIdS = teamIds.split("、");
for (String teamId : teamIdS) {
Team team = teamMapper.selectById(Integer.valueOf(teamId));
if (team != null) {
team.getName();
teamName = teamName.equals("") ? team.getName() : (teamName + "、" + team.getName());
}
}
}
sampleTmpVo.setTeamName(teamName);
sampleTmpVoList.add(sampleTmpVo);
}
}
entrustVo.setSampleTmpList(sampleTmpVoList);
}
return BaseResponse.okData(entrustVo);
}
......@@ -652,9 +678,19 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
Map<String, Object> params = new HashMap<>();
params.put("id", id);
List<SampleHandleVo> sampleHandleList = sampleHandleMapper.getSampleHandleList(params);
if (sampleHandleList != null && sampleHandleList.size() > 0) {
for (SampleHandleVo shVo : sampleHandleList) {
String contentName = "";
Handle handle = handleMapper.selectById(shVo.getHandleId());
if (handle == null) {
return BaseResponse.errorMsg("选择的处理项信息有误");
}
String contentName = handle.getName();
/*String contentName = "";
if (shVo.getContent() != null) {
String[] handIdS = shVo.getContent().split("、");
List<SampleHandleEnclosure> sampleHandleEnclosureList = new ArrayList<>();
......@@ -665,7 +701,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
}
contentName = contentName.equals("") ? handle.getName() : contentName + "、" + handle.getName();
}
}
}*/
shVo.setContentName(contentName);
}
}
......
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