|
|
|
@ -315,15 +315,15 @@ public class OcrIdentifyController extends JeecgController<OcrIdentify, IOcrIden
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "上报通知给无量云")
|
|
|
|
|
@PostMapping(value = "/pushNotice")
|
|
|
|
|
public Result<?> pushNotice(@RequestParam(name = "ids", required = true) String ids){
|
|
|
|
|
List<OcrIdentify> ocrIdentifyList = ocrIdentifyService.listByIds(Arrays.asList(ids.split(",")));
|
|
|
|
|
public Result<?> pushNotice(@RequestParam(name = "id", required = true) String id){
|
|
|
|
|
List<OcrIdentify> ocrIdentifyList = ocrIdentifyService.listByIds(Arrays.asList(id.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()));
|
|
|
|
|
}
|
|
|
|
|
for (String identifyId : Arrays.asList(ids.split(","))) {
|
|
|
|
|
for (String identifyId : Arrays.asList(id.split(","))) {
|
|
|
|
|
ocrIdentifyService.callbackWly(identifyId);
|
|
|
|
|
}
|
|
|
|
|
return Result.OK("操作成功");
|
|
|
|
|