王佳豪
2021-03-09 cc344f433bf14d966207255ac0c8f93a9a46dec2
src/main/resources/mapper/LocNormalMapper.xml
@@ -4,22 +4,22 @@
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.asrs.entity.LocNormal">
        <result column="matnr" property="matnr" />
        <result column="maktx" property="maktx" />
        <result column="lgnum" property="lgnum" />
        <result column="type" property="type" />
        <result column="mnemonic" property="mnemonic" />
        <result column="supplier" property="supplier" />
        <result column="warehouse" property="warehouse" />
        <result column="brand" property="brand" />
        <result column="anfme" property="anfme" />
        <result column="bname" property="bname" />
        <result column="memo" property="memo" />
        <result column="modi_user" property="modiUser" />
        <result column="modi_time" property="modiTime" />
        <result column="appe_user" property="appeUser" />
        <result column="appe_time" property="appeTime" />
        <result column="state" property="state" />
        <result column="matnr" property="matnr"/>
        <result column="maktx" property="maktx"/>
        <result column="lgnum" property="lgnum"/>
        <result column="type" property="type"/>
        <result column="mnemonic" property="mnemonic"/>
        <result column="supplier" property="supplier"/>
        <result column="warehouse" property="warehouse"/>
        <result column="brand" property="brand"/>
        <result column="anfme" property="anfme"/>
        <result column="bname" property="bname"/>
        <result column="memo" property="memo"/>
        <result column="modi_user" property="modiUser"/>
        <result column="modi_time" property="modiTime"/>
        <result column="appe_user" property="appeUser"/>
        <result column="appe_time" property="appeTime"/>
        <result column="state" property="state"/>
    </resultMap>
    <select id="getLocNormalData" resultMap="BaseResultMap">
@@ -42,4 +42,16 @@
        update asr_loc_normal set state = '3',modi_user = #{modiUser, jdbcType=DECIMAL},
        modi_time = #{modiTime, jdbcType=TIMESTAMP} where matnr = #{matnr,jdbcType=VARCHAR}
    </update>
    <insert id="pdaLocNormalIn">
        BEGIN
        <foreach collection="list" item="item" index="index">
            INSERT INTO asr_loc_normal (matnr, maktx, anfme, warehouse, state, appe_user, appe_time)
            VALUES (#{item.matnr,jdbcType=VARCHAR}, #{item.maktx,jdbcType=VARCHAR}, #{item.anfme,jdbcType=DECIMAL},
            #{item.warehouse,jdbcType=VARCHAR}, '1', #{item.appeUser,jdbcType=DECIMAL},
            #{item.appeTime,jdbcType=TIMESTAMP})
        </foreach>
        END;
    </insert>
</mapper>