feat : check
This commit is contained in:
@@ -99,12 +99,16 @@ class CompletePrintService extends CateringBaseService
|
||||
|
||||
|
||||
$siteInfo = $this->siteModel->find($orderInfo->site_id);
|
||||
if ($siteInfo->sequence <= 0) throw new ErrException('请先配置点位顺序');
|
||||
|
||||
$userInfo = $this->userModel->find($orderInfo->user_id);
|
||||
|
||||
$driverInfo = $this->driverSequenceModel->find($siteInfo->delivered_id);
|
||||
if (empty($driverInfo)) throw new ErrException('配送员信息丢失,请联系管理员');
|
||||
if ($driverInfo->driver_num <= 0) throw new ErrException('配送员编号丢失,请联系管理员');
|
||||
if (empty($driverInfo->driver_name)) throw new ErrException('配送员姓名丢失,请联系管理员');
|
||||
|
||||
$this->printService = $this->printOrderFactory->handle($this->request->input('type'));
|
||||
$this->printService = $this->printOrderFactory->handle((int)$this->request->input('type'));
|
||||
// 打印或者喷码
|
||||
match ($this->request->input('type')) {
|
||||
CateringCode::OPTION_PRINT_YLY => $this->printOrderByYly(),
|
||||
|
||||
Reference in New Issue
Block a user