@Query("select count(1) from InspectionWorkOrder where deleteFlag = 'N' and status = 3")
Optional<Integer>summaryInspectCompletedNumber();
@Query("select AVG(TIMESTAMPDIFF(SECOND, inspectionTime, inspectionCompletedTime)) AS avg_cost_seconds from InspectionWorkOrder where deleteFlag = 'N' AND status = 3 AND inspectionTime IS NOT null AND inspectionCompletedTime IS NOT NULL")
Optional<Integer>summaryAVGInspectTime();
@Query("select count(1) from InspectionWorkOrder where deleteFlag = 'N' and status = 3 and inspector = ?1")
@Query("select count(1) from InspectionWorkOrder where deleteFlag = 'N' and status = 3 and inspector = ?1 and inspectionTime >= ?2 and inspectionTime <= ?3 ")
@Query("select AVG(TIMESTAMPDIFF(SECOND, inspectionTime, inspectionCompletedTime)) AS avg_cost_seconds from InspectionWorkOrder where deleteFlag = 'N' AND status = 3 AND inspectionTime IS NOT null AND inspectionCompletedTime IS NOT NULL and inspector = ?1")
@Query("select AVG(TIMESTAMPDIFF(SECOND, inspectionTime, inspectionCompletedTime)) AS avg_cost_seconds from InspectionWorkOrder where deleteFlag = 'N' AND status = 3 AND inspectionTime IS NOT null AND inspectionCompletedTime IS NOT NULL and inspector = ?1 and inspectionTime >= ?2 and inspectionTime <= ?3 ")