代码提交

topo_dev
liu 9 months ago
parent bbe23139a0
commit 75fda079e4

@ -72,6 +72,8 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
private final LangChainChatService langChainChatService;
private final ModelCaseService modelCaseService;
@Override
@Transactional(transactionManager = "dataSourceTransactionManager", rollbackFor = Exception.class)
@ -96,6 +98,10 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
}
}*/
int i;
ModelCase modelCase = modelCaseService.getById(records.getCaseId());
if (StringUtils.isEmpty(modelCase.getCaseNo())){
throw new BusinessException("案件编号不能为空");
}
NoteRecord record = records.toNoteRecord();
if (StringUtils.isEmpty(records.getId())) {
i = noteRecordMapper.insert(record);
@ -118,7 +124,7 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
}
// 这里需要把文件传输,传输到知识库中去
CustomMultipartFile mockMultipartFile = new CustomMultipartFile(minioFile.getFilename(), inputStream);
LangChainChatRes langChainChatRes = langChainChatService.uploadFile("11111111",
LangChainChatRes langChainChatRes = langChainChatService.uploadFile(modelCase.getCaseNo(),
mockMultipartFile,
"问讯笔录",
UploadParamEnum.to_vector_store.getBooleanValue(),

Loading…
Cancel
Save