feat : catering

This commit is contained in:
2025-03-11 10:16:18 +08:00
parent e3ecd93b2d
commit d9f52ac755
7 changed files with 69 additions and 12 deletions

View File

@@ -67,6 +67,8 @@ abstract class CateringBaseService extends BaseService
$this->checkRole();
$this->getCycleId();
$this->getKitchenId();
}
/**
@@ -96,6 +98,12 @@ abstract class CateringBaseService extends BaseService
$this->cycleId = (int)$cycleId;
}
private function getKitchenId(): void
{
//todo 自选配餐员工要绑定厨房 套餐配餐员工要绑定每日套餐
$this->kitchenId = 1;
}
/**
* @param array $data
* @return array

View File

@@ -69,4 +69,21 @@ class CycleListService extends CateringBaseService
return $this->return->success('success',['count' => $count]);
}
public function skuList()
{
$res = [
[
'id' => 1,
'name' => 'spu_name'
],
[
'id' => 2,
'name' => 'spu2_name'
]
];
return $this->return->success('success',$res);
}
}

View File

@@ -34,6 +34,7 @@ class CycleListService extends CateringBaseService
{
$cycleCateringLogs = $this->orderOptionCateringLogModel
->where('cycle_id',$this->cycleId)
->where('kitchen_id',$this->kitchenId)
->select(['site_id','quantity','status','id'])
->get();
@@ -51,6 +52,7 @@ class CycleListService extends CateringBaseService
{
$count = $this->orderOptionCateringLogModel
->where('cycle_id',$this->cycleId)
->where('kitchen_id',$this->kitchenId)
->sum('quantity') ?? 0;
return $this->return->success('success',['count' => $count]);