自动化立体仓库 - WMS系统
#
zhou zhou
3 天以前 e0b041aca4e2ed0e0881e596c6cd1ec3dc63ddba
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
<?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.HalfBarcodeMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.asrs.entity.HalfBarcode">
        <result column="zpallet" property="zpallet"/>
        <result column="anfme" property="anfme" />
        <result column="price" property="price" />
        <result column="specs" property="specs" />
    </resultMap>
 
 
    <sql id="PageCondition">
        <if test="zpallet != null and zpallet != '' ">
            and zpallet like '%' + #{zpallet} + '%'
        </if>
        <if test="specs !=null and specs!='' ">
            and zpallet like  #{specs} + '%'
        </if>
        <if test="price!=null and price!='' ">
            and price like '%' + #{price} + '%'
        </if>
    </sql>
 
    <update id="half" parameterType="com.zy.asrs.entity.HalfBarcode">
        UPDATE cust_half_barcode
        <set>
            <if test="anfme != null">
                anfme = #{anfme},
            </if>
            <if test="price != null">
                price = #{price},
            </if>
        </set>
        WHERE zpallet = #{zpallet}
    </update>
    <select id="getList" resultType="com.zy.asrs.entity.HalfBarcode">
        select zpallet,sum(1) as anfme from cust_matnr_barcode
        where 1=1
        <include refid="PageCondition"></include>
        group by zpallet
    </select>
</mapper>