|
|
|
@ -157,6 +157,9 @@ public class DataEaseModel {
|
|
|
|
|
* @return 城市编码
|
|
|
|
|
*/
|
|
|
|
|
public String getCityCode(String cityName) {
|
|
|
|
|
if (cityName.contains("西双版纳")) {
|
|
|
|
|
cityName = "西双版纳州";
|
|
|
|
|
}
|
|
|
|
|
String full_name = getFullAreaName(cityName);
|
|
|
|
|
String sql = "select area_code from t_city_code where area_name=?";
|
|
|
|
|
return Db.findFirst(sql, full_name).getStr("area_code");
|
|
|
|
@ -528,8 +531,8 @@ public class DataEaseModel {
|
|
|
|
|
String sql = "select * from t_dm_area where full_name = ?";
|
|
|
|
|
Record record = Db.findFirst(sql, area_name);
|
|
|
|
|
if (record != null) return area_name;
|
|
|
|
|
sql = "select * from t_dm_area where area_name=?";
|
|
|
|
|
record = Db.findFirst(sql, area_name);
|
|
|
|
|
sql = "select * from t_dm_area where area_name like %" + area_name + "%";
|
|
|
|
|
record = Db.findFirst(sql);
|
|
|
|
|
return record.getStr("full_name");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -637,7 +640,7 @@ public class DataEaseModel {
|
|
|
|
|
Record record = Db.findById("t_dp_dataset", "id", id);
|
|
|
|
|
String tableName = record.getStr("table_name");
|
|
|
|
|
|
|
|
|
|
String sql = "select * from `" + tableName+"`";
|
|
|
|
|
String sql = "select * from `" + tableName + "`";
|
|
|
|
|
return Db.use(DB_NAME).find(sql);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|