寻找报错
parent
d3bd8c27cc
commit
128d031932
|
@ -344,16 +344,16 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
|
||||||
|
|
||||||
DataValue[][] data = tableValueResult.getData();
|
DataValue[][] data = tableValueResult.getData();
|
||||||
log.info("执行{}查询的方法结束", sqlSelect);
|
log.info("执行{}查询的方法结束", sqlSelect);
|
||||||
for (DataValue[] datum : data) {
|
// for (DataValue[] datum : data) {
|
||||||
for (DataValue dataValue : datum) {
|
// for (DataValue dataValue : datum) {
|
||||||
String key = dataValue.getKey();
|
// String key = dataValue.getKey();
|
||||||
String newKey = map.get(key);
|
// String newKey = map.get(key);
|
||||||
dataValue.setKey(newKey);
|
// dataValue.setKey(newKey);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
Result result = datasourceFeign.addProduct(newBasicId, tableId, data);
|
// Result result = datasourceFeign.addProduct(newBasicId, tableId, data);
|
||||||
log.info("{}添加结束", result);
|
// log.info("{}添加结束", result);
|
||||||
//executeTheRule(data,map,newBasicId,tableId);
|
executeTheRule(data,map,newBasicId,tableId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -368,13 +368,15 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
|
||||||
|
|
||||||
// 初始化第一个任务
|
// 初始化第一个任务
|
||||||
tasks.add(() -> {
|
tasks.add(() -> {
|
||||||
|
log.info(dataValues);
|
||||||
return dataValues;
|
return dataValues;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 创建任务链
|
// 提交第一个任务
|
||||||
Future<DataValue[][]> currentFuture = null;
|
Future<DataValue[][]> currentFuture = executor.submit(tasks.poll());
|
||||||
for (int i = 1; i <= 4; i++) {
|
for (int i = 1; i <= 4; i++) {
|
||||||
final Future<DataValue[][]> finalCurrentFuture = currentFuture;
|
final Future<DataValue[][]> finalCurrentFuture = currentFuture;
|
||||||
|
log.info(finalCurrentFuture);
|
||||||
Callable<DataValue[][]> task = () -> {
|
Callable<DataValue[][]> task = () -> {
|
||||||
|
|
||||||
DataValue[][] prevResult = finalCurrentFuture.get();
|
DataValue[][] prevResult = finalCurrentFuture.get();
|
||||||
|
@ -397,7 +399,15 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
DataValue[][] afterFilteringDataValue = currentFuture.get();
|
DataValue[][] afterFilteringDataValue = currentFuture.get();
|
||||||
|
for (DataValue[] datum : afterFilteringDataValue) {
|
||||||
|
for (DataValue dataValue : datum) {
|
||||||
|
String key = dataValue.getKey();
|
||||||
|
String newKey = map.get(key);
|
||||||
|
dataValue.setKey(newKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Result result = datasourceFeign.addProduct(newBasicId, tableId, afterFilteringDataValue);
|
||||||
|
log.info("{}添加结束", result);
|
||||||
|
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
Loading…
Reference in New Issue