Commit f0d22e94 authored by 高建强's avatar 高建强

场站地图数据接口更新

parent 2afdc84f
...@@ -3,35 +3,34 @@ ...@@ -3,35 +3,34 @@
<mapper namespace="com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper"> <mapper namespace="com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper">
<select id="queryPage" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.StationBasicDto"> <select id="queryPage" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.StationBasicDto">
select select
station_basic.sequence_nbr sequenceNbr, station_basic.sequence_nbr sequenceNbr,
station_basic.station_name stationName , station_basic.station_name stationName ,
station_basic.station_master_name stationMasterName , station_basic.station_master_name stationMasterName ,
station_basic.mobile_phone mobilePhone , station_basic.mobile_phone mobilePhone ,
station_basic.station_type stationType , station_basic.station_type stationType ,
station_basic.address address , station_basic.address address ,
station_basic.owner_unit ownerUnit station_basic.owner_unit ownerUnit
from station_basic from station_basic
<where> <where>
is_delete=0 is_delete=0
<if test="stationMasterName != null and stationMasterName != ''"> <if test="stationMasterName != null and stationMasterName != ''">
AND station_basic.station_master_name like concat('%',#{stationMasterName},'%') AND station_basic.station_master_name like concat('%',#{stationMasterName},'%')
</if> </if>
<if test="stationName != null and stationName != ''"> <if test="stationName != null and stationName != ''">
AND station_basic.station_name like concat('%',#{stationName},'%') AND station_basic.station_name like concat('%',#{stationName},'%')
</if> </if>
<if test="stationType != null and stationType != ''"> <if test="stationType != null and stationType != ''">
AND station_basic.station_type = #{stationType} AND station_basic.station_type = #{stationType}
</if> </if>
<if test="orgCode != null and orgCode != ''"> <if test="orgCode != null and orgCode != ''">
AND station_basic.project_org_code like concat('%',#{orgCode},'%') AND station_basic.project_org_code like concat('%',#{orgCode},'%')
</if> </if>
</where> </where>
ORDER BY station_basic.rec_date DESC ORDER BY station_basic.rec_date DESC
limit #{current},#{size} limit #{current},#{size}
</select> </select>
<select id="queryPagecount" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.StationBasicDto"> <select id="queryPagecount" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.StationBasicDto">
...@@ -56,28 +55,28 @@ ...@@ -56,28 +55,28 @@
</where> </where>
</select> </select>
<delete id="deleteList" parameterType="int"> <delete id="deleteList" parameterType="int">
delete from station_basic where sequence_nbr in delete from station_basic where sequence_nbr in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach>; </foreach>;
delete from station_coordinate where station_id in delete from station_coordinate where station_id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<select id="getExStationBasicDto" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.ExStationBasicDto"> <select id="getExStationBasicDto" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.ExStationBasicDto">
select select
station_basic.station_name stationName , station_basic.station_name stationName ,
station_basic.station_code stationCode, station_basic.station_code stationCode,
station_basic.station_type stationType, station_basic.station_type stationType,
station_basic.station_flag stationFlag, station_basic.station_flag stationFlag,
station_basic.address address, station_basic.address address,
station_basic.station_master_name stationMasterName , station_basic.station_master_name stationMasterName ,
station_basic.mobile_phone mobilePhone , station_basic.mobile_phone mobilePhone ,
station_basic.phone phone, station_basic.phone phone,
station_basic.email email, station_basic.email email,
station_basic.devops_time devopsTime, station_basic.devops_time devopsTime,
...@@ -100,11 +99,11 @@ ...@@ -100,11 +99,11 @@
AND station_basic.project_org_code like concat('%',#{orgCode},'%') AND station_basic.project_org_code like concat('%',#{orgCode},'%')
</if> </if>
</where> </where>
ORDER BY station_basic.rec_date DESC ORDER BY station_basic.rec_date DESC
</select> </select>
<select id="getStationList" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.StationInfoDto"> <select id="getStationList" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.StationInfoDto">
select select
station_basic.station_name stationName , station_basic.station_name stationName ,
station_basic.station_type stationType, station_basic.station_type stationType,
station_basic.station_flag stationFlag, station_basic.station_flag stationFlag,
station_coordinate.longitude, station_coordinate.longitude,
...@@ -113,7 +112,15 @@ ...@@ -113,7 +112,15 @@
from station_basic from station_basic
left join station_coordinate left join station_coordinate
on station_basic.sequence_nbr = station_coordinate.station_id on station_basic.sequence_nbr = station_coordinate.station_id
WHERE station_coordinate.is_main_coordinate = 0 LIMIT 1 WHERE station_coordinate.sequence_nbr in
(
SELECT
MIN(station_coordinate.sequence_nbr) station_coordinateID
FROM
station_basic
LEFT JOIN station_coordinate ON station_basic.sequence_nbr = station_coordinate.station_id
GROUP BY
( station_basic.sequence_nbr ))
<if test="areaCode != null and areaCode != ''"> <if test="areaCode != null and areaCode != ''">
AND station_basic.area_code like concat('%',#{areaCode},'%') AND station_basic.area_code like concat('%',#{areaCode},'%')
</if> </if>
......
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