Browse Source

清除多余的文件,修改土地面积核算

sugb 7 months ago
parent
commit
d6e4cd6b3f

+ 3 - 1
jeecg-boot-module-gis/src/main/java/org/jeecg/modules/geoAnalysis/controller/GeoAnalysisController.java

@@ -77,7 +77,6 @@ public class GeoAnalysisController extends JeecgController<GeoAnalysis, IGeoAnly
     @ApiOperation(value = " 通过获取坐标串进行分析", notes = " 通过获取坐标串进行分析")
     @GetMapping(value = "/DrawMap")
     public Result<?> DrawMapByzb( DrawMapDto drawMapDto) throws JsonProcessingException {
-        //ObjectMapper mapper = new ObjectMapper();
         HashMap<String,Object> wk=new HashMap<>();
         List<Object> rings=new ArrayList<>();
         rings.add(drawMapDto.getGeoJson());
@@ -86,15 +85,18 @@ public class GeoAnalysisController extends JeecgController<GeoAnalysis, IGeoAnly
         //System.out.println(jsonString);
         Geometry geometry = GeometryEngine.jsonToGeometry(jsonString).getGeometry();
         String drawWkt = GeometryEngine.geometryToWkt(geometry, WktExportFlags.wktExportPolygon);
+
         String[] split = drawMapDto.getAtableename().split(",");
         ArrayList<ZYFXPZB> yj_kszlq = new ArrayList<>();
         //省属地块,省直地块参数(atableename: sz_dkxx,ss_dkxx)
         if (drawMapDto.getAtableename().contains(",")) {
             for (String s : split) {
+                //占压分析配置表
                 ZYFXPZB zyfxpzb = geoAnalysisService.SelectByTbs(drawMapDto.getTable(), s);
                 yj_kszlq.add(zyfxpzb);
             }
         } else {
+            //占压分析配置表
             ZYFXPZB zyfxpzb = geoAnalysisService.SelectByTbs(drawMapDto.getTable(), drawMapDto.getAtableename());
             yj_kszlq.add(zyfxpzb);
         }

+ 0 - 5
jeecg-boot-module-gis/src/main/java/org/jeecg/modules/geoAnalysis/dto/DrawMapDto.java

@@ -11,12 +11,7 @@ import java.util.List;
 @AllArgsConstructor
 @NoArgsConstructor
 public class DrawMapDto {
-
     private List<Object> geoJson;
-
     private String table;
-
     private String atableename;
-
-
 }

+ 0 - 46
jeecg-boot-module-gis/src/main/java/org/jeecg/modules/geoAnalysis/entity/QcJzxx.java

@@ -1,46 +0,0 @@
-package org.jeecg.modules.geoAnalysis.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-import org.jeecgframework.poi.excel.annotation.Excel;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-/**
- * @Description: qc_jzxx
- * @Author: sugb
- * @Date:   2024-09-09
- * @Version: V1.0
- */
-@Data
-@TableName("qc_jzxx")
-@Accessors(chain = true)
-@EqualsAndHashCode(callSuper = false)
-@ApiModel(value="qc_jzxx对象", description="qc_jzxx")
-public class QcJzxx implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-	/**id*/
-	@TableId(type = IdType.ASSIGN_ID)
-    @ApiModelProperty(value = "id")
-    private String id;
-	/**政府规划用途*/
-	@Excel(name = "政府规划用途", width = 15)
-    @ApiModelProperty(value = "政府规划用途")
-    private String zfghyt;
-	/**价值(单位亩)*/
-	@Excel(name = "价值(单位亩)", width = 15)
-    @ApiModelProperty(value = "价值(单位亩)")
-    private Float jz;
-	/**备注*/
-	@Excel(name = "备注", width = 15)
-    @ApiModelProperty(value = "备注")
-    private String remark;
-}

+ 0 - 19
jeecg-boot-module-gis/src/main/java/org/jeecg/modules/geoAnalysis/mapper/QcJzxxMapper.java

@@ -1,19 +0,0 @@
-package org.jeecg.modules.geoAnalysis.mapper;
-
-import java.util.List;
-
-import org.apache.ibatis.annotations.Param;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.jeecg.modules.geoAnalysis.entity.QcJzxx;
-
-/**
- * @Description: qc_jzxx
- * @Author: jeecg-boot
- * @Date:   2024-09-09
- * @Version: V1.0
- */
-public interface QcJzxxMapper extends BaseMapper<QcJzxx> {
-
-    //根据地块编号获取地块类型,单价
-    QcJzxx queryDkInfo(@Param("dkbh") String dkbh);
-}

+ 0 - 11
jeecg-boot-module-gis/src/main/java/org/jeecg/modules/geoAnalysis/mapper/xml/QcJzxxMapper.xml

@@ -1,11 +0,0 @@
-<?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="org.jeecg.modules.geoAnalysis.mapper.QcJzxxMapper">
-
-    <select id="queryDkInfo" resultType="org.jeecg.modules.geoAnalysis.entity.QcJzxx">
-        SELECT a.*
-        from qc_jzxx as a
-                 JOIN qc_ssgqzysytdqk_gzv as qc ON a.zfghyt = qc.zfghyt_code
-        where qc.dkbh = #{dkbh}
-    </select>
-</mapper>

+ 8 - 29
jeecg-boot-module-gis/src/main/java/org/jeecg/modules/geoAnalysis/service/impl/GeoAnalysisServiceImpl.java

@@ -15,19 +15,13 @@ import org.geotools.data.simple.SimpleFeatureSource;
 import org.geotools.data.simple.SimpleFeatureStore;
 
 
-import org.geotools.feature.FeatureCollections;
 import org.geotools.feature.simple.SimpleFeatureBuilder;
 import org.geotools.referencing.crs.DefaultGeographicCRS;
 import org.jeecg.modules.commonQueryConfig.entity.CommonQueryConfig;
 import org.jeecg.modules.geoAnalysis.entity.GeoAnalysis;
-import org.jeecg.modules.geoAnalysis.entity.QcJzxx;
 import org.jeecg.modules.geoAnalysis.entity.ZYFXPZB;
 import org.jeecg.modules.geoAnalysis.mapper.GeoAnalysisMapper;
-import org.jeecg.modules.geoAnalysis.mapper.QcJzxxMapper;
 import org.jeecg.modules.geoAnalysis.service.IGeoAnlysisService;
-import org.jeecg.modules.gis.lochistory.entity.LocHistory;
-import org.jeecg.modules.gis.lochistory.mapper.LocHistoryMapper;
-import org.jeecg.modules.gis.lochistory.service.ILocHistoryService;
 import org.jeecg.modules.util.ZipUtils;
 
 import org.locationtech.jts.geom.Geometry;
@@ -60,8 +54,6 @@ import java.util.*;
 public class GeoAnalysisServiceImpl extends ServiceImpl<GeoAnalysisMapper, GeoAnalysis> implements IGeoAnlysisService {
     @Autowired
     GeoAnalysisMapper geoAnalysisMapper;
-    @Autowired
-    QcJzxxMapper qcJzxxMapper;
 
     @Override
     public ArrayList<GeoAnalysis> DrawMap(List<ZYFXPZB> zyfxpzb, String shape) {
@@ -69,10 +61,13 @@ public class GeoAnalysisServiceImpl extends ServiceImpl<GeoAnalysisMapper, GeoAn
         DecimalFormat format = new DecimalFormat("0.0000");
         for (ZYFXPZB zyfxpzb1 : zyfxpzb) {
             HashMap hashMap = new HashMap<>();
-            String atableenam = zyfxpzb1.getATABLEENAME();//图层名称
-            String afieldename = zyfxpzb1.getAFIELDENAME();//排序字段
-            String atablecname = zyfxpzb1.getATABLECNAME();
-            String afieldcname = zyfxpzb1.getAFIELDCNAME();
+
+            String atableenam =  zyfxpzb1.getATABLEENAME();   //分析表英文名称
+            String afieldename = zyfxpzb1.getAFIELDENAME();   //分析表英文字段名称
+            //分析表中文名称
+            String atablecname = zyfxpzb1.getATABLECNAME();   //分析表中文名称
+            String afieldcname = zyfxpzb1.getAFIELDCNAME();   //分析表中文字段名称
+            //包装shape
             hashMap.put("shape", shape);
             hashMap.put("table", atableenam);
             hashMap.put("DLMC", afieldename);
@@ -90,23 +85,6 @@ public class GeoAnalysisServiceImpl extends ServiceImpl<GeoAnalysisMapper, GeoAn
                 //增加地块编号
                 if (null != map.get("dkbh")) {
                     result.setDkbh(map.get("dkbh").toString());
-                    //根据zfghyt判断价值,单位(亩),地块可能涉及到多块
-                    QcJzxx qcJzxx = qcJzxxMapper.queryDkInfo(result.getDkbh());
-                    if (null != qcJzxx) {
-                        //计算地块和土地面积价值 面积单位是公顷, 地块价值面积单位是亩
-                        result.setZfghyt(qcJzxx.getZfghyt());
-                        result.setZfghytString(qcJzxx.getRemark());
-                        result.setRemark("面积单位:亩,价值单位:元");
-                        //价值计算公顷转换成亩
-                        try {
-                            result.setTdjz(Float.parseFloat(result.getArea()) * 15 * qcJzxx.getJz());
-                        } catch (Exception e) {
-                            result.setRemark("土地面积数据异常");
-                        }
-                    } else {
-                        //查不到地块的情况
-                        result.setRemark("该地块没有分类信息");
-                    }
                 }
                 result.setAtableenam(atableenam);
                 analysis.setResult(result);
@@ -147,6 +125,7 @@ public class GeoAnalysisServiceImpl extends ServiceImpl<GeoAnalysisMapper, GeoAn
                         org.jeecg.modules.geoAnalysis.entity.Result result = new org.jeecg.modules.geoAnalysis.entity.Result();
                         analysis.setType(zyfxpzb1.getATABLECNAME());
                         analysis.setAfieldcname(zyfxpzb1.getAFIELDCNAME());
+                        //解析
                         result.setTypes(hashMap.get(zyfxpzb1.getAFIELDENAME()).toString());
                         result.setArea(format.format(new BigDecimal(hashMap.get("area").toString())));
                         result.setObjectid(hashMap.get("objectid").toString());

+ 0 - 1
jeecg-boot-module-zrzyqc/src/main/java/org/jeecg/modules/zrzyqc/gzvhb/controller/QcSsgqzysytdqkGzvController.java

@@ -43,7 +43,6 @@ import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import sun.security.provider.MD5;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;