自动化立体仓库 - WMS系统
src/main/resources/mapper/PlaMapper.xml
@@ -25,10 +25,19 @@
            <if test="etime != null">
                and pakin_time &lt;= #{etime}
            </if>
            <if test="status == null or status.trim() == ''">
                and status in ('已入库','部分出库','待出库')
            </if>
            <if test="status != null and status != ''">
                and status = #{status}
            </if>
            <if test="type != null and type != ''">
                and type = #{type}
            </if>
            <if test="workshop != null and workshop != ''">
                and workshop = #{workshop}
            </if>
        </where>
        GROUP BY brand,matnr,workshop ORDER BY matnr,workshop
        GROUP BY brand,matnr,workshop HAVING SUM(weight_anfme) > 0 ORDER BY matnr,workshop
    </select>
</mapper>