liding
2026-05-25 4858d6a68446a5153749eca8fae8ae099ac879a2
src/main/resources/mapper/stock/StockInventoryMapper.xml
@@ -203,6 +203,7 @@
            </if>
        </where>
        group by product_model_id, model, unit, product_name, product_id, unQualifiedBatchNo, materialCode, processCategory, voltage
        having SUM(qualifiedQuantity) > 0 or SUM(unQualifiedQuantity) > 0
    </select>
    <select id="listStockInventoryExportData" resultType="com.ruoyi.stock.execl.StockInventoryExportData">
@@ -296,6 +297,7 @@
            </if>
        </where>
        group by product_model_id, model, unit, product_name, unQualifiedBatchNo, materialCode, processCategory, voltage
        having SUM(qualifiedQuantity) > 0 or SUM(unQualifiedQuantity) > 0
    </select>
    <select id="stockInventoryPage" resultType="com.ruoyi.stock.dto.StockInRecordDto">
        select sir.*,si.qualitity as current_stock,
@@ -521,7 +523,8 @@
               si.process_category as processCategory,
               si.voltage,
               pm.material_code as materialCode,
               pm.unit
               pm.unit,
               si.qualitity as qualitity
        from stock_inventory si
        inner join product_model pm on si.product_model_id = pm.id
        inner join product p on pm.product_id = p.id
@@ -539,6 +542,7 @@
            <if test="ew.voltage != null and ew.voltage != ''">
                and si.voltage = #{ew.voltage}
            </if>
            and si.qualitity > 0
        </where>
        order by p.id asc, pm.id asc, si.id asc
    </select>