|
|
|
@ -568,11 +568,17 @@ public class DataEaseModel {
|
|
|
|
|
* @param id 数据集id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public List<Record> getDataSetContent(int id) {
|
|
|
|
|
public List<Record> getDataSetContent(int id, int identity_id, String area_name) {
|
|
|
|
|
Record record = Db.findById("t_dp_dataset", "id", id);
|
|
|
|
|
String tableName = record.getStr("table_name");
|
|
|
|
|
String sql = "select * from `" + tableName + "`";
|
|
|
|
|
return Db.use(DB_NAME).find(sql);
|
|
|
|
|
|
|
|
|
|
if (identity_id > 1) {
|
|
|
|
|
String sql = "select * from `" + tableName + "` where `行政区划`='" + area_name + "'";
|
|
|
|
|
return Db.use(DB_NAME).find(sql);
|
|
|
|
|
} else {
|
|
|
|
|
String sql = "select * from `" + tableName + "`";
|
|
|
|
|
return Db.use(DB_NAME).find(sql);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -589,7 +595,7 @@ public class DataEaseModel {
|
|
|
|
|
String sql = "delete from `" + tableName + "` where `行政区划`=?";
|
|
|
|
|
Db.use(DB_NAME).update(sql, area_name);
|
|
|
|
|
} else {
|
|
|
|
|
String sql = "delete from `" + tableName+"`";
|
|
|
|
|
String sql = "delete from `" + tableName + "`";
|
|
|
|
|
Db.use(DB_NAME).update(sql);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|