|
|
@ -9,6 +9,7 @@ import org.jeecg.common.util.AssertUtils;
|
|
|
|
import org.jeecg.common.util.RestUtil;
|
|
|
|
import org.jeecg.common.util.RestUtil;
|
|
|
|
import org.jeecg.modules.ocr.dto.OcrIdentifyDTO;
|
|
|
|
import org.jeecg.modules.ocr.dto.OcrIdentifyDTO;
|
|
|
|
import org.jeecg.modules.ocr.entity.OcrIdentify;
|
|
|
|
import org.jeecg.modules.ocr.entity.OcrIdentify;
|
|
|
|
|
|
|
|
import org.jeecg.modules.ocr.service.IOcrIdentifyDetailService;
|
|
|
|
import org.jeecg.modules.ocr.service.IOcrIdentifyService;
|
|
|
|
import org.jeecg.modules.ocr.service.IOcrIdentifyService;
|
|
|
|
import org.jeecg.modules.ocr.service.impl.TaskService;
|
|
|
|
import org.jeecg.modules.ocr.service.impl.TaskService;
|
|
|
|
import org.jeecg.modules.ocr.utils.FileOUtils;
|
|
|
|
import org.jeecg.modules.ocr.utils.FileOUtils;
|
|
|
@ -36,6 +37,8 @@ public class HandleTaskInit implements ApplicationRunner {
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
IOcrIdentifyService ocrIdentifyService;
|
|
|
|
IOcrIdentifyService ocrIdentifyService;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
IOcrIdentifyDetailService ocrIdentifyDetailService;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
TaskService taskService;
|
|
|
|
TaskService taskService;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ISysDictService sysDictService;
|
|
|
|
private ISysDictService sysDictService;
|
|
|
@ -90,6 +93,9 @@ public class HandleTaskInit implements ApplicationRunner {
|
|
|
|
//判断是不是网络图片
|
|
|
|
//判断是不是网络图片
|
|
|
|
Boolean onlineFile = FileOUtils.isOnlineFile(ocrIdentify.getIdentifyUrl());
|
|
|
|
Boolean onlineFile = FileOUtils.isOnlineFile(ocrIdentify.getIdentifyUrl());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//把过去执行过的明细给删掉
|
|
|
|
|
|
|
|
ocrIdentifyDetailService.deleteByOcrIdentifyId(ocrIdentify.getId());
|
|
|
|
|
|
|
|
|
|
|
|
//最终要请求ocr识别的图片对象
|
|
|
|
//最终要请求ocr识别的图片对象
|
|
|
|
JSONObject requestBody = new JSONObject();
|
|
|
|
JSONObject requestBody = new JSONObject();
|
|
|
|
if (onlineFile) {
|
|
|
|
if (onlineFile) {
|
|
|
|