|
@@ -14,6 +14,7 @@
|
|
|
|
|
|
LIMIT 1000
|
|
LIMIT 1000
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="listGps" resultType="com.fdkankan.manage_jp.vo.response.SceneGpsDbVp">
|
|
<select id="listGps" resultType="com.fdkankan.manage_jp.vo.response.SceneGpsDbVp">
|
|
SELECT s.num,s.scene_name as title,null as laserTile,s.scene_source,'v3' as scene_version ,gps.lat,gps.lon,gps.alt,gps.web_site
|
|
SELECT s.num,s.scene_name as title,null as laserTile,s.scene_source,'v3' as scene_version ,gps.lat,gps.lon,gps.alt,gps.web_site
|
|
FROM t_scene_pro s
|
|
FROM t_scene_pro s
|
|
@@ -21,24 +22,24 @@
|
|
LEFT JOIN t_user u on s.user_id = u.id
|
|
LEFT JOIN t_user u on s.user_id = u.id
|
|
LEFT JOIN t_company co on u.company_id = co.id
|
|
LEFT JOIN t_company co on u.company_id = co.id
|
|
WHERE s.rec_status = 'A' and is_upgrade = 0 and s.`status` = -2 and gps.num is not null
|
|
WHERE s.rec_status = 'A' and is_upgrade = 0 and s.`status` = -2 and gps.num is not null
|
|
- <if test="param.searchKey != null and param.searchKey!='' ">
|
|
|
|
|
|
+ <if test="searchKey != null and searchKey!='' ">
|
|
and s.scene_name like concat ('%',#{searchKey},'%')
|
|
and s.scene_name like concat ('%',#{searchKey},'%')
|
|
</if>
|
|
</if>
|
|
- <if test="param.numList !=null and param.numList.size >0">
|
|
|
|
|
|
+ <if test="numList !=null and numList.size >0">
|
|
and s.num in
|
|
and s.num in
|
|
- <foreach collection="param.numList" item="num" open="(" separator="," close=")">
|
|
|
|
|
|
+ <foreach collection="numList" item="num" open="(" separator="," close=")">
|
|
#{num}
|
|
#{num}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</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=")">
|
|
|
|
|
|
+ <if test="userId !=null and companyId !=null and cooperateSceneCodes !=null and cooperateSceneCodes.size >0">
|
|
|
|
+ and ( s.user_id = #{userId} or co.id = #{companyId} or s.num in
|
|
|
|
+ <foreach collection="cooperateSceneCodes" item="coNum" open="(" separator="," close=")">
|
|
#{coNum}
|
|
#{coNum}
|
|
</foreach>
|
|
</foreach>
|
|
)
|
|
)
|
|
</if>
|
|
</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 test="userId !=null and companyId !=null and cooperateSceneCodes !=null and cooperateSceneCodes.size ==0 ">
|
|
|
|
+ and (co.id = #{companyId} or s.user_id = #{userId} )
|
|
</if>
|
|
</if>
|
|
|
|
|
|
UNION
|
|
UNION
|
|
@@ -49,24 +50,24 @@
|
|
LEFT JOIN t_user u on s.user_id = u.id
|
|
LEFT JOIN t_user u on s.user_id = u.id
|
|
LEFT JOIN t_company co on u.company_id = co.id
|
|
LEFT JOIN t_company co on u.company_id = co.id
|
|
WHERE s.rec_status = 'A' and s.scene_status = -2 and gps.num is not null
|
|
WHERE s.rec_status = 'A' and s.scene_status = -2 and gps.num is not null
|
|
- <if test="param.searchKey != null and param.searchKey!='' ">
|
|
|
|
- and (s.title like concat ('%',#{param.searchKey},'%') or s.laser_title like concat ('%',#{param.searchKey},'%') )
|
|
|
|
|
|
+ <if test="searchKey != null and searchKey!='' ">
|
|
|
|
+ and (s.title like concat ('%',#{searchKey},'%') or s.laser_title like concat ('%',#{searchKey},'%') )
|
|
</if>
|
|
</if>
|
|
- <if test="param.numList !=null and param.numList.size >0">
|
|
|
|
|
|
+ <if test="numList !=null and numList.size >0">
|
|
and s.num in
|
|
and s.num in
|
|
- <foreach collection="param.numList" item="num" open="(" separator="," close=")">
|
|
|
|
|
|
+ <foreach collection="numList" item="num" open="(" separator="," close=")">
|
|
#{num}
|
|
#{num}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</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=")">
|
|
|
|
|
|
+ <if test="userId !=null and companyId !=null and cooperateSceneCodes !=null and cooperateSceneCodes.size >0">
|
|
|
|
+ and ( s.user_id = #{userId} or co.id = #{companyId} or s.num in
|
|
|
|
+ <foreach collection="cooperateSceneCodes" item="coNum" open="(" separator="," close=")">
|
|
#{coNum}
|
|
#{coNum}
|
|
</foreach>
|
|
</foreach>
|
|
)
|
|
)
|
|
</if>
|
|
</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 test="userId !=null and companyId !=null and cooperateSceneCodes !=null and cooperateSceneCodes.size ==0 ">
|
|
|
|
+ and (co.id = #{companyId} or s.user_id = #{userId} )
|
|
</if>
|
|
</if>
|
|
|
|
|
|
</select>
|
|
</select>
|