//目标数据库数据集
Dataset dataset = desDataSets.get(sourceDataSet.getName());
if (dataset != null) {
boolean delete = desDataSets.delete(sourceDataSet.getName());
if (delete) {
log.info("删除数据集成功");
} else {
dataBaseSourceSync.setEndDate(new Date());
dataBaseSourceSync.setSyncResult(0);
log.info("删除数据集失败!!!");
dataBaseSourceSyncService.update(dataBaseSourceSync);
return new ResultUtil<DataBaseSourceSync>().setData(dataBaseSourceSync);
}
}
desDatasetVector = (DatasetVector) desDataSets.createFromTemplate(sourceDataSet.getName(), sourceDataSet);
//将数组添加到当前字段信息集合对象中
boolean append = desDatasetVector.append(sourceRecordSet);
if (append) {
log.info("追加到矢量数据集成功");
}else{
log.info("同步失败");
dataBaseSourceSync.setSyncResult(0);
dataBaseSourceSync.setCreateTableResult(0);
dataBaseSourceSyncService.update(dataBaseSourceSync);
workspace.getDatasources().closeAll();
workspaceOra.getDatasources().closeAll();
return new ResultUtil<DataBaseSourceSync>().setData(dataBaseSourceSync);
}