<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="org.jeecg.modules.board.mapper.DtBoardMapper">
|
|
<select id="equRepairList" resultType="org.jeecg.modules.board.vo.EquRepair">
|
SELECT
|
t3.equipment_code equipmentId,
|
COUNT(*) faultNum,
|
ROUND(
|
SUM(DATEDIFF(MINUTE, t2.fault_start_time, t1.actual_end_time)) / 60.0,
|
2
|
) faultTime
|
FROM
|
eam_repair_order t1
|
LEFT JOIN eam_report_repair t2 ON t1.report_id = t2.id
|
LEFT JOIN eam_equipment t3 ON t1.equipment_id = t3.id
|
WHERE
|
t1.repair_status = 'COMPLETE'
|
AND t2.fault_start_time > #{date}
|
AND t3.equipment_code IN
|
<foreach collection="equipmentIdList" item="id" index="index" open="(" close=")" separator=",">
|
#{ id }
|
</foreach>
|
GROUP BY
|
t3.equipment_code
|
</select>
|
</mapper>
|