| | |
| | | and err.create_time < #{end} |
| | | group by FORMAT(err.create_time, 'yyyy-MM') |
| | | </select> |
| | | <select id="repairStatusStatistics" resultType="org.jeecg.modules.eam.vo.EquipmentRepairStatusStatistics"> |
| | | SELECT |
| | | SUM(CASE WHEN t.report_status='WAIT_REPAIR' THEN 1 ELSE 0 END) AS waitRepair, |
| | | SUM(CASE WHEN t.report_status='UNDER_REPAIR' THEN 1 ELSE 0 END) AS underRepair, |
| | | SUM(CASE WHEN t.report_status='WAIT_SPARES' THEN 1 ELSE 0 END) AS waitSpares, |
| | | SUM(CASE WHEN t.report_status='WAIT_CONFIRM' THEN 1 ELSE 0 END) AS waitConfirm |
| | | from eam_report_repair t |
| | | where t.report_status not in ('ABOLISH', 'COMPLETE') and t.del_flag = 0 |
| | | </select> |
| | | |
| | | <select id="repairList" resultType="org.jeecg.modules.eam.vo.EquipmentRepairListVO"> |
| | | select e.equipment_code, |
| | | e.equipment_name, |
| | | e.org_id, |
| | | e.installation_position, |
| | | err.create_by as reportOperator, |
| | | err.fault_start_time, |
| | | ero.repairer as repairOperator, |
| | | ero.actual_start_time as repairStartTime, |
| | | err.report_status |
| | | from eam_report_repair err |
| | | left join eam_equipment e |
| | | on err.equipment_id = e.id |
| | | left join eam_repair_order ero |
| | | on ero.report_id = err.id |
| | | where err.report_status not in ('ABOLISH', 'COMPLETE') |
| | | and err.del_flag = 0 |
| | | order by e.org_id, err.fault_start_time |
| | | </select> |
| | | </mapper> |