1. 修复bug

topo_dev
xueqingkun 9 months ago
parent 9151594ec5
commit 039eeabe15

@ -208,16 +208,16 @@ public class ModelIndexServiceImpl extends ServiceImpl<ModelIndexMapper, ModelIn
}
// 从指标中计算出所有原子指标id
List<String> automicIndexIds = modelIndexList.stream().filter(modelIndex -> StrUtil.isNotEmpty(modelIndex.getJudgeLogic()))
List<String> atomicIndexIds = modelIndexList.stream().filter(modelIndex -> StrUtil.isNotEmpty(modelIndex.getJudgeLogic()))
.map(modelIndex -> pickAtomicIndexIds(modelIndex.getJudgeLogic()))
.flatMap(Collection::stream).distinct().toList();
if (CollUtil.isEmpty(automicIndexIds)) {
if (CollUtil.isEmpty(atomicIndexIds)) {
return new ArrayList<>(1);
}
// 查询原子指标相关信息
List<ModelAtomicIndex> modelAtomicIndexList = modelAtomicIndexService.listCaseAtomicIndex(automicIndexIds, caseType, indexSource);
List<ModelAtomicIndex> modelAtomicIndexList = modelAtomicIndexService.listCaseAtomicIndex(atomicIndexIds, caseType, indexSource);
if (CollUtil.isEmpty(modelAtomicIndexList)) {
return new ArrayList<>(1);
}
@ -226,7 +226,7 @@ public class ModelIndexServiceImpl extends ServiceImpl<ModelIndexMapper, ModelIn
List<ModelAtomicResult> modelAtomicResults = modelAtomicResultMapper.selectList(
Wrappers.lambdaQuery(ModelAtomicResult.class).eq(ModelAtomicResult::getCaseId, caseId)
.eq(ModelAtomicResult::getCasePersonId, actorId)
.in(ModelAtomicResult::getAtomicId, automicIndexIds));
.in(ModelAtomicResult::getAtomicId, atomicIndexIds));
Map<String, ModelAtomicResult> modelAtomicResultMap = modelAtomicResults.stream()
.filter(modelAtomicResult -> StrUtil.isNotEmpty(modelAtomicResult.getAtomicId())).collect(Collectors.toMap(ModelAtomicResult::getAtomicId, v -> v, (v1, v2) -> v1));

Loading…
Cancel
Save