Browse Source

地块类型

gushoubang 10 months ago
parent
commit
e3d7632526

+ 15 - 1
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/controller/FzssController.java

@@ -43,7 +43,7 @@ public class FzssController extends BaseController {
         // 存储规划参数
         FzxzCalc fzxzCalc = fzssService.saveScheduleParam(params);
         // 开始规划任务
-        RequestResult res = fzssService.startSchedule( fzxzCalc);
+        RequestResult res = fzssService.startSchedule(fzxzCalc);
         return res;
     }
 
@@ -59,6 +59,20 @@ public class FzssController extends BaseController {
         return res;
     }
 
+    /**
+     * 获取选址结果列表
+     *
+     * @param startTime
+     * @param endTime
+     * @param name
+     * @return
+     */
+    @GetMapping("/GetXzResList")
+    public RequestResult GetXzResList(String startTime, String endTime, String name) {
+        RequestResult res = fzssService.GetXzResList(startTime, endTime, name);
+        return res;
+    }
+
     /**
      * 通过选择的方案生成报告
      *

+ 1 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzDTO.java

@@ -27,6 +27,7 @@ public class FzxzDTO {
     @TableField(value = "geom_id")
     private String geomId; // 选址范围信息
     private String xmmc;//项目名称
+    private String xmlx;//项目类型
     // TODO:字段待确认
     private String jsdw;
 }

+ 3 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzxzMapper.java

@@ -18,4 +18,7 @@ public interface FzxzMapper extends BaseMapper<FzxzDTO> {
 
     @Master
     FzxzEntityDTO GetFzxzByBsm(@Param("bsm") String bsm);
+
+    @Master
+    List<FzxzDTO> getList(String startTime, String endTime, String name);
 }

+ 2 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/IFzssService.java

@@ -19,5 +19,7 @@ public interface IFzssService {
 
     RequestResult GetXzjg(String bsm);
 
+    RequestResult GetXzResList(String startTime, String endTime, String name);
+
     RequestResult saveWordFile(String bsm, ArrayList xzbsm);
 }

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

@@ -53,6 +53,7 @@ public class FzssServiceImpl implements IFzssService {
 
     @Autowired
     ShpFileMapper shpFileMapper;
+    // 辅助选址结果
     @Autowired
     private FzxzResMapper fzxzResMapper;
     // 选址任务
@@ -271,8 +272,8 @@ public class FzssServiceImpl implements IFzssService {
         iLogService.saveLog(fzxzDTO.getBsm(), "辅助选址", "计算完成", "info");
 
         // 6.生成报告,生成world文件
-        // FzxzReport fzxzReport = iReportService.createReport(fzxzDTO.getBsm(), null);
-        // updateFzxzReport(fzxzDTO.getBsm(), fzxzReport.getReportfile());
+        FzxzReport fzxzReport = iReportService.createReport(fzxzDTO.getBsm(), null);
+        updateFzxzReport(fzxzDTO.getBsm(), fzxzReport.getReportfile());
 
         // 7.开始规划,更新任务状态
         updateFzxzStatus(fzxzDTO.getBsm(), Rwzt.getComplete());
@@ -387,6 +388,13 @@ public class FzssServiceImpl implements IFzssService {
         return RequestResult.success("查询成功!", result);
     }
 
+    @Override
+    public RequestResult GetXzResList(String startTime, String endTime, String name) {
+        List<FzxzDTO> fzxzDTOS = fzxzMapper.getList(startTime, endTime, name);
+
+        return null;
+    }
+
     /**
      * 生成word文件
      *

+ 11 - 19
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/impl/ReportServiceImpl.java

@@ -71,19 +71,11 @@ public class ReportServiceImpl implements IReportService {
                 f.mkdirs();
             }
             String reportPath = res.getXmmc() + "(选址报告)_" + timeStamp + ".docx";
-            // String simplePath = res.getXmmc() + "(选址简报)_" + timeStamp + ".docx";
-            // String zipPath = res.getXmmc() + "_" + timeStamp + ".zip";
             // 选址报告
             createReport(res, rootPath + File.separator + reportPath, xzbsmList);
-            // 选址简报
-            // createSimpleReport(res, rootPath + File.separator + simplePath, xzbsmList);
-            // zip打包
-            // createZipReport(res, rootPath + File.separator + zipPath, rootPath + File.separator + reportPath, rootPath + File.separator + simplePath);
             // 生成返回结果
             fzxzReport.setRootPath(StringUtils.getFileStaticPath(rootPath));
             fzxzReport.setReportfile(StringUtils.getFileStaticPath(rootPath + File.separator + reportPath));
-            // fzxzReport.setSimplefile(StringUtils.getFileStaticPath(rootPath + File.separator + simplePath));
-            // fzxzReport.setZipfile(StringUtils.getFileStaticPath(rootPath + File.separator + zipPath));
             fzxzReport.setBsm(bsm);
             fzxzReport.setFxbg(fzxzReport.getReportfile());
             fzxzReport.setJsdw(res.getJsdw());
@@ -161,17 +153,17 @@ public class ReportServiceImpl implements IReportService {
                 FzxzXzyzDTO fzxzXzyzDTO = fzxzXzyzDTOList.get(i);
                 map.put("YXYZMC", fzxzXzyzDTO.getYxyzmc());
                 String yztj = "";
-                // if (fzxzXzyzDTO.getYztj() != null) {
-                //     if ("C".equals(fzxzXzyzDTO.getYztj().toUpperCase())) {
-                //         yztj = "包含";
-                //     }
-                //     if ("N".equals(fzxzXzyzDTO.getYztj().toUpperCase())) {
-                //         yztj = "不包含";
-                //     }
-                //     if ("A".equals(fzxzXzyzDTO.getYztj().toUpperCase()) || "F".equals(fzxzXzyzDTO.getYztj().toUpperCase())) {
-                //         yztj = "分析";
-                //     }
-                // }
+                if (fzxzXzyzDTO.getSpatial_type() != null) {
+                    if ("contain".equals(fzxzXzyzDTO.getSpatial_type())) {
+                        yztj = "包含";
+                    } else if ("n_contain".equals(fzxzXzyzDTO.getSpatial_type())) {
+                        yztj = "不包含";
+                    } else if ("identity".equals(fzxzXzyzDTO.getSpatial_type())) {
+                        yztj = "相交";
+                    } else if ("n_identity".equals(fzxzXzyzDTO.getSpatial_type())) {
+                        yztj = "不相交";
+                    }
+                }
 
                 map.put("YZTJ_TEXT", yztj);
                 Float yxz = (float) 0;

+ 12 - 12
onemap-modules/onemap-analyse/src/main/resources/mapper/oracle/base/FzxzResMapper.xml

@@ -10,16 +10,16 @@
         VALUES (#{bsm}, #{rwbsm}, #{sjyb}, #{ydxz}, now(),
                 #{area}, public.st_geomfromewkt(#{geom,jdbcType=OTHER}), #{dkid})
     </insert>
-<select id="getListByRwbsm" resultMap="fzxzResMap">
-    SELECT bsm,
-           rwbsm,
-           sjyb,
-           ydxz,
-           create_at,
-           area,
-           public.st_asewkt(geom) AS geom,
-           dkid
-    FROM t_fzss_fzxz_res
-    WHERE rwbsm = #{rwbsm}
-</select>
+    <select id="getListByRwbsm" resultMap="fzxzResMap">
+        SELECT bsm,
+               rwbsm,
+               sjyb,
+               ydxz,
+               create_at,
+               area,
+               public.st_asewkt(geom) AS geom,
+               dkid
+        FROM t_fzss_fzxz_res
+        WHERE rwbsm = #{rwbsm}
+    </select>
 </mapper>

+ 6 - 3
onemap-modules/onemap-analyse/src/main/resources/mapper/oracle/fzss/FzxzMapper.xml

@@ -35,7 +35,6 @@
         select t.bsm                        as "bsm",
                t.sjy                        as "sjy",
                sjy.sjymc                       "sjymc",
---                t.fwlx                       as "fwlx",
                t.ydxz_bsm                   as "ydbsm",
                (select dict.mc
                 from t_fzss_fzxz_dict dict
@@ -47,8 +46,6 @@
                t.jsdw                       as "jsdw",
                t.fxbg                       as "fxbg",
                t.rwzt                       as "rwzt"
---                t.xzfw                       as "xzfw",
---                t.zip                        as "zip"
         from t_fzss_fzxz t
                  left join t_fzss_fzxz_sjy sjy on sjy.bsm = t.sjy
         where t.bsm = #{bsm}
@@ -64,4 +61,10 @@
         from T_FZSS_FZXZ_TB
         where  t.RWBSM = #{rwbsm}
     </select>
+
+    <select id="getList" parameterType="java.lang.String" resultType="com.onemap.analyse.domain.FzxzDTO">
+        select xmmc,
+        from T_FZSS_FZXZ_TB
+        where t.RWBSM = #{rwbsm}
+    </select>
 </mapper>