|
|
|
@ -3,6 +3,7 @@ package com.supervision.police.service.impl;
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
@ -37,6 +38,8 @@ import java.nio.charset.StandardCharsets;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
import static com.supervision.police.service.impl.ModelRecordTypeServiceImpl.buildTripleInfo;
|
|
|
|
|
|
|
|
|
|
@Slf4j
|
|
|
|
|
@Service
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
@ -185,6 +188,15 @@ public class NotePromptServiceImpl extends ServiceImpl<NotePromptMapper, NotePro
|
|
|
|
|
NotePrompt notePrompt = super.getById(id);
|
|
|
|
|
NotePromptDTO notePromptDTO = new NotePromptDTO();
|
|
|
|
|
BeanUtils.copyProperties(notePrompt, notePromptDTO);
|
|
|
|
|
|
|
|
|
|
notePromptDTO.setTripleList(buildTripleInfo(notePrompt));
|
|
|
|
|
//根据notePrompt的ID调用notePromptTypeRelService查询prompt_id相等的list
|
|
|
|
|
|
|
|
|
|
List<NotePromptTypeRel> notePromptTypeRels = notePromptTypeRelService.list(new LambdaQueryWrapper<NotePromptTypeRel>().eq(NotePromptTypeRel::getPromptId, notePrompt.getId()));
|
|
|
|
|
if (notePromptTypeRels != null && !notePromptTypeRels.isEmpty()) {
|
|
|
|
|
notePromptDTO.setTypeList(notePromptTypeRels.stream().map(NotePromptTypeRel::getTypeId).collect(Collectors.toList()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String evidenceCategoryId = notePromptDTO.getEvidenceCategoryId();
|
|
|
|
|
if (StringUtils.isNotEmpty(evidenceCategoryId)) {
|
|
|
|
|
EvidenceCategory category = evidenceCategoryService.getById(evidenceCategoryId);
|
|
|
|
|