|
@@ -17,6 +17,8 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.ExecutorService;
|
|
|
+import java.util.concurrent.Executors;
|
|
|
|
|
|
@Service
|
|
|
public class HgxfxServiceImpl implements IHgxfxService {
|
|
@@ -25,8 +27,6 @@ public class HgxfxServiceImpl implements IHgxfxService {
|
|
|
@Autowired
|
|
|
private HgxfxScxRwMapper hgxfxScxRwMapper;
|
|
|
@Autowired
|
|
|
- private HgxfxRwJgTempMapper hgxfxRwJgTempMapper;
|
|
|
- @Autowired
|
|
|
private HgxfxRwJgMapper hgxfxRwJgMapper;
|
|
|
@Autowired
|
|
|
private HgxfxScxTableMapper hgxfxScxTableMapper;
|
|
@@ -88,6 +88,16 @@ public class HgxfxServiceImpl implements IHgxfxService {
|
|
|
if (StringUtils.isEmpty(hgxfxDTO.getScxList())) {
|
|
|
return RequestResult.error("分析因子为空");
|
|
|
}
|
|
|
+ Map xzfw = hgxfxMapper.getXzfw(hgxfxDTO.getXzfw());
|
|
|
+ if (StringUtils.isEmpty(xzfw)) {
|
|
|
+ return RequestResult.error("选址范围参数为空");
|
|
|
+ }
|
|
|
+
|
|
|
+ String ewkt = (String) xzfw.get("geom");
|
|
|
+ if (StringUtils.isEmpty(ewkt)) {
|
|
|
+ return RequestResult.error("选址范围参数为空");
|
|
|
+ }
|
|
|
+
|
|
|
hgxfxDTO.setCjsj(new Date());
|
|
|
hgxfxDTO.setBsm(StringUtils.getUUID());
|
|
|
//合规性分析项目
|
|
@@ -103,8 +113,12 @@ public class HgxfxServiceImpl implements IHgxfxService {
|
|
|
scxRw.setBsm(StringUtils.getUUID());
|
|
|
hgxfxScxRwMapper.insert(scxRw);
|
|
|
}
|
|
|
- String ewkt = "SRID=4525;MULTIPOLYGON(((37342998.802186266 2026355.2598068258,37342865.92545163 2026357.1014534528,37342817.87560371 2026357.767365824,37342802.97989663 2026372.974932678,37342803.898728564 2026506.9421275943,37342819.00023294 2026521.733922014,37342900.08195203 2026520.6101232516,37342911.12435312 2026520.139866627,37342921.978652984 2026519.0511605758,37342932.75255981 2026517.3415217374,37342943.41078094 2026515.0165252725,37342953.9178506 2026512.0838249521,37342964.23945906 2026508.5530478982,37342974.34150494 2026504.4360855871,37342984.190657474 2026499.7461450424,37342993.75455573 2026494.4988803158,37343003.123444214 2026488.6354845203,37343042.17791849 2026462.6041323764,37343046.33985531 2026441.8032885736,37343039.5553245 2026431.6244374511,37343033.89487493 2026422.4690548987,37343028.79298549 2026412.7975274948,37343024.36349438 2026402.800136831,37343020.62692146 2026392.523455117,37343017.60047662 2026382.0158757505,37343014.53736561 2026367.7884403756,37342998.802186266 2026355.2598068258)),((37342684.474113196 2026681.7678619213,37342697.86007041 2026684.1221921882,37342780.41605009 2026697.5276640216,37342785.17736046 2026693.44891586,37342784.243153 2026557.2187332094,37342769.141550235 2026542.4269937698,37342683.52653461 2026543.613566511,37342684.474113196 2026681.7678619213)))";
|
|
|
- hxfxHandleService.hgxfxHandle(hgxfxDTO.getBsm(), ewkt);
|
|
|
+
|
|
|
+ ExecutorService executorService = Executors.newFixedThreadPool(5);
|
|
|
+ executorService.execute(() -> {
|
|
|
+// String ewkt = "SRID=4525;MULTIPOLYGON(((37342998.802186266 2026355.2598068258,37342865.92545163 2026357.1014534528,37342817.87560371 2026357.767365824,37342802.97989663 2026372.974932678,37342803.898728564 2026506.9421275943,37342819.00023294 2026521.733922014,37342900.08195203 2026520.6101232516,37342911.12435312 2026520.139866627,37342921.978652984 2026519.0511605758,37342932.75255981 2026517.3415217374,37342943.41078094 2026515.0165252725,37342953.9178506 2026512.0838249521,37342964.23945906 2026508.5530478982,37342974.34150494 2026504.4360855871,37342984.190657474 2026499.7461450424,37342993.75455573 2026494.4988803158,37343003.123444214 2026488.6354845203,37343042.17791849 2026462.6041323764,37343046.33985531 2026441.8032885736,37343039.5553245 2026431.6244374511,37343033.89487493 2026422.4690548987,37343028.79298549 2026412.7975274948,37343024.36349438 2026402.800136831,37343020.62692146 2026392.523455117,37343017.60047662 2026382.0158757505,37343014.53736561 2026367.7884403756,37342998.802186266 2026355.2598068258)),((37342684.474113196 2026681.7678619213,37342697.86007041 2026684.1221921882,37342780.41605009 2026697.5276640216,37342785.17736046 2026693.44891586,37342784.243153 2026557.2187332094,37342769.141550235 2026542.4269937698,37342683.52653461 2026543.613566511,37342684.474113196 2026681.7678619213)))";
|
|
|
+ hxfxHandleService.hgxfxHandle(hgxfxDTO.getBsm(), ewkt);
|
|
|
+ });
|
|
|
return RequestResult.success(hgxfxDTO.getBsm());
|
|
|
}
|
|
|
|