AgvStateInfoMapper.xml 3.81 KB
<?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="com.huaheng.pc.monitor.agvcarinfo.mapper.AgvStateInfoMapper">
    <insert id="insertModel" parameterType="com.huaheng.pc.monitor.agvcarinfo.domain.StateInfoUploadModel">
        insert into agvstateinfo
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="carNo != null">
                carNo,
            </if>
            <if test="interactionId != null">
                interactionId,
            </if>
            <if test="taskType != null">
                taskType,
            </if>
            <if test="shelfNo != null">
                shelfNo,
            </if>
            <if test="station != null">
                station,
            </if>
            <if test="currentLocationNo != null">
                currentLocationNo,
            </if>
            <if test="fromLocationNo != null">
                fromLocationNo,
            </if>
            <if test="toLocationNo != null">
                toLocationNo,
            </if>
            <if test="orientation != null">
                orientation,
            </if>
            <if test="percentCapacity != null">
                percentCapacity,
            </if>
            <if test="exceptionFlag != null">
                exceptionFlag,
            </if>
            <if test="state != null">
                state,
            </if>
            <if test="exceptionInfo != null">
                exceptionInfo,
            </if>
            <if test="warehouseId != null">
                warehouseId,
            </if>
            <if test="warehouseCode != null">
                warehouseCode,
            </if>
        </trim>
        <trim prefix=" values (" suffix=")" suffixOverrides=",">
            <if test="carNo != null">
                #{carNo, jdbcType=VARCHAR},
            </if>
            <if test="interactionId != null">
                #{interactionId, jdbcType=VARCHAR},
            </if>
            <if test="taskType != null">
                #{taskType, jdbcType=VARCHAR},
            </if>
            <if test="shelfNo != null">
                #{shelfNo, jdbcType=VARCHAR},
            </if>
            <if test="station != null">
                #{station, jdbcType=VARCHAR},
            </if>
            <if test="currentLocationNo != null">
                #{currentLocationNo, jdbcType=VARCHAR},
            </if>
            <if test="fromLocationNo != null">
                #{fromLocationNo, jdbcType=VARCHAR},
            </if>
            <if test="toLocationNo != null">
                #{toLocationNo, jdbcType=VARCHAR},
            </if>
            <if test="orientation != null">
                #{orientation, jdbcType=VARCHAR},
            </if>
            <if test="percentCapacity != null">
                #{percentCapacity, jdbcType=INTEGER},
            </if>
            <if test="exceptionFlag != null">
                #{exceptionFlag, jdbcType=INTEGER},
            </if>
            <if test="state != null">
                #{state, jdbcType=VARCHAR},
            </if>
            <if test="exceptionInfo != null">
                #{exceptionInfo, jdbcType=VARCHAR},
            </if>
            <if test="warehouseId != null">
                #{warehouseId, jdbcType=INTEGER},
            </if>
            <if test="warehouseCode != null">
                #{warehouseCode, jdbcType=VARCHAR},
            </if>
        </trim>
    </insert>

    <select id="selectErrorList" resultType="com.huaheng.pc.monitor.agvcarinfo.domain.StateInfoUploadModel">
    select carNo,percentCapacity,exceptionInfo,date from agvstateinfo where warehouseCode=#{warehouseCode} and exceptionInfo is not null
     and exceptionInfo !=''
    order by id desc
    </select>
</mapper>