| | |
| | | |
| | | |
| | | <select id="selectTaskCount" resultType="int" parameterType="org.springblade.modules.task.vo.TaskVO"> |
| | | SELECT count(1) |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_gridman jgm |
| | | LEFT JOIN jczz_grid jg ON jgm.grid_id = jg.id |
| | | LEFT JOIN jczz_grid_range jgr ON jg.id = jgr.grid_id |
| | | LEFT JOIN jczz_task jt ON jgr.house_code = jt.house_code |
| | | jczz_task jt |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jt.house_code |
| | | WHERE |
| | | jgm.user_id = #{userId} |
| | | <if test="status != null"> |
| | | and jt.status = #{status} |
| | | </if> |
| | | <if test="frequency != null"> |
| | | and jt.frequency = #{frequency} |
| | | </if> |
| | | <if test="type != null"> |
| | | and jt.type = #{type} |
| | | </if> |
| | | <!-- 取保候审 --> |
| | | <if test="reportType != null and reportType == 1 "> |
| | | and jt.report_type = 1 |
| | | </if> |
| | | <!-- 场所店铺 --> |
| | | <if test="reportType != null and reportType == 2 "> |
| | | and jt.report_type in (2,3,4,5,6) |
| | | </if> |
| | | <where> |
| | | <if test="status != null"> |
| | | and jt.status = #{status} |
| | | </if> |
| | | <if test="frequency != null"> |
| | | and jt.frequency = #{frequency} |
| | | </if> |
| | | <if test="type != null"> |
| | | and jt.type = #{type} |
| | | </if> |
| | | <!-- 取保候审 --> |
| | | <if test="reportType != null and reportType == 1 "> |
| | | and jt.report_type = 1 |
| | | </if> |
| | | <!-- 场所店铺 --> |
| | | <if test="reportType != null and reportType == 2 "> |
| | | and jt.report_type in (2,3,4,5,6) |
| | | </if> |
| | | |
| | | <if test="name != null and name != ''"> |
| | | and jt.name like concat('%', #{name}, '%') |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and jt.name like concat('%', #{name}, '%') |
| | | </if> |
| | | <if test="neiCode != null and neiCode != ''"> |
| | | and jda.nei_code = #{neiCode} |
| | | </if> |
| | | <if test="userId != null"> |
| | | AND jt.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid_range jgr |
| | | LEFT JOIN jczz_grid jg ON jg.id = jgr.grid_id |
| | | LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id |
| | | WHERE |
| | | jg.is_deleted = 0 |
| | | AND jgm.user_id = #{userId} ) |
| | | </if> |
| | | </where> |
| | | |
| | | order by jt.create_time desc |
| | | |
| | | </select> |
| | | |
| | | |