自动化立体仓库 - WMS系统
LSH
2023-12-16 10b0dccb27336e2f286b5b464d035ead6dee7de9
src/main/resources/mapper/ManLocDetlMapper.xml
@@ -373,16 +373,17 @@
        FROM
        (
        SELECT
        loc_no,
        DISTINCT loc_no,
        locd.matnr,
        locd.maktx,
        locd.owner,
        locd.batch,
        create_time,
        locd.specs,
        locd.unit,
        inventory_max,
        inventory_min,
        inventory_age_max,
        count_anfme,
        DATEDIFF( DAY, create_time, GETDATE( ) ) AS [diff_time]
        FROM
        man_loc_detl locd
@@ -398,7 +399,7 @@
        count_anfme
        FROM
        man_mat
        RIGHT JOIN ( SELECT matnr, SUM ( anfme ) AS count_anfme FROM man_loc_detl loc GROUP BY matnr ) aa ON aa.matnr = man_mat.matnr
        RIGHT JOIN ( SELECT matnr,batch,owner, SUM ( anfme ) AS count_anfme FROM man_loc_detl loc GROUP BY matnr,batch,owner ) aa ON aa.matnr = man_mat.matnr
        ) warn ON locd.matnr = warn.matnr
        WHERE
        DATEDIFF( DAY, create_time, GETDATE( ) ) > inventory_age_max
@@ -419,6 +420,9 @@
        where 1=1
        and b.loc_sts = 'F'
        and a.matnr = #{matnr}
        <if test="batch != null || batch != ''">
            and a.batch = #{batch}
        </if>
    </select>
    <delete id="deleteDatailed">
@@ -443,6 +447,9 @@
        where 1=1
        and loc_no = #{locNo}
        and matnr = #{matnr}
        <if test="batch != null || batch != ''">
            and batch = #{batch}
        </if>
<!--        <choose>-->
<!--            <when test="batch != null and batch!=''  ">-->
<!--                and batch = #{batch}-->