解决给商品批量修正库存的bug

This commit is contained in:
jishenghua
2025-07-02 16:16:24 +08:00
parent 89f58636ee
commit 7f7e87accc
3 changed files with 13 additions and 6 deletions

View File

@@ -28,7 +28,10 @@
</update>
<select id="getCurrentUnitPriceByMId" resultType="java.math.BigDecimal">
select ifnull(mcs.current_unit_price,0) as current_unit_price from jsh_material_current_stock mcs where mcs.material_id=#{materialId} limit 1
select mcs.current_unit_price as current_unit_price from jsh_material_current_stock mcs
where mcs.material_id=#{materialId}
and mcs.current_unit_price is not null
limit 1
</select>
<update id="batchDeleteByDepots">