|
@@ -20,8 +20,10 @@ 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;
|
|
@@ -57,7 +59,17 @@ import java.util.*;
|
|
|
public class GeoAnalysisServiceImpl extends ServiceImpl<GeoAnalysisMapper, GeoAnalysis> implements IGeoAnlysisService {
|
|
|
@Autowired
|
|
|
GeoAnalysisMapper geoAnalysisMapper;
|
|
|
+ @Autowired
|
|
|
+ QcJzxxMapper qcJzxxMapper;
|
|
|
|
|
|
+ //if (map.get("info") instanceof Clob) {
|
|
|
+ // Clob clob = (Clob) map.get("info");
|
|
|
+ // try {
|
|
|
+ // result.setInfo(clob.getSubString((long) 1, (int) clob.length()));
|
|
|
+ // } catch (SQLException throwables) {
|
|
|
+ // throwables.printStackTrace();
|
|
|
+ // }
|
|
|
+ //}
|
|
|
|
|
|
@Override
|
|
|
public ArrayList<GeoAnalysis> DrawMap(List<ZYFXPZB> zyfxpzb, String shape) {
|
|
@@ -73,23 +85,34 @@ public class GeoAnalysisServiceImpl extends ServiceImpl<GeoAnalysisMapper, GeoAn
|
|
|
hashMap.put("table", atableenam);
|
|
|
hashMap.put("DLMC", afieldename);
|
|
|
List<HashMap<String, Object>> hashMaps = geoAnalysisMapper.DrawMap(hashMap);
|
|
|
- System.out.println(hashMaps);
|
|
|
+ //遍历处理
|
|
|
for (HashMap<String, Object> map : hashMaps) {
|
|
|
GeoAnalysis analysis = new GeoAnalysis();
|
|
|
org.jeecg.modules.geoAnalysis.entity.Result result = new org.jeecg.modules.geoAnalysis.entity.Result();
|
|
|
analysis.setType(atablecname);
|
|
|
+ //解析
|
|
|
result.setArea(format.format(new BigDecimal(map.get("area").toString())));
|
|
|
result.setTypes(map.get(afieldename).toString());
|
|
|
result.setObjectid(map.get("objectid").toString());
|
|
|
result.setInfo(map.get("info").toString());
|
|
|
-// if (map.get("info") instanceof Clob) {
|
|
|
-// Clob clob = (Clob) map.get("info");
|
|
|
-// try {
|
|
|
-// result.setInfo(clob.getSubString((long) 1, (int) clob.length()));
|
|
|
-// } catch (SQLException throwables) {
|
|
|
-// throwables.printStackTrace();
|
|
|
-// }
|
|
|
-// }
|
|
|
+ //增加地块编号
|
|
|
+ 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());
|
|
|
+ //价值计算公顷转换成亩
|
|
|
+ try{
|
|
|
+ Float f=Float.parseFloat(result.getArea());
|
|
|
+ result.setTdjz(f*15*qcJzxx.getJz());
|
|
|
+ }catch (Exception e){
|
|
|
+ result.setRemark("土地价值无法计算");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
result.setAtableenam(atableenam);
|
|
|
analysis.setResult(result);
|
|
|
analysis.setAfieldcname(afieldcname);
|
|
@@ -98,7 +121,6 @@ public class GeoAnalysisServiceImpl extends ServiceImpl<GeoAnalysisMapper, GeoAn
|
|
|
}
|
|
|
return list;
|
|
|
}
|
|
|
-
|
|
|
@Override
|
|
|
public ZYFXPZB SelectByTbs(String MTABLENAME, String atableename) {
|
|
|
return geoAnalysisMapper.SelectByTbs(MTABLENAME, atableename);
|
|
@@ -133,15 +155,6 @@ public class GeoAnalysisServiceImpl extends ServiceImpl<GeoAnalysisMapper, GeoAn
|
|
|
result.setArea(format.format(new BigDecimal(hashMap.get("area").toString())));
|
|
|
result.setObjectid(hashMap.get("objectid").toString());
|
|
|
result.setInfo(hashMap.get("info").toString());
|
|
|
-// if (hashMap.get("info") instanceof Clob) {
|
|
|
-// Clob clob = (Clob) hashMap.get("info");
|
|
|
-// try {
|
|
|
-// result.setInfo(clob.getSubString((long) 1, (int) clob.length()));
|
|
|
-// } catch (SQLException throwables) {
|
|
|
-// throwables.printStackTrace();
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
result.setAtableenam(zyfxpzb1.getATABLEENAME());
|
|
|
analysis.setResult(result);
|
|
|
list.add(analysis);
|