|
|
|
@ -28,7 +28,7 @@ import com.supervision.police.dto.*;
|
|
|
|
|
import com.supervision.police.mapper.ModelCaseMapper;
|
|
|
|
|
import com.supervision.police.service.*;
|
|
|
|
|
import com.supervision.police.vo.ModelCaseVO;
|
|
|
|
|
import com.supervision.utils.JudgeLogicUtil;
|
|
|
|
|
import com.supervision.utils.IndexRuleUtil;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
@ -418,21 +418,19 @@ public class ModelCaseServiceImpl extends ServiceImpl<ModelCaseMapper, ModelCase
|
|
|
|
|
List<CaseEvidence> caseEvidenceList = CollUtil.isEmpty(list) ? new ArrayList<>() : caseEvidenceService.listByIds(list);
|
|
|
|
|
|
|
|
|
|
for (IndexDetail record : indexDetails) {
|
|
|
|
|
if (StringUtils.isEmpty(record.getJudgeLogic())) {
|
|
|
|
|
if (StringUtils.isEmpty(record.getIndexResult())) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// 是否是新的结果
|
|
|
|
|
record.setNewFlagValue();
|
|
|
|
|
|
|
|
|
|
List<String> atomicIds = JudgeLogicUtil.pickAtomicIndexIds(record.getJudgeLogic());
|
|
|
|
|
List<AtomicIndexDTO> atomics = modelCaseMapper.getAtomicDetail(caseId, record.getIndexId(), atomicIds);
|
|
|
|
|
List<String> atomicIndexIds = IndexRuleUtil.getAtomicIndexIds(record.getIndexRule());
|
|
|
|
|
List<AtomicIndexDTO> atomics = modelCaseMapper.getAtomicDetail(caseId, record.getIndexId(), atomicIndexIds);
|
|
|
|
|
for (AtomicIndexDTO atomic : atomics) {
|
|
|
|
|
// 获取原子指标的判断规则
|
|
|
|
|
// 配置的指标的逻辑
|
|
|
|
|
Map<String, String> indexJundgeLogicMap = parseLogicMap(record.getJudgeLogic());
|
|
|
|
|
Map<String, String> indexJundgeLogicMap = IndexRuleUtil.getIndexJundgeLogicMap(record.getIndexRule());
|
|
|
|
|
// 需要和原子指标的规则判断是否一致(解决出罪和入罪冲突的问题)
|
|
|
|
|
String relationalSymbol = indexJundgeLogicMap.get(atomic.getAtomicIndexId());
|
|
|
|
|
|
|
|
|
|
atomic.judgeWithIndexResult(relationalSymbol);
|
|
|
|
|
atomic.setSegmentation(nodeRecordSpliteMap);
|
|
|
|
|
atomic.setRecordIfSegmentationAbsent("无");
|
|
|
|
@ -442,6 +440,31 @@ public class ModelCaseServiceImpl extends ServiceImpl<ModelCaseMapper, ModelCase
|
|
|
|
|
|
|
|
|
|
atomic.setParentIndexName(record.getIndexName());
|
|
|
|
|
}
|
|
|
|
|
// ===================================↑新方法=====================================
|
|
|
|
|
// ===================================↓老方法=====================================
|
|
|
|
|
|
|
|
|
|
// if (StringUtils.isEmpty(record.getJudgeLogic())) {
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// // 是否是新的结果
|
|
|
|
|
// record.setNewFlagValue();
|
|
|
|
|
//
|
|
|
|
|
// List<String> atomicIds = JudgeLogicUtil.pickAtomicIndexIds(record.getJudgeLogic());
|
|
|
|
|
// List<AtomicIndexDTO> atomics = modelCaseMapper.getAtomicDetail(caseId, record.getIndexId(), atomicIds);
|
|
|
|
|
// for (AtomicIndexDTO atomic : atomics) {
|
|
|
|
|
// // 获取原子指标的判断规则
|
|
|
|
|
// // 配置的指标的逻辑
|
|
|
|
|
// Map<String, String> indexJundgeLogicMap = parseLogicMap(record.getJudgeLogic());
|
|
|
|
|
// // 需要和原子指标的规则判断是否一致(解决出罪和入罪冲突的问题)
|
|
|
|
|
// String relationalSymbol = indexJundgeLogicMap.get(atomic.getAtomicIndexId());
|
|
|
|
|
//
|
|
|
|
|
// atomic.judgeWithIndexResult(relationalSymbol);
|
|
|
|
|
// atomic.setSegmentation(nodeRecordSpliteMap);
|
|
|
|
|
// atomic.setRecordIfSegmentationAbsent("无");
|
|
|
|
|
// List<ModelAtomicResult> filterAtomicResultList = atomicResultList.stream().filter(v -> StrUtil.equals(record.getIndexId(), v.getIndexId())).toList();
|
|
|
|
|
// List<EvidentIndexResultDTO> evidentResult = getEvidentResult(filterAtomicResultList, caseEvidenceList, rootDirectory);
|
|
|
|
|
// atomic.setEvidentResultList(evidentResult);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
record.setChildren(atomics);
|
|
|
|
|
record.setRecordValue();
|
|
|
|
@ -449,19 +472,19 @@ public class ModelCaseServiceImpl extends ServiceImpl<ModelCaseMapper, ModelCase
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private List<EvidentIndexResultDTO> getEvidentResult(List<ModelAtomicResult> atomicResultList,List<CaseEvidence> caseEvidenceList,EvidenceDirectoryDTO rootDirectory) {
|
|
|
|
|
private List<EvidentIndexResultDTO> getEvidentResult(List<ModelAtomicResult> atomicResultList, List<CaseEvidence> caseEvidenceList, EvidenceDirectoryDTO rootDirectory) {
|
|
|
|
|
|
|
|
|
|
ArrayList<EvidentIndexResultDTO> evidentIndexResultDTOS = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
for (ModelAtomicResult modelAtomicResult : atomicResultList) {
|
|
|
|
|
String evidenceId = modelAtomicResult.getEvidenceId();
|
|
|
|
|
if (StrUtil.isEmpty(evidenceId)){
|
|
|
|
|
if (StrUtil.isEmpty(evidenceId)) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
List<String> evidenceIdList = Arrays.asList(evidenceId.split(","));
|
|
|
|
|
|
|
|
|
|
for (CaseEvidence caseEvidence : caseEvidenceList) {
|
|
|
|
|
if (evidenceIdList.contains(caseEvidence.getId())){
|
|
|
|
|
if (evidenceIdList.contains(caseEvidence.getId())) {
|
|
|
|
|
EvidentIndexResultDTO evidentIndexResultDTO = new EvidentIndexResultDTO();
|
|
|
|
|
evidentIndexResultDTO.setEvidenceId(caseEvidence.getId());
|
|
|
|
|
evidentIndexResultDTO.setEvidenceName(caseEvidence.getEvidenceName());
|
|
|
|
@ -470,7 +493,7 @@ public class ModelCaseServiceImpl extends ServiceImpl<ModelCaseMapper, ModelCase
|
|
|
|
|
evidentIndexResultDTO.setIndexId(modelAtomicResult.getIndexId());
|
|
|
|
|
evidentIndexResultDTO.setProvider(caseEvidence.getProvider());
|
|
|
|
|
EvidenceDirectoryDTO directory = rootDirectory.findDirectory(caseEvidence.getDirectoryId());
|
|
|
|
|
if (directory != null){
|
|
|
|
|
if (directory != null) {
|
|
|
|
|
evidentIndexResultDTO.setDirectoryName(directory.getDirectoryName());
|
|
|
|
|
List<String> directoryPath = rootDirectory.getDirectoryPath(evidentIndexResultDTO.getDirectoryId());
|
|
|
|
|
evidentIndexResultDTO.setDirectoryPath(StrUtil.join(">", directoryPath));
|
|
|
|
|