feat : check

This commit is contained in:
2025-04-01 15:33:14 +08:00
parent 7f2d92f7aa
commit 957e18390f
2 changed files with 5 additions and 0 deletions

View File

@@ -10,6 +10,8 @@ declare(strict_types=1);
namespace App\Service\Admin\Catering\Meal;
use App\Constants\Admin\CateringCode;
use App\Constants\Common\OrderCode;
use App\Exception\ErrException;
use App\Model\OrderMealCateringLog;
use App\Model\Sku;
@@ -66,6 +68,7 @@ class CycleListService extends CateringBaseService
$count = $this->orderMealCateringLogModel
->where('cycle_id',$this->cycleId)
->where('sku_id',$skuInfo->id)
->where('status',CateringCode::CATERING_STATUS_UNDERWAY)
->sum('quantity') ?? 0;
return $this->return->success('success',['count' => $count]);

View File

@@ -10,6 +10,7 @@ declare(strict_types=1);
namespace App\Service\Admin\Catering\Option;
use App\Constants\Common\OrderCode;
use App\Model\OrderMealCateringLog;
use App\Model\OrderOptionCateringLog;
use App\Service\Admin\Catering\CateringBaseService;
@@ -53,6 +54,7 @@ class CycleListService extends CateringBaseService
$count = $this->orderOptionCateringLogModel
->where('cycle_id',$this->cycleId)
->where('kitchen_id',$this->kitchenId)
->where('status',OrderCode::CATERING_STATUS_UNDERWAY)
->sum('quantity') ?? 0;
return $this->return->success('success',['count' => $count]);