修改耗材库存

This commit is contained in:
韩鹏辉
2024-06-28 09:39:14 +08:00
parent e91636a188
commit 75ec8fc9e5
36 changed files with 788 additions and 83 deletions

View File

@@ -935,4 +935,29 @@
set stock_number = stock_number - #{number,jdbcType=INTEGER}
where id = #{productId}
</update>
<select id="selectBySkuId" resultType="com.chaozhanggui.system.cashierservice.entity.po.ProConsSkuInfo">
SELECT
c.shop_id,
c.product_sku_id,
c.`status`,
i.id as con_id,
i.con_code,
i.con_name,
i.surplus_stock,
i.stock_number,
p.id as product_id,
p.`name` as product_name,
i.con_warning,
s.spec_snap
FROM
tb_prosku_con c
LEFT JOIN tb_cons_info i ON c.con_info_id = i.id
left join tb_product_sku s on c.product_sku_id=s.id
left join tb_product p on s.product_id=p.id
where c.`status`=1
and c.product_sku_id=#{skuId}
group by i.id
order by i.id
</select>
</mapper>