| 
					
				 | 
			
			
				@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.onemap.analyse.domain.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.onemap.analyse.domain.calculation.ReportImage; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.onemap.analyse.domain.res.GeomRes; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.onemap.analyse.domain.res.TableSortRes; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.onemap.analyse.domain.vo.FactorSpatialVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.onemap.analyse.domain.vo.TableNameIdsVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.onemap.analyse.mapper.FactorUseMapper; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -217,14 +216,14 @@ public class ReportServiceImpl implements IReportService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             fwfx = fwfx.substring(0, fwfx.length() - 1) + "。详情如下:"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             NpoiHelper.content(document, fwfx, pos++); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 获取插入图片 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ReportImage reportImage = getWktImage(geomRes.getGeom(), 400); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            XWPFParagraph imageParagraph = document.createParagraph(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            imageParagraph.setAlignment(ParagraphAlignment.CENTER); // Center align the image 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            XWPFRun imageRun = imageParagraph.createRun(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            imageRun.addPicture(reportImage.getInputStream(), XWPFDocument.PICTURE_TYPE_PNG, null, Units.toEMU(reportImage.getUseWidth()), Units.toEMU(reportImage.getUseHeight())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            pos++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // // 获取插入图片 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // ReportImage reportImage = getWktImage(geomRes.getGeom(), 400); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // XWPFParagraph imageParagraph = document.createParagraph(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // imageParagraph.setAlignment(ParagraphAlignment.CENTER); // Center align the image 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // XWPFRun imageRun = imageParagraph.createRun(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // imageRun.addPicture(reportImage.getInputStream(), XWPFDocument.PICTURE_TYPE_PNG, null, Units.toEMU(reportImage.getUseWidth()), Units.toEMU(reportImage.getUseHeight())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // pos++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // 添加分页 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             XWPFParagraph pageBreakParagraph1 = document.createParagraph(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -246,7 +245,12 @@ public class ReportServiceImpl implements IReportService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // 获取规划信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            List<TableSortRes> tableSortRes = getCascadeList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<Map<String, String>> tableSortRes = getCascadeList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            PolygonDataVo polygonDataVo = new PolygonDataVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            polygonDataVo.setSourceLayerId(tableSortRes.get(0).get("tableId")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            polygonDataVo.setSourceLayerType("1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (int i = 0; i < fzxzJgGisDTOList.size(); i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (i != 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 添加分页 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -302,18 +306,66 @@ public class ReportServiceImpl implements IReportService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     cell.removeParagraph(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 获取地块图片 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                String geomWkt = item.getGeom(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ReportImage imageTable = getWktImage(geomWkt, 300); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // // 获取地块图片 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // String geomWkt = item.getGeom(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // ReportImage imageTable = getWktImage(geomWkt, 300); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // // 在合并后的单元格中创建一个新的段落 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // XWPFParagraph paraImag = row.getCell(0).addParagraph(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // paraImag.setAlignment(ParagraphAlignment.CENTER); // 居中对齐 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // XWPFRun run = paraImag.createRun(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // run.addPicture(imageTable.getInputStream(), XWPFDocument.PICTURE_TYPE_PNG, null, Units.toEMU(imageTable.getUseWidth()), Units.toEMU(imageTable.getUseHeight())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 在合并后的单元格中创建一个新的段落 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                XWPFParagraph paraImag = row.getCell(0).addParagraph(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                paraImag.setAlignment(ParagraphAlignment.CENTER); // 居中对齐 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                XWPFRun run = paraImag.createRun(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                run.addPicture(imageTable.getInputStream(), XWPFDocument.PICTURE_TYPE_PNG, null, Units.toEMU(imageTable.getUseWidth()), Units.toEMU(imageTable.getUseHeight())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // 获取地块信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                for (int j = 0; j < tableSortRes.size(); j++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (j == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    polygonDataVo.setSourceDataId(item.getDkid()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    polygonDataVo.setSourcePolygonWkt(item.getGeom().replace("SRID=4326;", "")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    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); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        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"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        // XWPFTable tableLand = document.createTable(mapList.size() , 2);// 创建表格 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        // tableLand.setWidth(8300);// 总宽度 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        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); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            // 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(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 // 插入因子 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                insertFactorImage(geomRes.getGeom(), geomWkt, rootFactors, factorTypeMap, document, pos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // insertFactorImage(geomRes.getGeom(), geomWkt, rootFactors, factorTypeMap, document, pos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -634,16 +686,18 @@ public class ReportServiceImpl implements IReportService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 获取级联列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private List<TableSortRes> getCascadeList() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private List<Map<String, String>> getCascadeList() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         RequestResult requestResult = applyService.GetCascadeList(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<TableSortRes> tableSortResList = (List<TableSortRes>) requestResult.get("data"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<Map<String, String>> tableSortResList = (List<Map<String, String>>) requestResult.get("data"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return tableSortResList; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 获取表格数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private void getTableData(PolygonDataVo polygonDataVo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        applyService.queryTableListByPolygon(polygonDataVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private Map<String, Object> getTableData(PolygonDataVo polygonDataVo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        RequestResult requestResult = applyService.queryTableListByPolygon(polygonDataVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Map<String, Object> mapData = (Map<String, Object>) requestResult.get("data"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return mapData; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |