huminmin
4 天以前 441dfbd1908affc1accc52006a2fe81a5067052d
src/main/resources/mapper/stock/StockInventoryMapper.xml
@@ -31,6 +31,9 @@
            <if test="ew.lockedQuantity != null and ew.lockedQuantity !=''">
                locked_quantity = locked_quantity + #{ew.lockedQuantity},
            </if>
            <if test="ew.source != null and ew.source != ''">
                source = #{ew.source},
            </if>
            update_time = now()
        </set>
        where product_model_id = #{ew.productModelId}
@@ -195,6 +198,7 @@
        from stock_uninventory su
        left join product_model pm on su.product_model_id = pm.id
        left join product p on pm.product_id = p.id
        where COALESCE(su.type, 'unqualified') != 'waste'
        ) as combined
        <where>
            <if test="ew.productName != null and ew.productName !=''">
@@ -222,7 +226,7 @@
        unit,
        product_name,
        product_id
        order by combined.create_time desc
        order by MAX(create_time) desc
    </select>
    <select id="listStockInventoryExportData" resultType="com.ruoyi.stock.execl.StockInventoryExportData">
@@ -328,6 +332,7 @@
            from stock_uninventory su
            left join product_model pm on su.product_model_id = pm.id
            left join product p on pm.product_id = p.id
            where COALESCE(su.type, 'unqualified') != 'waste'
        ) as combined
        <where>
            <if test="ew.productName != null and ew.productName !=''">