feat : catering
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user