| | |
| | | |
| | | <select id="selectTaskReportForRepairsPage" resultMap="taskReportForRepairsResultMap"> |
| | | select * from jczz_task_report_for_repairs where is_deleted = 0 |
| | | <if test="vo.createUser != null and vo.createUser != ''"> |
| | | AND create_user = #{vo.createUser} |
| | | </if> |
| | | <if test="vo.type != null and vo.type != ''"> |
| | | AND type = #{vo.type} |
| | | </if> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | <select id="getStatisticsCount" resultType="org.springblade.modules.task.vo.TaskReportStatistics"> |
| | | SELECT |
| | | CASE |
| | | TEMP.TOTAL |
| | | WHEN TEMP.TOTAL != 0 THEN |
| | | TEMP.TOTAL ELSE 0 |
| | | END AS TOTAL, |
| | | CASE |
| | | TEMP.HANDLE |
| | | WHEN TEMP.HANDLE != 0 THEN |
| | | TEMP.HANDLE ELSE 0 |
| | | END AS HANDLE |
| | | FROM |
| | | ( |
| | | SELECT |
| | | COUNT( 1 ) AS total, |
| | | SUM( CASE WHEN STATUS = 10 THEN 1 ELSE 0 END ) AS handle |
| | | FROM |
| | | jczz_task_report_for_repairs |
| | | WHERE |
| | | is_deleted = 0 |
| | | ) TEMP |
| | | |
| | | |
| | | </select> |
| | | |
| | | |