|
|
|
@ -38,7 +38,7 @@ public class DataEaseModel {
|
|
|
|
|
for (Record record : list) {
|
|
|
|
|
//这个数据集,当前的区域,已经填写了多少条数据
|
|
|
|
|
String table_name = record.getStr("table_name");
|
|
|
|
|
if(table_name.equals("excel_区域人口流动分布_374179b760")){
|
|
|
|
|
if (table_name.equals("excel_区域人口流动分布_374179b760")) {
|
|
|
|
|
System.out.println("ddd");
|
|
|
|
|
}
|
|
|
|
|
sql = "select count(1) as c from `" + table_name + "`";
|
|
|
|
@ -79,9 +79,10 @@ public class DataEaseModel {
|
|
|
|
|
String value = row.getData().get(j);
|
|
|
|
|
//第一行是表头
|
|
|
|
|
String colName = listExcelRow.getFirst().getData().get(j);
|
|
|
|
|
if (colName.equals("行政区划")) {
|
|
|
|
|
|
|
|
|
|
if (identity_id == 2 && colName.equals("行政区划")) {
|
|
|
|
|
record.set(colName, area_name);
|
|
|
|
|
} else if (colName.equals("上级行政区划")) {
|
|
|
|
|
} else if (identity_id == 2 && colName.equals("上级行政区划")) {
|
|
|
|
|
record.set(colName, parent_area_name);
|
|
|
|
|
} else {
|
|
|
|
|
if (StrKit.isBlank(value)) {
|
|
|
|
@ -91,7 +92,7 @@ public class DataEaseModel {
|
|
|
|
|
record.set(colName, Integer.parseInt(value));
|
|
|
|
|
} else if (isDouble(value)) {
|
|
|
|
|
double roundedValue = Math.round(Double.parseDouble(value) * 100) / 100.0;
|
|
|
|
|
record.set(colName,roundedValue );
|
|
|
|
|
record.set(colName, roundedValue);
|
|
|
|
|
} else {
|
|
|
|
|
record.set(colName, value);
|
|
|
|
|
}
|
|
|
|
@ -148,7 +149,7 @@ public class DataEaseModel {
|
|
|
|
|
* 修改大屏的城市地图为指定的城市
|
|
|
|
|
*
|
|
|
|
|
* @param dataVisualizationName 大屏名称
|
|
|
|
|
* @param cityAreaName 城市或县区名称
|
|
|
|
|
* @param cityAreaName 城市或县区名称
|
|
|
|
|
*/
|
|
|
|
|
public int updateCityArea(String dataVisualizationName, String cityAreaName) {
|
|
|
|
|
//取出大屏的ID值
|
|
|
|
@ -455,7 +456,7 @@ public class DataEaseModel {
|
|
|
|
|
//对此表中的数据进行直接导出EXCEL
|
|
|
|
|
String sql = "select * from `" + tableName + "`";
|
|
|
|
|
if (identity_id > 1) {
|
|
|
|
|
sql = sql + "where `行政区划`='" + area_name + "' or `上级行政区划`='" + area_name + "'" ;
|
|
|
|
|
sql = sql + "where `行政区划`='" + area_name + "' or `上级行政区划`='" + area_name + "'";
|
|
|
|
|
}
|
|
|
|
|
List<Record> tableData = Db.use(DataEaseModel.DB_NAME).find(sql);
|
|
|
|
|
String excelFileName = UUID.randomUUID().toString().toUpperCase() + ".xlsx";
|
|
|
|
|