|
@@ -327,42 +327,66 @@ public class ReportServiceImpl implements IReportService {
|
|
|
polygonDataVo.setQueryTableId(tableSortRes.get(j).get("tableId"));
|
|
|
|
|
|
Map<String, Object> mapData = getTableData(polygonDataVo);
|
|
|
- String dataname = (String) mapData.get("dataname");// 土地现状
|
|
|
- if (mapData.containsKey("datalist")) {
|
|
|
- List tabPlanTitles = new ArrayList<NpoiHelper.TableTitle>();
|
|
|
- NpoiHelper.TableTitle planC1Title = new NpoiHelper.TableTitle();
|
|
|
- planC1Title.setKey("type");
|
|
|
- planC1Title.setName("类型");
|
|
|
- planC1Title.setWidth(4150);
|
|
|
- tabPlanTitles.add(planC1Title);
|
|
|
+ // if (j == 1) {
|
|
|
+ String dataName = (String) mapData.get("dataname");// 土地现状
|
|
|
+
|
|
|
+ String column1 = "";
|
|
|
+ if (j == 1) {
|
|
|
+ column1 = "权属";
|
|
|
+ } else if (j == 2) {
|
|
|
+ column1 = "类型";
|
|
|
+ }
|
|
|
|
|
|
- NpoiHelper.TableTitle planC2Title = new NpoiHelper.TableTitle();
|
|
|
- planC2Title.setKey("area");
|
|
|
- planC2Title.setName("面积");
|
|
|
- planC2Title.setWidth(4150);
|
|
|
- tabPlanTitles.add(planC2Title);
|
|
|
+ List tabPlanTitles = new ArrayList<NpoiHelper.TableTitle>();
|
|
|
+ NpoiHelper.TableTitle planC1Title = new NpoiHelper.TableTitle();
|
|
|
+ planC1Title.setKey("type");
|
|
|
+ planC1Title.setName(column1);
|
|
|
+ planC1Title.setWidth(4150);
|
|
|
+ tabPlanTitles.add(planC1Title);
|
|
|
|
|
|
- List<Map<String, Object>> dataPlanlist = new ArrayList<>();
|
|
|
+ NpoiHelper.TableTitle planC2Title = new NpoiHelper.TableTitle();
|
|
|
+ planC2Title.setKey("area");
|
|
|
+ planC2Title.setName("面积");
|
|
|
+ planC2Title.setWidth(4150);
|
|
|
+ tabPlanTitles.add(planC2Title);
|
|
|
|
|
|
+ List<Map<String, Object>> dataPlanlist = new ArrayList<>();
|
|
|
+ if (mapData.containsKey("datalist")) {
|
|
|
List<Map<String, Object>> mapList = (List<Map<String, Object>>) mapData.get("datalist");
|
|
|
-
|
|
|
- // XWPFTable tableLand = document.createTable(mapList.size() , 2);// 创建表格
|
|
|
- // tableLand.setWidth(8300);// 总宽度
|
|
|
for (int iLand = 0; iLand < mapList.size(); iLand++) {
|
|
|
- Map<String, Object> planMap=new HashMap<>();
|
|
|
+ Map<String, Object> planMap = new HashMap<>();
|
|
|
planMap.put("type", mapList.get(iLand).get("groupvalue"));
|
|
|
- planMap.put("area", mapList.get(iLand).get("sumvalue")+" 平方米");
|
|
|
+ planMap.put("area", mapList.get(iLand).get("sumvalue") + " 平方米");
|
|
|
dataPlanlist.add(planMap);
|
|
|
-
|
|
|
- // tableLand.getRow(j).getCell(0).setParagraph(NpoiHelper.setCellText(table, (String) mapList.get(iLand).get("groupvalue"), null));
|
|
|
- // tableLand.getRow(j).getCell(1).setParagraph(NpoiHelper.setCellText(table, (Double) mapList.get(iLand).get("sumvalue")+" 平方米", null));
|
|
|
}
|
|
|
- NpoiHelper.setComTable(document, tabPlanTitles, dataPlanlist, "规划信息", pos++);
|
|
|
-
|
|
|
- System.out.println("");
|
|
|
}
|
|
|
- // String base = (String) mapData.get("base");
|
|
|
- System.out.println("");
|
|
|
+ NpoiHelper.setComTable(document, tabPlanTitles, dataPlanlist, dataName, pos++);
|
|
|
+ // }
|
|
|
+
|
|
|
+ // if (mapData.containsKey("datalist") && i == 2) {
|
|
|
+ // List tabPlanTitles = new ArrayList<NpoiHelper.TableTitle>();
|
|
|
+ // NpoiHelper.TableTitle planC1Title = new NpoiHelper.TableTitle();
|
|
|
+ // planC1Title.setKey("type");
|
|
|
+ // planC1Title.setName("类型");
|
|
|
+ // planC1Title.setWidth(4150);
|
|
|
+ // tabPlanTitles.add(planC1Title);
|
|
|
+ //
|
|
|
+ // NpoiHelper.TableTitle planC2Title = new NpoiHelper.TableTitle();
|
|
|
+ // planC2Title.setKey("area");
|
|
|
+ // planC2Title.setName("面积");
|
|
|
+ // planC2Title.setWidth(4150);
|
|
|
+ // tabPlanTitles.add(planC2Title);
|
|
|
+ //
|
|
|
+ // List<Map<String, Object>> dataPlanlist = new ArrayList<>();
|
|
|
+ // List<Map<String, Object>> mapList = (List<Map<String, Object>>) mapData.get("datalist");
|
|
|
+ // for (int iLand = 0; iLand < mapList.size(); iLand++) {
|
|
|
+ // Map<String, Object> planMap = new HashMap<>();
|
|
|
+ // planMap.put("type", mapList.get(iLand).get("groupvalue"));
|
|
|
+ // planMap.put("area", mapList.get(iLand).get("sumvalue") + " 平方米");
|
|
|
+ // dataPlanlist.add(planMap);
|
|
|
+ // }
|
|
|
+ // NpoiHelper.setComTable(document, tabPlanTitles, dataPlanlist, "规划信息", pos++);
|
|
|
+ // }
|
|
|
}
|
|
|
// 插入因子
|
|
|
// insertFactorImage(geomRes.getGeom(), geomWkt, rootFactors, factorTypeMap, document, pos);
|