自动化立体仓库 - WMS系统
erp
野心家
2023-03-11 7eefd146ab0997a5d26bdd66dff63b515b8f58c7
src/main/resources/mapper/LocDetlMapper.xml
@@ -48,11 +48,11 @@
    <sql id="batchSeq">
        <choose>
            <when test="batch != null and batch != ''">
            <when test="batch != null">
                and batch = #{batch}
            </when>
            <otherwise>
                and (batch IS NULL OR batch = '')
                and (batch IS NULL)
            </otherwise>
        </choose>
    </sql>
@@ -99,6 +99,9 @@
        </if>
        <if test="startTime!=null and endTime!=null">
            and a.modi_time between #{startTime} and #{endTime}
        </if>
        <if test="crnNo!=null and crnNo!='' ">
            and b.crn_no=#{crnNo}
        </if>
    </sql>
@@ -207,11 +210,11 @@
<!--                and (a.batch IS NULL OR a.batch = '')-->
<!--            </otherwise>-->
<!--        </choose>-->
        <if test="batch != null and batch != ''">
        <if test="batch != null">
            and a.batch = #{batch}
        </if>
        <if test="orderNo != null and orderNo != ''">
            and a.orderNo = #{orderNo}
            and a.order_no = #{orderNo}
        </if>
        <if test="locNos != null and locNos.size > 0">
@@ -295,6 +298,12 @@
        count(anfme) as count
        from asr_loc_detl
        where 1=1
        <if test="batch != null and batch != ''">
            and batch = #{batch}
        </if>
        <if test="matnr != null and matnr != ''">
            and matnr = #{matnr}
        </if>
        group by matnr,batch
    </select>
    <select id="sum" resultType="java.lang.Integer">
@@ -310,5 +319,11 @@
            batch LIKE '%[a-z]%'
    </select>
    <select id="selectLocDetlSumQty" resultType="double">
        select SUM(anfme) anfme
        from asr_loc_detl
        where loc_no=#{locNo}
    </select>
</mapper>