金额填充
This commit is contained in:
@@ -6,17 +6,19 @@
|
||||
|
||||
<select id="findSummaryExportList" resultType="com.czg.order.vo.TableSummaryExportVo">
|
||||
SELECT `order`.table_code,
|
||||
`order`.trade_day as create_date,
|
||||
`order`.trade_day as create_date,
|
||||
concat(`order`.table_code, '_', `order`.trade_day) as tableConcatDate,
|
||||
IF(`order`.table_code IS NULL OR `order`.table_code = '' OR `table`.NAME IS NULL, '吧台',
|
||||
`table`.NAME) AS table_name,
|
||||
category.`name` AS category_name,
|
||||
product.`name` AS product_name,
|
||||
unit.`name` AS unit_name,
|
||||
`table`.NAME) AS table_name,
|
||||
category.`name` AS category_name,
|
||||
product.`name` AS product_name,
|
||||
product.`id` AS product_id,
|
||||
unit.`name` AS unit_name,
|
||||
detail.sku_name,
|
||||
sum(detail.num - detail.return_num) AS num,
|
||||
sum(detail.pay_amount) AS salesAmount,
|
||||
sum(detail.refund_num) AS refund_num,
|
||||
sum(detail.return_amount) AS refund_amount
|
||||
sum(detail.num - detail.return_num) AS num,
|
||||
sum(detail.pay_amount) AS amount,
|
||||
sum(detail.refund_num) AS refund_num,
|
||||
sum(detail.return_amount) AS refund_amount
|
||||
FROM tb_order_info `order`
|
||||
INNER JOIN tb_order_detail detail ON detail.order_id = `order`.id
|
||||
AND detail.is_temporary = 0
|
||||
@@ -31,6 +33,6 @@
|
||||
AND `order`.pay_mode != 'no-table'
|
||||
AND `order`.trade_day >= #{beginDate}
|
||||
AND `order`.trade_day <= #{endDate}
|
||||
group by `order`.trade_day, `order`.table_code, detail.product_id
|
||||
group by `order`.trade_day, `order`.table_code, detail.product_id, detail.sku_id
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user