王佳豪
2021-03-06 9ba14d26e2ae8f5b5c3dfae07ea8558e7776bcec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?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>
</mapper>