Lius
2023-10-12 a6d22f16447c4b440b269fa8b43daf919e5a10c4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?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.mdc.mapper.MdcWorkshopInfoMapper">
 
 
    <select id="getBigScreenInfo" resultType="org.jeecg.modules.mdc.dto.MdcBigScreenEquipmentDto">
        SELECT
            mew.id id,
            a.EquipmentID equipmentId,
            mew.equipment_image equipmentImage,
            a.Oporation equipmentStatus,
            mew.coordinate_left coordinateLeft,
            mew.coordinate_top coordinateTop,
            mew.vw vw,
            mew.vh vh
        FROM
            EquipmentLog a
                INNER JOIN ( SELECT EquipmentID, MAX ( CollectTime ) 'maxgdtime' FROM EquipmentLog GROUP BY EquipmentID ) b ON a.EquipmentID= b.EquipmentID
                INNER JOIN mdc_workshop_equipment mew ON mew.equipment_id = a.EquipmentID
                AND a.CollectTime= b.maxgdtime
                AND mew.workshop_id = #{ workshopId }
    </select>
</mapper>