|
@@ -283,7 +283,7 @@ public class TableDataSelectServiceImpl implements TableDataSelectService {
|
|
|
return;
|
|
|
}
|
|
|
if (StringUtils.isEmpty(groupColumn)) {
|
|
|
- return;
|
|
|
+ groupColumn = ",siweiarea,geom";
|
|
|
}
|
|
|
String[] groupColumns = groupColumn.split(",", -1);
|
|
|
if (groupColumns.length < 3) {
|
|
@@ -297,7 +297,7 @@ public class TableDataSelectServiceImpl implements TableDataSelectService {
|
|
|
TableLayerJgTempDTO map = new TableLayerJgTempDTO();
|
|
|
map.setId(uid);
|
|
|
for (TableDataVo tableVo : dataVo) {
|
|
|
- if (tableVo.getFiled().equals(groupValue)) {
|
|
|
+ if (StringUtils.isNotEmpty(groupValue) && tableVo.getFiled().equals(groupValue)) {
|
|
|
map.setGroupvalue(tableVo.getData().toString());
|
|
|
} else if (tableVo.getFiled().equals(sumValue)) {
|
|
|
map.setSumvalue(tableVo.getData().toString());
|
|
@@ -305,6 +305,9 @@ public class TableDataSelectServiceImpl implements TableDataSelectService {
|
|
|
map.setGeomvalue(tableVo.getData().toString());
|
|
|
}
|
|
|
}
|
|
|
+ if (StringUtils.isEmpty(groupValue)) {
|
|
|
+ map.setGroupvalue("未知");
|
|
|
+ }
|
|
|
retList.add(map);
|
|
|
}
|
|
|
tableLayerJgTempMapper.insertTableLayerJgTempList(retList);
|
|
@@ -377,7 +380,7 @@ public class TableDataSelectServiceImpl implements TableDataSelectService {
|
|
|
if (retDataList == null || retDataList.size() <= 0) {
|
|
|
return retList;
|
|
|
}
|
|
|
- return dataMapTransFormZh(retDataList, filedlist);
|
|
|
+ return dataMapTransFormZhV1(retDataList, filedlist);
|
|
|
}
|
|
|
|
|
|
//取并集的函数
|
|
@@ -818,6 +821,60 @@ public class TableDataSelectServiceImpl implements TableDataSelectService {
|
|
|
return retList;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 汉化判断,如果没有就是要原始类型
|
|
|
+ *
|
|
|
+ * @param from_jg
|
|
|
+ * @param filedList
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<List<TableDataVo>> dataMapTransFormZhV1(List<Map> from_jg, List<TableFiledDTO> filedList) {
|
|
|
+ List<List<TableDataVo>> retList = new ArrayList<>();
|
|
|
+ if (from_jg == null || from_jg.size() == 0) {
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+ //循环结果
|
|
|
+ for (Map v_data : from_jg) {
|
|
|
+ //循环字段
|
|
|
+ List<TableDataVo> v_dataList = new ArrayList<>();
|
|
|
+ if (filedList == null || filedList.size() == 0) {
|
|
|
+ for (Object key : v_data.keySet()) {
|
|
|
+ if (!"siweiarea".equals(key)) {
|
|
|
+ String keyString = (String) key;
|
|
|
+ Object v_filedData = v_data.get(keyString);
|
|
|
+ TableDataVo tableDataVo = new TableDataVo();
|
|
|
+ tableDataVo.setData(v_filedData);
|
|
|
+ tableDataVo.setFiledZH(keyString);
|
|
|
+ tableDataVo.setFiled(keyString);
|
|
|
+ v_dataList.add(tableDataVo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (TableFiledDTO v_filed_data : filedList) {
|
|
|
+ String v_filedName = v_filed_data.getFiledName();
|
|
|
+ String v_filedZh = v_filed_data.getFiledZh();
|
|
|
+ Object v_filedData = v_data.get(v_filedName);
|
|
|
+ TableDataVo tableDataVo = new TableDataVo();
|
|
|
+ tableDataVo.setData(v_filedData);
|
|
|
+ tableDataVo.setFiledZH(v_filedZh);
|
|
|
+ tableDataVo.setFiled(v_filedName);
|
|
|
+ v_dataList.add(tableDataVo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Object siweiarea = v_data.get("siweiarea");
|
|
|
+ if (StringUtils.isNotNull(siweiarea)) {
|
|
|
+ // 面积
|
|
|
+ TableDataVo tableDataVo = new TableDataVo();
|
|
|
+ tableDataVo.setData(new BigDecimal(String.valueOf(siweiarea)).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
|
+ tableDataVo.setFiledZH("面积(平方米)");
|
|
|
+ tableDataVo.setFiled("siweiarea");
|
|
|
+ v_dataList.add(tableDataVo);
|
|
|
+ }
|
|
|
+ retList.add(v_dataList);
|
|
|
+ }
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
public List<TableFiledDTO> getFieldListByTableId(String tableId, Integer isDisplay) {
|
|
|
List<TableFiledDTO> list = tableFiledMapper.getFiledDTOByTableId(tableId, isDisplay);
|
|
|
return list;
|