|
|
|
@ -34,6 +34,7 @@ import org.jeecg.modules.ocr.vo.OcrMetadataConfigVo;
|
|
|
|
import org.jeecg.modules.ocr.vo.OcrRuleCheckVo;
|
|
|
|
import org.jeecg.modules.ocr.vo.OcrRuleCheckVo;
|
|
|
|
import org.jeecg.modules.system.service.ISysDictItemService;
|
|
|
|
import org.jeecg.modules.system.service.ISysDictItemService;
|
|
|
|
import org.jeecg.modules.system.service.ISysDictService;
|
|
|
|
import org.jeecg.modules.system.service.ISysDictService;
|
|
|
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
@ -351,8 +352,17 @@ public class OcrIdentifyController extends JeecgController<OcrIdentify, IOcrIden
|
|
|
|
if (!Arrays.asList("1","9").contains(identify.getStatus())) {
|
|
|
|
if (!Arrays.asList("1","9").contains(identify.getStatus())) {
|
|
|
|
return Result.error("当前任务不可重新执行");
|
|
|
|
return Result.error("当前任务不可重新执行");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//更新状态
|
|
|
|
|
|
|
|
OcrIdentify newOcrIdentify = new OcrIdentify();
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(identify,newOcrIdentify);
|
|
|
|
|
|
|
|
newOcrIdentify.setStatus("0");
|
|
|
|
|
|
|
|
newOcrIdentify.setId(null);
|
|
|
|
|
|
|
|
ocrIdentifyService.save(ocrIdentify);
|
|
|
|
//TODO 重新执行操作
|
|
|
|
//TODO 重新执行操作
|
|
|
|
return Result.OK("已执行");
|
|
|
|
List<String> identifyUrlList = FileOUtils.fileLists(null, newOcrIdentify.getIdentifyUrl());
|
|
|
|
|
|
|
|
//List<String> identifyUrlList = Arrays.asList("1","2");
|
|
|
|
|
|
|
|
taskService.postSemantic(newOcrIdentify,identifyUrlList);
|
|
|
|
|
|
|
|
return Result.OK("操作成功");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "上报通知给无量云")
|
|
|
|
@ApiOperation(value = "上报通知给无量云")
|
|
|
|
|