|
|
|
@ -292,18 +292,21 @@ public class ImportUtil {
|
|
|
|
|
//写入模板与表结构的关系t_importexcel_mapping
|
|
|
|
|
String sql = "delete from t_importexcel_mapping where table_name=?";
|
|
|
|
|
Db.update(sql, tableName);
|
|
|
|
|
|
|
|
|
|
int sheet_index = input.getInt("sheet_index");
|
|
|
|
|
String sheet_name = input.getStr("sheet_name");
|
|
|
|
|
List<Record> writeList = new ArrayList<>();
|
|
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
|
|
Record record = new Record();
|
|
|
|
|
record.set("table_name", tableName);
|
|
|
|
|
record.set("column_name", list.get(i).getStr("column_name"));
|
|
|
|
|
record.set("excel_column_idx", i + 1);
|
|
|
|
|
record.set("excel_column_idx", i);
|
|
|
|
|
record.set("memo", list.get(i).getStr("memo"));
|
|
|
|
|
record.set("allow_blank", list.get(i).getBoolean("allow_blank"));
|
|
|
|
|
record.set("column_type", convertDataType(list.get(i).getStr("column_type")));
|
|
|
|
|
record.set("upload_excel_filename", upload_excel_filename);
|
|
|
|
|
record.set("sheet_index", i);
|
|
|
|
|
record.set("sheet_name", sheetName);
|
|
|
|
|
record.set("sheet_index", sheet_index);
|
|
|
|
|
record.set("sheet_name", sheet_name);
|
|
|
|
|
record.set("options", list.get(i).getStr("options"));
|
|
|
|
|
writeList.add(record);
|
|
|
|
|
}
|
|
|
|
@ -317,11 +320,9 @@ public class ImportUtil {
|
|
|
|
|
int end_row = input.getInt("end_row");
|
|
|
|
|
int start_column = input.getInt("start_column");
|
|
|
|
|
int end_column = input.getInt("end_column");
|
|
|
|
|
int sheet_index = input.getInt("sheet_index");
|
|
|
|
|
int data_start_row = input.getInt("data_start_row");
|
|
|
|
|
int column_num = input.getInt("column_num");
|
|
|
|
|
|
|
|
|
|
String sheet_name = input.getStr("sheet_name");
|
|
|
|
|
Record record = new Record();
|
|
|
|
|
record.set("upload_excel_filename", upload_excel_filename);
|
|
|
|
|
record.set("table_name", tableName);
|
|
|
|
|