zhang
2025-07-23 b3814333d786324bb81cca7d1bcf5ac8f2f1a7cf
zy-acs-manager/src/main/resources/mapper/manager/VehFaultRecMapper.xml
@@ -23,4 +23,21 @@
        </where>
    </sql>
    <update id="resetError">
        UPDATE man_veh_fault_rec
        SET reset_time = now(),
            duration = (UNIX_TIMESTAMP(reset_time) - UNIX_TIMESTAMP(happen_time))
        WHERE agv_id = #{agvId}
          and reset_time is null
    </update>
    <select id="getTopVehFaultRec" resultType="com.zy.acs.manager.manager.entity.VehFaultRec">
        SELECT *
        FROM man_veh_fault_rec
        WHERE agv_id = #{agvId}
          and fault_no = #{faultNo}
          and reset_time is null
        ORDER BY happen_time DESC LIMIT 1
    </select>
</mapper>