| | |
| | | <mapper namespace="org.jeecg.modules.mdc.mapper.EquipmentStatisticalInfoMapper"> |
| | | <select id="findDataRankingForBigScreen" resultType="org.jeecg.modules.mdc.subcontrol.vo.LastWeekDataVo"> |
| | | SELECT |
| | | EQUIPMENT, |
| | | SUM( CLOSEDLONG ) CLOSEDLONG, |
| | | SUM( ERRORINGLONG ) ERRORINGLONG, |
| | | SUM( OPENINGLONG ) OPENINGLONG, |
| | | SUM( PROCESSINGLONG ) PROCESSINGLONG, |
| | | SUM( WAITINGLONG ) WAITINGLONG |
| | | equipment_id equipment, |
| | | SUM( open_long ) openlong, |
| | | SUM( close_long ) closelong, |
| | | SUM( wait_long ) waitlong, |
| | | SUM( process_long ) processingLong, |
| | | SUM( error_long ) errorlong |
| | | FROM |
| | | EQUIPMENTSTATISTICALINFO |
| | | mdc_equipment_statistical_info |
| | | <where> |
| | | <if test="equipmentIdList != null and equipmentIdList.size() > 0"> |
| | | AND EQUIPMENT IN |
| | | AND equipment_id IN |
| | | <foreach collection="equipmentIdList" item="id" index="index" open="(" close=")" separator=","> |
| | | #{ id } |
| | | </foreach> |
| | | </if> |
| | | AND THEDATE >= #{ monday } |
| | | AND THEDATE <= #{ saturday } |
| | | AND the_date >= #{ monday } |
| | | AND the_date <= #{ saturday } |
| | | </where> |
| | | GROUP BY |
| | | EQUIPMENT; |
| | | equipment_id; |
| | | </select> |
| | | |
| | | <select id="findDataForBigScreen" resultType="org.jeecg.modules.mdc.subcontrol.vo.LastWeekDataVo"> |
| | | SELECT |
| | | THEDATE, |
| | | SUM( OPENINGLONG ) OPENINGLONG, |
| | | SUM(CLOSEDLONG) CLOSEDLONG, |
| | | SUM(PROCESSINGLONG) PROCESSINGLONG, |
| | | SUM(WAITINGLONG) WAITINGLONG |
| | | equipment_id equipment, |
| | | SUM( open_long ) openlong, |
| | | SUM( close_long ) closelong, |
| | | SUM( wait_long ) waitlong, |
| | | SUM( process_long ) processingLong, |
| | | SUM( error_long ) errorlong |
| | | FROM |
| | | EQUIPMENTSTATISTICALINFO |
| | | mdc_equipment_statistical_info |
| | | <where> |
| | | <if test="equipmentIdList != null and equipmentIdList.size() > 0"> |
| | | AND EQUIPMENT IN |
| | | AND equipment_id IN |
| | | <foreach collection="equipmentIdList" item="id" index="index" open="(" close=")" separator=","> |
| | | #{ id } |
| | | </foreach> |
| | | </if> |
| | | AND THEDATE >= #{ monday } |
| | | AND THEDATE <= #{ saturday } |
| | | AND the_date >= #{ monday } |
| | | AND the_date <= #{ saturday } |
| | | </where> |
| | | GROUP BY |
| | | THEDATE |
| | | the_date |
| | | ORDER BY |
| | | THEDATE ASC; |
| | | the_date ASC; |
| | | </select> |
| | | |
| | | <select id="findEquipmentId" resultType="java.lang.String"> |
| | | SELECT DISTINCT |
| | | EQUIPMENT |
| | | equipment_id equipment |
| | | FROM |
| | | EQUIPMENTSTATISTICALINFO |
| | | |
| | | mdc_equipment_statistical_info |
| | | <where> |
| | | <if test="equipmentIdList != null and equipmentIdList.size() > 0"> |
| | | AND EQUIPMENT IN |
| | | AND equipment_id IN |
| | | <foreach collection="equipmentIdList" item="id" index="index" open="(" close=")" separator=","> |
| | | #{ id } |
| | | </foreach> |
| | | </if> |
| | | <if test="date != null and date != ''"> |
| | | AND THEDATE = #{ date } |
| | | AND the_date = #{ date } |
| | | </if> |
| | | </where> |
| | | </select> |