|
|
|
@ -357,10 +357,10 @@ public class ImportUtil {
|
|
|
|
|
/**
|
|
|
|
|
* 功能:导入数据
|
|
|
|
|
*
|
|
|
|
|
* @throws IOException
|
|
|
|
|
* @throws ParseException
|
|
|
|
|
*/
|
|
|
|
|
public static void importData(String upload_excel_filename, XSSFWorkbook wb, int sheetIdx, String bureau_id, String person_id) throws IOException, ParseException {
|
|
|
|
|
public static void importData(String upload_excel_filename, XSSFWorkbook wb,
|
|
|
|
|
int sheetIdx, String bureau_id, String person_id) throws ParseException {
|
|
|
|
|
//读取sheet页
|
|
|
|
|
XSSFSheet sheet = wb.getSheetAt(sheetIdx);
|
|
|
|
|
//通过表名获取到它的读取起始行,终止列
|
|
|
|
@ -368,6 +368,10 @@ public class ImportUtil {
|
|
|
|
|
Record record = Db.findFirst(sql, upload_excel_filename, sheetIdx);
|
|
|
|
|
String table_name = record.getStr("table_name");
|
|
|
|
|
|
|
|
|
|
//先删除
|
|
|
|
|
sql = "delete from " + table_name + " where bureau_id=?";
|
|
|
|
|
Db.update(sql, bureau_id);
|
|
|
|
|
|
|
|
|
|
int data_start_row = record.getInt("data_start_row");
|
|
|
|
|
int column_num = record.getInt("column_num");
|
|
|
|
|
|
|
|
|
|