liujie
2025-10-15 25c6504bd385f58be23fe12020d7d9ac33566ffd
bug修改
1个文件已修改
9 ■■■■ 已修改文件
ruoyi-system/src/main/resources/mapper/system/TErpSupplierWarehousingMapper.xml 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TErpSupplierWarehousingMapper.xml
@@ -34,8 +34,13 @@
        SUM(t2.unit_amount * (t2.goods_count - COALESCE(t3.outbound_count, 0))) as allTotalPrice,
        COALESCE(sum(t3.outbound_count), 0) as outNum
        from t_erp_goods t1  left join  t_erp_supplier_warehousing t2  on t1.id = t2.goods_id
        left join  t_erp_supplier_outbound_goods t3 on t2.id = t3.warehousing_id
        from t_erp_goods t1
        left join t_erp_supplier_warehousing t2 on t1.id = t2.goods_id
        left join (
        select warehousing_id, sum(outbound_count) as outbound_count
        from t_erp_supplier_outbound_goods
        group by warehousing_id
        ) t3 on t2.id = t3.warehousing_id
        where t1.disabled = 0 and t2.id is not null
        <if test="query.goodsName != null and query.goodsName != ''">
            and t1.goods_name like concat('%',#{query.goodsName},'%')