Преглед изворни кода

项目策划生成智慧选址前期接口浅对接

wanger пре 1 година
родитељ
комит
d49c10f7ba
23 измењених фајлова са 946 додато и 39 уклоњено
  1. 85 0
      onemap-api/onemap-api-system/src/main/java/com/onemap/system/api/RemoteAnalyseService.java
  2. 9 0
      onemap-api/onemap-api-system/src/main/java/com/onemap/system/api/RemoteFileService.java
  3. 67 0
      onemap-api/onemap-api-system/src/main/java/com/onemap/system/api/domain/FzssChscXmgxDTO.java
  4. 402 0
      onemap-api/onemap-api-system/src/main/java/com/onemap/system/api/domain/FzxzChscDTO.java
  5. 64 0
      onemap-api/onemap-api-system/src/main/java/com/onemap/system/api/factory/RemoteAnalyseFallbackFactory.java
  6. 6 0
      onemap-api/onemap-api-system/src/main/java/com/onemap/system/api/factory/RemoteFileFallbackFactory.java
  7. 1 0
      onemap-api/onemap-api-system/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  8. 5 0
      onemap-common/onemap-common-core/src/main/java/com/onemap/common/core/constant/ServiceNameConstants.java
  9. 4 0
      onemap-common/onemap-common-core/src/main/java/com/onemap/common/core/utils/UnPackageUtils.java
  10. 10 9
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/controller/ChscController.java
  11. 28 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzChscDTO.java
  12. 9 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzDTO.java
  13. 1 1
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/XzlbDTO.java
  14. 3 3
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/IChscService.java
  15. 3 3
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/impl/ChscServiceImpl.java
  16. 55 10
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/ChscSchedule.java
  17. 16 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/FzxzSchedule.java
  18. 38 6
      onemap-modules/onemap-api/src/main/java/com/onemap/api/controller/ZhxzController.java
  19. 18 1
      onemap-modules/onemap-api/src/main/java/com/onemap/api/service/ZhxzService.java
  20. 96 5
      onemap-modules/onemap-api/src/main/java/com/onemap/api/service/impl/ZhxzServiceImpl.java
  21. 6 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/cggl/CgglServiceImpl.java
  22. 1 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/fzss/FzxzServiceImpl.java
  23. 19 1
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/sbjk/XzczghcgsbServiceImpl.java

+ 85 - 0
onemap-api/onemap-api-system/src/main/java/com/onemap/system/api/RemoteAnalyseService.java

@@ -0,0 +1,85 @@
+package com.onemap.system.api;
+
+import com.onemap.common.core.constant.ServiceNameConstants;
+import com.onemap.common.core.domain.R;
+import com.onemap.common.core.web.domain.WebResult;
+import com.onemap.system.api.domain.FzssChscXmgxDTO;
+import com.onemap.system.api.domain.FzxzChscDTO;
+import com.onemap.system.api.factory.RemoteAnalyseFallbackFactory;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * 应用分析服务
+ *
+ * @author onemap
+ */
+@FeignClient(contextId = "RemoteAnalyseService", value = ServiceNameConstants.ANALYSE_SERVICE, fallbackFactory = RemoteAnalyseFallbackFactory.class)
+public interface RemoteAnalyseService {
+    /**
+     * 接口1:安全认证
+     *
+     * @param appid
+     * @param request
+     * @param response
+     * @return
+     */
+    @PostMapping("/chsc/authorize")
+    public R<?> authorize(@RequestParam(value = "appid") String appid, @RequestParam(value = "request") HttpServletRequest request,
+                          @RequestParam(value = "response") HttpServletResponse response);
+
+    /**
+     * 接口3:创建项目选址:根据项目信息,创建选址项目
+     *
+     * @param fzxzChscDTO
+     * @return
+     */
+    @PostMapping("/chsc/create")
+    public WebResult create(FzxzChscDTO fzxzChscDTO);
+
+    /**
+     * 接口4:查询项目选址进度
+     *
+     * @param bsm
+     * @return
+     */
+    @GetMapping("/chsc/getProgress")
+    public WebResult getProgress(@RequestParam("bsm") String bsm);
+
+    /**
+     * 接口5:下载选址报告
+     *
+     * @param bsm
+     * @param response
+     * @return
+     */
+    @GetMapping(value = "/chsc/download", produces = "application/octet-stream")
+    public ResponseEntity<byte[]> download(@RequestParam(value = "bsm") String bsm,
+                                           @RequestParam(value = "response") HttpServletResponse response);
+
+    /**
+     * 接口6:更新项目选址结果:项目策划完成,更新选址审批结果
+     *
+     * @param fzssChscXmgxDTO
+     * @return
+     */
+    @PostMapping(value = "/chsc/xmjg", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+    public WebResult xmjg(FzssChscXmgxDTO fzssChscXmgxDTO);
+
+    /**
+     * 接口7:文本转SHP文件
+     *
+     * @param file
+     * @param response
+     * @return
+     */
+    @PostMapping(value = "/chsc/txt2shp", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+    public ResponseEntity<byte[]> txt2shp(@RequestPart(value = "file") MultipartFile file, @RequestParam(value = "response") HttpServletResponse response);
+
+}

+ 9 - 0
onemap-api/onemap-api-system/src/main/java/com/onemap/system/api/RemoteFileService.java

@@ -1,6 +1,7 @@
 package com.onemap.system.api;
 
 import com.onemap.common.core.domain.UploadZipDTO;
+import com.onemap.common.core.web.domain.RequestResult;
 import com.onemap.system.api.domain.GhtgCl;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.http.MediaType;
@@ -65,4 +66,12 @@ public interface RemoteFileService {
      */
     @RequestMapping("/file/uploadAppendix")
     R<List<SysFile>> uploadAppendix(MultipartFile[] files);
+
+    /**
+     * shp压缩包文件上传****智慧选址
+     *
+     * @param file 文件
+     */
+    @PostMapping(value = "/uploadZhxzZip", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+    public RequestResult uploadZhxzZip(MultipartFile file);
 }

+ 67 - 0
onemap-api/onemap-api-system/src/main/java/com/onemap/system/api/domain/FzssChscXmgxDTO.java

@@ -0,0 +1,67 @@
+package com.onemap.system.api.domain;
+
+public class FzssChscXmgxDTO {
+    private String bsm;//标识码
+    private Integer chzt;//策划状态(1通过 2未通过 3删除)*只有策划状态为1时,才会将项目由储备库转至实施库
+    private String chjg;//策划结果(原因)
+    private String bgfw;//如果范围调整,需要上传最终的shp范围(接口2)
+    private Double bgmj;//变更面积,平方米,两位小数  条件必填 ,变更原因不能为空
+    private String bgyy;//变更原因,如果项目范围变更,变更原因不能为空
+    private String bz;//备注
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public Integer getChzt() {
+        return chzt;
+    }
+
+    public void setChzt(Integer chzt) {
+        this.chzt = chzt;
+    }
+
+    public String getChjg() {
+        return chjg;
+    }
+
+    public void setChjg(String chjg) {
+        this.chjg = chjg;
+    }
+
+    public String getBgfw() {
+        return bgfw;
+    }
+
+    public void setBgfw(String bgfw) {
+        this.bgfw = bgfw;
+    }
+
+    public Double getBgmj() {
+        return bgmj;
+    }
+
+    public void setBgmj(Double bgmj) {
+        this.bgmj = bgmj;
+    }
+
+    public String getBgyy() {
+        return bgyy;
+    }
+
+    public void setBgyy(String bgyy) {
+        this.bgyy = bgyy;
+    }
+
+    public String getBz() {
+        return bz;
+    }
+
+    public void setBz(String bz) {
+        this.bz = bz;
+    }
+}

+ 402 - 0
onemap-api/onemap-api-system/src/main/java/com/onemap/system/api/domain/FzxzChscDTO.java

@@ -0,0 +1,402 @@
+package com.onemap.system.api.domain;
+
+import com.onemap.common.core.utils.StringUtils;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+public class FzxzChscDTO {
+    private String bsm;
+    private Integer xzlb;
+    private String xmbm;
+    private String xmmc;
+    private String xmdm;
+    private Integer fwlx;
+    private String xzfw;
+    private String ydmjks;
+    private String ydmjjs;
+    private Integer jzgd;
+    private String ywlx;
+    private String ntzlx;
+    private String ntznx;
+    private String jsxz;
+    private Integer ztze;
+    private Integer sfylrndys;
+    private String xmjsyj;
+    private String njsdz;
+    private String xzqbm;
+    private String xzqmc;
+    private String jsgmjnr;
+    private Double nydmj;
+    private String ydbpzbwj;
+    private String xmlxrmc;
+    private String sbdw;
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date sbsj;
+    private String lxdh;
+    private String bz;
+    private Integer rwzt;
+    private Integer rwjd;
+    private String rwjg;
+    private String chzt;
+    private String chjg;
+    private String bgfw;
+    private Double bgmj;
+    private String bgyy;
+    private String chbz;
+    private String yxyz;
+    private Date cjsj;
+    //根据易利代码新增三个字段
+    private String cjyh;
+    private String sjy;
+    private String ydlx;
+
+    public String getCjyh() {
+        return cjyh;
+    }
+
+    public void setCjyh(String cjyh) {
+        this.cjyh = cjyh;
+    }
+
+    public String getSjy() {
+        return sjy;
+    }
+
+    public void setSjy(String sjy) {
+        this.sjy = sjy;
+    }
+
+    public String getYdlx() {
+        return ydlx;
+    }
+
+    public void setYdlx(String ydlx) {
+        this.ydlx = ydlx;
+    }
+
+    public Date getCjsj() {
+        return cjsj;
+    }
+
+    public void setCjsj(Date cjsj) {
+        this.cjsj = cjsj;
+    }
+
+    public boolean paramsChecked() {
+        if (StringUtils.isEmpty(xmbm)
+                || StringUtils.isEmpty(xmmc)
+                || StringUtils.isEmpty(xzfw)
+                || StringUtils.isEmpty(ydbpzbwj)
+                || StringUtils.isEmpty(sbdw)
+                || StringUtils.isEmpty(lxdh)
+        ) {
+            return false;
+        }
+        return true;
+    }
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public Integer getXzlb() {
+        return xzlb;
+    }
+
+    public void setXzlb(Integer xzlb) {
+        this.xzlb = xzlb;
+    }
+
+    public String getXmbm() {
+        return xmbm;
+    }
+
+    public void setXmbm(String xmbm) {
+        this.xmbm = xmbm;
+    }
+
+    public String getXmmc() {
+        return xmmc;
+    }
+
+    public void setXmmc(String xmmc) {
+        this.xmmc = xmmc;
+    }
+
+    public String getXmdm() {
+        return xmdm;
+    }
+
+    public void setXmdm(String xmdm) {
+        this.xmdm = xmdm;
+    }
+
+    public Integer getFwlx() {
+        return fwlx;
+    }
+
+    public void setFwlx(Integer fwlx) {
+        this.fwlx = fwlx;
+    }
+
+    public String getXzfw() {
+        return xzfw;
+    }
+
+    public void setXzfw(String xzfw) {
+        this.xzfw = xzfw;
+    }
+
+    public String getYdmjks() {
+        return ydmjks;
+    }
+
+    public void setYdmjks(String ydmjks) {
+        this.ydmjks = ydmjks;
+    }
+
+    public String getYdmjjs() {
+        return ydmjjs;
+    }
+
+    public void setYdmjjs(String ydmjjs) {
+        this.ydmjjs = ydmjjs;
+    }
+
+    public Integer getJzgd() {
+        return jzgd;
+    }
+
+    public void setJzgd(Integer jzgd) {
+        this.jzgd = jzgd;
+    }
+
+    public String getYwlx() {
+        return ywlx;
+    }
+
+    public void setYwlx(String ywlx) {
+        this.ywlx = ywlx;
+    }
+
+    public String getNtzlx() {
+        return ntzlx;
+    }
+
+    public void setNtzlx(String ntzlx) {
+        this.ntzlx = ntzlx;
+    }
+
+    public String getNtznx() {
+        return ntznx;
+    }
+
+    public void setNtznx(String ntznx) {
+        this.ntznx = ntznx;
+    }
+
+    public String getJsxz() {
+        return jsxz;
+    }
+
+    public void setJsxz(String jsxz) {
+        this.jsxz = jsxz;
+    }
+
+    public Integer getZtze() {
+        return ztze;
+    }
+
+    public void setZtze(Integer ztze) {
+        this.ztze = ztze;
+    }
+
+    public Integer getSfylrndys() {
+        return sfylrndys;
+    }
+
+    public void setSfylrndys(Integer sfylrndys) {
+        this.sfylrndys = sfylrndys;
+    }
+
+    public String getXmjsyj() {
+        return xmjsyj;
+    }
+
+    public void setXmjsyj(String xmjsyj) {
+        this.xmjsyj = xmjsyj;
+    }
+
+    public String getNjsdz() {
+        return njsdz;
+    }
+
+    public void setNjsdz(String njsdz) {
+        this.njsdz = njsdz;
+    }
+
+    public String getXzqbm() {
+        return xzqbm;
+    }
+
+    public void setXzqbm(String xzqbm) {
+        this.xzqbm = xzqbm;
+    }
+
+    public String getXzqmc() {
+        return xzqmc;
+    }
+
+    public void setXzqmc(String xzqmc) {
+        this.xzqmc = xzqmc;
+    }
+
+    public String getJsgmjnr() {
+        return jsgmjnr;
+    }
+
+    public void setJsgmjnr(String jsgmjnr) {
+        this.jsgmjnr = jsgmjnr;
+    }
+
+    public Double getNydmj() {
+        return nydmj;
+    }
+
+    public void setNydmj(Double nydmj) {
+        this.nydmj = nydmj;
+    }
+
+    public String getYdbpzbwj() {
+        return ydbpzbwj;
+    }
+
+    public void setYdbpzbwj(String ydbpzbwj) {
+        this.ydbpzbwj = ydbpzbwj;
+    }
+
+    public String getXmlxrmc() {
+        return xmlxrmc;
+    }
+
+    public void setXmlxrmc(String xmlxrmc) {
+        this.xmlxrmc = xmlxrmc;
+    }
+
+    public String getSbdw() {
+        return sbdw;
+    }
+
+    public void setSbdw(String sbdw) {
+        this.sbdw = sbdw;
+    }
+
+    public Date getSbsj() {
+        return sbsj;
+    }
+
+    public void setSbsj(Date sbsj) {
+        this.sbsj = sbsj;
+    }
+
+    public String getLxdh() {
+        return lxdh;
+    }
+
+    public void setLxdh(String lxdh) {
+        this.lxdh = lxdh;
+    }
+
+    public String getBz() {
+        return bz;
+    }
+
+    public void setBz(String bz) {
+        this.bz = bz;
+    }
+
+    public Integer getRwzt() {
+        return rwzt;
+    }
+
+    public void setRwzt(Integer rwzt) {
+        this.rwzt = rwzt;
+    }
+
+    public Integer getRwjd() {
+        return rwjd;
+    }
+
+    public void setRwjd(Integer rwjd) {
+        this.rwjd = rwjd;
+    }
+
+    public String getRwjg() {
+        return rwjg;
+    }
+
+    public void setRwjg(String rwjg) {
+        this.rwjg = rwjg;
+    }
+
+    public String getChzt() {
+        return chzt;
+    }
+
+    public void setChzt(String chzt) {
+        this.chzt = chzt;
+    }
+
+    public String getChjg() {
+        return chjg;
+    }
+
+    public void setChjg(String chjg) {
+        this.chjg = chjg;
+    }
+
+    public String getBgfw() {
+        return bgfw;
+    }
+
+    public void setBgfw(String bgfw) {
+        this.bgfw = bgfw;
+    }
+
+    public Double getBgmj() {
+        return bgmj;
+    }
+
+    public void setBgmj(Double bgmj) {
+        this.bgmj = bgmj;
+    }
+
+    public String getBgyy() {
+        return bgyy;
+    }
+
+    public void setBgyy(String bgyy) {
+        this.bgyy = bgyy;
+    }
+
+    public String getChbz() {
+        return chbz;
+    }
+
+    public void setChbz(String chbz) {
+        this.chbz = chbz;
+    }
+
+    public String getYxyz() {
+        return yxyz;
+    }
+
+    public void setYxyz(String yxyz) {
+        this.yxyz = yxyz;
+    }
+}

+ 64 - 0
onemap-api/onemap-api-system/src/main/java/com/onemap/system/api/factory/RemoteAnalyseFallbackFactory.java

@@ -0,0 +1,64 @@
+package com.onemap.system.api.factory;
+
+import com.onemap.common.core.domain.R;
+import com.onemap.common.core.web.domain.WebResult;
+import com.onemap.system.api.RemoteAnalyseService;
+import com.onemap.system.api.RemoteAuthService;
+import com.onemap.system.api.domain.FzssChscXmgxDTO;
+import com.onemap.system.api.domain.FzxzChscDTO;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.cloud.openfeign.FallbackFactory;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * 应用分析服务降级处理
+ *
+ * @author onemap
+ */
+@Component
+public class RemoteAnalyseFallbackFactory implements FallbackFactory<RemoteAnalyseService> {
+    private static final Logger log = LoggerFactory.getLogger(RemoteAnalyseFallbackFactory.class);
+
+    @Override
+    public RemoteAnalyseService create(Throwable throwable) {
+        log.error("应用分析服务调用失败:{}", throwable.getMessage());
+        return new RemoteAnalyseService() {
+
+            @Override
+            public R<?> authorize(String appid, HttpServletRequest request, HttpServletResponse response) {
+                return null;
+            }
+
+            @Override
+            public WebResult create(FzxzChscDTO fzxzChscDTO) {
+                return null;
+            }
+
+            @Override
+            public WebResult getProgress(String bsme) {
+                return null;
+            }
+
+            @Override
+            public ResponseEntity<byte[]> download(String bsm, HttpServletResponse response) {
+                return null;
+            }
+
+            @Override
+            public WebResult xmjg(FzssChscXmgxDTO fzssChscXmgxDTO) {
+                return null;
+            }
+
+            @Override
+            public ResponseEntity<byte[]> txt2shp(MultipartFile file, HttpServletResponse response) {
+                return null;
+            }
+        };
+    }
+}

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

@@ -1,6 +1,7 @@
 package com.onemap.system.api.factory;
 
 import com.onemap.common.core.domain.UploadZipDTO;
+import com.onemap.common.core.web.domain.RequestResult;
 import com.onemap.system.api.domain.GhtgCl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -50,6 +51,11 @@ public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileServ
             public R<List<SysFile>> uploadAppendix(MultipartFile[] files) {
                 return R.fail("上传文件失败:" + throwable.getMessage());
             }
+
+            @Override
+            public RequestResult uploadZhxzZip(MultipartFile file) {
+                return null;
+            }
         };
     }
 }

+ 1 - 0
onemap-api/onemap-api-system/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

@@ -2,3 +2,4 @@ com.onemap.system.api.factory.RemoteUserFallbackFactory
 com.onemap.system.api.factory.RemoteLogFallbackFactory
 com.onemap.system.api.factory.RemoteFileFallbackFactory
 com.onemap.system.api.factory.RemoteAuthFallbackFactory
+com.onemap.system.api.factory.RemoteAnalyseFallbackFactory

+ 5 - 0
onemap-common/onemap-common-core/src/main/java/com/onemap/common/core/constant/ServiceNameConstants.java

@@ -21,4 +21,9 @@ public class ServiceNameConstants
      * 文件服务的serviceid
      */
     public static final String FILE_SERVICE = "onemap-file";
+
+    /**
+     * 应用分析服务的serviceid
+     */
+    public static final String ANALYSE_SERVICE = "onemap-analyse";
 }

+ 4 - 0
onemap-common/onemap-common-core/src/main/java/com/onemap/common/core/utils/UnPackageUtils.java

@@ -24,6 +24,10 @@ public class UnPackageUtils {
      */
     public static void unPackZip(File zipFile, String destPath) {
         try {
+            File dir = new File(destPath);
+            if (!dir.exists()) {
+                dir.mkdirs();
+            }
             String system = getSystem();
             String command = "";
             if (system.equals("windows")) {

+ 10 - 9
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/controller/ChscController.java

@@ -10,6 +10,7 @@ import com.onemap.common.core.web.domain.RequestResult;
 import com.onemap.common.core.web.domain.WebResult;
 import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -45,9 +46,9 @@ public class ChscController extends BaseController {
      * @return
      */
     @GetMapping("/download")
-    public WebResult download(String bsm, HttpServletRequest request, HttpServletResponse response) {
-        WebResult res = chscService.download(bsm, request, response);
-        return res;
+    public ResponseEntity<byte[]> download(String bsm, HttpServletResponse response) {
+        chscService.download(bsm, response);
+        return null;
     }
 
     /**
@@ -57,8 +58,8 @@ public class ChscController extends BaseController {
      * @return
      */
     @GetMapping("/getProgress")
-    public WebResult getProgress(String bsm, HttpServletRequest request, HttpServletResponse response) {
-        WebResult res = chscService.getProgress(bsm, request, response);
+    public WebResult getProgress(String bsm) {
+        WebResult res = chscService.getProgress(bsm);
         return res;
     }
 
@@ -90,14 +91,14 @@ public class ChscController extends BaseController {
      * 文本转SHP文件
      *
      * @param file
-     * @param request
      * @param response
      * @return
      */
     @PostMapping("/txt2shp")
-    public WebResult txt2shp(MultipartFile file, HttpServletRequest request, HttpServletResponse response) {
-        WebResult res = chscService.txt2shp(file, request, response);
-        return res;
+    public ResponseEntity<byte[]> txt2shp(MultipartFile file,
+                                          HttpServletResponse response) {
+        chscService.txt2shp(file, response);
+        return null;
     }
 
 }

+ 28 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzChscDTO.java

@@ -48,6 +48,34 @@ public class FzxzChscDTO {
     private String chbz;
     private String yxyz;
     private Date cjsj;
+    //根据易利代码新增三个字段
+    private String cjyh;
+    private String sjy;
+    private String ydlx;
+
+    public String getCjyh() {
+        return cjyh;
+    }
+
+    public void setCjyh(String cjyh) {
+        this.cjyh = cjyh;
+    }
+
+    public String getSjy() {
+        return sjy;
+    }
+
+    public void setSjy(String sjy) {
+        this.sjy = sjy;
+    }
+
+    public String getYdlx() {
+        return ydlx;
+    }
+
+    public void setYdlx(String ydlx) {
+        this.ydlx = ydlx;
+    }
 
     public Date getCjsj() {
         return cjsj;

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

@@ -25,6 +25,15 @@ public class FzxzDTO {
     private String xmmc;
     private String jsdw;
     private Integer fwlx;
+    private String rwly = "Web";
+
+    public String getRwly() {
+        return rwly;
+    }
+
+    public void setRwly(String rwly) {
+        this.rwly = rwly;
+    }
 
     public String getCjyh() {
         return cjyh;

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

@@ -1,7 +1,7 @@
 package com.onemap.analyse.domain;
 
 public class XzlbDTO {
-    private Integer xmxz =0;
+    private Integer xmxz = 0;
     private Integer hgxfx = 1;
 
     public Integer getXmxz() {

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

@@ -13,13 +13,13 @@ import javax.servlet.http.HttpServletResponse;
 public interface IChscService {
     R<?> authorize(String appid, HttpServletRequest request, HttpServletResponse response);
 
-    WebResult download(String bsm, HttpServletRequest request, HttpServletResponse response);
+    WebResult download(String bsm, HttpServletResponse response);
 
-    WebResult getProgress(String bsm, HttpServletRequest request, HttpServletResponse response);
+    WebResult getProgress(String bsm);
 
     WebResult xmjg(FzssChscXmgxDTO fzssChscXmgxDTO);
 
     WebResult create(FzxzChscDTO fzxzChscDTO);
 
-    WebResult txt2shp(MultipartFile file, HttpServletRequest request, HttpServletResponse response);
+    WebResult txt2shp(MultipartFile file, HttpServletResponse response);
 }

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

@@ -66,7 +66,7 @@ public class ChscServiceImpl implements IChscService {
     }
 
     @Override
-    public WebResult download(String bsm, HttpServletRequest request, HttpServletResponse response) {
+    public WebResult download(String bsm, HttpServletResponse response) {
         QueryWrapper<FzxzChscDTO> wrapper = new QueryWrapper<>();
         wrapper.eq("bsm", bsm);
         FzxzChscDTO chsc = fzssChscMapper.selectOne(wrapper);
@@ -95,7 +95,7 @@ public class ChscServiceImpl implements IChscService {
     }
 
     @Override
-    public WebResult getProgress(String bsm, HttpServletRequest request, HttpServletResponse response) {
+    public WebResult getProgress(String bsm) {
         QueryWrapper<FzxzChscDTO> wrapper = new QueryWrapper<>();
         wrapper.eq("bsm", bsm);
         FzxzChscDTO chsc = fzssChscMapper.selectOne(wrapper);
@@ -157,7 +157,7 @@ public class ChscServiceImpl implements IChscService {
     }
 
     @Override
-    public WebResult txt2shp(MultipartFile file, HttpServletRequest request, HttpServletResponse response) {
+    public WebResult txt2shp(MultipartFile file, HttpServletResponse response) {
         //将txt文件保存到本地
         long timeMillis = System.currentTimeMillis();
         String targetfolder = temp + "\\" + timeMillis + "\\";

+ 55 - 10
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/ChscSchedule.java

@@ -1,6 +1,8 @@
 package com.onemap.analyse.task;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import com.onemap.analyse.domain.*;
 import com.onemap.analyse.mapper.*;
 import com.onemap.analyse.utils.DozerUtils;
@@ -15,6 +17,7 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTcPr;
 import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblWidth;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
@@ -41,6 +44,10 @@ public class ChscSchedule {
     private RwztDTO Rwzt = new RwztDTO();
     private XzlbDTO xzlbDTO = new XzlbDTO();
     private FxfwDictDTO fxfwDictDTO = new FxfwDictDTO();
+    @Autowired
+    private FzxzMapper fzxzMapper;
+    @Autowired
+    private FzxzXzyzMapper fzxzXzyzMapper;
     @Resource
     private HgxfxMapper hgxfxMapper;
     @Resource
@@ -95,11 +102,48 @@ public class ChscSchedule {
                 rzDto.setRzsj(new Date());
                 fxrwrzMapper.insert(rzDto);
                 //根据选址类别区分进行任务分配执行
-                String rwlx = "辅助选址";
+                String rwlx = "";
                 if (zhxzChsc.getXzlb() == xzlbDTO.getXmxz()) {//项目选址
-                    //TODO 后续对接智慧选址
+                    //TODO wanger 对接智慧选址
+                    rwlx = "辅助选址";
+                    FzxzDTO fzxzDTO = new FzxzDTO();
+                    fzxzDTO.setBsm(zhxzChsc.getBsm());
+                    fzxzDTO.setFwlx(zhxzChsc.getFwlx());
+                    fzxzDTO.setJsdw(zhxzChsc.getSbdw());
+                    fzxzDTO.setXmmc(zhxzChsc.getXmmc());
+                    fzxzDTO.setXzfw(zhxzChsc.getXzfw());
+                    fzxzDTO.setXzmj(zhxzChsc.getNydmj());
+                    fzxzDTO.setYdmjbegin(zhxzChsc.getYdmjks());
+                    fzxzDTO.setYdmjend(zhxzChsc.getYdmjjs());
+                    fzxzDTO.setCjyh(zhxzChsc.getCjyh());
+                    fzxzDTO.setSjy(zhxzChsc.getSjy());
+                    fzxzDTO.setYdxz_bsm(zhxzChsc.getYdlx());
+                    fzxzDTO.setRwzt(Rwzt.getCreate());
+                    fzxzDTO.setRwly("OpenAPI");
+                    fzxzMapper.insert(fzxzDTO);
+                    if (StringUtils.isNotEmpty(zhxzChsc.getYxyz())) {
+                        String yxyz = zhxzChsc.getYxyz();
+                        List<Map<String, Object>> list = null;
+                        try {
+                            ObjectMapper mapper = new ObjectMapper();
+                            list = mapper.readValue(yxyz, new TypeReference<List<Map<String, Object>>>() {
+                            });
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                        for (int i = 0; i < list.size(); i++) {
+                            FzxzXzyzDTO dto = DozerUtils.map(list.get(i), FzxzXzyzDTO.class);
+                            dto.setBsm(StringUtils.getUUID());
+                            dto.setRwbsm(fzxzDTO.getBsm());
+                            fzxzXzyzMapper.insert(dto);
+                        }
+                    }
+                    //TODO 入储备库
+//                    FzssZhxzCbk cbk = zhxzChsc.MapTo<FzssZhxzCbk>();
+//                    cbk.BSM = zhxzChsc.BSM;
+//                    var listFields = EsriClassField.ToFields<FzssZhxzCbk>(cbk);
+//                    PyUtils.Shp2Sde(shpfile, "KJGH.T_FZSS_ZHXZ_CBK", listFields);
                     System.out.println("XZLB暂不支持" + zhxzChsc.getXzlb());
-                    return;
                 } else if (zhxzChsc.getXzlb() == xzlbDTO.getHgxfx()) {
                     rwlx = "合规性分析";
                     //插入合规性分析主表
@@ -127,14 +171,15 @@ public class ChscSchedule {
                         if (res.size() > 0) {
                             basefxyz.addAll(res);
                         }
-                    } else {
+                    } else if (StringUtils.isNotEmpty(zhxzChsc.getYxyz())) {
                         //查询审查项 默认把控制线级别等于0的也添加进去
-//                        QueryWrapper<HgxfxScxDTO> fxyzwrapper = new QueryWrapper<HgxfxScxDTO>();
-//                        fxyzwrapper.gt("kzxjb", 0).eq("status",1);
-//                        List<HgxfxScxDTO> res = hgxfxScxMapper.selectList(fxyzwrapper);
-//                        if (res.size() > 0) {
-//                            basefxyz.addAll(res);
-//                        }
+                        QueryWrapper<HgxfxScxDTO> fxyzwrapper = new QueryWrapper<HgxfxScxDTO>();
+                        fxyzwrapper.gt("kzxjb", 0).eq("status", 1);
+//                        fxyzwrapper.in("bsm", zhxzChsc.getYxyz().split(",")).orderByAsc("xssx");
+                        List<HgxfxScxDTO> res = hgxfxScxMapper.selectList(fxyzwrapper);
+                        if (res.size() > 0) {
+                            basefxyz.addAll(res);
+                        }
                     }
                     for (HgxfxScxDTO cur : basefxyz) {
                         HgxfxHgscxDTO scx = new HgxfxHgscxDTO();

+ 16 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/FzxzSchedule.java

@@ -44,6 +44,8 @@ public class FzxzSchedule {
     @Resource
     private FzxzJgGISMapper fzxzJgGISMapper;
     @Resource
+    private FzssChscMapper fzssChscMapper;
+    @Resource
     private FzxzXzyzMapper fzxzXzyzMapper;
     @Resource
     private FzxzTbMapper fzxzTbMapper;
@@ -58,6 +60,8 @@ public class FzxzSchedule {
     private String fzxzShp;
     @Value("${Hgxfx.temp}")
     private String temp;
+    @Value("${Hgxfx.ftpOut}")
+    private String ftpOut;
     /**
      * Scheduled 定时器参数
      * cron表达式:指定任务在特定时间执行
@@ -122,6 +126,18 @@ public class FzxzSchedule {
                     successDto.setRzlx("info");
                     successDto.setRzsj(new Date());
                     fxrwrzMapper.insert(successDto);
+                    //TODO 策划生成 项目
+                    if ("OpenAPI".equals(res.getRwly())) {
+                        QueryWrapper<FzxzChscDTO> chscwrapper = new QueryWrapper<FzxzChscDTO>();
+                        chscwrapper.eq("bsm", res.getBsm());
+                        FzxzChscDTO chscDto = fzssChscMapper.selectOne(chscwrapper);
+                        chscDto.setRwzt(Rwzt.getComplete());
+                        chscDto.setRwjg("分析完成");
+                        chscDto.setRwjd(100);
+                        fzssChscMapper.update(chscDto, chscwrapper);
+                        //拷贝合规性分析报告
+                        com.onemap.common.core.utils.file.FileUtils.copyNewFileAndRename(ftpOut, report.getReportfile(), chscDto.getXmmc() + ".pdf");
+                    }
                 } else {//失败
                     res.setRwjssj(new Date());
                     res.setRwzt(Rwzt.getError());

+ 38 - 6
onemap-modules/onemap-api/src/main/java/com/onemap/api/controller/ZhxzController.java

@@ -3,15 +3,17 @@ package com.onemap.api.controller;
 
 import com.onemap.api.domain.AuthorizeDto;
 import com.onemap.api.service.ZhxzService;
+import com.onemap.common.core.web.domain.AjaxResult;
 import com.onemap.common.core.web.domain.RequestResult;
+import com.onemap.system.api.domain.FzssChscXmgxDTO;
+import com.onemap.system.api.domain.FzxzChscDTO;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import com.onemap.common.core.web.controller.BaseController;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 /**
  * 智慧选址接口
@@ -25,13 +27,43 @@ public class ZhxzController extends BaseController {
     private ZhxzService zhxzService;
 
     @PostMapping("/authorize")
-    public RequestResult authorize(@RequestBody AuthorizeDto authorizeDto, HttpServletRequest request) {
+    public AjaxResult authorize(@RequestBody AuthorizeDto authorizeDto, HttpServletRequest request) {
         return zhxzService.authorize(authorizeDto, request);
     }
 
 
     @PostMapping("/Authorize")
-    public RequestResult Authorize(@RequestBody AuthorizeDto authorizeDto, HttpServletRequest request) {
+    public AjaxResult Authorize(@RequestBody AuthorizeDto authorizeDto, HttpServletRequest request) {
         return zhxzService.authorize(authorizeDto, request);
     }
+
+    @PostMapping("/upload")
+    public AjaxResult upload(MultipartFile file) {
+        return zhxzService.upload(file);
+    }
+
+    @PostMapping("/createxm")
+    public AjaxResult createxm(FzxzChscDTO fzxzChscDTO) {
+        return zhxzService.createxm(fzxzChscDTO);
+    }
+
+    @GetMapping("/getjd")
+    public AjaxResult getjd(String bsm, HttpServletRequest request, HttpServletResponse response) {
+        return zhxzService.getjd(bsm, request, response);
+    }
+
+    @GetMapping("/downbg")
+    public AjaxResult downbg(String bsm, HttpServletRequest request, HttpServletResponse response) {
+        return zhxzService.downbg(bsm, request, response);
+    }
+
+    @PostMapping("/xmjg")
+    public AjaxResult xmjg(FzssChscXmgxDTO fzssChscXmgxDTO) {
+        return zhxzService.xmjg(fzssChscXmgxDTO);
+    }
+
+    @PostMapping("/txt2shp")
+    public AjaxResult txt2shp(MultipartFile file, HttpServletRequest request, HttpServletResponse response) {
+        return zhxzService.txt2shp(file, request, response);
+    }
 }

+ 18 - 1
onemap-modules/onemap-api/src/main/java/com/onemap/api/service/ZhxzService.java

@@ -1,11 +1,28 @@
 package com.onemap.api.service;
 
 import com.onemap.api.domain.AuthorizeDto;
+import com.onemap.common.core.web.domain.AjaxResult;
 import com.onemap.common.core.web.domain.RequestResult;
+import com.onemap.system.api.domain.FzssChscXmgxDTO;
+import com.onemap.system.api.domain.FzxzChscDTO;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 public interface ZhxzService {
 
-    RequestResult authorize(AuthorizeDto authorizeDto, HttpServletRequest request);
+    AjaxResult authorize(AuthorizeDto authorizeDto, HttpServletRequest request);
+
+    AjaxResult upload(MultipartFile file);
+
+    AjaxResult createxm(FzxzChscDTO fzxzChscDTO);
+
+    AjaxResult getjd(String bsm, HttpServletRequest request, HttpServletResponse response);
+
+    AjaxResult downbg(String bsm, HttpServletRequest request, HttpServletResponse response);
+
+    AjaxResult xmjg(FzssChscXmgxDTO fzssChscXmgxDTO);
+
+    AjaxResult txt2shp(MultipartFile file, HttpServletRequest request, HttpServletResponse response);
 }

+ 96 - 5
onemap-modules/onemap-api/src/main/java/com/onemap/api/service/impl/ZhxzServiceImpl.java

@@ -8,14 +8,24 @@ import com.onemap.api.service.ZhxzService;
 import com.onemap.common.core.constant.SecurityConstants;
 import com.onemap.common.core.domain.R;
 import com.onemap.common.core.utils.StringUtils;
+import com.onemap.common.core.web.domain.AjaxResult;
 import com.onemap.common.core.web.domain.RequestResult;
+import com.onemap.common.core.web.domain.WebResult;
 import com.onemap.common.security.service.TokenService;
+import com.onemap.system.api.RemoteAnalyseService;
 import com.onemap.system.api.RemoteUserService;
+import com.onemap.system.api.RemoteFileService;
+import com.onemap.system.api.domain.FzssChscXmgxDTO;
+import com.onemap.system.api.domain.FzxzChscDTO;
 import com.onemap.system.api.model.LoginUser;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 import java.util.Map;
 
 
@@ -27,22 +37,26 @@ public class ZhxzServiceImpl implements ZhxzService {
     @Autowired
     private RemoteUserService remoteUserService;
     @Autowired
+    private RemoteFileService remoteFileService;
+    @Autowired
+    private RemoteAnalyseService remoteAnalyseService;
+    @Autowired
     private TokenService tokenService;
 
     @Override
-    public RequestResult authorize(AuthorizeDto authorizeDto, HttpServletRequest request) {
+    public AjaxResult authorize(AuthorizeDto authorizeDto, HttpServletRequest request) {
         String appid = authorizeDto.getAppid();
         String ip = request.getHeader("X-Forwarded-For");
         if (StringUtils.isEmpty(appid)) {
-            return RequestResult.error("APPID不能为空!");
+            return changeResponse(RequestResult.error("APPID不能为空!"));
         }
         QueryWrapper<TSysOpenUser> wrapper = new QueryWrapper();
         wrapper.eq("appid", appid);
         TSysOpenUser dto = tSysOpenUserMapper.selectOne(wrapper);
         if (dto == null) {
-            return RequestResult.error("应用不存在,请检查并重新输入!");
+            return changeResponse(RequestResult.error("应用不存在,请检查并重新输入!"));
         } else if (dto.getState() == 0) {
-            return RequestResult.error("当前应用已禁用,请联系管理员!");
+            return changeResponse(RequestResult.error("当前应用已禁用,请联系管理员!"));
         }
 //        else if (!ip.equals(dto.getIp())) {//TODO wanger 需不需要校验访问的IP地址
 //            return RequestResult.error("非法登录!");
@@ -53,6 +67,83 @@ public class ZhxzServiceImpl implements ZhxzService {
         R<LoginUser> userResult = remoteUserService.getUserInfo(username, SecurityConstants.INNER);
         LoginUser userInfo = userResult.getData();
         Map<String, Object> token = tokenService.createToken(userInfo);
-        return RequestResult.success(token);
+        return changeResponse(RequestResult.success(token));
+    }
+
+    @Override
+    public AjaxResult upload(MultipartFile file) {
+        RequestResult res = remoteFileService.uploadZhxzZip(file);
+        return changeResponse(res);
+    }
+
+    @Override
+    public AjaxResult createxm(FzxzChscDTO fzxzChscDTO) {
+        WebResult res = remoteAnalyseService.create(fzxzChscDTO);
+        return changeResponse2(res);
+    }
+
+    @Override
+    public AjaxResult getjd(String bsm, HttpServletRequest request, HttpServletResponse response) {
+        WebResult res = remoteAnalyseService.getProgress(bsm);
+        return changeResponse2(res);
+    }
+
+    @Override
+    public AjaxResult downbg(String bsm, HttpServletRequest request, HttpServletResponse response) {
+        ResponseEntity<byte[]> data = remoteAnalyseService.download(bsm, response);
+        try {
+            response.getOutputStream().write(data.getBody());
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        WebResult res = new WebResult();
+        res.put("code", 200);
+        return changeResponse2(res);
+    }
+
+    @Override
+    public AjaxResult xmjg(FzssChscXmgxDTO fzssChscXmgxDTO) {
+        WebResult res = remoteAnalyseService.xmjg(fzssChscXmgxDTO);
+        return changeResponse2(res);
+    }
+
+    @Override
+    public AjaxResult txt2shp(MultipartFile file, HttpServletRequest request, HttpServletResponse response) {
+        ResponseEntity<byte[]> data = remoteAnalyseService.txt2shp(file, response);
+        try {
+            response.getOutputStream().write(data.getBody());
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        WebResult res = new WebResult();
+        res.put("code", 200);
+        return changeResponse2(res);
+    }
+
+    public AjaxResult changeResponse(RequestResult res) {
+        AjaxResult ajax = null;
+        if (res.isSuccess()) {
+            ajax = AjaxResult.success(String.valueOf(res.get("message")), res.get("data"));
+            ajax.put("statuscode", 200);
+        } else {
+            ajax = AjaxResult.error(String.valueOf(res.get("message")), res.get("data"));
+            ajax.put("statuscode", ajax.get("code"));
+        }
+        ajax.put("message", res.get("message"));
+        ajax.put("success", res.isSuccess());
+        return ajax;
+    }
+
+    public AjaxResult changeResponse2(WebResult res) {
+        AjaxResult ajax = null;
+        if (res.isSuccess()) {
+            ajax = AjaxResult.success(String.valueOf(res.get("message")), res.get("data"));
+            ajax.put("statuscode", 200);
+        } else {
+            ajax = AjaxResult.error(String.valueOf(res.get("message")), res.get("data"));
+            ajax.put("statuscode", ajax.get("code"));
+        }
+        ajax.put("message", res.get("message"));
+        return ajax;
     }
 }

+ 6 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/cggl/CgglServiceImpl.java

@@ -293,6 +293,12 @@ public class CgglServiceImpl implements CgglService {
             }
             fileDto.setRemark(txtjson);
             escalationFileMapper.update(fileDto, filewrapper);
+            if (StringUtils.isNotEmpty(xzqdm)) {
+                escalationDTO.setXzqdm(xzqdm);
+            }
+            if (StringUtils.isNotEmpty(xzqmc)) {
+                escalationDTO.setXzqmc(xzqmc);
+            }
         }
         escalationMapper.insert(escalationDTO);
         addCgglRz(escalationDTO);

+ 1 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/fzss/FzxzServiceImpl.java

@@ -79,6 +79,7 @@ public class FzxzServiceImpl implements IFzxzService {
             if (!StringUtils.isEmpty(lx)) {
                 wrapper.eq("lx", lx);
             }
+            wrapper.eq("rwly", "Web");
             List<FzxzYzDTO> res = fzxzYzMapper.selectList(wrapper);
             return RequestResult.success("查询成功", res);
         } catch (Exception e) {

+ 19 - 1
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/sbjk/XzczghcgsbServiceImpl.java

@@ -182,7 +182,25 @@ public class XzczghcgsbServiceImpl implements XzczghcgsbService {
             xzczghcgsbDTO.setCglevel("1");
             xzczghcgsbDTO.setUploadStatus(2);
         }
-        xzczghcgsbDTO.setBz(xmDetailMap.get(xzczghcgsbDTO.getFilePath()));
+        //TODO wanger 提取基本信息中的行政区信息
+        String txtStr = xmDetailMap.get(xzczghcgsbDTO.getFilePath());
+        if (StringUtils.isNotEmpty(txtStr)) {
+            ObjectMapper objectMapper = new ObjectMapper();
+            try {
+                Map<String, String> txtMap = objectMapper.readValue(txtStr, Map.class);
+                String xzqdm = txtMap.get("行政区代码");
+                String xzqmc = txtMap.get("行政区名称");
+                if (StringUtils.isNotEmpty(xzqdm)) {
+                    xzczghcgsbDTO.setXzqCode(xzqdm);
+                }
+                if (StringUtils.isNotEmpty(xzqmc)) {
+                    xzczghcgsbDTO.setXzqName(xzqmc);
+                }
+            } catch (JsonProcessingException e) {
+                e.printStackTrace();
+            }
+            xzczghcgsbDTO.setBz(txtStr);
+        }
         return xzczghcgsbMapper.insert(xzczghcgsbDTO);
     }