|
@@ -239,7 +239,7 @@ public class SysKgServiceImpl extends ServiceImpl<SysKgMapper, SysKg> implements
|
|
|
sysEntityRelation.setRelation((String) map.get("p"));
|
|
|
sysEntityRelation.setEnd((String) map.get("o"));
|
|
|
sysEntityRelation.setEndId(oCopy);
|
|
|
- sysEntityRelation.setEntityRelation(map.get("sType") + "-" + map.get("pType") + "-" + (String) map.get("oType"));
|
|
|
+ sysEntityRelation.setEntityRelation(map.get("sType") + "-" + map.get("pType") + "-" + map.get("oType"));
|
|
|
sysEntityRelationMapper.insert(sysEntityRelation);
|
|
|
}
|
|
|
}
|
|
@@ -579,7 +579,7 @@ public class SysKgServiceImpl extends ServiceImpl<SysKgMapper, SysKg> implements
|
|
|
QueryWrapper<SysEntityInstance> queryWrapper = new QueryWrapper();
|
|
|
queryWrapper.eq("kg_id", keyEntityNce.getKgId());
|
|
|
if (keyEntityNce.getKeyWord() != null && !"".equals(keyEntityNce.getKeyWord())) {
|
|
|
- queryWrapper.like("name",keyEntityNce.getKeyWord());
|
|
|
+ queryWrapper.like("name", keyEntityNce.getKeyWord());
|
|
|
}
|
|
|
|
|
|
// zez 如果EntityName(实体名字)有值,则跟它一起连查,如果没有,则不管
|
|
@@ -601,11 +601,11 @@ public class SysKgServiceImpl extends ServiceImpl<SysKgMapper, SysKg> implements
|
|
|
|
|
|
if (keyEntityRelation.getKeyWord() != null && !"".equals(keyEntityRelation.getKeyWord())) {
|
|
|
queryWrap
|
|
|
- .like("start",keyEntityRelation.getKeyWord())
|
|
|
+ .like("start", keyEntityRelation.getKeyWord())
|
|
|
.or()
|
|
|
- .like("relation",keyEntityRelation.getKeyWord())
|
|
|
+ .like("relation", keyEntityRelation.getKeyWord())
|
|
|
.or()
|
|
|
- .like("end",keyEntityRelation.getKeyWord())
|
|
|
+ .like("end", keyEntityRelation.getKeyWord())
|
|
|
;
|
|
|
}
|
|
|
// zez 根据实体名字查询实例关系
|
|
@@ -641,7 +641,7 @@ public class SysKgServiceImpl extends ServiceImpl<SysKgMapper, SysKg> implements
|
|
|
@Override
|
|
|
public List<String> getFileIdsByKgId(String kgId) {
|
|
|
SysKg sysKg = baseMapper.selectById(kgId);
|
|
|
- if(null != sysKg && null != sysKg.getFileIds() && StringUtils.isNotBlank(sysKg.getFileIds())){
|
|
|
+ if (null != sysKg && null != sysKg.getFileIds() && StringUtils.isNotBlank(sysKg.getFileIds())) {
|
|
|
String[] fileIdsTmp = sysKg.getFileIds().split(",");
|
|
|
List<String> fileIds = Arrays.asList(fileIdsTmp);
|
|
|
return fileIds;
|
|
@@ -650,21 +650,28 @@ public class SysKgServiceImpl extends ServiceImpl<SysKgMapper, SysKg> implements
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Boolean updateGrapgStatus(String kgId,Integer graphStatus,Integer annotationStatus, Integer finalStatus,String finalReason) {
|
|
|
+ public Boolean updateGrapgStatus(String kgId, Integer graphStatus, Integer annotationStatus, Integer finalStatus, String finalReason) {
|
|
|
SysKg sysKg = baseMapper.selectById(kgId);
|
|
|
- if (null != sysKg){
|
|
|
- if (null != graphStatus){
|
|
|
+ if (null != sysKg) {
|
|
|
+ if (null != graphStatus) {
|
|
|
sysKg.setGraphStatus(graphStatus);
|
|
|
}
|
|
|
- if (null != annotationStatus){
|
|
|
+ if (null != annotationStatus) {
|
|
|
sysKg.setAnnotationStatus(annotationStatus);
|
|
|
}
|
|
|
sysKg.setGenerateGraphStatus(finalStatus);
|
|
|
sysKg.setGenerateGraphReason(finalReason);
|
|
|
int upRes = baseMapper.updateById(sysKg);
|
|
|
- log.info("更新生成图谱的状态:{}",upRes);
|
|
|
+ log.info("更新生成图谱的状态:{}", upRes);
|
|
|
return upRes > 0 ? true : false;
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public SysKg updateKg(SysKg sysKg) {
|
|
|
+ log.info("******接口(updateKg)--->入参(sysKg):{}", JSON.toJSONString(sysKg));
|
|
|
+ baseMapper.updateById(sysKg);
|
|
|
+ return sysKg;
|
|
|
+ }
|
|
|
}
|