<?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.zy.asrs.mapper.LocNormalMapper">
|
|
<!-- 通用查询映射结果 -->
|
<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"/>
|
</resultMap>
|
|
<select id="getLocNormalData" resultMap="BaseResultMap">
|
select * from asr_loc_normal
|
</select>
|
|
<!-- 更新平仓物料的数量 -->
|
<update id="updateLocNormal">
|
update asr_loc_normal set anfme = #{anfme,jdbcType=DECIMAL},
|
modi_user = #{modiUser, jdbcType=DECIMAL}, modi_time = #{modiTime, jdbcType=TIMESTAMP}
|
where matnr = #{matnr,jdbcType=VARCHAR}
|
</update>
|
|
<update id="outLocNormal">
|
update asr_loc_normal set state = '2',modi_user = #{modiUser, jdbcType=DECIMAL},
|
modi_time = #{modiTime, jdbcType=TIMESTAMP} where matnr = #{matnr,jdbcType=VARCHAR}
|
</update>
|
|
<update id="removeLocNormal">
|
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>
|
|
<insert id="locNormalIn">
|
BEGIN
|
<foreach collection="list" item="item" index="index">
|
INSERT INTO asr_loc_normal (matnr, maktx, anfme, altme, lgnum, type, supplier, brand, warehouse, state,
|
appe_user, appe_time)
|
VALUES (#{item.matnr,jdbcType=VARCHAR}, #{item.maktx,jdbcType=VARCHAR}, #{item.anfme,jdbcType=DECIMAL},
|
#{item.altme,jdbcType=VARCHAR},#{item.lgnum, jdbcType=VARCHAR}, #{item.type, jdbcType=VARCHAR},
|
#{item.supplier, jdbcType=VARCHAR},#{item.brand, jdbcType=VARCHAR},
|
#{item.warehouse,jdbcType=VARCHAR}, '1', #{item.appeUser,jdbcType=DECIMAL},
|
#{item.appeTime,jdbcType=TIMESTAMP})
|
</foreach>
|
END;
|
</insert>
|
</mapper>
|