待起菜数量
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
COALESCE(`table`.`name`, '无台桌') AS tableName,
|
||||
`table`.`area_id` AS areaId,
|
||||
CASE WHEN `table`.id IS NULL THEN '吧台' ELSE COALESCE(`area`.`name`, '') END AS areaName,
|
||||
count( detail.id ) AS pendingDishCount
|
||||
sum(case when detail.sub_status = 'READY_TO_SERVE' then detail.num - detail.return_num else 0 end) AS pendingDishCount
|
||||
FROM
|
||||
`tb_order_detail` detail
|
||||
INNER JOIN `tb_order_info` `order` ON detail.order_id = `order`.id AND `order`.`status` = 'unpaid'
|
||||
|
||||
Reference in New Issue
Block a user