Browse Source

Merge branch 'dev' of http://114.244.114.158:8802/siwei/sanya-data-management-back into dev

gushoubang 1 year ago
parent
commit
ad10d7168f
16 changed files with 765 additions and 211 deletions
  1. 11 13
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/fzss/HgxfxController.java
  2. 81 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/config/fzss/HgxfxRwJgDTO.java
  3. 14 41
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/config/fzss/HgxfxScxDTO.java
  4. 12 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/config/fzss/HgxfxScxRwDTO.java
  5. 101 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/config/fzss/HgxfxScxSortationDTO.java
  6. 28 33
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/config/fzss/HgxfxScxTableDTO.java
  7. 0 3
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/fzss/HgxfxMapper.java
  8. 56 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/fzss/HgxfxRwJgMapper.java
  9. 12 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/fzss/HgxfxScxRwMapper.java
  10. 18 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/fzss/HgxfxScxSortationMapper.java
  11. 2 4
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/fzss/IHgxfxService.java
  12. 32 117
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/fzss/HgxfxServiceImpl.java
  13. 233 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/fzss/hgxfxjg/HgxfxHandleService.java
  14. 91 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/fzss/hgxfxjg/HgxfxJgService.java
  15. 52 0
      onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/fzss/HgxfxRwJgMapper.xml
  16. 22 0
      onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/fzss/HgxfxScxRwMapper.xml

+ 11 - 13
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/fzss/HgxfxController.java

@@ -73,19 +73,17 @@ public class HgxfxController extends BaseController {
         return RequestResult.success(list);
     }
 
-
-//
-//    /**
-//     * 获取分析结果
-//     *
-//     * @param bsm
-//     * @return
-//     */
-//    @GetMapping("/GetFxjg")
-//    public RequestResult GetFxjg(String bsm) {
-//        RequestResult res = hgxfxService.GetFxjg(bsm);
-//        return res;
-//    }
+    /**
+     * 获取分析结果
+     *
+     * @param bsm
+     * @return
+     */
+    @GetMapping("/GetFxjg")
+    public RequestResult GetFxjg(String bsm) {
+        RequestResult res = hgxfxService.GetFxjg(bsm);
+        return res;
+    }
 //
 //    /**
 //     * 删除分析结果

+ 81 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/config/fzss/HgxfxRwJgDTO.java

@@ -0,0 +1,81 @@
+package com.onemap.apply.domain.config.fzss;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+@TableName("t_fzss_hgxfx_rw_jg")
+public class HgxfxRwJgDTO {
+    private String bsm;
+    private String rwbsm;
+    private String scxbsm;
+    private String yslx;
+    private String yslxmc;
+    private Double mj;
+    private String geom;
+    @TableField(exist = false)
+    private String mc_name;
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getRwbsm() {
+        return rwbsm;
+    }
+
+    public void setRwbsm(String rwbsm) {
+        this.rwbsm = rwbsm;
+    }
+
+    public String getScxbsm() {
+        return scxbsm;
+    }
+
+    public void setScxbsm(String scxbsm) {
+        this.scxbsm = scxbsm;
+    }
+
+    public String getYslx() {
+        return yslx;
+    }
+
+    public void setYslx(String yslx) {
+        this.yslx = yslx;
+    }
+
+    public String getYslxmc() {
+        return yslxmc;
+    }
+
+    public void setYslxmc(String yslxmc) {
+        this.yslxmc = yslxmc;
+    }
+
+    public Double getMj() {
+        return mj;
+    }
+
+    public void setMj(Double mj) {
+        this.mj = mj;
+    }
+
+    public String getGeom() {
+        return geom;
+    }
+
+    public void setGeom(String geom) {
+        this.geom = geom;
+    }
+
+    public String getMc_name() {
+        return mc_name;
+    }
+
+    public void setMc_name(String mc_name) {
+        this.mc_name = mc_name;
+    }
+}

+ 14 - 41
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/config/fzss/HgxfxScxDTO.java

@@ -5,22 +5,11 @@ import com.baomidou.mybatisplus.annotation.TableName;
 @TableName("t_fzss_hgxfx_scx")
 public class HgxfxScxDTO {
     private String bsm;
-    private String ysdm;
-    private String ysmc;
-    private String sjy;
+    private String bsmmc;
+    private String pbsm;
     private Integer kzxjb;
     private Integer xssx;
-    private String tjzd;
     private Integer status;
-    private String pbsm;
-
-    public Integer getStatus() {
-        return status;
-    }
-
-    public void setStatus(Integer status) {
-        this.status = status;
-    }
 
     public String getBsm() {
         return bsm;
@@ -30,28 +19,20 @@ public class HgxfxScxDTO {
         this.bsm = bsm;
     }
 
-    public String getYsdm() {
-        return ysdm;
-    }
-
-    public void setYsdm(String ysdm) {
-        this.ysdm = ysdm;
+    public String getBsmmc() {
+        return bsmmc;
     }
 
-    public String getYsmc() {
-        return ysmc;
+    public void setBsmmc(String bsmmc) {
+        this.bsmmc = bsmmc;
     }
 
-    public void setYsmc(String ysmc) {
-        this.ysmc = ysmc;
-    }
-
-    public String getSjy() {
-        return sjy;
+    public String getPbsm() {
+        return pbsm;
     }
 
-    public void setSjy(String sjy) {
-        this.sjy = sjy;
+    public void setPbsm(String pbsm) {
+        this.pbsm = pbsm;
     }
 
     public Integer getKzxjb() {
@@ -70,19 +51,11 @@ public class HgxfxScxDTO {
         this.xssx = xssx;
     }
 
-    public String getTjzd() {
-        return tjzd;
-    }
-
-    public void setTjzd(String tjzd) {
-        this.tjzd = tjzd;
-    }
-
-    public String getPbsm() {
-        return pbsm;
+    public Integer getStatus() {
+        return status;
     }
 
-    public void setPbsm(String pbsm) {
-        this.pbsm = pbsm;
+    public void setStatus(Integer status) {
+        this.status = status;
     }
 }

+ 12 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/config/fzss/HgxfxScxRwDTO.java

@@ -1,8 +1,10 @@
 package com.onemap.apply.domain.config.fzss;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 
 import java.util.Date;
+import java.util.List;
 
 //合规性审查项与分析任务对应关系表
 @TableName("t_fzss_hgxfx_scx_rw")
@@ -10,6 +12,8 @@ public class HgxfxScxRwDTO {
     private String bsm;
     private String rwbsm;
     private String scxbsm;
+    @TableField(exist = false)
+    private String scxname;
     private Date rwkssj;
     private Date rwjssj;
 
@@ -52,4 +56,12 @@ public class HgxfxScxRwDTO {
     public void setRwjssj(Date rwjssj) {
         this.rwjssj = rwjssj;
     }
+
+    public String getScxname() {
+        return scxname;
+    }
+
+    public void setScxname(String scxname) {
+        this.scxname = scxname;
+    }
 }

+ 101 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/config/fzss/HgxfxScxSortationDTO.java

@@ -0,0 +1,101 @@
+package com.onemap.apply.domain.config.fzss;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+@TableName("t_fzss_hgxfx_scx_sortation")
+public class HgxfxScxSortationDTO {
+    private String id;
+    private String pid;
+    private String bsm;
+    private String bsmmc;
+    @TableField("type_column")
+    private String typeColumn;
+    @TableField("type_length")
+    private Integer typeLength;
+    @TableField("type_dict")
+    private String typeDict;
+    private Integer template;
+    private Integer xssx;
+    private Integer status;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getPid() {
+        return pid;
+    }
+
+    public void setPid(String pid) {
+        this.pid = pid;
+    }
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getBsmmc() {
+        return bsmmc;
+    }
+
+    public void setBsmmc(String bsmmc) {
+        this.bsmmc = bsmmc;
+    }
+
+    public String getTypeColumn() {
+        return typeColumn;
+    }
+
+    public void setTypeColumn(String typeColumn) {
+        this.typeColumn = typeColumn;
+    }
+
+    public Integer getTypeLength() {
+        return typeLength;
+    }
+
+    public void setTypeLength(Integer typeLength) {
+        this.typeLength = typeLength;
+    }
+
+    public String getTypeDict() {
+        return typeDict;
+    }
+
+    public void setTypeDict(String typeDict) {
+        this.typeDict = typeDict;
+    }
+
+    public Integer getTemplate() {
+        return template;
+    }
+
+    public void setTemplate(Integer template) {
+        this.template = template;
+    }
+
+    public Integer getXssx() {
+        return xssx;
+    }
+
+    public void setXssx(Integer xssx) {
+        this.xssx = xssx;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+}

+ 28 - 33
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/config/fzss/HgxfxScxTableDTO.java

@@ -1,18 +1,21 @@
 package com.onemap.apply.domain.config.fzss;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 
 @TableName("t_fzss_hgxfx_scx_table")
 public class HgxfxScxTableDTO {
     private String bsm;
-    private String ysdm;
-    private String ysmc;
+    private String bsmmc;
     private String sjy;
-    private Integer srid;
+    @TableField("sjy_srid")
+    private Integer sjySrid;
+    @TableField("analyse_srid")
+    private Integer analyseSrid;
+    @TableField("analyse_tjzd")
+    private String analyseTjzd;
     private Integer xssx;
-    private String tjzd;
     private Integer status;
-    private Integer rwsrid;
 
     public String getBsm() {
         return bsm;
@@ -22,20 +25,12 @@ public class HgxfxScxTableDTO {
         this.bsm = bsm;
     }
 
-    public String getYsdm() {
-        return ysdm;
+    public String getBsmmc() {
+        return bsmmc;
     }
 
-    public void setYsdm(String ysdm) {
-        this.ysdm = ysdm;
-    }
-
-    public String getYsmc() {
-        return ysmc;
-    }
-
-    public void setYsmc(String ysmc) {
-        this.ysmc = ysmc;
+    public void setBsmmc(String bsmmc) {
+        this.bsmmc = bsmmc;
     }
 
     public String getSjy() {
@@ -46,28 +41,28 @@ public class HgxfxScxTableDTO {
         this.sjy = sjy;
     }
 
-    public Integer getSrid() {
-        return srid;
+    public Integer getSjySrid() {
+        return sjySrid;
     }
 
-    public void setSrid(Integer srid) {
-        this.srid = srid;
+    public void setSjySrid(Integer sjySrid) {
+        this.sjySrid = sjySrid;
     }
 
-    public Integer getXssx() {
-        return xssx;
+    public Integer getAnalyseSrid() {
+        return analyseSrid;
     }
 
-    public void setXssx(Integer xssx) {
-        this.xssx = xssx;
+    public void setAnalyseSrid(Integer analyseSrid) {
+        this.analyseSrid = analyseSrid;
     }
 
-    public String getTjzd() {
-        return tjzd;
+    public Integer getXssx() {
+        return xssx;
     }
 
-    public void setTjzd(String tjzd) {
-        this.tjzd = tjzd;
+    public void setXssx(Integer xssx) {
+        this.xssx = xssx;
     }
 
     public Integer getStatus() {
@@ -78,11 +73,11 @@ public class HgxfxScxTableDTO {
         this.status = status;
     }
 
-    public Integer getRwsrid() {
-        return rwsrid;
+    public String getAnalyseTjzd() {
+        return analyseTjzd;
     }
 
-    public void setRwsrid(Integer rwsrid) {
-        this.rwsrid = rwsrid;
+    public void setAnalyseTjzd(String analyseTjzd) {
+        this.analyseTjzd = analyseTjzd;
     }
 }

+ 0 - 3
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/fzss/HgxfxMapper.java

@@ -2,9 +2,6 @@ package com.onemap.apply.mapper.fzss;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.onemap.apply.domain.config.fzss.HgxfxDTO;
-import com.onemap.apply.domain.config.fzss.HgxfxFxtbDTO;
-import com.onemap.apply.domain.config.fzss.HgxfxJcxsDTO;
-import com.onemap.apply.domain.config.fzss.HgxfxScxDTO;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;

+ 56 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/fzss/HgxfxRwJgMapper.java

@@ -0,0 +1,56 @@
+package com.onemap.apply.mapper.fzss;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.apply.domain.config.fzss.HgxfxRwJgDTO;
+import com.onemap.apply.domain.config.fzss.HgxfxRwJgTempDTO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 数据层
+ *
+ * @author onemap
+ */
+public interface HgxfxRwJgMapper extends BaseMapper<HgxfxRwJgDTO> {
+
+    @Override
+    int insert(HgxfxRwJgDTO entity);
+
+    /**
+     * 没有业务分析
+     *
+     * @param bsm
+     * @param rwbsm
+     * @param scxbsm
+     * @return
+     */
+    HgxfxRwJgDTO selectTypeNo(
+            @Param("bsm") String bsm,
+            @Param("rwbsm") String rwbsm,
+            @Param("scxbsm") String scxbsm,
+            @Param("yslx") String yslx);
+
+    /**
+     * 有业务分类
+     *
+     * @param bsm
+     * @param rwbsm
+     * @param scxbsm
+     * @param type_column
+     * @param type_length
+     * @param type_dict
+     * @return
+     */
+    List<Map> selectType(
+            @Param("bsm") String bsm,
+            @Param("rwbsm") String rwbsm,
+            @Param("scxbsm") String scxbsm,
+            @Param("type_column") String type_column,
+            @Param("type_length") Integer type_length,
+            @Param("type_dict") String type_dict,
+            @Param("yslx") String yslx
+    );
+
+}

+ 12 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/fzss/HgxfxScxRwMapper.java

@@ -2,6 +2,9 @@ package com.onemap.apply.mapper.fzss;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.onemap.apply.domain.config.fzss.HgxfxScxRwDTO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * 数据层
@@ -9,4 +12,13 @@ import com.onemap.apply.domain.config.fzss.HgxfxScxRwDTO;
  * @author onemap
  */
 public interface HgxfxScxRwMapper extends BaseMapper<HgxfxScxRwDTO> {
+
+    /**
+     * 现接口只支持查询一级的
+     *
+     * @param rwbsm   任务标识码
+     * @param scxPBsm 审查项标识码(父级)
+     * @return
+     */
+    List<HgxfxScxRwDTO> selectScxRwInfo(@Param("rwbsm") String rwbsm, @Param("scxPBsm") String scxPBsm);
 }

+ 18 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/fzss/HgxfxScxSortationMapper.java

@@ -0,0 +1,18 @@
+package com.onemap.apply.mapper.fzss;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.apply.domain.config.fzss.HgxfxScxRwDTO;
+import com.onemap.apply.domain.config.fzss.HgxfxScxSortationDTO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 数据层
+ *
+ * @author onemap
+ */
+public interface HgxfxScxSortationMapper extends BaseMapper<HgxfxScxSortationDTO> {
+
+
+}

+ 2 - 4
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/fzss/IHgxfxService.java

@@ -13,11 +13,9 @@ public interface IHgxfxService {
     RequestResult GetLog(String bsm);
 
     List<HgxfxDTO> GetPage(String kssj, String jssj, String xmmc, String username);
-//
 
-//
-//    RequestResult GetFxjg(String bsm);
-//
+    RequestResult GetFxjg(String bsm);
+
 //    RequestResult DeleteFxjg(String bsm);
 //
 //    RequestResult UpdateScx(String params);

+ 32 - 117
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/fzss/HgxfxServiceImpl.java

@@ -4,10 +4,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.onemap.apply.domain.config.fzss.*;
 import com.onemap.apply.mapper.fzss.*;
 import com.onemap.apply.service.fzss.IHgxfxService;
-import com.onemap.common.core.domain.R;
+import com.onemap.apply.service.impl.fzss.hgxfxjg.HgxfxHandleService;
+import com.onemap.apply.service.impl.fzss.hgxfxjg.HgxfxJgService;
 import com.onemap.common.core.utils.StringUtils;
 import com.onemap.common.core.web.domain.RequestResult;
-import com.onemap.common.security.utils.SecurityUtils;
 import com.onemap.system.api.AnalyseService;
 import com.onemap.system.api.RemoteAuthService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -25,6 +25,10 @@ public class HgxfxServiceImpl implements IHgxfxService {
     @Autowired
     private HgxfxScxRwMapper hgxfxScxRwMapper;
     @Autowired
+    private HgxfxRwJgTempMapper hgxfxRwJgTempMapper;
+    @Autowired
+    private HgxfxRwJgMapper hgxfxRwJgMapper;
+    @Autowired
     private HgxfxScxTableMapper hgxfxScxTableMapper;
     @Autowired
     private HgxfxMapper hgxfxMapper;
@@ -34,6 +38,29 @@ public class HgxfxServiceImpl implements IHgxfxService {
     private RemoteAuthService remoteAuthService;
     @Autowired
     private AnalyseService analyseService;
+    @Autowired
+    private HgxfxScxSortationMapper hgxfxScxSortationMapper;
+    @Autowired
+    private HgxfxJgService hgxfxJgService;
+    @Resource
+    private HgxfxHandleService hxfxHandleService;
+
+    @Override
+    public RequestResult GetFxjg(String bsm) {
+        if (StringUtils.isEmpty(bsm)) {
+            return RequestResult.error("标识码未传递!", null);
+        }
+        //任务详情信息
+        QueryWrapper<HgxfxDTO> wrapper = new QueryWrapper<HgxfxDTO>();
+        wrapper.eq("bsm", bsm);
+        HgxfxDTO entity = hgxfxMapper.selectOne(wrapper);
+        if (entity == null) {
+            return RequestResult.error("检查任务不存在!", null);
+        }
+        List retl = hgxfxJgService.GetHgxfxFxjg(bsm, "0", 0);
+        return RequestResult.success("查询成功", retl);
+    }
+
 
     @Override
     public RequestResult GetScxList(String param) {
@@ -61,8 +88,7 @@ public class HgxfxServiceImpl implements IHgxfxService {
         if (StringUtils.isEmpty(hgxfxDTO.getScxList())) {
             return RequestResult.error("分析因子为空");
         }
-        //TODO 时间未添加
-//        hgxfxDTO.setCjsj(DatetimeU);
+        hgxfxDTO.setCjsj(new Date());
         hgxfxDTO.setBsm(StringUtils.getUUID());
         //合规性分析项目
         hgxfxMapper.insert(hgxfxDTO);
@@ -77,80 +103,11 @@ public class HgxfxServiceImpl implements IHgxfxService {
             scxRw.setBsm(StringUtils.getUUID());
             hgxfxScxRwMapper.insert(scxRw);
         }
-        hgxfxHandle(hgxfxDTO.getBsm());
-        return RequestResult.success(hgxfxDTO.getBsm());
-    }
-
-    public void hgxfxHandle(String bsm) {
         String ewkt = "SRID=4525;MULTIPOLYGON(((37342998.802186266 2026355.2598068258,37342865.92545163 2026357.1014534528,37342817.87560371 2026357.767365824,37342802.97989663 2026372.974932678,37342803.898728564 2026506.9421275943,37342819.00023294 2026521.733922014,37342900.08195203 2026520.6101232516,37342911.12435312 2026520.139866627,37342921.978652984 2026519.0511605758,37342932.75255981 2026517.3415217374,37342943.41078094 2026515.0165252725,37342953.9178506 2026512.0838249521,37342964.23945906 2026508.5530478982,37342974.34150494 2026504.4360855871,37342984.190657474 2026499.7461450424,37342993.75455573 2026494.4988803158,37343003.123444214 2026488.6354845203,37343042.17791849 2026462.6041323764,37343046.33985531 2026441.8032885736,37343039.5553245 2026431.6244374511,37343033.89487493 2026422.4690548987,37343028.79298549 2026412.7975274948,37343024.36349438 2026402.800136831,37343020.62692146 2026392.523455117,37343017.60047662 2026382.0158757505,37343014.53736561 2026367.7884403756,37342998.802186266 2026355.2598068258)),((37342684.474113196 2026681.7678619213,37342697.86007041 2026684.1221921882,37342780.41605009 2026697.5276640216,37342785.17736046 2026693.44891586,37342784.243153 2026557.2187332094,37342769.141550235 2026542.4269937698,37342683.52653461 2026543.613566511,37342684.474113196 2026681.7678619213)))";
-        QueryWrapper<HgxfxDTO> hgxfxWrapper = new QueryWrapper<HgxfxDTO>();
-        hgxfxWrapper.eq("bsm", bsm);
-        HgxfxDTO hgxfxDTO = hgxfxMapper.selectOne(hgxfxWrapper);
-        if (StringUtils.isNull(hgxfxDTO)) {
-            return;
-        }
-        //更新任务开始时间
-//        hgxfxDTO.setRwkssj(new Date());
-//        hgxfxMapper.updateById(hgxfxDTO);
-
-        //查询审查项
-        QueryWrapper<HgxfxScxRwDTO> scxRwWrapper = new QueryWrapper<HgxfxScxRwDTO>();
-        scxRwWrapper.eq("rwbsm", bsm);
-        List<HgxfxScxRwDTO> scxRwDTOList = hgxfxScxRwMapper.selectList(scxRwWrapper);
-        if (scxRwDTOList.size() > 0) {
-            //查询审查项对应的数据库表
-            for (HgxfxScxRwDTO scxRwDTO : scxRwDTOList) {
-
-                FxrwrzDTO fxrwrzDTO = new FxrwrzDTO();
-                fxrwrzDTO.setBsm(scxRwDTO.getBsm());
-                fxrwrzDTO.setRwbsm(scxRwDTO.getRwbsm());
-                fxrwrzDTO.setRzsj(new Date());
-
-                QueryWrapper<HgxfxScxTableDTO> scxTableWrapper = new QueryWrapper<HgxfxScxTableDTO>();
-                scxTableWrapper.eq("bsm", scxRwDTO.getScxbsm());
-                scxTableWrapper.orderByDesc("xssx");
-                List<HgxfxScxTableDTO> hgxfxScxTableDTOList = hgxfxScxTableMapper.selectList(scxTableWrapper);
-                if (hgxfxScxTableDTOList.size() > 0) {
-                    for (HgxfxScxTableDTO scxTable : hgxfxScxTableDTOList) {
-                        fxrwrzDTO.setRzlx("info");
-                        fxrwrzDTO.setRwlx(scxTable.getYsmc());
-                        fxrwrzDTO.setRzlr(scxTable.getYsmc() + "完成");
-                        String v_sjy = scxTable.getSjy();
-                        Integer v_srid = scxTable.getSrid();
-                        Integer v_rwsrid = scxTable.getRwsrid();
-                        RequestResult result = analyseService.intersectsTableWkt(v_sjy, v_srid, null, ewkt, v_rwsrid);
-                        int resultCode = (int) result.get("statuscode");
-                        if (resultCode == 200) {
-                            System.out.println("************");
-                            Object resultData = result.get("data");
-                            if (StringUtils.isNotNull(resultData)) {
-                                List<String> resultList = (List<String>) resultData;
-                                for (Object gg : resultList) {
-                                    System.out.println(gg.toString());
-                                }
-                                if (resultList.size() > 0) {
-                                    String v_tjzd = scxTable.getTjzd();
-                                    List<String> outputColumn = Arrays.asList(v_tjzd.split(","));
-                                    RequestResult result2 = analyseService.intersectionTableWkt(v_sjy, v_srid, resultList, ewkt, v_rwsrid, outputColumn);
-                                    System.out.println(result2);
-                                }
-                            }
-
-
-                        }
-
-                    }
-                }
-                fxrwrzMapper.insert(fxrwrzDTO);
-            }
-        }
-
-        //更新任务截止时间
-//        hgxfxDTO.setRwjssj(new Date());
-//        hgxfxMapper.updateById(hgxfxDTO);
+        hxfxHandleService.hgxfxHandle(hgxfxDTO.getBsm(), ewkt);
+        return RequestResult.success(hgxfxDTO.getBsm());
     }
 
-
     @Override
     public RequestResult GetLog(String bsm) {
         if (StringUtils.isEmpty(bsm)) {
@@ -175,48 +132,6 @@ public class HgxfxServiceImpl implements IHgxfxService {
     }
 
 
-//
-//    @Override
-//    public RequestResult GetFxjg(String bsm) {
-//        if (StringUtils.isEmpty(bsm)) {
-//            return RequestResult.error("标识码未传递!", null);
-//        }
-//        //任务详情信息
-//        QueryWrapper<HgxfxDTO> wrapper = new QueryWrapper<HgxfxDTO>();
-//        wrapper.eq("bsm", bsm);
-//        HgxfxDTO entity = hgxfxEntityMapper.selectOne(wrapper);
-//        if (entity == null) {
-//            return RequestResult.error("检查任务不存在!", null);
-//        }
-//        //分析审查项相关信息
-//        List<HgxfxJcxsDTO> jcxs = hgxfxMapper.getJcxs(bsm);
-//        if (jcxs != null && jcxs.size() > 0) {
-//            for (HgxfxJcxsDTO jcx : jcxs) {
-//                QueryWrapper<HgxfxGisDTO> query = new QueryWrapper<HgxfxGisDTO>();
-//                query.eq("scxbsm", jcx.getBsm()).orderByDesc("yzmj");
-//                List<HgxfxGisDTO> gis = hgxfxGisMapper.selectList(query);
-//                if (gis != null && gis.size() > 0) {
-//                    jcx.setJgs(gis);
-//                }
-//            }
-//        } else {
-//            jcxs = new ArrayList<>();
-//        }
-//        //现状数据组织
-//        //现状审查项是否为空
-//        QueryWrapper<HgxfxScxDTO> scx = new QueryWrapper();
-//        scx.eq("kzxjb", 0);
-//        HgxfxScxDTO xzscx = hgxfxMapper.selectOne(scx);
-//        List<HgxfxFxtbDTO> fxtb = new ArrayList<>();
-//        if (xzscx != null) {
-//            fxtb = hgxfxMapper.getFxtb(bsm);
-//        }
-//        Map<String, Object> result = new HashMap<>();
-//        result.put("task", entity);//任务相关信息
-//        result.put("jcxs", jcxs);//检查项集合
-//        result.put("fxtb", fxtb);//分析结果图斑信息
-//        return RequestResult.success("查询成功", result);
-//    }
 //
 //    @Override
 //    public RequestResult DeleteFxjg(String bsm) {

+ 233 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/fzss/hgxfxjg/HgxfxHandleService.java

@@ -0,0 +1,233 @@
+package com.onemap.apply.service.impl.fzss.hgxfxjg;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.onemap.apply.domain.config.fzss.*;
+import com.onemap.apply.mapper.fzss.*;
+import com.onemap.common.core.utils.StringUtils;
+import com.onemap.common.core.web.domain.RequestResult;
+import com.onemap.system.api.AnalyseService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+
+@Service
+public class HgxfxHandleService {
+    @Autowired
+    private HgxfxMapper hgxfxMapper;
+    @Autowired
+    private HgxfxScxMapper hgxfxScxMapper;
+    @Autowired
+    private HgxfxScxRwMapper hgxfxScxRwMapper;
+    @Autowired
+    private HgxfxRwJgTempMapper hgxfxRwJgTempMapper;
+    @Autowired
+    private HgxfxRwJgMapper hgxfxRwJgMapper;
+    @Autowired
+    private HgxfxScxTableMapper hgxfxScxTableMapper;
+    @Autowired
+    private HgxfxScxSortationMapper hgxfxScxSortationMapper;
+    @Autowired
+    private AnalyseService analyseService;
+
+    public void hgxfxHandle(String bsm, String ewkt) {
+        QueryWrapper<HgxfxDTO> hgxfxWrapper = new QueryWrapper<HgxfxDTO>();
+        hgxfxWrapper.eq("bsm", bsm);
+        HgxfxDTO hgxfxDTO = hgxfxMapper.selectOne(hgxfxWrapper);
+        if (StringUtils.isNull(hgxfxDTO)) {
+            return;
+        }
+
+        //更新开始时间
+        QueryWrapper<HgxfxDTO> v1_update = new QueryWrapper<HgxfxDTO>();
+        v1_update.eq("bsm", bsm);
+        hgxfxDTO.setRwkssj(new Date());
+
+        getHgxfxScx(bsm, ewkt, "0");
+
+        //更新结束时间
+        hgxfxDTO.setRwjssj(new Date());
+        hgxfxMapper.update(hgxfxDTO, v1_update);
+    }
+
+
+    private void getHgxfxScx(String rwbsm, String ewkt, String scxPBsm) {
+        if (StringUtils.isEmpty(scxPBsm)) {
+            scxPBsm = "0";
+        }
+        List<HgxfxScxRwDTO> scxRwDTOList = hgxfxScxRwMapper.selectScxRwInfo(rwbsm, scxPBsm);
+        for (HgxfxScxRwDTO v01_scx : scxRwDTOList) {
+            String bsm = v01_scx.getBsm();
+            String scxbsm = v01_scx.getScxbsm();
+            // 任务开始时间
+            Date kssj = new Date();
+            QueryWrapper<HgxfxScxTableDTO> v1_select = new QueryWrapper<HgxfxScxTableDTO>();
+            v1_select.eq("bsm", v01_scx.getScxbsm());
+            List<HgxfxScxTableDTO> data_table_list = hgxfxScxTableMapper.selectList(v1_select);
+            for (HgxfxScxTableDTO v_dataTable : data_table_list) {
+                List<String> idsList = getHgxfxScxJgIntersects(bsm, rwbsm, scxbsm, ewkt, v_dataTable);
+                List<Map> dataList = getHgxfxScxJgIntersection(bsm, rwbsm, scxbsm, ewkt, idsList, v_dataTable);
+                insertHgxfxScxJgIntersection(bsm, rwbsm, scxbsm, dataList, v_dataTable);
+            }
+            getHgxfxScx(rwbsm, ewkt, v01_scx.getScxbsm());
+            // 任务开始时间
+            Date jssj = new Date();
+            //添加记录
+        }
+    }
+
+    private List<String> getHgxfxScxJgIntersects(String bsm, String rwbsm, String scxbsm, String ewkt, HgxfxScxTableDTO dataTable) {
+        String v_sjy = dataTable.getSjy();
+        Integer v_sjy_srid = dataTable.getSjySrid();
+        Integer v_analyse_srid = dataTable.getAnalyseSrid();
+        RequestResult result = analyseService.intersectsTableWkt(v_sjy, v_sjy_srid, null, ewkt, v_analyse_srid);
+        Integer statuscode = (Integer) result.get("statuscode");
+        if (statuscode == 200) {
+            Object resultDataObject = result.get("data");
+            if (StringUtils.isNotNull(resultDataObject)) {
+                List<String> idsList = (List<String>) resultDataObject;
+                return idsList;
+            }
+        }
+        return null;
+    }
+
+    private List<Map> getHgxfxScxJgIntersection(String bsm, String rwbsm, String scxbsm, String ewkt, List<String> idsList, HgxfxScxTableDTO dataTable) {
+        if (StringUtils.isNotEmpty(idsList)) {
+            String v_sjy = dataTable.getSjy();
+            Integer v_sjy_srid = dataTable.getSjySrid();
+            Integer v_analyse_srid = dataTable.getAnalyseSrid();
+            List<String> outputColumn = null;
+            if (StringUtils.isNotEmpty(dataTable.getAnalyseTjzd())) {
+                outputColumn = Arrays.asList(dataTable.getAnalyseTjzd().split(","));
+            }
+            RequestResult result = analyseService.intersectionTableWkt(v_sjy, v_sjy_srid, idsList, ewkt, v_analyse_srid, outputColumn);
+            Integer statuscode = (Integer) result.get("statuscode");
+            if (statuscode == 200) {
+                Object resultDataObject = result.get("data");
+                if (StringUtils.isNotNull(resultDataObject)) {
+                    List<Map> resultList = (List<Map>) resultDataObject;
+                    return resultList;
+                }
+            }
+        }
+        return null;
+    }
+
+    private void insertHgxfxScxJgIntersection(String bsm, String rwbsm, String scxbsm, List<Map> dataList, HgxfxScxTableDTO dataTable) {
+        if (StringUtils.isNotEmpty(dataList)) {
+            List<String> outputColumn = new ArrayList<>();
+            if (StringUtils.isNotEmpty(dataTable.getAnalyseTjzd())) {
+                outputColumn = Arrays.asList(dataTable.getAnalyseTjzd().split(","));
+            }
+            for (Map<String, Object> v_data : dataList) {
+                HgxfxRwJgDTO dtoRk = new HgxfxRwJgDTO();
+                dtoRk.setBsm(bsm);
+                dtoRk.setRwbsm(rwbsm);
+                dtoRk.setScxbsm(scxbsm);
+                dtoRk.setYslx(outputColumn.size() > 0 ? v_data.get(outputColumn.get(0).toString()).toString() : null);
+                dtoRk.setYslxmc(outputColumn.size() > 1 ? v_data.get(outputColumn.get(1).toString()).toString() : null);
+                dtoRk.setMj(Double.parseDouble(v_data.get("geom_area").toString()));
+                dtoRk.setGeom(v_data.get("geom").toString());
+                hgxfxRwJgMapper.insert(dtoRk);
+            }
+        }
+    }
+
+//    public void hgxfxHandle(String bsm, String ewkt) {
+//        //String ewkt = "SRID=4525;MULTIPOLYGON(((37342998.802186266 2026355.2598068258,37342865.92545163 2026357.1014534528,37342817.87560371 2026357.767365824,37342802.97989663 2026372.974932678,37342803.898728564 2026506.9421275943,37342819.00023294 2026521.733922014,37342900.08195203 2026520.6101232516,37342911.12435312 2026520.139866627,37342921.978652984 2026519.0511605758,37342932.75255981 2026517.3415217374,37342943.41078094 2026515.0165252725,37342953.9178506 2026512.0838249521,37342964.23945906 2026508.5530478982,37342974.34150494 2026504.4360855871,37342984.190657474 2026499.7461450424,37342993.75455573 2026494.4988803158,37343003.123444214 2026488.6354845203,37343042.17791849 2026462.6041323764,37343046.33985531 2026441.8032885736,37343039.5553245 2026431.6244374511,37343033.89487493 2026422.4690548987,37343028.79298549 2026412.7975274948,37343024.36349438 2026402.800136831,37343020.62692146 2026392.523455117,37343017.60047662 2026382.0158757505,37343014.53736561 2026367.7884403756,37342998.802186266 2026355.2598068258)),((37342684.474113196 2026681.7678619213,37342697.86007041 2026684.1221921882,37342780.41605009 2026697.5276640216,37342785.17736046 2026693.44891586,37342784.243153 2026557.2187332094,37342769.141550235 2026542.4269937698,37342683.52653461 2026543.613566511,37342684.474113196 2026681.7678619213)))";
+//        QueryWrapper<HgxfxDTO> hgxfxWrapper = new QueryWrapper<HgxfxDTO>();
+//        hgxfxWrapper.eq("bsm", bsm);
+//        HgxfxDTO hgxfxDTO = hgxfxMapper.selectOne(hgxfxWrapper);
+//        if (StringUtils.isNull(hgxfxDTO)) {
+//            return;
+//        }
+//
+//        //更新开始时间
+//        QueryWrapper<HgxfxDTO> v1_update = new QueryWrapper<HgxfxDTO>();
+//        v1_update.eq("bsm", bsm);
+//        hgxfxDTO.setRwkssj(new Date());
+//        hgxfxMapper.update(hgxfxDTO, v1_update);
+//
+//
+//        //查询审查项
+//        QueryWrapper<HgxfxScxRwDTO> scxRwWrapper = new QueryWrapper<HgxfxScxRwDTO>();
+//        scxRwWrapper.eq("rwbsm", bsm);
+//        List<HgxfxScxRwDTO> scxRwDTOList = hgxfxScxRwMapper.selectList(scxRwWrapper);
+//        if (scxRwDTOList.size() > 0) {
+//            //查询审查项对应的数据库表
+//            for (HgxfxScxRwDTO scxRwDTO : scxRwDTOList) {
+//
+//                FxrwrzDTO fxrwrzDTO = new FxrwrzDTO();
+//                fxrwrzDTO.setBsm(scxRwDTO.getBsm());
+//                fxrwrzDTO.setRwbsm(scxRwDTO.getRwbsm());
+//                fxrwrzDTO.setRzsj(new Date());
+//
+//                QueryWrapper<HgxfxScxTableDTO> scxTableWrapper = new QueryWrapper<HgxfxScxTableDTO>();
+//                scxTableWrapper.eq("bsm", scxRwDTO.getScxbsm());
+//                scxTableWrapper.orderByDesc("xssx");
+//                List<HgxfxScxTableDTO> hgxfxScxTableDTOList = hgxfxScxTableMapper.selectList(scxTableWrapper);
+//                if (hgxfxScxTableDTOList.size() > 0) {
+//                    for (HgxfxScxTableDTO scxTable : hgxfxScxTableDTOList) {
+//                        fxrwrzDTO.setRzlx("info");
+//                        fxrwrzDTO.setRwlx(scxTable.getYsmc());
+//                        fxrwrzDTO.setRzlr(scxTable.getYsmc() + "完成");
+//                        String v_sjy = scxTable.getSjy();
+//                        Integer v_srid = scxTable.getSrid();
+//                        Integer v_rwsrid = scxTable.getRwsrid();
+//                        RequestResult result = analyseService.intersectsTableWkt(v_sjy, v_srid, null, ewkt, v_rwsrid);
+//                        int resultCode = (int) result.get("statuscode");
+//                        if (resultCode == 200) {
+//                            System.out.println("************");
+//                            Object resultData = result.get("data");
+//                            if (StringUtils.isNotNull(resultData)) {
+//                                List<String> resultList = (List<String>) resultData;
+//                                for (Object gg : resultList) {
+//                                    System.out.println(gg.toString());
+//                                }
+//                                if (resultList.size() > 0) {
+//                                    String v_tjzd = scxTable.getTjzd();
+//                                    List<String> outputColumn = Arrays.asList(v_tjzd.split(","));
+//                                    RequestResult result2 = analyseService.intersectionTableWkt(v_sjy, v_srid, resultList, ewkt, v_rwsrid, outputColumn);
+//                                    int resultCode2 = (int) result2.get("statuscode");
+//                                    if (resultCode2 == 200) {
+//                                        System.out.println("************");
+//                                        Object resultData2 = result2.get("data");
+//                                        if (StringUtils.isNotNull(resultData2)) {
+//                                            List<Map> resultList2 = (List<Map>) resultData2;
+//                                            for (Map gg2 : resultList2) {
+//                                                HgxfxRwJgTempDTO dtoRk = new HgxfxRwJgTempDTO();
+//                                                dtoRk.setBsm(scxRwDTO.getBsm());
+//                                                dtoRk.setRwbsm(scxRwDTO.getRwbsm());
+//                                                dtoRk.setScxbsm(scxRwDTO.getScxbsm());
+//                                                dtoRk.setYslx(gg2.get("dlbm").toString());
+//                                                dtoRk.setYslxmc(gg2.get("dlmc").toString());
+//                                                dtoRk.setMj(Double.parseDouble(gg2.get("geom_area").toString()));
+//                                                dtoRk.setGeom(gg2.get("geom").toString());
+//                                                hgxfxRwJgTempMapper.insert(dtoRk);
+//                                                System.out.println(gg2.toString());
+//                                            }
+//                                        }
+//                                    }
+//                                    System.out.println(result2);
+//                                }
+//                            }
+//
+//                        }
+//
+//                    }
+//                }
+////                List<HgxfxRwJgDTO> listHgxfxRwJgDTO= hgxfxRwJgTempMapper.groupByYslx(scxRwDTO.getBsm(), scxRwDTO.getRwbsm(), scxRwDTO.getScxbsm());
+////                for(HgxfxRwJgDTO kk:listHgxfxRwJgDTO){
+////                    hgxfxRwJgMapper.insert(kk);
+////                }
+////                fxrwrzMapper.insert(fxrwrzDTO);
+//            }
+//        }
+//
+//        //更新任务截止时间
+////        hgxfxDTO.setRwjssj(new Date());
+////        hgxfxMapper.updateById(hgxfxDTO);
+//    }
+
+}

+ 91 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/fzss/hgxfxjg/HgxfxJgService.java

@@ -0,0 +1,91 @@
+package com.onemap.apply.service.impl.fzss.hgxfxjg;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.onemap.apply.domain.config.fzss.HgxfxRwJgDTO;
+import com.onemap.apply.domain.config.fzss.HgxfxScxRwDTO;
+import com.onemap.apply.domain.config.fzss.HgxfxScxSortationDTO;
+import com.onemap.apply.mapper.fzss.*;
+import com.onemap.common.core.utils.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class HgxfxJgService {
+
+    @Autowired
+    private HgxfxScxMapper hgxfxScxMapper;
+    @Autowired
+    private HgxfxScxRwMapper hgxfxScxRwMapper;
+    @Autowired
+    private HgxfxRwJgTempMapper hgxfxRwJgTempMapper;
+    @Autowired
+    private HgxfxRwJgMapper hgxfxRwJgMapper;
+    @Autowired
+    private HgxfxScxTableMapper hgxfxScxTableMapper;
+    @Autowired
+    private HgxfxScxSortationMapper hgxfxScxSortationMapper;
+
+    public List<Map> GetHgxfxFxjg(String rwbsm, String scxPBsm, Integer template) {
+        if (StringUtils.isEmpty(scxPBsm)) {
+            scxPBsm = "0";
+        }
+        List<Map> retli = new ArrayList<>();
+        List<HgxfxScxRwDTO> scxList = hgxfxScxRwMapper.selectScxRwInfo(rwbsm, scxPBsm);
+        if (scxList != null && scxList.size() > 0) {
+            for (HgxfxScxRwDTO v00_scx : scxList) {
+                Map v001_sortation = GetHgxfxScxFxjg(v00_scx.getBsm(), v00_scx.getRwbsm(), v00_scx.getScxbsm(), v00_scx.getScxname(), null, template, null);
+                List<Map> child = GetHgxfxFxjg(rwbsm, v00_scx.getScxbsm(), template);
+                v001_sortation.put("child", child);
+                retli.add(v001_sortation);
+            }
+        }
+        return retli;
+    }
+
+    private Map<String, Object> GetHgxfxScxFxjg(String bsm, String rwbsm, String scxbsm, String scxname, String scxSortationPid, Integer template, String yslx) {
+        Map<String, Object> retMap = new HashMap<>();
+        retMap.put("bsm", bsm);
+        retMap.put("rwbsm", rwbsm);
+        retMap.put("scxbsm", scxbsm);
+        retMap.put("scxname", scxname);
+        if (StringUtils.isEmpty(scxSortationPid)) {
+            scxSortationPid = "0";
+        }
+        HgxfxRwJgDTO dtao = hgxfxRwJgMapper.selectTypeNo(bsm, rwbsm, scxbsm, yslx);
+        if (dtao != null) {
+            retMap.put("mj", dtao.getMj());
+        }
+        HgxfxScxSortationDTO v001_sortation = getHgxfxScxSortation(scxbsm, scxSortationPid, template);
+        if (StringUtils.isNotNull(v001_sortation)) {
+            List<Map> v_list = hgxfxRwJgMapper.selectType(bsm, rwbsm, scxbsm, v001_sortation.getTypeColumn(), v001_sortation.getTypeLength(), v001_sortation.getTypeDict(), yslx);
+            if (v_list != null && v_list.size() > 0) {
+                for (Map v02_datas : v_list) {
+                    Map<String, Object> childMap = GetHgxfxScxFxjg(bsm, rwbsm, scxbsm, scxname, v001_sortation.getId(), template, v02_datas.get("yslx").toString());
+                    v02_datas.put("dataList", childMap.get("dataList"));
+                }
+            }
+            retMap.put("dataList", v_list);
+        } else {
+            retMap.put("data", dtao);
+        }
+        return retMap;
+    }
+
+
+    private HgxfxScxSortationDTO getHgxfxScxSortation(String scxBsm, String scxSortationPid, Integer template) {
+        if (StringUtils.isEmpty(scxSortationPid)) {
+            scxSortationPid = "0";
+        }
+        QueryWrapper<HgxfxScxSortationDTO> v01_Wrapper = new QueryWrapper<HgxfxScxSortationDTO>();
+        v01_Wrapper.eq("bsm", scxBsm);
+        v01_Wrapper.eq("pid", scxSortationPid);
+        v01_Wrapper.eq("template", template);
+        return hgxfxScxSortationMapper.selectOne(v01_Wrapper);
+    }
+
+}

+ 52 - 0
onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/fzss/HgxfxRwJgMapper.xml

@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.fzss.HgxfxRwJgMapper">
+
+    <insert id="insert">
+        insert into t_fzss_hgxfx_rw_jg(bsm, rwbsm, scxbsm, yslx, yslxmc, mj, geom)
+        values (#{bsm}, #{rwbsm}, #{scxbsm}, #{yslx}, #{yslxmc}, #{mj},
+                public.st_transform(public.st_geomfromewkt(#{geom}), 4326))
+    </insert>
+
+
+    <select id="selectTypeNo" resultType="com.onemap.apply.domain.config.fzss.HgxfxRwJgDTO">
+        select  v0.bsm,v0.rwbsm,v0.scxbsm,sum(v0.mj::numeric) mj,
+        public.st_asewkt(public.st_union(v0.geom)) geom
+        from t_fzss_hgxfx_rw_jg v0
+        where bsm = #{bsm}
+        and rwbsm = #{rwbsm}
+        and scxbsm = #{scxbsm}
+        <if test="yslx != null and yslx != ''">
+            and yslx like concat(#{yslx},'%')
+        </if>
+        group by bsm,rwbsm,scxbsm
+    </select>
+
+    <select id="selectType" resultType="map">
+        select
+        <if test="type_dict != null and type_dict != ''">
+            v2.mc yslx_name,
+        </if>
+        v1.type_column as "${type_column}",v1.bsm,v1.rwbsm,v1.scxbsm,v1.mj,
+        public.st_asewkt(ret_geom) geom
+        from(
+        select v0.type_column,min(v0.bsm) bsm,min(v0.rwbsm) rwbsm,min(v0.scxbsm) scxbsm,
+        sum(mj::numeric) mj,
+        public.st_union(v0.geom) ret_geom
+        from (
+        select v.*,substring("${type_column}",1,#{type_length}) type_column from t_fzss_hgxfx_rw_jg v
+        where bsm = #{bsm} and rwbsm = #{rwbsm} and scxbsm = #{scxbsm}
+        <if test="yslx != null and yslx != ''">
+            and yslx like concat(#{yslx},'%')
+        </if>
+        )v0
+        group by type_column
+        )v1
+        <if test="type_dict != null and type_dict != ''">
+            left join t_fzss_fzxz_dict v2 on v2.dm=v1.type_column and v2.fzbs = #{type_dict}
+        </if>
+    </select>
+
+</mapper> 

+ 22 - 0
onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/fzss/HgxfxScxRwMapper.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.fzss.HgxfxScxRwMapper">
+
+    <select id="selectScxRwInfo" resultType="com.onemap.apply.domain.config.fzss.HgxfxScxRwDTO">
+        select t.*,t1.bsmmc scxname
+        from t_fzss_hgxfx_scx_rw t
+        left join t_fzss_hgxfx_scx t1 on t1.bsm = t.scxbsm
+        where t.rwbsm = #{rwbsm} and t1.bsm is not null
+        <choose>
+            <when test="scxPBsm != null and scxPBsm != ''">
+                and t1.pbsm = #{scxPBsm}
+            </when>
+            <otherwise>
+                and t1.pbsm = '0'
+            </otherwise>
+        </choose>
+    </select>
+
+</mapper>