| | |
| | | <mapper namespace="org.springblade.modules.police.mapper.PoliceAffairsGridMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="policeAffairsGridResultMap" type="org.springblade.modules.police.entity.PoliceAffairsGridEntity"> |
| | | <resultMap id="policeAffairsGridResultMap" type="org.springblade.modules.police.vo.PoliceAffairsGridVO"> |
| | | <result column="id" property="id"/> |
| | | <result column="object_id" property="objectId"/> |
| | | <result column="jws_code" property="jwsCode"/> |
| | |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <!--自定义分页查询--> |
| | | <select id="selectPoliceAffairsGridPage" resultMap="policeAffairsGridResultMap"> |
| | | select * from jczz_police_affairs_grid where is_deleted = 0 |
| | | <if test="policeAffairsGrid.communityName!=null and policeAffairsGrid.communityName!=''"> |
| | | and community_name like concat('%',#{policeAffairsGrid.communityName},'%') |
| | | </if> |
| | | <if test="policeAffairsGrid.jwGridCode!=null and policeAffairsGrid.jwGridCode!=''"> |
| | | and jw_grid_code like concat('%',#{policeAffairsGrid.jwGridCode},'%') |
| | | </if> |
| | | <if test="policeAffairsGrid.pcsCode!=null and policeAffairsGrid.pcsCode!=''"> |
| | | and pcs_code like concat('%',#{policeAffairsGrid.pcsCode},'%') |
| | | </if> |
| | | <if test="policeAffairsGrid.pcsName!=null and policeAffairsGrid.pcsName!=''"> |
| | | and pcs_name like concat('%',#{policeAffairsGrid.pcsName},'%') |
| | | </if> |
| | | <if test="isAdministrator==2"> |
| | | <choose> |
| | | <when test="policeAffairsGrid.roleName != null and policeAffairsGrid.roleName != ''"> |
| | | <if test="policeAffairsGrid.roleName=='mj'"> |
| | | <choose> |
| | | <when test="regionChildCodesList !=null and regionChildCodesList.size()>0"> |
| | | and community_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and community_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | </when> |
| | | <otherwise> |
| | | <choose> |
| | | <when test="regionChildCodesList !=null and regionChildCodesList.size()>0"> |
| | | and community_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and community_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | order by id desc,pcs_code desc |
| | | </select> |
| | | |
| | | <!--判断该点在哪个警务网格--> |