| | |
| | | <result column="completed_count" property="completedCount"/> |
| | | </resultMap> |
| | | |
| | | <sql id="gdClueEventDeptWhere"> |
| | | where ce.is_deleted = 0 |
| | | and ce.dispose_dept = #{deptId} |
| | | </sql> |
| | | |
| | | <resultMap id="gdClueEventExcelResultMap" type="org.sxkj.gd.workorder.excel.GdClueEventExcel"> |
| | | <result column="result_id" property="resultId"/> |
| | | <result column="work_order_id" property="workOrderId"/> |
| | |
| | | left join ja_gd_task_result tr on tr.id::VARCHAR = ce.result_id::VARCHAR and tr.is_deleted = 0 |
| | | left join blade_user bu on bu.id::VARCHAR = ce.dispose_user::VARCHAR and bu.is_deleted = 0 |
| | | left join blade_dept bd on bd.id::VARCHAR = ce.dispose_dept::VARCHAR and bd.is_deleted = 0 |
| | | <include refid="gdClueEventDeptWhere"/> |
| | | where ce.is_deleted = 0 |
| | | <if test="deptId != null"> |
| | | and ce.dispose_dept = #{deptId} |
| | | </if> |
| | | <if test="statusList != null and statusList.size() > 0"> |
| | | and ce.event_status in |
| | | <foreach collection="statusList" item="status" open="(" separator="," close=")"> |
| | |
| | | left join blade_user cu on cu.id::VARCHAR = ce.create_user::VARCHAR and cu.is_deleted = 0 |
| | | left join blade_dept cd on cd.id::VARCHAR = ce.create_dept::VARCHAR and cd.is_deleted = 0 |
| | | left join ja_gd_task_result tr on tr.id::VARCHAR = ce.result_id::VARCHAR and tr.is_deleted = 0 |
| | | <include refid="gdClueEventDeptWhere"/> |
| | | where ce.is_deleted = 0 |
| | | <if test="deptId != null"> |
| | | and ce.dispose_dept = #{deptId} |
| | | </if> |
| | | and ce.id = #{id} |
| | | </select> |
| | | |
| | |
| | | COALESCE(sum(case when ce.event_status = 3 then 1 else 0 end), 0) as disposed_count, |
| | | COALESCE(sum(case when ce.event_status = 4 then 1 else 0 end), 0) as completed_count |
| | | from ja_gd_clue_event ce |
| | | <include refid="gdClueEventDeptWhere"/> |
| | | where ce.is_deleted = 0 |
| | | <if test="deptId != null"> |
| | | and ce.dispose_dept = #{deptId} |
| | | </if> |
| | | <if test="statusList != null and statusList.size() > 0"> |
| | | and ce.event_status in |
| | | <foreach collection="statusList" item="status" open="(" separator="," close=")"> |