|
@@ -112,6 +112,44 @@ public class HgxfxServiceImpl implements IHgxfxService {
|
|
return RequestResult.success(bsm);
|
|
return RequestResult.success(bsm);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public RequestResult AddHgxfxV1(HgxfxDTO hgxfxDTO) {
|
|
|
|
+
|
|
|
|
+ if (StringUtils.isEmpty(hgxfxDTO.getXmmc())) {
|
|
|
|
+ return RequestResult.error("项目参数为空");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isEmpty(hgxfxDTO.getXzfw())) {
|
|
|
|
+ return RequestResult.error("选址范围参数为空");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isEmpty(hgxfxDTO.getScxList())) {
|
|
|
|
+ return RequestResult.error("分析因子为空");
|
|
|
|
+ }
|
|
|
|
+ String xzfwId = StringUtils.getUUID();
|
|
|
|
+ Map<String, Object> xzfwMap = new HashMap<>();
|
|
|
|
+ xzfwMap.put("id", xzfwId);
|
|
|
|
+ xzfwMap.put("geom", "SRID=4326;" + hgxfxDTO.getXzfw());
|
|
|
|
+ xzfwMap.put("from_type", 1);
|
|
|
|
+ hgxfxMapper.insertXzfw(xzfwMap);
|
|
|
|
+
|
|
|
|
+ Map xzfw = hgxfxMapper.getXzfw(xzfwId);
|
|
|
|
+ if (StringUtils.isEmpty(xzfw)) {
|
|
|
|
+ return RequestResult.error("选址范围参数为空");
|
|
|
|
+ }
|
|
|
|
+ Double area = Double.valueOf(xzfw.get("area").toString());
|
|
|
|
+ String ewkt = (String) xzfw.get("geom");
|
|
|
|
+ if (StringUtils.isEmpty(ewkt)) {
|
|
|
|
+ return RequestResult.error("选址范围参数为空");
|
|
|
|
+ }
|
|
|
|
+ hgxfxDTO.setXzfw(xzfwId);
|
|
|
|
+ hgxfxDTO.setFxmj(area);
|
|
|
|
+ hgxfxDTO.setCjsj(new Date());
|
|
|
|
+ hgxfxDTO.setRwzt(0);
|
|
|
|
+ String bsm = insertHgxfx(hgxfxDTO);
|
|
|
|
+ hxfxHandleService.hgxfxHandle(bsm, ewkt);
|
|
|
|
+ return RequestResult.success(GetFxjg(bsm));
|
|
|
|
+ }
|
|
|
|
+
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public String insertHgxfx(HgxfxDTO hgxfxDTO) {
|
|
public String insertHgxfx(HgxfxDTO hgxfxDTO) {
|
|
hgxfxDTO.setCjsj(new Date());
|
|
hgxfxDTO.setCjsj(new Date());
|