bug修改

This commit is contained in:
jjLv 2025-09-12 09:25:26 +08:00
parent 2f8f31202d
commit 018f23c782
1 changed files with 7 additions and 1 deletions

View File

@ -54,7 +54,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ELSE 0
END AS has_inventory
from cook_material cm
LEFT JOIN ims_inventory iin ON iin.material_id = cm.material_id and iin.del_flag=0
left join (
SELECT
sum(material_num) as material_num,material_id
from ims_inventory
where del_flag=0
group by material_id
)iin ON iin.material_id = cm.material_id
left join cook_material_type cmt on cm.material_type_id = cmt.material_type_id
left join cook_nutrition_type cnt on cm.nutrition_type_id = cnt.nutrition_type_id
left join cook_nutrition cn on cm.nutrition_id = cn.nutrition_id