|
|
@ -592,7 +592,7 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String task_ = (String) redisUtil.get("task_" + taskLevel);
|
|
|
|
String task_ = (String) redisUtil.get("task_identify_" + taskLevel);//TODO task_
|
|
|
|
log.info("历史任务:" + task_);
|
|
|
|
log.info("历史任务:" + task_);
|
|
|
|
if (task_ == null || task_.equals("[]")) {
|
|
|
|
if (task_ == null || task_.equals("[]")) {
|
|
|
|
//无历史任务
|
|
|
|
//无历史任务
|
|
|
@ -627,7 +627,7 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//存入redis
|
|
|
|
//存入redis
|
|
|
|
redisUtil.set("task_" + taskLevel, task_);
|
|
|
|
redisUtil.set("task_identify_" + taskLevel, task_);//TODO task_
|
|
|
|
//执行任务
|
|
|
|
//执行任务
|
|
|
|
executeTask();
|
|
|
|
executeTask();
|
|
|
|
return Result.OK("已追加到任务");
|
|
|
|
return Result.OK("已追加到任务");
|
|
|
@ -963,7 +963,7 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
TaskModel taskModel = taskList.stream().filter(t -> t.getTaskId().equals(taskId)).findFirst().get();
|
|
|
|
TaskModel taskModel = taskList.stream().filter(t -> t.getTaskId().equals(taskId)).findFirst().get();
|
|
|
|
if (taskModel!=null) {
|
|
|
|
if (taskModel!=null) {
|
|
|
|
int taskLevel = taskModel.getTaskLevel();
|
|
|
|
int taskLevel = taskModel.getTaskLevel();
|
|
|
|
String task = (String) redisUtil.get("task_" + taskLevel);
|
|
|
|
String task = (String) redisUtil.get("task_identify_" + taskLevel);//TODO task_
|
|
|
|
JSONArray taskJsonArray = JSONObject.parseArray(task);
|
|
|
|
JSONArray taskJsonArray = JSONObject.parseArray(task);
|
|
|
|
taskList = new ArrayList<>();
|
|
|
|
taskList = new ArrayList<>();
|
|
|
|
if (task != null) {
|
|
|
|
if (task != null) {
|
|
|
@ -982,7 +982,7 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String s = JSONObject.toJSONString(taskList);
|
|
|
|
String s = JSONObject.toJSONString(taskList);
|
|
|
|
//存入redis
|
|
|
|
//存入redis
|
|
|
|
redisUtil.set("task_" + taskLevel, s);
|
|
|
|
redisUtil.set("task_identify_" + taskLevel, s);//TODO task_
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|