资产更新版本3.0豪华版优化字段名称查询

master
Yueng 2024-09-06 22:39:20 +08:00
parent 0f78a440bb
commit 5e2b5e65cf
3 changed files with 3751 additions and 57 deletions

View File

@ -142,14 +142,15 @@ public class DataRunNameServiceImpl implements DataRunNameService {
//在取数据数据遍历里获取表名称查询方法
tableIdAndBasicIdByUserId.forEach(tableIdAndBasicId -> {
if (tableIdAndBasicId.getUserId().equals(userId) || tableIdAndBasicId.getDeptId().equals(deptId)){
this.dataDeptShow(tableIdAndBasicId,dataName);
}
});
idByDeptId.forEach(tableIdAndBasicId -> {
if (tableIdAndBasicId.getDeptId()==tableIdAndBasicId.getDeptId()){
this.dataDeptShow(tableIdAndBasicId,dataName);
}
});
}
@ -181,7 +182,7 @@ public class DataRunNameServiceImpl implements DataRunNameService {
if (CollectionUtils.isEmpty(dataName.getTableNames())) {return;}
//在内部封装方法
dataName.getTableNames().forEach(tableName1 -> {
this.tableNameRun(tableName1,dataName);
this.tableStructureShow(tableName1);
});
}
@ -221,9 +222,6 @@ public class DataRunNameServiceImpl implements DataRunNameService {
//将添加好的实体类集合进行遍历操作
log.info("数据库表名称:{}",dataName.getTableNames());
if (CollectionUtils.isEmpty(dataName.getTableNames())) {return;}
//在内部封装方法
dataName.getTableNames().forEach(tableName1 -> {this.tableNameRun(tableName1,dataName);});
}
});
//返回所有数据
@ -231,17 +229,6 @@ public class DataRunNameServiceImpl implements DataRunNameService {
}
/**
*
* @param tableName1
* @param dataName
*/
public void tableNameRun(TableNames tableName1, DataName dataName) {
}
/**
*
*
@ -316,7 +303,8 @@ public class DataRunNameServiceImpl implements DataRunNameService {
* @param preparedStatement
* @throws SQLException
*/
private void getDataResult(DruidPooledConnection conn, List<DataValue> list, PreparedStatement preparedStatement) throws SQLException {
private void getDataResult(DruidPooledConnection conn, List<DataValue> list, PreparedStatement preparedStatement) {
try {
ResultSet resultSet = preparedStatement.executeQuery();
ResultSetMetaData metaData = resultSet.getMetaData();
int columnCount = metaData.getColumnCount();
@ -335,8 +323,6 @@ public class DataRunNameServiceImpl implements DataRunNameService {
remarks = columns.getString("REMARKS");
log.info("字段备注:{}", remarks);
}
DataValue build = DataValue.builder()
.key(metaData.getColumnName(i))
.label(remarks)
@ -358,6 +344,9 @@ public class DataRunNameServiceImpl implements DataRunNameService {
}
}
JdbcHelper.close(null,preparedStatement,null);
} catch (Exception e) {
log.error(e.getMessage(),e);
}
}
/**
@ -466,7 +455,9 @@ public class DataRunNameServiceImpl implements DataRunNameService {
.map(TableFie::tableFieBuild).toList();
log.info("字段类型名称集合:{}", tableFieList);
DataName dataName = dataNameService.getById(tableNames.getDataId());
List<DataValue> tableValue = this.findTableValue(String.valueOf(dataName.getId()), tableNames.getName());
tableFieList.forEach(tableFy -> {
//查询字段映射信息
String str = this.tableFySelect(dataName.getName(), tableNames.getName(), tableFy.getField());

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long