From 91f2cd5b0f832091f654cce926585d2f05cad114 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <xltys1995>
Date: 星期四, 08 四月 2021 23:22:32 +0800
Subject: [PATCH] Merge branches 'dev' and 'master' of https://gitee.com/luxiaotao1123/xtywms into master

---
 src/main/resources/mapper/LocNormalMapper.xml |  119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 119 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/LocNormalMapper.xml b/src/main/resources/mapper/LocNormalMapper.xml
new file mode 100644
index 0000000..83fc826
--- /dev/null
+++ b/src/main/resources/mapper/LocNormalMapper.xml
@@ -0,0 +1,119 @@
+<?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} and id = #{id, jdbcType=DECIMAL}
+    </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} and id = #{id, jdbcType=DECIMAL}
+    </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} and id = #{id, jdbcType=DECIMAL}
+    </update>
+
+    <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>
+
+    <insert id="pdaLocNormalIn">
+        BEGIN
+        <foreach collection="list" item="item" index="index">
+            INSERT INTO asr_loc_normal (matnr, maktx, anfme, mnemonic, supplier, warehouse, state, lgnum, type, altme,
+            appe_user, appe_time)
+            VALUES (#{item.matnr,jdbcType=VARCHAR}, #{item.maktx,jdbcType=VARCHAR}, #{item.anfme,jdbcType=DECIMAL},
+            #{item.mnemonic, jdbcType=VARCHAR}, #{item.supplier, jdbcType=VARCHAR},
+            #{item.warehouse,jdbcType=VARCHAR}, '1',
+            #{item.lgnum, jdbcType=VARCHAR}, #{item.type, jdbcType=VARCHAR},
+            #{item.altme, jdbcType=VARCHAR},
+            #{item.appeUser,jdbcType=DECIMAL},#{item.appeTime,jdbcType=TIMESTAMP})
+        </foreach>
+        END;
+    </insert>
+
+    <select id="pdaLocNormalQuery" resultMap="BaseResultMap">
+        select id, matnr,maktx, warehouse,anfme from asr_loc_normal
+        where 1 = 1
+        <if test="warehouse != null and warehouse != ''">
+            and warehouse = #{warehouse,jdbcType=VARCHAR}
+        </if>
+        <if test="matnr != null and matnr != ''">
+            and matnr =#{matnr,jdbcType=VARCHAR}
+        </if>
+        <if test="billNo != null and billNo != ''">
+            and supplier = #{billNo, jdbcType=VARCHAR}
+        </if>
+        and state = '1' COLLATE Chinese_PRC_CS_AS
+    </select>
+
+    <update id="pdaLocNormalOut1">
+        update asr_loc_normal set state = '2',modi_user = #{modiUser, jdbcType=DECIMAL},modi_time = #{modiTime, jdbcType=TIMESTAMP}
+        where matnr = #{matnr,jdbcType=VARCHAR} and warehouse = #{warehouse,jdbcType=VARCHAR} and id = #{id,jdbcType=DECIMAL}
+    </update>
+
+    <update id="pdaLocNormalOut2">
+        update asr_loc_normal set anfme = #{anfme, jdbcType=DECIMAL},modi_user = #{modiUser, jdbcType=DECIMAL},modi_time = #{modiTime, jdbcType=TIMESTAMP}
+        where matnr = #{matnr,jdbcType=VARCHAR} and warehouse = #{warehouse,jdbcType=VARCHAR} and id = #{id,jdbcType=DECIMAL}
+    </update>
+
+    <select id="pdaLocNormalWarehouseQuery" resultMap="BaseResultMap">
+        select id,matnr, maktx, warehouse from asr_loc_normal
+        where warehouse = #{warehouse, jdbcType=VARCHAR}
+        and state = '1'
+        <if test="matnr != ''">
+            and matnr = #{matnr, jdbcType=VARCHAR}
+        </if>
+        COLLATE Chinese_PRC_CS_AS
+    </select>
+
+    <update id="pdaLocNormalMove">
+        BEGIN
+        <foreach collection="list" item="item" index="index">
+            update asr_loc_normal set warehouse = #{item.warehouse,jdbcType=VARCHAR},
+            modi_user = #{item.modiUser, jdbcType=DECIMAL},modi_time = #{item.modiTime, jdbcType=TIMESTAMP}
+            where id = #{item.id,jdbcType=DECIMAL}
+        </foreach>
+        END;
+    </update>
+</mapper>

--
Gitblit v1.9.1