| | |
| | | WHERE |
| | | equipment_id = #{equipmentId} AND the_date LIKE CONCAT(#{date}, '%') |
| | | </select> |
| | | |
| | | <select id="findByEquipmentAndDate" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo"> |
| | | SELECT |
| | | the_date, |
| | | AVG ( open_long ) openLong, |
| | | AVG ( wait_long ) waitLong, |
| | | AVG ( process_long ) processLong, |
| | | AVG ( close_long ) closeLong, |
| | | AVG ( error_long ) errorLong |
| | | FROM |
| | | mdc_equipment_statistical_info |
| | | <where> |
| | | the_date BETWEEN #{start} AND #{end} |
| | | AND equipment_id IN |
| | | <foreach collection="equipmentList" index="index" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </where> |
| | | GROUP BY |
| | | the_date |
| | | </select> |
| | | |
| | | <select id="findByEquIdAndDate" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo"> |
| | | SELECT * FROM mdc_equipment_statistical_info WHERE equipment_id = #{equipmentId} AND the_date BETWEEN #{start} AND #{end} ORDER BY the_date |
| | | </select> |
| | | |
| | | <select id="findByEquIdAndMonth" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo"> |
| | | SELECT |
| | | AVG(open_long) openLong, |
| | | AVG(close_long) closeLong, |
| | | AVG(wait_long) waitLong, |
| | | AVG(process_long) processLong, |
| | | AVG(error_long) errorLong |
| | | FROM |
| | | mdc_equipment_statistical_info |
| | | WHERE |
| | | equipment_id = #{equipmentId} AND the_date LIKE CONCAT(#{month}, '%') |
| | | </select> |
| | | </mapper> |