12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.fdkankan.manage_jp.mapper.IProjectSceneGpsMapper">
- <select id="getNotGpsScene" resultType="com.fdkankan.manage_jp.vo.response.SceneGpsDb">
- SELECT DISTINCT s.num,s.scene_source,e.web_site,e.gps,e.data_source ,'v4' as scene_version
- FROM t_scene_plus s
- LEFT JOIN t_scene_plus_ext e on s.id = e.plus_id
- LEFT JOIN t_project_scene_gps gps on s.num = gps.num
- WHERE s.rec_status = 'A'and s.scene_status = -2 and s.scene_source in (4,5) and s.pay_status = 1 and gps.num is null
- </select>
-
- <select id="listGps" resultType="com.fdkankan.manage_jp.vo.response.SceneGpsDbVp">
- SELECT DISTINCT s.num,s.title ,s.laser_title,s.scene_source,'v4' as scene_version ,gps.lat,gps.lon,gps.alt,gps.web_site,c.sn_code
- FROM t_project_scene_gps gps
- LEFT JOIN t_scene_plus s on gps.num = s.num
- LEFT JOIN t_scene_plus_ext e on s.id = e.plus_id
- LEFT JOIN t_camera c on s.camera_id = c.id
- LEFT JOIN t_user u on s.user_id = u.id
- LEFT JOIN t_company co on u.company_id = co.id
- WHERE s.rec_status = 'A' and s.scene_status = -2 and s.pay_status = 1 and s.map_show = 1 and s.num is not null and gps.gps_source = 2
- <if test="param.searchKey != null and param.searchKey!='' ">
- and (s.title like concat ('%',#{param.searchKey},'%') or s.laser_title like concat ('%',#{param.searchKey},'%') or s.num = #{param.searchKey})
- </if>
- <if test="param.numList !=null and param.numList.size >0">
- and s.num in
- <foreach collection="param.numList" item="num" open="(" separator="," close=")">
- #{num}
- </foreach>
- </if>
- <if test="param.userId !=null and param.companyId !=null and param.cooperateSceneCodes !=null and param.cooperateSceneCodes.size >0">
- and ( s.user_id = #{param.userId} or co.id = #{param.companyId} or s.num in
- <foreach collection="param.cooperateSceneCodes" item="coNum" open="(" separator="," close=")">
- #{coNum}
- </foreach>
- )
- </if>
- <if test="param.userId !=null and param.companyId !=null and param.cooperateSceneCodes !=null and param.cooperateSceneCodes.size ==0 ">
- and (co.id = #{param.companyId} or s.user_id = #{param.userId} )
- </if>
- order by s.create_time desc
- </select>
- </mapper>
|