| | |
| | | <otherwise> |
| | | and |
| | | ( |
| | | jg.grid_code in ('') or jpag.community_code in in ('') |
| | | jg.grid_code in ('') or jpag.community_code in ('') |
| | | ) |
| | | </otherwise> |
| | | </choose> |
| | |
| | | <otherwise> |
| | | and |
| | | ( |
| | | jg.grid_code in ('') or jpag.community_code in in ('') |
| | | jg.grid_code in ('') or jpag.community_code in ('') |
| | | ) |
| | | </otherwise> |
| | | </choose> |
| | |
| | | </select> |
| | | |
| | | <select id="getCount" resultType="java.lang.Integer"> |
| | | SELECT count(1) |
| | | FROM jczz_task_place_rectification jtpr |
| | | LEFT JOIN jczz_place jp ON jp.house_code = jtpr.house_code |
| | | WHERE jp.jw_grid_code IN |
| | | (SELECT jpag.jw_grid_code FROM jczz_police_affairs_grid jpag WHERE jpag.police_user_id like concat('%',${userId},'%')) |
| | | AND jtpr.`status` = 1 |
| | | |
| | | SELECT count(1) |
| | | FROM |
| | | jczz_task_place_rectification jtpr |
| | | LEFT JOIN jczz_place jp ON jtpr.house_code = jp.house_code |
| | | LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code |
| | | LEFT JOIN blade_region br ON br.`code` = jg.community_code |
| | | LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id |
| | | LEFT JOIN blade_user bu ON bu.id = jtpr.create_user |
| | | LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code |
| | | <where> |
| | | <if test="taskPalce.communityCode != null ">and jg.community_code = #{taskPalce.communityCode}</if> |
| | | <if test="taskPalce.status != null ">and jtpr.status = #{taskPalce.status}</if> |
| | | <if test="isAdministrator==2"> |
| | | <choose> |
| | | <when test="taskPalce.roleName != null and taskPalce.roleName != ''"> |
| | | <if test="taskPalce.roleName=='wgy'"> |
| | | <choose> |
| | | <when test="gridCodeList !=null and gridCodeList.size()>0"> |
| | | and jp.grid_code in |
| | | <foreach collection="gridCodeList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and jp.grid_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | <if test="taskPalce.roleName=='mj'"> |
| | | <choose> |
| | | <when test="regionChildCodesList !=null and regionChildCodesList.size()>0"> |
| | | and br.village_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" |
| | | separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and br.village_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | </when> |
| | | <otherwise> |
| | | <choose> |
| | | <when test="regionChildCodesList !=null and regionChildCodesList.size()>0"> |
| | | and |
| | | ( |
| | | jg.grid_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | or |
| | | jpag.community_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | ) |
| | | </when> |
| | | <otherwise> |
| | | and |
| | | ( |
| | | jg.grid_code in ('') or jpag.community_code in ('') |
| | | ) |
| | | </otherwise> |
| | | </choose> |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |