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

场站地图数据接口更新

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