74 lines
1.9 KiB
Java
74 lines
1.9 KiB
Java
package com.supervision.neo4j.service;
|
|
|
|
import cn.hutool.core.lang.Pair;
|
|
import com.supervision.common.domain.R;
|
|
import com.supervision.neo4j.domain.CaseNode;
|
|
import com.supervision.neo4j.domain.Rel;
|
|
import com.supervision.neo4j.dto.WebRelDTO;
|
|
import com.supervision.police.domain.TripleInfo;
|
|
import org.neo4j.driver.Record;
|
|
import com.supervision.police.vo.GraphReqVO;
|
|
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
/**
|
|
* @author qmy
|
|
* @since 2023-10-26
|
|
*/
|
|
public interface Neo4jService {
|
|
|
|
CaseNode save(CaseNode caseNode);
|
|
|
|
void delNode(Long id);
|
|
|
|
/**
|
|
* 移除不具备任何连接关系的节点
|
|
*/
|
|
void deleteNoRelationNode(Long id);
|
|
|
|
void deleteRel(Long relId);
|
|
|
|
CaseNode findById(Long id);
|
|
|
|
List<CaseNode> findByName(String caseId, String recordId, String nodeType, String name, String picType);
|
|
|
|
CaseNode findOneByName(String caseId, String recordId, String nodeType, String name, String picType);
|
|
|
|
Rel findRelation(Rel rel);
|
|
|
|
Rel saveRelation(Rel rel);
|
|
|
|
/**
|
|
* 查询案件图谱
|
|
*
|
|
* @param graphReqVO 图谱查询请求参数
|
|
* @return 图谱数据
|
|
*/
|
|
R<?> getCaseGraph(GraphReqVO graphReqVO);
|
|
|
|
|
|
Pair<List<WebRelDTO>, List<Map<String, String>>> mergeRecord(List<Map<String, String>> nodes, List<WebRelDTO> relDTOS);
|
|
|
|
/**
|
|
* 查询案件图谱全量节点和关系
|
|
*
|
|
* @param picType 图谱类型
|
|
* @param caseId 案件id
|
|
* @return 图谱数据
|
|
*/
|
|
R<?> getNodeAndRelationListByCaseId(String picType, String caseId);
|
|
|
|
// R<?> test();
|
|
|
|
void deleteAbstractGraph();
|
|
|
|
void createAbstractGraph(String path, String sheetName);
|
|
|
|
void mockTestGraph(String path, String sheetName, String recordId, String recordSplitId, String caseId);
|
|
|
|
List<Record> executeCypher(String cypher, Map<String, Object> parameters);
|
|
|
|
TripleInfo saveTripleInfo(TripleInfo tripleInfo);
|
|
}
|