Commit d8ee8871 authored by chenhao's avatar chenhao

修改获取联系人sql语句的方式

parent 7621d26a
...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper; ...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -60,11 +61,6 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> { ...@@ -60,11 +61,6 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
//未结束灾情列表 //未结束灾情列表
List<AlertCalled> AlertCalledStatusPage(@Param("current")Integer current, @Param("size")Integer size); List<AlertCalled> AlertCalledStatusPage(@Param("current")Integer current, @Param("size")Integer size);
List<Map<String, Object>> getOrgUserLocation(String locationt); Set<Map<String, Object>> getLocation();
List<Map<String, Object>> getAlertCalledLocation(String locationt);
List<Map<String, Object>> getKeySiteLocation(String locationt);
List<Map<String, Object>> getAirportLocation(String locationt);
} }
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
</select> </select>
<select id="getKeySiteLocation" resultType="Map"> <!-- <select id="getKeySiteLocation" resultType="Map">
SELECT SELECT
address_desc AS location, address_desc AS location,
latitude, latitude,
...@@ -309,5 +309,76 @@ ...@@ -309,5 +309,76 @@
WHERE WHERE
is_delete=0 is_delete=0
</select> </select>
-->
<select id="getLocation" resultType="Map">
SELECT
*
FROM
(
(
SELECT
stand_code AS location,
longitude,
latitude
FROM
jc_airport_stand
WHERE
is_delete = 0
)
UNION ALL
(
SELECT
tt.location AS location,
tt.longitude AS longitude,
tt.latitude AS latitude
FROM
(
SELECT
CASE
WHEN field_code = 'companyLocation' THEN
field_value
END AS location,
CASE
WHEN field_code = 'longitude' THEN
field_value
END AS longitude,
CASE
WHEN field_code = 'latitude' THEN
field_value
END AS latitude
FROM
cb_dynamic_form_instance
WHERE
group_code = '244'
) tt
WHERE
tt.location IS NOT NULL
)
UNION ALL
(
SELECT
address AS location,
coordinate_x AS latitude,
coordinate_y AS longitude
FROM
jc_alert_called
WHERE
is_delete = 0
) UNION all (
SELECT
address_desc AS location,
latitude,
longitude
FROM
cb_key_site
WHERE
is_delete=0
)
) hh
</select>
</mapper> </mapper>
...@@ -859,16 +859,16 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal ...@@ -859,16 +859,16 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
/* 2304 地址 联系人模糊查询缺失 陈召 2021-09-23 结束 */ /* 2304 地址 联系人模糊查询缺失 陈召 2021-09-23 结束 */
public Set<Map<String, Object>> getLocationLike(String locationt) { public Set<Map<String, Object>> getLocationLike(String locationt) {
Set<Map<String, Object>> set=new HashSet<Map<String, Object>>(); // Set<Map<String, Object>> set=new HashSet<Map<String, Object>>();
List<Map<String, Object>> orgUserLocation = alertCalledMapper.getOrgUserLocation(locationt); // List<Map<String, Object>> orgUserLocation = alertCalledMapper.getOrgUserLocation(locationt);
List<Map<String, Object>> alertCalledLocation = alertCalledMapper.getAlertCalledLocation(locationt); // List<Map<String, Object>> alertCalledLocation = alertCalledMapper.getAlertCalledLocation(locationt);
List<Map<String, Object>> keySiteLocation = alertCalledMapper.getKeySiteLocation(locationt); // List<Map<String, Object>> keySiteLocation = alertCalledMapper.getKeySiteLocation(locationt);
List<Map<String, Object>> airportLocation = alertCalledMapper.getAirportLocation(locationt); // List<Map<String, Object>> airportLocation = alertCalledMapper.getAirportLocation(locationt);
set.addAll(alertCalledLocation); // set.addAll(alertCalledLocation);
set.addAll(keySiteLocation); // set.addAll(keySiteLocation);
set.addAll(airportLocation); // set.addAll(airportLocation);
set.addAll(orgUserLocation); // set.addAll(orgUserLocation);
set.remove(null); // set.remove(null);
return set; return alertCalledMapper.getLocation();
} }
} }
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