| | |
| | | <if test="rotation.regionCode!=null and rotation.regionCode!=''"> |
| | | and jr.community_code like concat('%',#{rotation.regionCode},'%') |
| | | </if> |
| | | <if test="isAdministrator==2"> |
| | | <choose> |
| | | <when test="rotation.roleName != null and rotation.roleName != ''"> |
| | | <if test="rotation.roleName=='wgy'"> |
| | | <choose> |
| | | <when test="gridCodeList !=null and gridCodeList !=''"> |
| | | and jr.type = 2 |
| | | and jr.community_code REGEXP #{gridCodeList} |
| | | </when> |
| | | <otherwise> |
| | | and jr.type = 2 |
| | | and jr.community_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | <if test="rotation.roleName=='mj'"> |
| | | <choose> |
| | | <when test="regionChildCodesList !=null and regionChildCodesList!=''"> |
| | | and jr.type = 1 |
| | | and jr.community_code REGEXP #{regionChildCodesList} |
| | | </when> |
| | | <otherwise> |
| | | and jr.type = 1 |
| | | and jr.community_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | <if test="rotation.roleName=='inhabitant'"> |
| | | and jr.type = 3 |
| | | </if> |
| | | </when> |
| | | <otherwise> |
| | | <choose> |
| | | <when test="regionChildCodesList !=null and regionChildCodesList!=''"> |
| | | and jr.community_code REGEXP #{regionChildCodesList} |
| | | </when> |
| | | <otherwise> |
| | | and jr.community_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | </select> |
| | | |
| | | |