master
周文涛 2 years ago
parent f322015e6d
commit d528dad28f

@ -315,15 +315,15 @@ public class OcrIdentifyController extends JeecgController<OcrIdentify, IOcrIden
@ApiOperation(value = "上报通知给无量云") @ApiOperation(value = "上报通知给无量云")
@PostMapping(value = "/pushNotice") @PostMapping(value = "/pushNotice")
public Result<?> pushNotice(@RequestParam(name = "ids", required = true) String ids){ public Result<?> pushNotice(@RequestParam(name = "id", required = true) String id){
List<OcrIdentify> ocrIdentifyList = ocrIdentifyService.listByIds(Arrays.asList(ids.split(","))); List<OcrIdentify> ocrIdentifyList = ocrIdentifyService.listByIds(Arrays.asList(id.split(",")));
if (ocrIdentifyList==null|| ocrIdentifyList.size()==0) { if (ocrIdentifyList==null|| ocrIdentifyList.size()==0) {
return Result.error("未获取到任务"); return Result.error("未获取到任务");
} }
for (OcrIdentify ocrIdentify : ocrIdentifyList) { for (OcrIdentify ocrIdentify : ocrIdentifyList) {
AssertUtils.isTrue("1".equals(ocrIdentify.getStatus()),String.format("[任务名称]-%s 当前正在识别中,不可进行通知回调",ocrIdentify.getTaskName())); 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); ocrIdentifyService.callbackWly(identifyId);
} }
return Result.OK("操作成功"); return Result.OK("操作成功");

Loading…
Cancel
Save