原子指标判断代码提交

topo_dev
liu 9 months ago
parent e67aefe029
commit f11ea5219c

@ -91,8 +91,10 @@ public class Neo4jUtils {
resultDTO.setEndId(valueTransportString(record.get("endId")));
resultDTO.setRelId(valueTransportString(record.get("relId")));
resultDTO.setRelId(valueTransportString(record.get("relId")));
// 这里注意,neo4j的recordId对应的是note_record_split的数据
resultDTO.setRecordId(valueTransportString(record.get("recordId")));
resultDTO.setRecordId(valueTransportString(record.get("recordsId")));
// recordsId对应数据库note_record
resultDTO.setRecordsId(valueTransportString(record.get("recordsId")));
list.add(resultDTO);
}
return list;

@ -47,12 +47,12 @@ public class ModelAtomicResult implements Serializable {
/**
* id
*/
private String recordId;
private String recordSplitId;
/**
* id
*/
private String recordsId;
private String recordId;
/**
*

@ -17,7 +17,6 @@ import lombok.extern.slf4j.Slf4j;
import org.neo4j.driver.Driver;
import org.neo4j.driver.Result;
import org.neo4j.driver.Session;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
@ -206,8 +205,8 @@ public class ModelServiceImpl implements ModelService {
if (StringUtils.isNotEmpty(resultDTO.getRelId())) {
//存在关系
result.setAtomicResult("1");
result.setRecordId(resultDTO.getRecordId());
result.setRecordsId(resultDTO.getRecordsId());
result.setRecordSplitId(resultDTO.getRecordId());
result.setRecordId(resultDTO.getRecordsId());
break;
} else {
result.setAtomicResult("0");

@ -33,13 +33,17 @@
</if>
</select>
<select id="selectMaxIndex" resultType="java.lang.Integer">
select ifnull(max(index_num), 0) from model_case where data_status = '1'
select ifnull(max(index_num), 0)
from model_case
where data_status = '1'
</select>
<select id="getIndexDetail" resultType="com.supervision.police.dto.IndexDetail">
select mi.name as indexName, mi.index_score as score, mir.index_result, mir.atomic_ids
from model_index mi
left join model_index_result mir on mi.id = mir.index_id
WHERE mi.data_status = '1' and mir.case_id = #{caseId} and mi.index_type = #{indexType}
left join model_index_result mir on mi.id = mir.index_id
WHERE mi.data_status = '1'
and mir.case_id = #{caseId}
and mi.index_type = #{indexType}
</select>
<select id="getAtomicDetail" resultType="com.supervision.police.dto.AtomicIndexDTO">
select mai.name as indexName,
@ -47,7 +51,7 @@
concat(nrs.question, nrs.answer) as record
from model_atomic_result mar
left join model_atomic_index mai on mar.atomic_id = mai.id
left join note_record_split nrs on mar.record_id = nrs.id
left join note_record_split nrs on mar.record_split_id = nrs.id
where mar.case_id = #{caseId} and mar.atomic_id in
<foreach collection="atomicIds" item="item" open="(" close=")" separator=",">
#{item}

Loading…
Cancel
Save