二次测试
parent
a982be1946
commit
3696f53e31
|
@ -191,6 +191,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>
|
|||
throw new TaskException("数据输出节点必须紧跟在数据输入/操作节点之后");
|
||||
}
|
||||
// 执行查询语句
|
||||
log.info("任务执行查询阶段结束,查询sql为: [{}]", findSql);
|
||||
Result<List<DataModel>> tableValue = remoteDataSourceService.findTableValue(new DataValueModel(4L, findSql));
|
||||
if (tableValue.getCode() != 200){
|
||||
throw new TaskException(tableValue.getMsg());
|
||||
|
@ -201,9 +202,13 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>
|
|||
addSql = NodeUtils.nodeDispExportation(dispList, data);
|
||||
}
|
||||
}
|
||||
log.info("任务执行结束,最终sql为: [{}]",addSql+" "+findSql);
|
||||
|
||||
return findSql;
|
||||
log.info("任务执行完成,新增sql为: [{}]", addSql);
|
||||
Result<List<DataModel>> tableValue = remoteDataSourceService.findTableValue(new DataValueModel(4L, addSql));
|
||||
if (tableValue.getCode() != 200){
|
||||
throw new TaskException(tableValue.getMsg());
|
||||
}
|
||||
return "执行成功";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -269,14 +269,17 @@ public class NodeUtils {
|
|||
}
|
||||
dataMap.put(data.get(i).getKey(), data.get(i).getValue().toString());
|
||||
}
|
||||
dataList1.forEach(map -> {
|
||||
insSql.append("( ");
|
||||
for (NodeDisposition disposition : fieldList) {
|
||||
insSql.append("'").append(map.get(disposition.getDispDesc())).append("',");
|
||||
}
|
||||
insSql.append(" )");
|
||||
});
|
||||
return insSql.toString();
|
||||
dataList1.forEach(map -> insSql.append(
|
||||
"( " +
|
||||
StringUtils.join(
|
||||
fieldList.
|
||||
stream().
|
||||
map(field -> map.get(field.getDispDesc())).
|
||||
map(field -> "'" + field + "'").
|
||||
toArray(),
|
||||
",") +
|
||||
" ),"));
|
||||
return insSql.deleteCharAt(insSql.length() - 1).toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue