| | |
| | | <if test="createEndTime != null"> |
| | | and t1.create_time <= #{createEndTime} |
| | | </if> |
| | | |
| | | <if test="workCenterIds != null"> |
| | | and t2.work_center_id in |
| | | <foreach collection="workCenterIds" open="(" separator="," close=")" item="workCenterId"> |
| | | #{workCenterId} |
| | | </foreach> |
| | | </if> |
| | | order by t1.create_time desc |
| | | </select> |
| | | |
| | |
| | | t1.del_flag = 0 |
| | | AND t2.del_flag = 0 |
| | | <if test="params.equipmentNum != null and params.equipmentNum != ''"> |
| | | and t11.num = #{params.equipmentNum} |
| | | and t11.num like concat('%',#{params.equipmentNum},'%') |
| | | </if> |
| | | <if test="params.useId != null and params.useId != ''"> |
| | | and t11.use_id = #{params.useId} |
| | | </if> |
| | | <if test="params.faultStartTime != null"> |
| | | and t2.create_time >= #{params.faultStartTime} |
| | | </if> |
| | |
| | | t1.del_flag = 0 |
| | | AND t2.del_flag = 0 |
| | | <if test="params.equipmentNum != null and params.equipmentNum != ''"> |
| | | and t11.num = #{params.equipmentNum} |
| | | and t11.num like concat('%',#{params.equipmentNum},'%') |
| | | </if> |
| | | <if test="params.useId != null and params.useId != ''"> |
| | | and t11.use_id = #{params.useId} |
| | | </if> |
| | | <if test="params.faultStartTime != null"> |
| | | and t2.create_time >= #{params.faultStartTime} |
| | |
| | | </if> |
| | | ) t4 ON t3.item_value = t4.repair_order_fault_analysis_uda2 |
| | | group by t3.item_text |
| | | </select> |
| | | |
| | | <select id="getEquipmentFaultCause" parameterType="Map" resultType="Map"> |
| | | select count(SUBSTRING(CONVERT(VARCHAR(10), t1.fault_time, 120), 1, 10)) as '设备故障次数', |
| | | SUBSTRING(CONVERT(VARCHAR(10), t1.fault_time, 120), 1, 10) as type from mom_eam_equipment_report_repair t1 |
| | | left join mom_eam_equipment t2 on t1.equipment_id = t2.id |
| | | where 1=1 |
| | | <if test="params.equipmentNum != null and params.equipmentNum != ''"> |
| | | and t2.num like concat('%',#{params.equipmentNum},'%') |
| | | </if> |
| | | <if test="params.useId != null and params.useId != ''"> |
| | | and t2.use_id = #{params.useId} |
| | | </if> |
| | | <if test="params.faultStartTime != null"> |
| | | and t1.fault_time >= #{params.faultStartTime} |
| | | </if> |
| | | <if test="params.faultEndTime != null"> |
| | | and t1.fault_time <= #{params.faultEndTime} |
| | | </if> |
| | | GROUP BY SUBSTRING(CONVERT(VARCHAR(10), t1.fault_time, 120), 1, 10) |
| | | </select> |
| | | |
| | | <select id="getMTPF" parameterType="Map" resultType="Map"> |
| | |
| | | t1.del_flag = 0 |
| | | AND t2.del_flag = 0 |
| | | <if test="params.equipmentNum != null and params.equipmentNum != ''"> |
| | | and t11.num = #{params.equipmentNum} |
| | | and t11.num like concat('%',#{params.equipmentNum},'%') |
| | | </if> |
| | | <if test="params.useId != null and params.useId != ''"> |
| | | and t11.use_id = #{params.useId} |
| | | </if> |
| | | <if test="params.faultStartTime != null"> |
| | | and t2.create_time >= #{params.faultStartTime} |