1. 添加单个提示词分析笔录功能
parent
c388c1eaf5
commit
791e133780
@ -1,6 +1,18 @@
|
|||||||
package com.supervision.police.service;
|
package com.supervision.police.service;
|
||||||
|
|
||||||
|
import com.supervision.police.domain.CasePerson;
|
||||||
|
import com.supervision.police.domain.NotePrompt;
|
||||||
|
import com.supervision.police.domain.NoteRecordSplit;
|
||||||
|
import com.supervision.police.domain.TripleInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface ExtractTripleInfoService {
|
public interface ExtractTripleInfoService {
|
||||||
|
|
||||||
void extractTripleInfo(String caseId, String name, String recordSplitId);
|
void extractTripleInfo(String caseId, String name, String recordSplitId);
|
||||||
|
|
||||||
|
List<TripleInfo> extractTripleInfo(NotePrompt notePrompt, CasePerson mainActor, List<NoteRecordSplit> noteRecordSplitList);
|
||||||
|
|
||||||
|
|
||||||
|
List<TripleInfo> extractTripleInfo(NotePrompt notePrompt, String caseId, String recordId);
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,53 @@
|
|||||||
package com.supervision.police.service.impl;
|
package com.supervision.police.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.supervision.police.domain.TripleInfo;
|
import com.supervision.police.domain.TripleInfo;
|
||||||
import com.supervision.police.mapper.TripleInfoMapper;
|
import com.supervision.police.mapper.TripleInfoMapper;
|
||||||
import com.supervision.police.service.TripleInfoService;
|
import com.supervision.police.service.TripleInfoService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class TripleInfoServiceImpl extends ServiceImpl<TripleInfoMapper, TripleInfo> implements TripleInfoService {
|
public class TripleInfoServiceImpl extends ServiceImpl<TripleInfoMapper, TripleInfo> implements TripleInfoService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TripleInfo saveOrUpdateByBusiness(TripleInfo tripleInfo) {
|
||||||
|
if (StrUtil.isNotEmpty(tripleInfo.getId())) {
|
||||||
|
TripleInfo dbTripleInfo = super.getById(tripleInfo.getId());
|
||||||
|
if (null != dbTripleInfo) {
|
||||||
|
super.updateById(tripleInfo);
|
||||||
|
} else {
|
||||||
|
super.save(tripleInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (StrUtil.isEmpty(tripleInfo.getId())) {
|
||||||
|
TripleInfo one = super.lambdaQuery()
|
||||||
|
.eq(TripleInfo::getStartNode, tripleInfo.getStartNode())
|
||||||
|
.eq(TripleInfo::getEndNode, tripleInfo.getEndNode())
|
||||||
|
.eq(TripleInfo::getRelation, tripleInfo.getRelation())
|
||||||
|
.eq(TripleInfo::getCaseId, tripleInfo.getCaseId())
|
||||||
|
.eq(TripleInfo::getStartNodeType, tripleInfo.getStartNodeType())
|
||||||
|
.eq(TripleInfo::getEndNodeType, tripleInfo.getEndNodeType())
|
||||||
|
.eq(TripleInfo::getRecordSplitId, tripleInfo.getRecordSplitId()).one();
|
||||||
|
if (null != one) {
|
||||||
|
tripleInfo.setId(one.getId());
|
||||||
|
super.updateById(tripleInfo);
|
||||||
|
} else {
|
||||||
|
super.save(tripleInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return tripleInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateNeo4jFlag(List<String> ids, String neo4jFlag) {
|
||||||
|
if (CollUtil.isEmpty(ids)){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
super.lambdaUpdate().in(TripleInfo::getId, ids).set(TripleInfo::getAddNeo4j, neo4jFlag).update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue