main
黄海 9 months ago
commit ce2695a177

@ -70,7 +70,7 @@
table.render({
elem: '#data-table',
url: '/dsBase/dataease/getDataSet',
url: '/dsBase/dataease/getDataSet',
height: 'full-35',
page: {
limit: 20
@ -81,16 +81,16 @@
cols: [[
{ title: '序号', align: 'center', width: "5%", type: 'numbers' },
{ title: '分类', field: 'parent_name', align: 'center' },
{ title: '数据集', field: 'dataset_name', align: 'center'},
{ title: '表名', field: 'table_name', align: 'center'},
{ title: '操作', toolbar: '#table-bar', align: 'center'}
{ title: '数据集', field: 'dataset_name', align: 'center' },
// { title: '表名', field: 'table_name', align: 'center' },
{ title: '操作', toolbar: '#table-bar', align: 'center' }
]],
skin: 'line',
skin: 'line',
defaultToolbar: []
});
table.on('tool(data-table)', function (obj) {
window.location.href = "./dataMod.html?id=" + obj.data.id;
window.location.href = "./dataMod.html?id=" + obj.data.id;
});
});

@ -167,8 +167,6 @@
layer.msg("保存成功!", {
icon: 1,
time: 1300
}, function () {
history.back();
});
} else {
layer.msg(result.message, {
@ -180,13 +178,11 @@
});
});
$("#back").click(function () {
history.back();
});
function GetQueryString(name, istop) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");

@ -60,7 +60,7 @@ public class GenerateExcel {
for (int i = 1; i <= columnCount; i++) {
Cell cell = row.createCell(i - 1);
Object value = resultSet.getObject(i);
cell.setCellValue(value.toString());
if (value != null) cell.setCellValue(value.toString());
cell.setCellStyle(dataStyle);
}
}
@ -108,13 +108,13 @@ public class GenerateExcel {
List<String> files = getFiles(directoryPath);
int cnt = 0;//有问题的查询个数
for (String file : files) {
if(!file.contains(".sql")) continue;
if (!file.contains(".sql")) continue;
String sql = FileUtil.readUtf8String(file);
try {
String excelFilePath = file.replace(".sql", ".xlsx");
ResultSet rs = statement.executeQuery(sql);
//如果数据集是空的,返回
if(!rs.isBeforeFirst()) continue;
if (!rs.isBeforeFirst()) continue;
//否则导出
cnt++;
exportResultSetToExcel(rs, excelFilePath);

Loading…
Cancel
Save