| | |
| | | </if> |
| | | order by p.equipment_id desc, p.shift_schedule asc |
| | | </select> |
| | | |
| | | <!--查询所有设备数量--> |
| | | <select id="getTotalDeviceCount" resultType="int"> |
| | | SELECT COUNT(*) |
| | | FROM mdc_equipment |
| | | </select> |
| | | |
| | | <!-- 早班 上班打卡 --> |
| | | <select id="countMorningShiftIn" resultType="int"> |
| | | SELECT COUNT(DISTINCT equipment_id) |
| | | FROM mdc_equipment_punch |
| | | WHERE record_date = #{date, jdbcType=VARCHAR} |
| | | AND shift_schedule = '1' |
| | | AND check_in_time IS NOT NULL |
| | | </select> |
| | | |
| | | <!-- 晚班 上班打卡 --> |
| | | <select id="countEveningShiftIn" resultType="int"> |
| | | SELECT COUNT(DISTINCT equipment_id) |
| | | FROM mdc_equipment_punch |
| | | WHERE record_date = #{date, jdbcType=VARCHAR} |
| | | AND shift_schedule = '2' |
| | | AND check_in_time IS NOT NULL |
| | | </select> |
| | | |
| | | <!-- 早班 下班打卡 --> |
| | | <select id="countMorningShiftOut" resultType="int"> |
| | | SELECT COUNT(DISTINCT equipment_id) |
| | | FROM mdc_equipment_punch |
| | | WHERE record_date = #{date, jdbcType=VARCHAR} |
| | | AND shift_schedule = '1' |
| | | AND check_out_time IS NOT NULL |
| | | </select> |
| | | |
| | | <!-- 晚班 下班打卡 --> |
| | | <select id="countEveningShiftOut" resultType="int"> |
| | | SELECT COUNT(DISTINCT equipment_id) |
| | | FROM mdc_equipment_punch |
| | | WHERE record_date = #{date, jdbcType=VARCHAR} |
| | | AND shift_schedule = '2' |
| | | AND check_out_time IS NOT NULL |
| | | </select> |
| | | |
| | | </mapper> |