|
|
|
@ -80,6 +80,7 @@ public class OcrIdentifyController extends JeecgController<OcrIdentify, IOcrIden
|
|
|
|
|
Page<OcrIdentify> page = new Page<OcrIdentify>(pageNo, pageSize);
|
|
|
|
|
Map<String, OcrRuleCheckVo> ocrRuleCheckMap = ocrRuleCheckService.listToMap(null);
|
|
|
|
|
Map<String, OcrMetadataConfigVo> metadataConfigMap = ocrMetadataConfigService.listToMap(null);
|
|
|
|
|
Map<String, String> taskNameMap = ocrTaskTypeService.listNameToMap(null);
|
|
|
|
|
IPage<OcrIdentify> pageList = ocrIdentifyService.page(page, queryWrapper);
|
|
|
|
|
if (pageList != null && pageList.getRecords() != null) {
|
|
|
|
|
for (OcrIdentify record : pageList.getRecords()) {
|
|
|
|
@ -87,7 +88,10 @@ public class OcrIdentifyController extends JeecgController<OcrIdentify, IOcrIden
|
|
|
|
|
if (ocrRuleCheckVo!=null && StringUtils.isNotBlank(ocrRuleCheckVo.getMetadataConfigId())) {
|
|
|
|
|
record.setMetadataConfigId(ocrRuleCheckVo.getMetadataConfigId());
|
|
|
|
|
OcrMetadataConfigVo ocrMetadataConfigVo = metadataConfigMap.get(ocrRuleCheckVo.getMetadataConfigId());
|
|
|
|
|
record.setTaskType_dictText(ocrMetadataConfigVo!=null?ocrMetadataConfigVo.getTaskType_dictText():null);
|
|
|
|
|
if (ocrMetadataConfigVo!=null) {
|
|
|
|
|
record.setTaskType(ocrMetadataConfigVo.getTaskType());
|
|
|
|
|
record.setTaskType_dictText(taskNameMap.get(ocrMetadataConfigVo.getTaskType()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -235,4 +239,16 @@ public class OcrIdentifyController extends JeecgController<OcrIdentify, IOcrIden
|
|
|
|
|
return super.importExcel(request, response, OcrIdentify.class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/pushNotice")
|
|
|
|
|
public Result<?> pushNotice(@RequestParam(name = "ids", required = true) String ids){
|
|
|
|
|
List<OcrIdentify> ocrIdentifyList = ocrIdentifyService.listByIds(Arrays.asList(ids.split(",")));
|
|
|
|
|
if (ocrIdentifyList==null|| ocrIdentifyList.size()==0) {
|
|
|
|
|
return Result.error("未获取到任务");
|
|
|
|
|
}
|
|
|
|
|
for (OcrIdentify ocrIdentify : ocrIdentifyList) {
|
|
|
|
|
AssertUtils.isTrue("1".equals(ocrIdentify.getStatus()),String.format("[任务名称]-%s 当前正在识别中,不可进行通知回调",ocrIdentify.getTaskName()));
|
|
|
|
|
}
|
|
|
|
|
return Result.OK("操作成功");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|