feat : rank
This commit is contained in:
@@ -77,7 +77,6 @@ class CateringService extends CateringBaseService
|
|||||||
// 获取数据源
|
// 获取数据源
|
||||||
$this->logInfo = $this->orderMealCateringLogModel->find($id);
|
$this->logInfo = $this->orderMealCateringLogModel->find($id);
|
||||||
$this->siteInfo = $this->siteModel->find($this->logInfo->site_id);
|
$this->siteInfo = $this->siteModel->find($this->logInfo->site_id);
|
||||||
$this->resCount = $this->logInfo->quantity;
|
|
||||||
|
|
||||||
// 检测数据
|
// 检测数据
|
||||||
$this->check();
|
$this->check();
|
||||||
@@ -138,6 +137,8 @@ class CateringService extends CateringBaseService
|
|||||||
|
|
||||||
if ($this->logInfo->quantity <= 0) throw new ErrException('该配餐数量为0,不可配餐');
|
if ($this->logInfo->quantity <= 0) throw new ErrException('该配餐数量为0,不可配餐');
|
||||||
|
|
||||||
|
$this->resCount = $this->logInfo->quantity;
|
||||||
|
|
||||||
$allOrderIds = $this->orderModel
|
$allOrderIds = $this->orderModel
|
||||||
->where('site_id', $this->logInfo->site_id)
|
->where('site_id', $this->logInfo->site_id)
|
||||||
->where('cycle_id', $this->cycleId)
|
->where('cycle_id', $this->cycleId)
|
||||||
@@ -152,6 +153,6 @@ class CateringService extends CateringBaseService
|
|||||||
->where('sku_id', $this->logInfo->sku_id)
|
->where('sku_id', $this->logInfo->sku_id)
|
||||||
->sum('copies') ?? 0;
|
->sum('copies') ?? 0;
|
||||||
|
|
||||||
if ($totalCopies != $this->logInfo->quantity) $this->resCount = $totalCopies;
|
if ($totalCopies != $this->logInfo->quantity) $this->resCount = (int)$totalCopies;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user