master
周文涛 2 years ago
parent b8100b4e3b
commit 0f51d3f9d2

@ -347,11 +347,13 @@ public class OcrIdentifyController extends JeecgController<OcrIdentify, IOcrIden
public Result<?> pushNotice(@RequestBody OcrIdentify ocrIdentify){ public Result<?> pushNotice(@RequestBody OcrIdentify ocrIdentify){
String id = ocrIdentify.getId(); String id = ocrIdentify.getId();
List<OcrIdentify> ocrIdentifyList = ocrIdentifyService.listByIds(Arrays.asList(id.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 entity : ocrIdentifyList) { for (OcrIdentify entity : ocrIdentifyList) {
AssertUtils.isTrue("1".equals(entity.getStatus()),String.format("[任务名称]-%s 当前正在识别中,不可进行通知回调",entity.getTaskName())); AssertUtils.isTrue("1".equals(entity.getStatus()),String.format("[任务名称]-%s 当前正在识别中,不可进行上报",entity.getTaskName()));
AssertUtils.isTrue(entity.getNoticeStatus().equals("0"),"当前任务已上报成功");
} }
for (String identifyId : Arrays.asList(id.split(","))) { for (String identifyId : Arrays.asList(id.split(","))) {
ocrIdentifyService.callbackWlyAsync(identifyId); ocrIdentifyService.callbackWlyAsync(identifyId);

Loading…
Cancel
Save