|
|
|
@ -51,6 +51,8 @@ public class DataEaseModel {
|
|
|
|
|
* @param ja json数组
|
|
|
|
|
*/
|
|
|
|
|
public void saveDataSetTable(int identity_id, int dataset_id, String xmqh, JSONArray ja) {
|
|
|
|
|
|
|
|
|
|
System.out.println(ja);
|
|
|
|
|
String tableName = getTableName(dataset_id).getStr("table_name");
|
|
|
|
|
if (identity_id > 1) {
|
|
|
|
|
String sql = "delete from dataease.`" + tableName + "` where `行政区划`=?";
|
|
|
|
@ -67,9 +69,10 @@ public class DataEaseModel {
|
|
|
|
|
com.jfinal.plugin.activerecord.Record record = new Record();
|
|
|
|
|
for (Object key : jsonObject.keySet()) {
|
|
|
|
|
Object value = jsonObject.get(key);
|
|
|
|
|
if (value.equals("null")) value = null;
|
|
|
|
|
record.set(key.toString(), value);
|
|
|
|
|
list.add(record);
|
|
|
|
|
}
|
|
|
|
|
list.add(record);
|
|
|
|
|
}
|
|
|
|
|
Db.use("dataease").batchSave(tableName, list, 100);
|
|
|
|
|
}
|
|
|
|
|