|
|
@ -151,13 +151,17 @@ public class Step2_CopyFilter {
|
|
|
|
sql = "select * from core_chart_view where scene_id=? and table_id>0 and type not like '%map%'";
|
|
|
|
sql = "select * from core_chart_view where scene_id=? and table_id>0 and type not like '%map%'";
|
|
|
|
List<Record> list = Db.use(DB_NAME).find(sql, childId);
|
|
|
|
List<Record> list = Db.use(DB_NAME).find(sql, childId);
|
|
|
|
String custom_filter_json = cn.hutool.core.io.FileUtil.readUtf8String(PathKit.getRootClassPath() + "/Data/filter.json");
|
|
|
|
String custom_filter_json = cn.hutool.core.io.FileUtil.readUtf8String(PathKit.getRootClassPath() + "/Data/filter.json");
|
|
|
|
|
|
|
|
int idx = 0;
|
|
|
|
for (Record record : list) {
|
|
|
|
for (Record record : list) {
|
|
|
|
|
|
|
|
System.out.println("正在设置第" + (++idx) + "个数据~");
|
|
|
|
long dataset_id = record.getLong("table_id");
|
|
|
|
long dataset_id = record.getLong("table_id");
|
|
|
|
|
|
|
|
System.out.println("dataset_id=" + dataset_id);
|
|
|
|
sql = "select id from core_dataset_table_field where dataset_table_id =(" +
|
|
|
|
sql = "select id from core_dataset_table_field where dataset_table_id =(" +
|
|
|
|
" select id from core_dataset_table where dataset_group_id=(select id from core_dataset_group where id=?)" +
|
|
|
|
" select id from core_dataset_table where dataset_group_id=(select id from core_dataset_group where id=?)" +
|
|
|
|
") and origin_name='行政区划'";
|
|
|
|
") and origin_name='行政区划'";
|
|
|
|
long field_id = Db.use(DB_NAME).queryLong(sql, dataset_id);
|
|
|
|
Record r = Db.use(DB_NAME).findFirst(sql, dataset_id);
|
|
|
|
|
|
|
|
if (r == null) continue;
|
|
|
|
|
|
|
|
long field_id = r.getLong("id");
|
|
|
|
long id = record.getLong("id");
|
|
|
|
long id = record.getLong("id");
|
|
|
|
String custom_filter = record.getStr("custom_filter");//原来的过滤器
|
|
|
|
String custom_filter = record.getStr("custom_filter");//原来的过滤器
|
|
|
|
JSONObject jo = JSONObject.parseObject(custom_filter);//还原原来的过滤器为JSONObject
|
|
|
|
JSONObject jo = JSONObject.parseObject(custom_filter);//还原原来的过滤器为JSONObject
|
|
|
|