查询未排单大板SQL更改

This commit is contained in:
liuzhaotian
2025-03-08 16:51:02 +08:00
parent 1022234dcd
commit 05e12e9185
@@ -184,7 +184,7 @@
<select id="selectNoPlanGoodsList" resultMap="OrderGoodsMap" parameterType="java.lang.Long">
select distinct
select distinct
og.color as color,
og.goods_name as goodsName,
@@ -222,10 +222,10 @@
og.order_id as orderId
from orders o
left join order_goods og on o.id = og.order_id and og.organ_id = #{organId}
left join order_plate op on og.order_id = op.order_id and og.id = op.goods_id and op.organ_id = #{organId}
left join order_item oi on op.order_id = oi.order_id and op.id = oi.plate_id and oi.organ_id = #{organId}
left join order_plan_item opi on op.order_id = opi.order_id and op.id = opi.plate_id and opi.organ_id = #{organId}
left join (select * from order_goods where organ_id = #{organId}) og on o.organ_id = og.organ_id and o.id = og.order_id
left join (select * from order_plate where organ_id = #{organId}) op on og.organ_id = op.organ_id and og.order_id = op.order_id and og.id = op.goods_id
left join (select * from order_item where organ_id = #{organId}) oi on op.organ_id = oi.organ_id and op.order_id = oi.order_id and op.id = oi.plate_id
left join (select * from order_plan_item where organ_id = #{organId}) opi on op.organ_id = opi.organ_id and op.order_id = opi.order_id and op.id = opi.plate_id
${ew.customSqlSegment}