|
|
|
@ -40,6 +40,7 @@ import java.util.stream.Collectors;
|
|
|
|
|
@Service
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
|
public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMapper, NoteRecordSplit> implements NoteRecordSplitService {
|
|
|
|
|
private static final int TASK_STATUS_IN_PROCESS = 1;
|
|
|
|
|
|
|
|
|
|
private final NoteRecordService noteRecordService;
|
|
|
|
|
|
|
|
|
@ -104,8 +105,8 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
|
|
|
|
|
/**
|
|
|
|
|
* 校验是否已经执行过任务
|
|
|
|
|
*
|
|
|
|
|
* @param caseId
|
|
|
|
|
* @param recordId
|
|
|
|
|
* @param caseId 案件id
|
|
|
|
|
* @param recordId 笔录id
|
|
|
|
|
* @return 没有执行过, 返回true, 执行过, 返回false
|
|
|
|
|
*/
|
|
|
|
|
private boolean recordProcessTaskStatusCheck(String caseId, String recordId, Integer splitSize) {
|
|
|
|
@ -387,6 +388,10 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(transactionManager = "dataSourceTransactionManager", rollbackFor = Exception.class)
|
|
|
|
|
public String redoExtract(NoteRecordReqVO records) {
|
|
|
|
|
CaseTaskRecord caseTaskRecord = caseTaskRecordService.getOne(new QueryWrapper<CaseTaskRecord>().eq("record_id", records.getId()));
|
|
|
|
|
if (caseTaskRecord != null && TASK_STATUS_IN_PROCESS == caseTaskRecord.getStatus()){
|
|
|
|
|
return "任务正在执行中,请稍后再试";
|
|
|
|
|
}
|
|
|
|
|
// 删除旧数据
|
|
|
|
|
// 删除问答对数据
|
|
|
|
|
noteRecordSplitService.remove(new QueryWrapper<NoteRecordSplit>().eq("note_record_id", records.getId()));
|
|
|
|
|