Commit 126aa0f8 authored by xinglei's avatar xinglei

*)修改特种设备地图少数据问题

parent 84f2138a
......@@ -206,7 +206,7 @@ public class InspectionServiceImpl implements InspectionService {
@Override
public Page<JSONObject> getMapByRegion(Long regionSeq, String tableId, String type) {
Page<JSONObject> page = new Page<>(1, 10);
Collection<RegionModel> result = Systemctl.regionClient.queryByParentId(regionSeq).getResult();
// Collection<RegionModel> result = Systemctl.regionClient.queryByParentId(regionSeq).getResult();
JSONObject tableMap = idxFeignService.queryByTableId(tableId).getResult();
String tableName = tableMap.getString("tableName");
JSONArray tableCols = tableMap.getJSONArray("tableCols");
......@@ -220,15 +220,15 @@ public class InspectionServiceImpl implements InspectionService {
JSONObject jsonObject = new JSONObject();
String selectSql = "SELECT * FROM " + tableName + " WHERE TYPE=" + StringUtils.str2sqlValue(type);
Map<String, Object> objectMap = bizJdbcTemplate.queryForMap(selectSql);
result.forEach(x -> {
String regionName = columMap.get(x.getRegionName());
jsonObject.put(regionName, objectMap.get(regionName));
});
// result.forEach(x -> {
// String regionName = columMap.get(x.getRegionName());
// jsonObject.put(regionName, objectMap.get(regionName));
// });
if (!ValidationUtil.isEmpty(jsonObject)) {
if (!ValidationUtil.isEmpty(objectMap)) {
page.setTotal(1);
List<JSONObject> list = new ArrayList();
list.add(jsonObject);
list.add(JSONObject.parseObject(JSONObject.toJSONString(objectMap)));
page.setRecords(list);
}
return page;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment