|
|
|
@ -103,13 +103,13 @@ public class TaskRecordServiceImpl extends ServiceImpl<TaskRecordMapper, TaskRec
|
|
|
|
|
taskRecord.setType(TASK_TYPE_ONE_CLICK);
|
|
|
|
|
taskRecord.setName(this.generateTaskName(taskRecord.getType()));
|
|
|
|
|
super.save(taskRecord);
|
|
|
|
|
//异步调用xxl-job执行任务
|
|
|
|
|
Thread thread = new Thread(() -> {
|
|
|
|
|
notePromptService.list(new LambdaQueryWrapper<NotePrompt>().eq(NotePrompt::getType, TYPE_GRAPH_REASONING).or().eq(NotePrompt::getType, TYPE_STRUCTURAL_REASONING)).forEach(notePrompt -> {
|
|
|
|
|
try {
|
|
|
|
|
NotePrompt prompt = notePromptService.getById(notePrompt.getId());
|
|
|
|
|
List<ModelCase> modelCases = this.getModelCases(taskRecord);
|
|
|
|
|
if (!CollUtil.isEmpty(modelCases)) {
|
|
|
|
|
//异步调用xxl-job执行任务
|
|
|
|
|
Thread thread = new Thread(() -> {
|
|
|
|
|
for (ModelCase modelCase : modelCases) {
|
|
|
|
|
String caseId = modelCase.getId();
|
|
|
|
|
List<String> ids = this.getIds(taskRecord, caseId, prompt.getType());
|
|
|
|
@ -120,8 +120,6 @@ public class TaskRecordServiceImpl extends ServiceImpl<TaskRecordMapper, TaskRec
|
|
|
|
|
log.info("案件【{}】没有笔录或证据", caseId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
thread.start();
|
|
|
|
|
} else {
|
|
|
|
|
log.info("查无案件");
|
|
|
|
|
}
|
|
|
|
@ -131,6 +129,8 @@ public class TaskRecordServiceImpl extends ServiceImpl<TaskRecordMapper, TaskRec
|
|
|
|
|
log.error("任务执行失败", e);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
thread.start();
|
|
|
|
|
stopWatch.stop();
|
|
|
|
|
log.info("一键提取任务触发完成。耗时:{}", stopWatch.getTotalTimeSeconds());
|
|
|
|
|
}
|
|
|
|
|