| | |
| | | AND tt1.del_flag = '0' |
| | | ) |
| | | </select> |
| | | |
| | | <select id="findDayInspectionStandard" parameterType="String" resultType="Map"> |
| | | SELECT |
| | | t3.name AS name, |
| | | t3.detection_standard AS detectionStandard |
| | | FROM |
| | | mom_eam_daily_inspection_standard_detail t1 |
| | | LEFT JOIN mom_eam_daily_inspection_standard t2 ON t1.daily_inspection_standard_id = t2.id |
| | | LEFT JOIN mom_eam_inspection_project t3 ON t1.inspection_project_id = t3.id |
| | | LEFT JOIN mom_eam_equipment t4 ON t2.equipment_id = t4.id |
| | | WHERE t4.num = '0524' |
| | | AND t2.version_status = '2' |
| | | UNION ALL select '' as name,'维护责任人签字' as detectionStandard |
| | | UNION ALL select '' as name,'检查责任人签字' as detectionStandard |
| | | |
| | | </select> |
| | | |
| | | <select id="findDayInspectionStandardProject" parameterType="String" resultType="Map"> |
| | | SELECT |
| | | t3.name AS name, |
| | | t3.detection_standard AS detectionStandard, |
| | | t2.inspection_order_uda2 as inspectionUserName, |
| | | t2.inspection_order_uda1 AS repairConfirmPerson, |
| | | case t1.inspection_project_result when '1' then '√' when '2' then 'x' when '3' then '△' when '4' then 'T' else '' end as insResult, |
| | | CONVERT(VARCHAR, DATEPART(DAY, t2.create_time)) as dayTime |
| | | FROM |
| | | mom_eam_inspection_order_detail t1 |
| | | LEFT JOIN mom_eam_inspection_order t2 ON t1.inspection_order_id= t2.id |
| | | left join mom_eam_inspection_project t3 on t1.inspection_project_id = t3.id |
| | | LEFT JOIN mom_eam_equipment t4 ON t2.equipment_id = t4.id |
| | | WHERE |
| | | t4.num = '0524' |
| | | and t3.name = #{name} and t3.detection_standard = #{detectionStandard} |
| | | </select> |
| | | |
| | | <select id="getUserQianzi" parameterType="String" resultType="Map"> |
| | | SELECT |
| | | t1.inspection_order_uda2 AS inspectionUserName, |
| | | t1.inspection_order_uda1 AS repairConfirmPerson, |
| | | CONVERT ( VARCHAR, DATEPART( DAY, t1.create_time ) ) AS dayTime |
| | | FROM |
| | | mom_eam_inspection_order t1 |
| | | LEFT JOIN mom_eam_equipment t2 ON t1.equipment_id = t2.id |
| | | WHERE |
| | | t2.num = '0524' |
| | | </select> |
| | | </mapper> |