Sfoglia il codice sorgente

合规性分析报告

LAPTOP-BJJ3IV5R\SIWEI 8 mesi fa
parent
commit
cb872fc702

+ 6 - 0
onemap-api/onemap-api-system/src/main/java/com/onemap/system/api/AnalyseService.java

@@ -7,6 +7,9 @@ import com.onemap.system.api.factory.AnalyseFallbackFactory;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * 分析服务
  */
@@ -30,4 +33,7 @@ public interface AnalyseService {
 
     @PostMapping("/table/date/raw_table_length")
     public RequestResult rawTableLength(@RequestBody RawTableLengthVo rawTableLengthVo);
+
+    @PostMapping("/hgxfx/generate/docx")
+    public RequestResult hgxfxGenerateDocx(@RequestBody HgxfxReportVo hgxfxReportVo);
 }

+ 71 - 0
onemap-api/onemap-api-system/src/main/java/com/onemap/system/api/domain/HgxfxReportVo.java

@@ -0,0 +1,71 @@
+package com.onemap.system.api.domain;
+
+import java.util.List;
+import java.util.Map;
+
+public class HgxfxReportVo {
+    private List<Map> jgList;
+    private String bsm;
+    private String ewkt;
+    private String xmmc;
+    private String xmlx;
+    private Double fxmj;
+    private String jsdw;
+
+    public List<Map> getJgList() {
+        return jgList;
+    }
+
+    public void setJgList(List<Map> jgList) {
+        this.jgList = jgList;
+    }
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+
+    public String getEwkt() {
+        return ewkt;
+    }
+
+    public void setEwkt(String ewkt) {
+        this.ewkt = ewkt;
+    }
+
+    public String getXmmc() {
+        return xmmc;
+    }
+
+    public void setXmmc(String xmmc) {
+        this.xmmc = xmmc;
+    }
+
+    public String getXmlx() {
+        return xmlx;
+    }
+
+    public void setXmlx(String xmlx) {
+        this.xmlx = xmlx;
+    }
+
+    public Double getFxmj() {
+        return fxmj;
+    }
+
+    public void setFxmj(Double fxmj) {
+        this.fxmj = fxmj;
+    }
+
+    public String getJsdw() {
+        return jsdw;
+    }
+
+    public void setJsdw(String jsdw) {
+        this.jsdw = jsdw;
+    }
+}

+ 8 - 0
onemap-api/onemap-api-system/src/main/java/com/onemap/system/api/factory/AnalyseFallbackFactory.java

@@ -9,6 +9,9 @@ import org.springframework.cloud.openfeign.FallbackFactory;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.RequestBody;
 
+import java.util.List;
+import java.util.Map;
+
 @Component
 public class AnalyseFallbackFactory implements FallbackFactory<AnalyseService> {
     private static final Logger log = LoggerFactory.getLogger(AnalyseFallbackFactory.class);
@@ -46,6 +49,11 @@ public class AnalyseFallbackFactory implements FallbackFactory<AnalyseService> {
             public RequestResult rawTableLength(@RequestBody RawTableLengthVo rawTableLengthVo) {
                 return RequestResult.error("内部错误");
             }
+
+            @Override
+            public RequestResult hgxfxGenerateDocx(@RequestBody HgxfxReportVo hgxfxReportVo) {
+                return RequestResult.error("内部错误");
+            }
         };
     }
 }

+ 27 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/controller/HfxfxController.java

@@ -0,0 +1,27 @@
+package com.onemap.analyse.controller;
+
+
+import com.onemap.analyse.domain.vo.HgxfxReportVo;
+import com.onemap.analyse.service.HgxfxJgReportService;
+import com.onemap.common.core.web.controller.BaseController;
+import com.onemap.common.core.web.domain.RequestResult;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/hgxfx")
+public class HfxfxController extends BaseController {
+
+    @Autowired
+    private HgxfxJgReportService hgxfxJgReportService;
+    @PostMapping("/generate/docx")
+    public RequestResult hgxfxGenerateDocx(@RequestBody HgxfxReportVo hgxfxReportVo) throws IOException {
+        System.out.println("调用。。。。。。。。");
+        hgxfxJgReportService.hgxfxGenerateDocx(hgxfxReportVo);
+        return RequestResult.success(0);
+    }
+}

+ 71 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/vo/HgxfxReportVo.java

@@ -0,0 +1,71 @@
+package com.onemap.analyse.domain.vo;
+
+import java.util.List;
+import java.util.Map;
+
+public class HgxfxReportVo {
+    private List<Map> jgList;
+    private String bsm;
+    private String ewkt;
+    private String xmmc;
+    private String xmlx;
+    private Double fxmj;
+    private String jsdw;
+
+    public List<Map> getJgList() {
+        return jgList;
+    }
+
+    public void setJgList(List<Map> jgList) {
+        this.jgList = jgList;
+    }
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+
+    public String getEwkt() {
+        return ewkt;
+    }
+
+    public void setEwkt(String ewkt) {
+        this.ewkt = ewkt;
+    }
+
+    public String getXmmc() {
+        return xmmc;
+    }
+
+    public void setXmmc(String xmmc) {
+        this.xmmc = xmmc;
+    }
+
+    public String getXmlx() {
+        return xmlx;
+    }
+
+    public void setXmlx(String xmlx) {
+        this.xmlx = xmlx;
+    }
+
+    public Double getFxmj() {
+        return fxmj;
+    }
+
+    public void setFxmj(Double fxmj) {
+        this.fxmj = fxmj;
+    }
+
+    public String getJsdw() {
+        return jsdw;
+    }
+
+    public void setJsdw(String jsdw) {
+        this.jsdw = jsdw;
+    }
+}

+ 11 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/HgxfxJgReportService.java

@@ -0,0 +1,11 @@
+package com.onemap.analyse.service;
+
+import com.onemap.analyse.domain.vo.HgxfxReportVo;
+
+import java.util.List;
+import java.util.Map;
+
+public interface HgxfxJgReportService {
+
+    public void hgxfxGenerateDocx(HgxfxReportVo hgxfxReportVo);
+}

File diff suppressed because it is too large
+ 52 - 28
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/impl/HgxfxJgReportServiceImpl.java


+ 2 - 1
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/fzss/HgxfxServiceImpl.java

@@ -11,6 +11,7 @@ import com.onemap.common.core.utils.StringUtils;
 import com.onemap.common.core.web.domain.RequestResult;
 import com.onemap.system.api.AnalyseService;
 import com.onemap.system.api.RemoteAuthService;
+import com.onemap.system.api.domain.HgxfxReportVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -58,7 +59,7 @@ public class HgxfxServiceImpl implements IHgxfxService {
         if (entity == null) {
             return RequestResult.error("检查任务不存在!", null);
         }
-        List retl = hgxfxJgService.GetHgxfxFxjg(bsm, "0", 0);
+        List<Map> retl = hgxfxJgService.GetHgxfxFxjg(bsm, "0", 0);
 //        Map<String, Object> retMap = new HashMap<>();
 //        retMap.put("xmmc", entity.getXmmc());
 //        retMap.put("xmmj", entity.getFxmj());

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

@@ -39,6 +39,8 @@ public class HgxfxHandleService {
     private FxrwrzMapper fxrwrzMapper;
     @Autowired
     private HttpAnalyseService httpAnalyseService;
+    @Autowired
+    private HgxfxJgService hgxfxJgService;
 
     public void hgxfxHandle(String bsm, String ewkt) {
         System.out.println("进入hgxfxHandle.....................");
@@ -61,6 +63,18 @@ public class HgxfxHandleService {
         insertFxrwrz(StringUtils.getUUID(), bsm, hgxfxDTO.getXmmc(), "合规性分析开始。。。");
         getHgxfxScx(bsm, ewkt, "0");
 
+
+        //合规性报告
+        HgxfxReportVo hgxfxReportVo = new HgxfxReportVo();
+        hgxfxReportVo.setBsm(bsm);
+        hgxfxReportVo.setJgList(hgxfxJgService.GetHgxfxFxjg(bsm, "0", 0));
+        hgxfxReportVo.setEwkt(ewkt);
+        hgxfxReportVo.setXmmc(hgxfxDTO.getXmmc());
+        hgxfxReportVo.setXmlx(hgxfxDTO.getXmlx());
+        hgxfxReportVo.setFxmj(hgxfxDTO.getFxmj());
+        hgxfxReportVo.setJsdw(hgxfxDTO.getJsdw());
+        analyseService.hgxfxGenerateDocx(hgxfxReportVo);
+
         //更新结束时间
         insertFxrwrz(StringUtils.getUUID(), bsm, hgxfxDTO.getXmmc(), "合规性分析结束。。。");
         hgxfxDTO.setRwjssj(new Date());

+ 17 - 6
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/table/TableDataSelectServiceImpl.java

@@ -13,6 +13,8 @@ import com.onemap.system.api.domain.*;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.util.*;
 
 @Service
@@ -317,12 +319,21 @@ public class TableDataSelectServiceImpl implements TableDataSelectService {
             }
             Object siweiarea = v_data.get("siweiarea");
             if (StringUtils.isNotNull(siweiarea)) {
-                // 面积
-                TableDataVo tableDataVo = new TableDataVo();
-                tableDataVo.setData(siweiarea);
-                tableDataVo.setFiledZH("面积");
-                tableDataVo.setFiled("siweiarea");
-                v_dataList.add(tableDataVo);
+                boolean show = false;
+                for (TableFiledDTO v_filed_data : filedList) {
+                    String v_filedName = v_filed_data.getFiledName();
+                    if (v_filedName.equals("siweiarea")) {
+                        show = true;
+                    }
+                }
+                if (show) {
+                    // 面积
+                    TableDataVo tableDataVo = new TableDataVo();
+                    tableDataVo.setData(new BigDecimal(String.valueOf(siweiarea)).setScale(2, RoundingMode.HALF_UP).doubleValue());
+                    tableDataVo.setFiledZH("面积");
+                    tableDataVo.setFiled("siweiarea");
+                    v_dataList.add(tableDataVo);
+                }
             }
             retList.add(v_dataList);
         }

Some files were not shown because too many files changed in this diff