| | |
| | | |
| | | <!--自定义分页查询--> |
| | | <select id="selectPlaceExtPage" resultType="org.springblade.modules.place.vo.PlaceExtVO"> |
| | | select jpe.*,jp.place_name as placeName from jczz_place_ext jpe |
| | | left join jczz_place jp on jpe.place_id = jp.id and jp.is_deleted = 0 |
| | | where jpe.is_deleted = 0 |
| | | SELECT |
| | | jpe.*, |
| | | jp.place_name AS placeName |
| | | FROM |
| | | jczz_place_ext jpe |
| | | LEFT JOIN jczz_place jp ON jpe.place_id = jp.id |
| | | AND jp.is_deleted = 0 |
| | | LEFT JOIN jczz_grid_range jgr on jgr.house_code=jp.house_code |
| | | LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id |
| | | WHERE |
| | | jpe.is_deleted = 0 |
| | | <if test="placeExt.communityCode != null and placeExt.communityCode != ''"> |
| | | and jg.community_code=#{placeExt.communityCode} |
| | | </if> |
| | | |
| | | <if test="placeExt.placeName != null and placeExt.placeName != ''"> |
| | | and jp.place_name like concat('%',#{placeExt.placeName},'%') |
| | | </if> |
| | |
| | | <if test="placeExt.confirmFlag != null"> |
| | | and jpe.confirm_flag = #{placeExt.confirmFlag} |
| | | </if> |
| | | <if test="placeExt.startTime != null and placeExt.startTime != '' and placeExt.endTime != null and placeExt.endTime != '' "> |
| | | AND jpe.create_time BETWEEN #{placeExt.startTime} and #{placeExt.endTime} |
| | | </if> |
| | | <if test="placeExt.roleName!=null and placeExt.roleName!='' and placeExt.createUser!=null"> |
| | | <choose> |
| | | <when test="placeExt.roleName=='网格员'"> |
| | |
| | | jp.create_user = #{placeExt.createUser} |
| | | <if test="houseCodeList != null and houseCodeList.size()>0"> |
| | | or jp.house_code in |
| | | <foreach collection="houseCodeList" item="houseCode" separator ="," open="(" close=")"> |
| | | <foreach collection="houseCodeList" item="houseCode" separator="," open="(" close=")"> |
| | | #{houseCode} |
| | | </foreach> |
| | | </if> |
| | |
| | | </select> |
| | | |
| | | <select id="getDetail" resultType="org.springblade.modules.place.vo.PlaceExtVO"> |
| | | select jpe.*, jp.place_name as placeName |
| | | select jpe.*, |
| | | jp.place_name as placeName, |
| | | jp.lng, |
| | | jp.lat, |
| | | jp.location |
| | | from jczz_place_ext jpe |
| | | left join jczz_place jp on jpe.place_id = jp.id and jp.is_deleted = 0 |
| | | where jpe.is_deleted = 0 |
| | | and jpe.place_id = #{placeExt.placeId} |
| | | left join jczz_place jp on jpe.place_id = jp.id and jp.is_deleted = 0 |
| | | where jpe.is_deleted = 0 and jpe.place_id = #{placeExt.placeId} |
| | | </select> |
| | | |
| | | |