| | |
| | | t2.equipment_model equipmentModel, |
| | | t2.factory_org_code factoryName, |
| | | DATEPART( YEAR, t1.inspection_date ) AS inspectionYear, |
| | | DATEPART( MONTH, t1.inspection_date ) AS inspectionMonth |
| | | DATEPART( MONTH, t1.inspection_date ) AS inspectionMonth, |
| | | t1.hf_code hfCode |
| | | FROM |
| | | eam_inspection_order t1 |
| | | LEFT JOIN eam_equipment t2 ON t1.equipment_id = t2.id |
| | |
| | | LEFT JOIN eam_equipment t2 ON t1.equipment_id = t2.id |
| | | LEFT JOIN eam_inspection_order t3 ON t3.inspection_date = t1.plan_inspection_date |
| | | AND t3.equipment_id = t1.equipment_id |
| | | AND t1.inspector IS NOT NULL |
| | | WHERE |
| | | t2.equipment_code = #{equipmentCode} |
| | | AND t3.inspection_date LIKE CONCAT(#{inspectionDate},'%') |