|
@@ -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());
|