|
|
@ -78,7 +78,9 @@ public class KnowledgePointApplicationServiceImpl implements KnowledgePointAppli |
|
|
uploadToPython(inputStream, path , id); |
|
|
uploadToPython(inputStream, path , id); |
|
|
} |
|
|
} |
|
|
// 成功后更新状态
|
|
|
// 成功后更新状态
|
|
|
updateStatusInformation(null, InformationParseStatusEnum.Success.getValue(), id); |
|
|
updateStatusInformation(null, InformationParseStatusEnum.InProgress.getValue(), id); |
|
|
|
|
|
// 聚类
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.error("解析异常, ID:{}", id, e); |
|
|
log.error("解析异常, ID:{}", id, e); |
|
|
// 失败更新状态
|
|
|
// 失败更新状态
|
|
|
@ -127,11 +129,11 @@ public class KnowledgePointApplicationServiceImpl implements KnowledgePointAppli |
|
|
if (!CollectionUtils.isEmpty(knowledgePointEntities)) { |
|
|
if (!CollectionUtils.isEmpty(knowledgePointEntities)) { |
|
|
knowledgePointBaseService.saveBatch(knowledgePointEntities); |
|
|
knowledgePointBaseService.saveBatch(knowledgePointEntities); |
|
|
// 更新资料状态为:成功
|
|
|
// 更新资料状态为:成功
|
|
|
updateStatusInformation(knowledgePointEntities.get(0).getParseName(), InformationParseStatusEnum.Success.getValue(), id); |
|
|
updateStatusInformation(knowledgePointEntities.get(0).getParseName(), InformationParseStatusEnum.InProgress.getValue(), id); |
|
|
} else { |
|
|
} else { |
|
|
log.warn("文件 [{}] 解析成功但未提取到知识点", fileName); |
|
|
log.warn("文件 [{}] 解析成功但未提取到知识点", fileName); |
|
|
// 更新资料状态为:成功 (或根据业务定义为无知识点状态)
|
|
|
// 更新资料状态为:成功 (或根据业务定义为无知识点状态)
|
|
|
updateStatusInformation(null, InformationParseStatusEnum.Success.getValue(), id); |
|
|
updateStatusInformation(null, InformationParseStatusEnum.InProgress.getValue(), id); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
/** |
|
|
/** |
|
|
|