master
周文涛 2 years ago
parent 8629ed02dd
commit 760ae9a3d3

@ -123,7 +123,8 @@ public class ApiController {
} }
Thread.sleep(1000L); Thread.sleep(1000L);
//3.请求python ocr识别异步执行 //3.请求python ocr识别异步执行
ocrIdentifyService.postSemantic(ocrIdentify, fileList); taskService.postSemantic(ocrIdentify,fileList);
//ocrIdentifyService.postSemantic(ocrIdentify, fileList);
return Result.OK("请求成功"); return Result.OK("请求成功");
} }

@ -25,6 +25,7 @@ import org.jeecg.modules.ocr.entity.OcrIdentifyDetail;
import org.jeecg.modules.ocr.entity.OcrMetadataConfig; import org.jeecg.modules.ocr.entity.OcrMetadataConfig;
import org.jeecg.modules.ocr.service.*; import org.jeecg.modules.ocr.service.*;
import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.ocr.service.impl.TaskService;
import org.jeecg.modules.ocr.utils.DownloadTemplateUtil; import org.jeecg.modules.ocr.utils.DownloadTemplateUtil;
import org.jeecg.modules.ocr.utils.FileOUtils; import org.jeecg.modules.ocr.utils.FileOUtils;
import org.jeecg.modules.ocr.vo.OcrIdentifyVo; import org.jeecg.modules.ocr.vo.OcrIdentifyVo;
@ -69,6 +70,8 @@ public class OcrIdentifyController extends JeecgController<OcrIdentify, IOcrIden
private ISysDictItemService sysDictItemService; private ISysDictItemService sysDictItemService;
@Autowired @Autowired
private RedisUtil redisUtil; private RedisUtil redisUtil;
@Autowired
private TaskService taskService;
/** /**
* *
* *
@ -179,7 +182,8 @@ public class OcrIdentifyController extends JeecgController<OcrIdentify, IOcrIden
ocrIdentify.setStatus("0"); ocrIdentify.setStatus("0");
ocrIdentifyService.save(ocrIdentify); ocrIdentifyService.save(ocrIdentify);
//3.请求python ocr识别异步执行 //3.请求python ocr识别异步执行
ocrIdentifyService.postSemantic(ocrIdentify, fileList); taskService.postSemantic(ocrIdentify,fileList);
//ocrIdentifyService.postSemantic(ocrIdentify, fileList);
//请求ocr识别接口 //请求ocr识别接口
//ocrIdentifyService.postSemantic(ocrIdentify.getId(),Arrays.asList(ocrIdentify.getIdentifyUrl())); //ocrIdentifyService.postSemantic(ocrIdentify.getId(),Arrays.asList(ocrIdentify.getIdentifyUrl()));
return Result.OK("添加成功!"); return Result.OK("添加成功!");

Loading…
Cancel
Save