#
luxiaotao1123
2024-12-23 766bcd63a19f7acaff2f5ed2cd1cb016894978ea
zy-acs-manager/src/main/resources/mapper/manager/ActionMapper.xml
@@ -96,4 +96,18 @@
        ORDER BY ma.priority DESC
    </select>
    <select id="selectLatestOfGroup" resultType="com.zy.acs.manager.manager.entity.Action">
        SELECT *
        FROM man_action a
        JOIN (
            SELECT group_id, MAX(io_time) AS max_io_time
            FROM man_action
            WHERE agv_id = #{agvId} AND action_sts = #{actionSts}
            GROUP BY group_id
        ) b ON a.group_id = b.group_id AND a.io_time = b.max_io_time
        WHERE a.agv_id = #{agvId}
        AND a.action_sts = #{actionSts}
        ORDER BY a.priority DESC
    </select>
</mapper>