DatasetVector desDatasetVector = null;
//目标数据库数据集
Dataset dataset = desDataSets.get(sourceDataSet.getName());
if (dataset == null) {
desDatasetVector = (DatasetVector) desDataSets.createFromTemplate(sourceDataSet.getName(), sourceDataSet);
} else {
desDatasetVector = (DatasetVector) desDataSets.get(sourceDataSet.getName());
boolean trun = desDatasetVector.truncate();
}
//TODO
List<String> fieldInfoNameList = new ArrayList<>();
FieldInfos fieldInfosSource = sourceRecordSet.getFieldInfos();
//字段名称相等则做处理
for (int k = 0; k < dataSetNameLists.length; k++) {
for (int ssour = 0; ssour < fieldInfosSource.getCount(); ssour++) {
//log.info("源里面字段值:" + fieldInfosSource.get(ssour).getName());
if (dataSetNameLists[k].equals(fieldInfosSource.get(ssour).getName())) {
fieldInfoNameList.add(fieldInfosSource.get(ssour).getName());
}
}
}
//将数组添加到当前字段信息集合对象中
boolean append = desDatasetVector.append(sourceRecordSet);