分类
This commit is contained in:
@@ -64,9 +64,9 @@ public class TableController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("getKitchenFood")
|
@GetMapping("getKitchenFood")
|
||||||
// @SaAdminCheckPermission(value = "kitchen:table", name = "后厨-按台桌查看")
|
// @SaAdminCheckPermission(value = "kitchen:table", name = "后厨-按台桌查看")
|
||||||
public CzgResult<List<KitchenFoodVO>> getKitchenFood(@RequestParam(required = false) String productName) {
|
public CzgResult<List<KitchenFoodVO>> getKitchenFood(@RequestParam(required = false) String productName, @RequestParam(required = false) Long categoryId) {
|
||||||
Long shopId = StpKit.USER.getShopId();
|
Long shopId = StpKit.USER.getShopId();
|
||||||
List<KitchenFoodVO> kitchenFood = kitchenDetailMapper.getKitchenFood(shopId, productName);
|
List<KitchenFoodVO> kitchenFood = kitchenDetailMapper.getKitchenFood(shopId, productName, categoryId);
|
||||||
return CzgResult.success(kitchenFood);
|
return CzgResult.success(kitchenFood);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class BkTableVO {
|
|||||||
public static class TableVO {
|
public static class TableVO {
|
||||||
private Long tableId;
|
private Long tableId;
|
||||||
private String tableName;
|
private String tableName;
|
||||||
|
private String tableStatus;
|
||||||
private Integer tableUserNum;
|
private Integer tableUserNum;
|
||||||
private List<BkOrder> bkOrders;
|
private List<BkOrder> bkOrders;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class KitchenFoodVO {
|
|||||||
record KitchenFoodItemVO(
|
record KitchenFoodItemVO(
|
||||||
//员工名称
|
//员工名称
|
||||||
Long orderId, String staffName,
|
Long orderId, String staffName,
|
||||||
String tableName,String areaName,Long orderDetailId,
|
String tableName,String areaName,Long orderDetailId,Long categoryId,String categoryName,
|
||||||
//下单数 //菜品状态 待起菜 PENDING_PREP 待出菜 READY_TO_SERVE 已出菜 SENT_OUT 已上菜 DELIVERED
|
//下单数 //菜品状态 待起菜 PENDING_PREP 待出菜 READY_TO_SERVE 已出菜 SENT_OUT 已上菜 DELIVERED
|
||||||
Long num, String subStatus,
|
Long num, String subStatus,
|
||||||
//下单时间 起菜时间 出菜时间 上菜时间
|
//下单时间 起菜时间 出菜时间 上菜时间
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
`table`.id as table_id,
|
`table`.id as table_id,
|
||||||
`table`.`name` as table_name,
|
`table`.`name` as table_name,
|
||||||
`table`.`max_capacity` as table_user_num,
|
`table`.`max_capacity` as table_user_num,
|
||||||
|
`table`.`status` as table_status,
|
||||||
`order`.call_phone,
|
`order`.call_phone,
|
||||||
`order`.call_username,
|
`order`.call_username,
|
||||||
`order`.booking_phone,
|
`order`.booking_phone,
|
||||||
@@ -56,6 +57,7 @@
|
|||||||
<id property="tableId" column="table_id"/>
|
<id property="tableId" column="table_id"/>
|
||||||
<result property="tableName" column="table_name"/>
|
<result property="tableName" column="table_name"/>
|
||||||
<result property="tableUserNum" column="table_user_num"/>
|
<result property="tableUserNum" column="table_user_num"/>
|
||||||
|
<result property="tableStatus" column="table_status"/>
|
||||||
|
|
||||||
<!-- 嵌套集合:订单列表 -->
|
<!-- 嵌套集合:订单列表 -->
|
||||||
<collection property="bkOrders" ofType="com.czg.account.vo.BkTableVO$BkOrder">
|
<collection property="bkOrders" ofType="com.czg.account.vo.BkTableVO$BkOrder">
|
||||||
|
|||||||
@@ -28,5 +28,5 @@ public interface KitchenDetailMapper {
|
|||||||
/**
|
/**
|
||||||
* 按台桌查看商品列表
|
* 按台桌查看商品列表
|
||||||
*/
|
*/
|
||||||
List<KitchenFoodVO> getKitchenFood(Long shopId, String productName);
|
List<KitchenFoodVO> getKitchenFood(Long shopId, String productName, Long categoryId);
|
||||||
}
|
}
|
||||||
@@ -12,8 +12,10 @@
|
|||||||
detail.sku_name AS skuName,
|
detail.sku_name AS skuName,
|
||||||
`order`.id AS orderId,
|
`order`.id AS orderId,
|
||||||
detail.id AS orderDetailId,
|
detail.id AS orderDetailId,
|
||||||
COALESCE(`table`.`name`, '无台桌') AS tableName,
|
`category`.id AS categoryId,
|
||||||
CASE WHEN `table`.id IS NULL THEN '吧台' ELSE COALESCE(`area`.`name`, '') END AS areaName,
|
`category`.name AS categoryName,
|
||||||
|
COALESCE(`table`.`name`, '无台桌') AS tableName,
|
||||||
|
CASE WHEN `table`.id IS NULL THEN '吧台' ELSE COALESCE(`area`.`name`, '') END AS areaName,
|
||||||
`staff`.`name` AS staffName,
|
`staff`.`name` AS staffName,
|
||||||
sum(detail.num - detail.return_num) AS num,
|
sum(detail.num - detail.return_num) AS num,
|
||||||
detail.sub_status AS subStatus,
|
detail.sub_status AS subStatus,
|
||||||
@@ -24,10 +26,15 @@
|
|||||||
FROM `tb_order_detail` detail
|
FROM `tb_order_detail` detail
|
||||||
INNER JOIN `tb_order_info` `order` ON detail.order_id = `order`.id AND `order`.`status` = 'unpaid'
|
INNER JOIN `tb_order_info` `order` ON detail.order_id = `order`.id AND `order`.`status` = 'unpaid'
|
||||||
LEFT JOIN `tb_shop_staff` `staff` ON staff.id = `order`.staff_id and staff.shop_id = #{shopId}
|
LEFT JOIN `tb_shop_staff` `staff` ON staff.id = `order`.staff_id and staff.shop_id = #{shopId}
|
||||||
|
LEFT JOIN `tb_product` `product` ON `product`.id = `detail`.product_id and product.shop_id = #{shopId}
|
||||||
|
INNER JOIN `tb_shop_prod_category` `category` ON category.id = `product`.category_id and category.shop_id = #{shopId}
|
||||||
LEFT JOIN `tb_shop_table` `table` ON `order`.table_code = `table`.table_code
|
LEFT JOIN `tb_shop_table` `table` ON `order`.table_code = `table`.table_code
|
||||||
LEFT JOIN `tb_shop_table_area` `area` ON `table`.area_id = `area`.id
|
LEFT JOIN `tb_shop_table_area` `area` ON `table`.area_id = `area`.id
|
||||||
WHERE detail.shop_id = #{shopId}
|
WHERE detail.shop_id = #{shopId}
|
||||||
AND detail.`status` = 'wait-pay'
|
AND detail.`status` = 'wait-pay'
|
||||||
|
<if test="categoryId != null">
|
||||||
|
AND `category`.id = #{categoryId}
|
||||||
|
</if>
|
||||||
<if test="productName != null and productName != ''">
|
<if test="productName != null and productName != ''">
|
||||||
AND detail.product_name like concat('%',#{productName},'%')
|
AND detail.product_name like concat('%',#{productName},'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -108,6 +115,8 @@
|
|||||||
<arg column="tableName" javaType="java.lang.String"/>
|
<arg column="tableName" javaType="java.lang.String"/>
|
||||||
<arg column="areaName" javaType="java.lang.String"/>
|
<arg column="areaName" javaType="java.lang.String"/>
|
||||||
<arg column="orderDetailId" javaType="java.lang.Long"/>
|
<arg column="orderDetailId" javaType="java.lang.Long"/>
|
||||||
|
<arg column="categoryId" javaType="java.lang.Long"/>
|
||||||
|
<arg column="categoryName" javaType="java.lang.String"/>
|
||||||
<arg column="num" javaType="java.lang.Long"/>
|
<arg column="num" javaType="java.lang.Long"/>
|
||||||
<arg column="subStatus" javaType="java.lang.String"/>
|
<arg column="subStatus" javaType="java.lang.String"/>
|
||||||
<arg column="orderTime" javaType="java.lang.String"/>
|
<arg column="orderTime" javaType="java.lang.String"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user