Browse Source

Merge branch 'f-xiaogu' into dev

gushoubang 9 months ago
parent
commit
6a3c4efaaf

+ 3 - 3
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/impl/FzssServiceImpl.java

@@ -473,14 +473,14 @@ public class FzssServiceImpl implements IFzssService {
             String rawTableName = selectionInfo.getSjy();
             Integer rawItemId = selectionRes.getDkid();
             List<String> columns = new ArrayList<>();
-            columns.add("kzxxgyddm");
+            columns.add("dkbm");
             columns.add("kzxxgydmc");
             Map<String, Object> rawTable = ghdkaMapper.getInfoByColumn(rawTableName, rawItemId.toString(), columns);
 
             // 构建地块返回结果
             Map<String, Object> dkMap = new HashMap<>();
-            if (rawTable != null && rawTable.containsKey("kzxxgyddm") && rawTable.containsKey("kzxxgydmc")) {
-                dkMap.put("dkbm", rawTable.get("kzxxgyddm"));// 地块编码
+            if (rawTable != null && rawTable.containsKey("dkbm") && rawTable.containsKey("kzxxgydmc")) {
+                dkMap.put("dkbm", rawTable.get("dkbm"));// 地块编码
                 dkMap.put("kzxxgydmc", rawTable.get("kzxxgydmc"));// 地块类型
             }
 

+ 18 - 39
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/impl/ReportServiceImpl.java

@@ -24,6 +24,7 @@ import org.apache.poi.xwpf.usermodel.*;
 import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth;
 import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTcPr;
 import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblWidth;
+import org.python.antlr.ast.Num;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
@@ -108,7 +109,7 @@ public class ReportServiceImpl implements IReportService {
      *
      * @param res
      * @param reportPath
-     * @param xzbsmList  没有导出全部地块
+     * @param dkIds  没有导出全部地块
      */
     private void createReport(FzxzEntityDTO res, String reportPath, List<String> dkIds) {
         GeomRes geomRes = shpFileMapper.getOne(res.getGeomId());
@@ -287,10 +288,10 @@ public class ReportServiceImpl implements IReportService {
                 NpoiHelper.mergeHorizontal(table, dkList.size(), 1, 3);// 合并单元格
                 table.getRow(dkList.size()).getCell(0).setParagraph(NpoiHelper.setCellText(table, "配建机动车位说明", optionIsBold));
 
-                // row
+                // 准地价预估(万元)
                 NpoiHelper.mergeHorizontal(table, dkList.size() + 1, 1, 3);// 合并单元格
                 table.getRow(dkList.size() + 1).getCell(0).setParagraph(NpoiHelper.setCellText(table, "准地价预估(万元)", optionIsBold));
-                // Table 表格第六行 -专题图
+                // 地块位置
                 NpoiHelper.mergeHorizontal(table, dkList.size() + 2, 0, 3);
                 table.getRow(dkList.size() + 2).getCell(0).setParagraph(NpoiHelper.setCellText(table, "地块位置", optionIsBold));
 
@@ -368,36 +369,6 @@ public class ReportServiceImpl implements IReportService {
                 NpoiHelper.mergeHorizontal(table, dkList.size() + 3, 0, 3);
                 XWPFParagraph para6 = table.getRow(dkList.size() + 3).getCell(0).addParagraph();
                 para6.setAlignment(ParagraphAlignment.LEFT);
-
-
-                int jgyzid = 1;
-                for (int j = 0; j < fzxzXzyzDTOList.size(); j++) {
-                    FactorUseDTO fzxzJgyzDTO = fzxzXzyzDTOList.get(j);
-                    XWPFRun run = para6.createRun();
-                    // TODO
-                    // run.setText(jgyzid + "、" + fzxzJgyzDTO.getFxjg());
-                    run.addBreak(BreakType.TEXT_WRAPPING);
-                    jgyzid++;
-                }
-
-
-                for (int j = 0; j < fzxzXzyzDTOList.size(); j++) {
-                    FactorUseDTO jgyz = fzxzXzyzDTOList.get(j);
-                    XWPFRun run = para6.createRun();
-                    // String jg = jgyz.getFxjg();
-                    // TODO
-                    String jg = "";
-                    Double jgDouble = 0.0;
-                    try {
-                        // jgDouble = Double.parseDouble(jg);
-                        // TODO
-                        // run.setText(jgyzid + "、压占" + jgyz.getYxyzmc() + "面积" + jg + "平方米");
-                    } catch (Exception e) {
-                        run.setText(jg);
-                    }
-                    run.addBreak(BreakType.TEXT_WRAPPING);
-                    jgyzid++;
-                }
             }
             File fileDoc = new File(reportPath);
             if (fileDoc.exists()) {
@@ -501,16 +472,16 @@ public class ReportServiceImpl implements IReportService {
 
             Map<String, String> row3ItemMap = new HashMap<>();
             row3ItemMap.put("colum0", "用地面积(亩)");
-            row3ItemMap.put("colum1", rawTable.get("ydmj") + "");
+            row3ItemMap.put("colum1", NumberUtil.double2TwoDecimal(UnitsUtil.m2ToMu((Double) rawTable.get("ydmj"))) + "");
             row3ItemMap.put("colum2", "建筑面积(亩)");
-            row3ItemMap.put("colum3", rawTable.get("jzmj") + "");
+            row3ItemMap.put("colum3", NumberUtil.double2TwoDecimal(UnitsUtil.m2ToMu((Double) rawTable.get("jzmj"))) + "");
             rows.add(row3ItemMap);
 
             Map<String, String> row4ItemMap = new HashMap<>();
             row4ItemMap.put("colum0", "容积率上限");
-            row4ItemMap.put("colum1", rawTable.get("rjld") + "");
+            row4ItemMap.put("colum1", NumberUtil.double2TwoDecimal(UnitsUtil.m2ToMu((Double)rawTable.get("rjld"))) + "");
             row4ItemMap.put("colum2", "容积率下限");
-            row4ItemMap.put("colum3", rawTable.get("rjlx") + "");
+            row4ItemMap.put("colum3", NumberUtil.double2TwoDecimal(UnitsUtil.m2ToMu((Double)rawTable.get("rjlx"))) + "");
             rows.add(row4ItemMap);
 
             Map<String, String> row5ItemMap = new HashMap<>();
@@ -529,9 +500,17 @@ public class ReportServiceImpl implements IReportService {
 
             Map<String, String> row7ItemMap = new HashMap<>();
             row7ItemMap.put("colum0", "建筑限高上限(米)");
-            row7ItemMap.put("colum1", rawTable.get("jzxgd") + "");
+            String jzxgd = rawTable.get("jzxgd") + "";
+            if (jzxgd.equals("null")) {
+                jzxgd = "暂无";
+            }
+            row7ItemMap.put("colum1", jzxgd);
             row7ItemMap.put("colum2", "建筑限高下限(米)");
-            row7ItemMap.put("colum3", rawTable.get("jzxgx") + "");
+            String jzxgx = rawTable.get("jzxgx") + "";
+            if (jzxgx.equals("null")) {
+                jzxgx = "暂无";
+            }
+            row7ItemMap.put("colum3", jzxgx);
             rows.add(row7ItemMap);
         }
         return rows;