| | |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectTaskReportForRepairsPage" resultMap="taskReportForRepairsResultMap"> |
| | | select * from jczz_task_report_for_repairs where is_deleted = 0 |
| | | <!--自定义分页查询--> |
| | | <select id="selectTaskReportForRepairsPage" resultType="org.springblade.modules.task.vo.TaskReportForRepairsVO"> |
| | | select |
| | | jtrfr.*, |
| | | jda.address_name as addressName |
| | | from jczz_task_report_for_repairs jtrfr |
| | | left join jczz_doorplate_address jda on jda.address_code = jtrfr.address_code |
| | | where jtrfr.is_deleted = 0 |
| | | <if test="vo.createUser != null and vo.createUser != ''"> |
| | | AND create_user = #{vo.createUser} |
| | | AND jtrfr.create_user = #{vo.createUser} |
| | | </if> |
| | | <if test="vo.type != null and vo.type != ''"> |
| | | AND type = #{vo.type} |
| | | <if test="vo.type != null"> |
| | | AND jtrfr.type = #{vo.type} |
| | | </if> |
| | | ORDER BY create_time DESC |
| | | <if test="vo.realName != null and vo.realName != ''"> |
| | | AND jtrfr.real_name like concat('%',#{vo.realName},'%') |
| | | </if> |
| | | <if test="vo.phone != null and vo.phone != ''"> |
| | | AND jtrfr.phone like concat('%',#{vo.phone},'%') |
| | | </if> |
| | | <if test="vo.confirmFlag != null"> |
| | | AND jtrfr.confirm_flag = #{vo.confirmFlag} |
| | | </if> |
| | | <if test="vo.roleName!=null and vo.roleName!=''"> |
| | | <if test="vo.roleName=='网格员'"> |
| | | <choose> |
| | | <when test="list != null and list.size()>0"> |
| | | and jda.address_code in |
| | | <foreach collection="list" item="houseCode" separator ="," open="(" close=")"> |
| | | #{houseCode} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and jda.address_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | </if> |
| | | ORDER BY jtrfr.create_time DESC |
| | | </select> |
| | | |
| | | <!--统计查询,个人--> |
| | | <select id="getStatisticsCount" resultType="org.springblade.modules.task.vo.TaskReportStatistics"> |
| | | SELECT |
| | | COUNT( 1 ) AS total, |