#
luxiaotao1123
2024-11-11 95f54b8b7dbc42b7cdeb497145bc07484e41423d
zy-acs-manager/src/main/resources/mapper/manager/ActionMapper.xml
@@ -96,4 +96,26 @@
        ORDER BY ma.priority DESC
    </select>
    <select id="selectLatestOfGroup" resultType="com.zy.acs.manager.manager.entity.Action">
        SELECT *
        FROM man_action
        WHERE 1=1
        AND agv_id = #{agvId}
        AND action_sts = #{actionSts}
        AND group_id IN (
            SELECT group_id
            FROM man_action
            WHERE agv_id = #{agvId}
            AND action_sts = #{actionSts}
            GROUP BY group_id
            HAVING MAX(io_time) = (
                SELECT MAX(io_time)
                FROM man_action
                WHERE agv_id = #{agvId}
                AND action_sts = #{actionSts}
            )
        )
        ORDER BY priority DESC
    </select>
</mapper>