|
@@ -10,6 +10,7 @@ import com.onemap.apply.domain.res.ApiTTable;
|
|
|
import com.onemap.apply.domain.res.ApiTTableFiled;
|
|
|
import com.onemap.apply.mapper.gdbh.*;
|
|
|
import com.onemap.apply.service.analyse.HttpAnalyseService;
|
|
|
+import com.onemap.apply.service.gdbh.ITGdbhRwGeomService;
|
|
|
import com.onemap.common.core.utils.NumberUtil;
|
|
|
import com.onemap.common.core.utils.StringUtils;
|
|
|
import com.onemap.common.core.web.domain.AjaxResult;
|
|
@@ -19,10 +20,8 @@ import com.onemap.system.api.domain.RawTableVo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.*;
|
|
|
|
|
|
@Service
|
|
|
public class GdbhJgService {
|
|
@@ -40,6 +39,8 @@ public class GdbhJgService {
|
|
|
private GdbhRwMxYzMapper gdbhRwMxYzMapper;
|
|
|
@Autowired
|
|
|
private TableFiledRelationService tableFiledRelationService;
|
|
|
+ @Resource
|
|
|
+ private ITGdbhRwGeomService iTGdbhRwGeomService;
|
|
|
|
|
|
public RequestResult gdbhAnalysisHandle(String rwBsm) {
|
|
|
QueryWrapper<GdbhDto> wrapper0_1 = new QueryWrapper<>();
|
|
@@ -49,6 +50,10 @@ public class GdbhJgService {
|
|
|
return RequestResult.error("未查询到数据");
|
|
|
}
|
|
|
|
|
|
+ Map<String, Object> retd0 = iTGdbhRwGeomService.sumTGdbhRwGeomByRwbsm(gdbhDto.getBsm());
|
|
|
+ String ewkt = (String) retd0.get("geom");
|
|
|
+ gdbhDto.setGeom(ewkt);
|
|
|
+
|
|
|
//计算1 模型
|
|
|
QueryWrapper<GdbhRwMxDto> wrapper0_2 = new QueryWrapper<>();
|
|
|
wrapper0_2.eq("rwbsm", rwBsm);
|
|
@@ -219,44 +224,14 @@ public class GdbhJgService {
|
|
|
ret.add(mxMap);
|
|
|
}
|
|
|
|
|
|
- String d_RawTableName = gdbhDto.getXzfwTbaleName();
|
|
|
|
|
|
- //查询tableid
|
|
|
- String tableId = gdbhDto.getXzfwTbaleId();
|
|
|
- AjaxResult ajaxResult = tableFiledRelationService.QueryTableFiledRelation(tableId);
|
|
|
- if (!ajaxResult.isSuccess()) {
|
|
|
- return null;
|
|
|
- }
|
|
|
- Object tableStr = ajaxResult.get(AjaxResult.DATA_TAG);
|
|
|
- ApiTTable tTable = JSON.parseObject(JSON.toJSONString(tableStr), ApiTTable.class);
|
|
|
+// @Resource
|
|
|
+// private ITGdbhRwGeomService iTGdbhRwGeomService;
|
|
|
|
|
|
- List<String> ids = new ArrayList<>();
|
|
|
- ids.add(id);
|
|
|
|
|
|
- List<ApiTTableFiled> filedList = tTable.getTableFiledlist();
|
|
|
- List<String> columns = new ArrayList<>(); // 列名
|
|
|
- for (ApiTTableFiled filed : filedList) {
|
|
|
- columns.add(filed.getFiledName());
|
|
|
- }
|
|
|
- RawTableVo d0_vo = new RawTableVo();
|
|
|
- d0_vo.setIds(ids);
|
|
|
- d0_vo.setSrid(4525);
|
|
|
- d0_vo.setRawTableName(d_RawTableName);
|
|
|
- d0_vo.setSiweiArea(true);
|
|
|
- d0_vo.setIsGeography(false);
|
|
|
- d0_vo.setColumns(columns);
|
|
|
- Object objectData = httpAnalyseService.getHttpAnalyse(d0_vo);
|
|
|
Map<String, Object> retMap = new HashMap<>();
|
|
|
retMap.put("yzjg", ret);
|
|
|
- if (objectData != null) {
|
|
|
- List<Map> objectDataList = (List<Map>) objectData;
|
|
|
- for (Map d_map_01 : objectDataList) {
|
|
|
- d_map_01.put("siweiarea", NumberUtil.double2TwoDecimal(Double.parseDouble(d_map_01.get("siweiarea").toString())));
|
|
|
- }
|
|
|
- if (objectDataList != null && objectDataList.size() > 0) {
|
|
|
- retMap.put("tbxx", objectDataList.get(0));
|
|
|
- }
|
|
|
- }
|
|
|
+ retMap.put("tbxx", iTGdbhRwGeomService.selectTGdbhRwGeomById(id));
|
|
|
return RequestResult.success(retMap);
|
|
|
}
|
|
|
}
|