feat : check
This commit is contained in:
@@ -66,7 +66,7 @@ class CompleteListService extends CateringBaseService
|
||||
|
||||
if (!$this->isBuildPickupCode() || !$this->isCateringByCache() || !$this->checkIsPrint()) throw new ErrException('先执行整线路配餐后才可以获取已配餐信息');
|
||||
|
||||
if ($this->logInfo->quantity <= 0) throw new ErrException('该点无任何配餐数据');
|
||||
if ($this->logInfo->quantity <= 0) throw new ErrException('该点无任何配餐数据-01');
|
||||
|
||||
$siteInfo = $this->siteModel->getInfoById($this->logInfo->site_id);
|
||||
if (empty($siteInfo)) throw new ErrException('配餐地址不存在,请确认信息');
|
||||
@@ -78,11 +78,11 @@ class CompleteListService extends CateringBaseService
|
||||
->where('site_id', $siteInfo->id)
|
||||
->where('cycle_id', $this->cycleId)
|
||||
->where('type',OrderCode::ORDER_TYPE_OPTIONAL)
|
||||
->where('status',OrderCode::PAYED)
|
||||
->where('status',OrderCode::PLAN)
|
||||
->orderBy('id')
|
||||
->pluck('id')
|
||||
->toArray();
|
||||
if (empty($orderIds)) throw new ErrException('该点无任何配餐数据');
|
||||
if (empty($orderIds)) throw new ErrException('该点无任何配餐数据-02');
|
||||
|
||||
$pickUpCodeList = $this->pickupCodeModel->whereIn('order_id',$orderIds)->select(['pickup_code','order_id','copies','id'])->get();
|
||||
if ($pickUpCodeList->isEmpty()) throw new ErrException('该点未生成取餐码');
|
||||
|
||||
Reference in New Issue
Block a user