Commit 0ffaacb5 authored by 周健威's avatar 周健威

修改代码

parent 26d2c15a
...@@ -121,7 +121,7 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo ...@@ -121,7 +121,7 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo
String redisStr = redisTemplate.opsForValue().get(dto.getShpKey()).toString(); String redisStr = redisTemplate.opsForValue().get(dto.getShpKey()).toString();
ShpDTO shpDTO = JSONUtil.toBean(redisStr, ShpDTO.class); ShpDTO shpDTO = JSONUtil.toBean(redisStr, ShpDTO.class);
if(CollUtil.isNotEmpty(shpDTO.getFeatures())) { if(CollUtil.isNotEmpty(shpDTO.getFeatures())) {
dto.setGeom(shpDTO.getFeatures().get(0)); dto.setGeoms(shpDTO.getFeatures());
// dto.setGeom(redisTemplate.opsForValue().get(dto.getShpKey()).toString()); // dto.setGeom(redisTemplate.opsForValue().get(dto.getShpKey()).toString());
} }
return ObjectRestResponse.succ(baseBiz.queryDataAreaList(dto)); return ObjectRestResponse.succ(baseBiz.queryDataAreaList(dto));
...@@ -192,6 +192,7 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo ...@@ -192,6 +192,7 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo
String startDateTime; String startDateTime;
String endDateTime; String endDateTime;
String geom; String geom;
List<String> geoms;
String areaNo; String areaNo;
String provinceNo; String provinceNo;
List<satelliteDTO> saSensor; List<satelliteDTO> saSensor;
......
...@@ -132,6 +132,15 @@ ...@@ -132,6 +132,15 @@
<if test="geom != null"> <if test="geom != null">
, (select geojsontowkt(#{geom}, 'true') geom_input) temp , (select geojsontowkt(#{geom}, 'true') geom_input) temp
</if> </if>
<if test="geoms != null">
, ( select st_asgeojson(st_union(item_geom)
from
<foreach collection="geoms" index="geomsIndex" item="geomsItem" open="(" close=")" separator=" UNION ALL ">
select geojsontowkt(#{geomsItem}, 'true') item_geom
</foreach>
as item_temp
) geoms_input ) temp
</if>
<where> <where>
<if test="saSensor != null"> <if test="saSensor != null">
and and
...@@ -160,6 +169,9 @@ ...@@ -160,6 +169,9 @@
<if test="geom != null"> <if test="geom != null">
and ST_Intersects(temp.geom_input,range) and ST_Intersects(temp.geom_input,range)
</if> </if>
<if test="geoms != null">
and ST_Intersects(temp.geoms_input,range)
</if>
</where> </where>
</sql> </sql>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment