|
|
|
@ -7,6 +7,10 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
|
|
import org.apache.commons.lang3.ArrayUtils;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.checkerframework.checker.units.qual.C;
|
|
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
|
|
import org.jeecg.common.constant.OcrConstant;
|
|
|
|
|
import org.jeecg.common.util.RedisUtil;
|
|
|
|
|
import org.jeecg.common.util.RestUtil;
|
|
|
|
|
import org.jeecg.modules.ocr.entity.OcrIdentify;
|
|
|
|
|
import org.jeecg.modules.ocr.entity.OcrIdentifyDetail;
|
|
|
|
|
import org.jeecg.modules.ocr.entity.OcrRuleCheck;
|
|
|
|
@ -14,10 +18,8 @@ import org.jeecg.modules.ocr.mapper.OcrIdentifyMapper;
|
|
|
|
|
import org.jeecg.modules.ocr.model.CheckSemanticModel;
|
|
|
|
|
import org.jeecg.modules.ocr.model.OcrResult;
|
|
|
|
|
import org.jeecg.modules.ocr.model.SourceImage;
|
|
|
|
|
import org.jeecg.modules.ocr.service.IOcrIdentifyDetailService;
|
|
|
|
|
import org.jeecg.modules.ocr.service.IOcrIdentifyService;
|
|
|
|
|
import org.jeecg.modules.ocr.service.IOcrRuleCheckDetailService;
|
|
|
|
|
import org.jeecg.modules.ocr.service.IOcrRuleCheckService;
|
|
|
|
|
import org.jeecg.modules.ocr.model.TaskModel;
|
|
|
|
|
import org.jeecg.modules.ocr.service.*;
|
|
|
|
|
import org.jeecg.modules.ocr.utils.ArrayCUtils;
|
|
|
|
|
import org.jeecg.modules.ocr.vo.OcrIdentifyVo;
|
|
|
|
|
import org.jeecg.modules.ocr.vo.OcrRuleCheckVo;
|
|
|
|
@ -26,6 +28,8 @@ import org.springframework.scheduling.annotation.Async;
|
|
|
|
|
import org.springframework.scheduling.annotation.EnableAsync;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.util.*;
|
|
|
|
@ -46,6 +50,10 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
|
IOcrIdentifyDetailService ocrIdentifyDetailService;
|
|
|
|
|
@Resource
|
|
|
|
|
IOcrRuleCheckDetailService ocrRuleCheckDetailService;
|
|
|
|
|
@Resource
|
|
|
|
|
IOcrApiCallStatisticsService ocrApiCallStatisticsService;
|
|
|
|
|
@Resource
|
|
|
|
|
RedisUtil redisUtil;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public OcrIdentifyVo findById(String id) {
|
|
|
|
@ -68,6 +76,7 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
|
@Override
|
|
|
|
|
public void getSemanticInfo(JSONObject responseBody) {
|
|
|
|
|
try {
|
|
|
|
|
ocrApiCallStatisticsService.saveLogs("通用识别", "/ocr/ocrApi/identify", 1);
|
|
|
|
|
Thread.sleep(10000l);
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
@ -112,7 +121,8 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
|
StringBuffer rMessage = new StringBuffer();
|
|
|
|
|
Map<String, Boolean> fieldRightMap = new LinkedHashMap<>();//存放 字段判断正确map
|
|
|
|
|
//==========================
|
|
|
|
|
checkSemanticFor: for (CheckSemanticModel value : checkSemanticModelMap.values()) {
|
|
|
|
|
checkSemanticFor:
|
|
|
|
|
for (CheckSemanticModel value : checkSemanticModelMap.values()) {
|
|
|
|
|
String field = value.getField();
|
|
|
|
|
String fieldName = value.getFieldName();//校验的字段名称
|
|
|
|
|
String ruleInfo = value.getRuleInfo();//是否绝对判断 0-绝对判断,1-不绝对判断
|
|
|
|
@ -132,7 +142,8 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
|
ocrArray.addAll(jsonArray.toJavaList(JSONObject.class));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ocrArrayFor:for (int i = 0; i < ocrArray.size(); i++) {
|
|
|
|
|
ocrArrayFor:
|
|
|
|
|
for (int i = 0; i < ocrArray.size(); i++) {
|
|
|
|
|
JSONObject ocrItem = ocrArray.get(i);
|
|
|
|
|
text = ocrItem.getString("text");//ocr 识别的文本
|
|
|
|
|
probability = ocrItem.getDouble("probability");//置信度
|
|
|
|
@ -175,23 +186,49 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static String semanticResponse = "{\"execution_time\":69.1751720905304,\"img_path\":\"./static/ocrData/custom_2_44.jpg\",\"message\":\"成功\",\"semantic_result\":{\"医院名称\":[{\"area\":[[227,382],[441,388],[440,422],[226,416]],\"end\":7,\"ocrText\":\"开封市眼病医院\",\"probability\":0.9677108957485778,\"start\":0,\"text\":\"开封市眼病医院\"}],\"姓名\":[{\"area\":[[566,668],[691,668],[691,712],[566,712]],\"end\":3,\"ocrText\":\"闫利霞\",\"probability\":0.884488371938783,\"start\":0,\"text\":\"闫利霞\"}],\"时间\":[{\"area\":[[701,400],[874,400],[874,456],[701,456]],\"end\":5,\"ocrText\":\"10:40\",\"probability\":0.9626484940814066,\"start\":0,\"text\":\"10:40\"},{\"area\":[[502,422],[667,424],[667,452],[502,450]],\"end\":11,\"ocrText\":\"2023年05月17日\",\"probability\":0.815085233546764,\"start\":0,\"text\":\"2023年05月17日\"}],\"科室\":[]},\"task_id\":1}";
|
|
|
|
|
|
|
|
|
|
public static String semanticUrl = "http://111.202.228.113:7003/semantic";
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Async
|
|
|
|
|
public void postSemantic(String id, String identifyUrl) {
|
|
|
|
|
public void postSemantic(OcrIdentify ocrIdentify, List<String> identifyUrlList) {
|
|
|
|
|
//3.请求python ocr识别
|
|
|
|
|
JSONObject semanticResponseJson = JSONObject.parseObject(semanticResponse);
|
|
|
|
|
JSONObject requestBody = new JSONObject();
|
|
|
|
|
String id = ocrIdentify.getId();
|
|
|
|
|
String identifyUrl;//识别图片
|
|
|
|
|
String priority = ocrIdentify.getPriority();//加急状态;//任务优先级
|
|
|
|
|
String taskId;
|
|
|
|
|
JSONObject semanticResponseJson = new JSONObject();
|
|
|
|
|
|
|
|
|
|
//将主任务存到redis.
|
|
|
|
|
StringBuffer task_master = new StringBuffer();
|
|
|
|
|
for (int i = 0; i < identifyUrlList.size(); i++) {
|
|
|
|
|
taskId = String.format(id + "_" + (i + 1));
|
|
|
|
|
task_master.append(taskId).append(",");
|
|
|
|
|
}
|
|
|
|
|
redisUtil.set("identify_" + id, task_master.toString());
|
|
|
|
|
//执行子任务.
|
|
|
|
|
for (int i = 0; i < identifyUrlList.size(); i++) {
|
|
|
|
|
identifyUrl = identifyUrlList.get(i);
|
|
|
|
|
taskId = String.format(id + "_" + (i + 1));
|
|
|
|
|
requestBody.put("taskId", taskId);
|
|
|
|
|
requestBody.put("taskLevel", Integer.valueOf(priority));
|
|
|
|
|
requestBody.put("taskType", "identify");
|
|
|
|
|
requestBody.put("parameter",id+","+taskId+","+identifyUrl);
|
|
|
|
|
//发送任务请求 到 redis
|
|
|
|
|
pushTask(requestBody);
|
|
|
|
|
/*semanticResponseJson = RestUtil.post(OcrConstant.api_test_identify_url, requestBody);
|
|
|
|
|
semanticResponseJson.put("task_id", id);
|
|
|
|
|
this.getSemanticInfo(semanticResponseJson);
|
|
|
|
|
this.getSemanticInfo(semanticResponseJson);*/
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void updateOcrIdentifyStatus(String id,String status) {
|
|
|
|
|
//4.更新主任务状态
|
|
|
|
|
OcrIdentify ocrIdentify=new OcrIdentify();
|
|
|
|
|
LambdaUpdateWrapper<OcrIdentify> updateWrapper = new LambdaUpdateWrapper<OcrIdentify>();
|
|
|
|
|
updateWrapper.eq(OcrIdentify::getId, id);
|
|
|
|
|
updateWrapper.set(OcrIdentify::getEndTime, new Date());
|
|
|
|
|
updateWrapper.set(OcrIdentify::getStatus, "1");
|
|
|
|
|
this.update(updateWrapper);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void mapPutIfTrue(Map map, String key, Boolean flag) {
|
|
|
|
@ -203,6 +240,7 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 将数据 疯转成 OcrResult,追加到 ocrResultList
|
|
|
|
|
*
|
|
|
|
|
* @param ocrResultList
|
|
|
|
|
* @param field
|
|
|
|
|
* @param inputText
|
|
|
|
@ -235,6 +273,7 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 组装 checkSemanticModelMap
|
|
|
|
|
*
|
|
|
|
|
* @param configRuleMap 1/0 map
|
|
|
|
|
* @param fieldMap 字段含义 map
|
|
|
|
|
* @return
|
|
|
|
@ -284,21 +323,206 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
|
return checkSemanticModelMap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
Map<String,Boolean> fieldRightMap = new LinkedHashMap<>();
|
|
|
|
|
fieldRightMap.put("zhangsan",false);
|
|
|
|
|
fieldRightMap.put("zhangsan4",true);
|
|
|
|
|
mapPutIfTrue(fieldRightMap,"zhangsan",true);
|
|
|
|
|
mapPutIfTrue(fieldRightMap,"zhangsan2",false);
|
|
|
|
|
mapPutIfTrue(fieldRightMap,"zhangsan3",true);
|
|
|
|
|
mapPutIfTrue(fieldRightMap,"zhangsan4",false);
|
|
|
|
|
for (String s : fieldRightMap.keySet()) {
|
|
|
|
|
System.out.println(s+":"+fieldRightMap.get(s));
|
|
|
|
|
/**
|
|
|
|
|
* 发送任务
|
|
|
|
|
* @param jsonObject
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public Result pushTask(JSONObject jsonObject) {
|
|
|
|
|
//获取优先级1的任务
|
|
|
|
|
String taskId = jsonObject.getString("taskId");
|
|
|
|
|
String taskType = jsonObject.getString("taskType");
|
|
|
|
|
int taskLevel= jsonObject.getInteger("taskLevel");
|
|
|
|
|
String parameter = jsonObject.getString("parameter");
|
|
|
|
|
String task_ = (String) redisUtil.get("task_"+taskLevel);
|
|
|
|
|
if (task_ == null || task_.equals("[]")) {
|
|
|
|
|
//无历史任务
|
|
|
|
|
TaskModel task = new TaskModel(taskId,taskLevel,taskType,"0",parameter);
|
|
|
|
|
List<TaskModel> jsonObjects = Arrays.asList(task);
|
|
|
|
|
task_ = JSONObject.toJSONString(jsonObjects);
|
|
|
|
|
} else {
|
|
|
|
|
//有历史任务
|
|
|
|
|
JSONArray jsonArray = JSONObject.parseArray(task_);
|
|
|
|
|
if (jsonArray != null) {
|
|
|
|
|
List<TaskModel> taskList = jsonArray.toJavaList(TaskModel.class);
|
|
|
|
|
List<TaskModel> staskList = taskList.stream().filter(t -> t.getTaskId().equals(taskId)).collect(Collectors.toList());
|
|
|
|
|
TaskModel task = null;
|
|
|
|
|
if (staskList==null || staskList.size()==0) {
|
|
|
|
|
//该任务不存在, 看看 库表里 该任务是否已执行成功了
|
|
|
|
|
String overTask = (String) redisUtil.get("over_task");
|
|
|
|
|
if (org.apache.commons.lang.StringUtils.isNotBlank(overTask)&&Arrays.asList(overTask.split(",")).contains(taskId)) {
|
|
|
|
|
//库表里已执行过
|
|
|
|
|
return Result.OK("该任务已执行结束");
|
|
|
|
|
} else {
|
|
|
|
|
//库表中未执行过,追加任务
|
|
|
|
|
taskList.add(new TaskModel(taskId, taskLevel, taskType, "0", parameter));
|
|
|
|
|
task_ = JSONObject.toJSONString(taskList);
|
|
|
|
|
}
|
|
|
|
|
} else if ("0".equals(staskList.get(0).getTaskStatus())) {
|
|
|
|
|
//该任务 待运行
|
|
|
|
|
return Result.OK("该任务还处于排队中");
|
|
|
|
|
} else if ("1".equals(staskList.get(0).getTaskStatus())) {
|
|
|
|
|
//该任务 运行中
|
|
|
|
|
return Result.OK("该任务还处于运行中");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//存入redis
|
|
|
|
|
redisUtil.set("task_"+taskLevel, task_);
|
|
|
|
|
//执行任务
|
|
|
|
|
executeTask();
|
|
|
|
|
return Result.OK("已追加到任务");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
@Async
|
|
|
|
|
public void executeTask() {
|
|
|
|
|
//获取任务
|
|
|
|
|
List<TaskModel> taskList = getTaskList();
|
|
|
|
|
//查看是否有执行中的任务
|
|
|
|
|
long executingCount = taskList.stream().filter(t -> t.getTaskStatus().equals("1")).count();
|
|
|
|
|
if (executingCount > 0) {
|
|
|
|
|
//该方法正在执行中
|
|
|
|
|
log.error("该方法正在执行中");
|
|
|
|
|
}
|
|
|
|
|
List<TaskModel> waitingTaskList = taskList.stream().filter(t -> t.getTaskStatus().equals("0")).collect(Collectors.toList());
|
|
|
|
|
if (waitingTaskList != null) {
|
|
|
|
|
while (waitingTaskList.size() > 0) {
|
|
|
|
|
//取第一个任务
|
|
|
|
|
TaskModel taskModel = waitingTaskList.get(0);
|
|
|
|
|
waitingTaskList.get(0).setTaskStatus("1");
|
|
|
|
|
//刷新redis,执行中
|
|
|
|
|
flushTask(taskModel.getTaskId(), 1);
|
|
|
|
|
//执行
|
|
|
|
|
executeTaskp(taskModel);
|
|
|
|
|
//刷新已知任务
|
|
|
|
|
taskList = getTaskList();
|
|
|
|
|
//刷新待运行任务
|
|
|
|
|
waitingTaskList = taskList.stream().filter(t -> t.getTaskStatus().equals("0")).collect(Collectors.toList());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
log.error("任务已全部执行");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 刷新任务状态
|
|
|
|
|
*
|
|
|
|
|
* @param taskId
|
|
|
|
|
* @param status 状态 1 运行中,2 已结束
|
|
|
|
|
*/
|
|
|
|
|
public void flushTask(String taskId, int status) {
|
|
|
|
|
List<TaskModel> taskList = getTaskList();
|
|
|
|
|
if (taskList != null && taskList.size() > 0) {
|
|
|
|
|
TaskModel taskModel = taskList.stream().filter(t -> t.getTaskId().equals(taskId)).findFirst().get();
|
|
|
|
|
if (taskModel != null) {
|
|
|
|
|
int taskLevel = taskModel.getTaskLevel();
|
|
|
|
|
String task = (String) redisUtil.get("task_" + taskLevel);
|
|
|
|
|
JSONArray taskJsonArray = JSONObject.parseArray(task);
|
|
|
|
|
taskList = new ArrayList<>();
|
|
|
|
|
if (task != null) {
|
|
|
|
|
taskList.addAll(taskJsonArray.toJavaList(TaskModel.class));
|
|
|
|
|
}
|
|
|
|
|
if (status == 1) {
|
|
|
|
|
//更新任务状态
|
|
|
|
|
taskList.forEach(t -> {
|
|
|
|
|
if (t.getTaskId().equals(taskId)) {
|
|
|
|
|
t.setTaskStatus("1");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else if (status == 2) {
|
|
|
|
|
//删除任务
|
|
|
|
|
taskList = taskList.stream().filter(t -> !t.getTaskId().equals(taskId)).collect(Collectors.toList());
|
|
|
|
|
}
|
|
|
|
|
String s = JSONObject.toJSONString(taskList);
|
|
|
|
|
//存入redis
|
|
|
|
|
redisUtil.set("task_" + taskLevel, s);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//执行任务
|
|
|
|
|
public void executeTaskp(TaskModel taskModel) {
|
|
|
|
|
//睡眠
|
|
|
|
|
try {
|
|
|
|
|
String parameter = taskModel.getParameter();
|
|
|
|
|
// 任务类型
|
|
|
|
|
if ("identify".equals(taskModel.getTaskType())) {
|
|
|
|
|
String[] parameters = parameter.split(",");
|
|
|
|
|
//通用识别
|
|
|
|
|
String masterTaskId = parameters[0];//主任务redis
|
|
|
|
|
String task_id = parameters[1];
|
|
|
|
|
String image = parameters[2];
|
|
|
|
|
JSONObject requestBody = new JSONObject();
|
|
|
|
|
requestBody.put("task_id", task_id);
|
|
|
|
|
requestBody.put("img_path", image);
|
|
|
|
|
JSONObject semanticResponseJson = RestUtil.post(OcrConstant.api_test_identify_url, requestBody);
|
|
|
|
|
this.getSemanticInfo(semanticResponseJson);
|
|
|
|
|
//该子任务已执行,判断主任务是否残留
|
|
|
|
|
String masterTask = (String) redisUtil.get(masterTaskId);
|
|
|
|
|
if (StringUtils.isNotBlank(masterTask)) {
|
|
|
|
|
//主任务中排除当前任务
|
|
|
|
|
String collect = Arrays.asList(masterTask.split(",")).stream().filter(t -> t.equals(task_id)).collect(Collectors.joining(","));
|
|
|
|
|
if (StringUtils.isBlank(collect)) {
|
|
|
|
|
//如果主任务下的子任务已清空,删除key
|
|
|
|
|
redisUtil.removeAll(masterTaskId);
|
|
|
|
|
//刷新Ocr识别任务状态
|
|
|
|
|
updateOcrIdentifyStatus(masterTaskId,"1");
|
|
|
|
|
}else{
|
|
|
|
|
//主任务还存在,刷新主任务明细
|
|
|
|
|
redisUtil.set(masterTaskId,collect);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
Thread.sleep(20000l);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
//模拟执行成功
|
|
|
|
|
String overTaskIds = (String) redisUtil.get("over_task");
|
|
|
|
|
if (org.apache.commons.lang.StringUtils.isBlank(overTaskIds)) {
|
|
|
|
|
overTaskIds = taskModel.getTaskId();
|
|
|
|
|
} else {
|
|
|
|
|
if (!Arrays.asList(overTaskIds.split(",")).contains(taskModel.getTaskId())) {
|
|
|
|
|
//该任务未执行过
|
|
|
|
|
overTaskIds += "," + taskModel.getTaskId();
|
|
|
|
|
} else {
|
|
|
|
|
//该任务已结束过
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//存入已执行 redis里
|
|
|
|
|
redisUtil.set("over_task", overTaskIds);
|
|
|
|
|
log.error(taskModel.getTaskLevel() + "-级别," + taskModel.getTaskId() + "-已执行");
|
|
|
|
|
//从3中任务集中,删除该任务
|
|
|
|
|
flushTask(taskModel.getTaskId(), 2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String ss="[{\"tag\":\"hospitalName\",\"inputText\":\"仁和医院\"},{\"tag\":\"departmentName\",\"inputText\":\"耳鼻喉科\"},{\"tag\":\"doctorName\",\"inputText\":\"张三\"}]";
|
|
|
|
|
JSONArray jsonArray = JSONObject.parseArray(ss);
|
|
|
|
|
//System.out.println(jsonArray);
|
|
|
|
|
//获取全部任务
|
|
|
|
|
public List<TaskModel> getTaskList() {
|
|
|
|
|
String task_0 = (String) redisUtil.get("task_0");
|
|
|
|
|
String task_1 = (String) redisUtil.get("task_1");
|
|
|
|
|
/*String task_2 = (String) redisUtil.get("task_2");
|
|
|
|
|
String task_3 = (String) redisUtil.get("task_3");*/
|
|
|
|
|
JSONArray task0JsonArray = JSONObject.parseArray(task_0);
|
|
|
|
|
JSONArray task1JsonArray = JSONObject.parseArray(task_1);
|
|
|
|
|
/*JSONArray task2JsonArray = JSONObject.parseArray(task_2);
|
|
|
|
|
JSONArray task3JsonArray = JSONObject.parseArray(task_3);*/
|
|
|
|
|
List<TaskModel> taskList = new ArrayList<>();
|
|
|
|
|
if (task0JsonArray != null) {
|
|
|
|
|
taskList.addAll(task0JsonArray.toJavaList(TaskModel.class));
|
|
|
|
|
}
|
|
|
|
|
if (task1JsonArray != null) {
|
|
|
|
|
taskList.addAll(task1JsonArray.toJavaList(TaskModel.class));
|
|
|
|
|
}
|
|
|
|
|
/*if (task2JsonArray != null) {
|
|
|
|
|
taskList.addAll(task2JsonArray.toJavaList(TaskModel.class));
|
|
|
|
|
}
|
|
|
|
|
if (task3JsonArray != null) {
|
|
|
|
|
taskList.addAll(task3JsonArray.toJavaList(TaskModel.class));
|
|
|
|
|
}*/
|
|
|
|
|
return taskList;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|