| | |
| | | |
| | | <select id="page" resultMap="BaseResultMap"> |
| | | SELECT |
| | | wo.id,wo.status, wo.work_order_no,wo.create_time, wo.unit_id, wo.yw_people_id, wo.yw_handle_time, wo.yw_result, wo.yw_check_result, wo.overtime, wo.deduct, |
| | | wo.id,wo.status, wo.work_order_no, wo.serial_number,wo.create_time, wo.unit_id, wo.yw_people_id, wo.yw_handle_time, wo.yw_result, wo.yw_check_result, wo.overtime, wo.deduct, |
| | | u.unit_name, |
| | | p.yw_person_name, |
| | | tm.name as source, |
| | |
| | | AND wo.yw_handle_time BETWEEN #{query.start} AND #{query.end} |
| | | </if> |
| | | GROUP BY |
| | | wo.id, wo.status, wo.work_order_no,wo.create_time, wo.unit_id, wo.yw_people_id,tm.name, wo.yw_handle_time, wo.yw_result, wo.yw_check_result, wo.overtime, wo.deduct, |
| | | wo.id, wo.status, wo.work_order_no, wo.serial_number,wo.create_time, wo.unit_id, wo.yw_people_id,tm.name, wo.yw_handle_time, wo.yw_result, wo.yw_check_result, wo.overtime, wo.deduct, |
| | | u.unit_name, |
| | | p.yw_person_name |
| | | ORDER BY wo.create_time DESC |
| | |
| | | <select id="workOrderTotal" resultType="com.ycl.platform.domain.vo.screen.WorkOrderTotalVO"> |
| | | SELECT |
| | | COUNT(*) AS totalNum, |
| | | COUNT(IF(w.status = 'DISTRIBUTED', 1, NULL)) + COUNT(IF(w.status = 'AUDITING_FAIL', 1, NULL)) + COUNT(IF(w.status = 'WAIT_DISTRIBUTE', 1, NULL)) AS todoNum, |
| | | COUNT(IF(w.status = 'YW_HANDLE', 1, NULL)) + COUNT(IF(w.status = 'AUDITING_SUCCESS', 1, NULL)) + COUNT(IF(w.status = 'AUDITING', 1, NULL)) AS doneNum |
| | | COUNT(IF(w.status != 'AUDITING_SUCCESS' and w.status != 'WAIT_DISTRIBUTED', 1, NULL)) AS todoNum, |
| | | COUNT(IF(w.status = 'AUDITING_SUCCESS', 1, NULL)) AS doneNum |
| | | FROM t_work_order w |
| | | LEFT JOIN t_yw_point p ON w.serial_number = p.serial_number AND p.deleted = 0 |
| | | WHERE w.deleted = 0 |