自动化立体仓库 - WMS系统
pang.jiabao
2025-02-08 f1c69821bfa7733daaa79a377dac45556946cf6b
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
<?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.PlaMapper">
    <update id="autoThaw">
        update
            asr_pla_detl
        set
            stock_freeze = 1
        where
            stock_freeze = 0
          and status != '全部出库'
    and stock_freeze_date is not null
    and datediff(day , stock_freeze_date, getdate()) > 90
    </update>
    <select id="getStockStatisAll" resultType="com.zy.asrs.entity.Pla">
        select brand, matnr,workshop, sum(weight_anfme) as weight
        from asr_pla_detl
        <where>
            <if test="brand != null and brand != ''">
                and brand = #{brand}
            </if>
            <if test="stime != null">
                and pakin_time >= #{stime}
            </if>
            <if test="etime != null">
                and pakin_time &lt;= #{etime}
            </if>
            <if test="status != null and status != ''">
                and status = #{status}
            </if>
        </where>
        GROUP BY brand,matnr,workshop ORDER BY matnr,workshop
    </select>
</mapper>