master
周文涛 2 years ago
parent f5cfb278e2
commit 2d97e7342c

@ -205,11 +205,12 @@ public class ApiController {
@Async @Async
public Result restartTask() throws InterruptedException { public Result restartTask() throws InterruptedException {
//获取未执行完的任务 //获取未执行完的任务
/*List<OcrIdentify> list = ocrIdentifyService.list(new LambdaQueryWrapper<OcrIdentify>().eq(OcrIdentify::getStatus,"1")); /*List<OcrIdentify> list = ocrIdentifyService.list(new LambdaQueryWrapper<OcrIdentify>().eq(OcrIdentify::getStatus,"0"));*/
for (OcrIdentify ocrIdentify : list) { /*for (OcrIdentify ocrIdentify : list) {
ocrIdentifyService.updateTaskResultInfo(ocrIdentify.getId()); ocrIdentifyService.updateTaskResultInfo(ocrIdentify.getId());
}*/ }*/
List<OcrIdentify> list = ocrIdentifyService.list(new LambdaQueryWrapper<OcrIdentify>().in(OcrIdentify::getStatus, "0","2").eq(OcrIdentify::getRuleCheck,"1688885402495229954"));
List<OcrIdentify> list = ocrIdentifyService.list(new LambdaQueryWrapper<OcrIdentify>().in(OcrIdentify::getStatus, "0","2"));
List<String> identifyIdList = list.stream().map(l -> l.getId()).collect(Collectors.toList()); List<String> identifyIdList = list.stream().map(l -> l.getId()).collect(Collectors.toList());
if (identifyIdList.size()>0) { if (identifyIdList.size()>0) {
ocrIdentifyDetailService.remove(new LambdaQueryWrapper<OcrIdentifyDetail>().in(OcrIdentifyDetail::getIdentifyId,identifyIdList)); ocrIdentifyDetailService.remove(new LambdaQueryWrapper<OcrIdentifyDetail>().in(OcrIdentifyDetail::getIdentifyId,identifyIdList));

Loading…
Cancel
Save