feat : check

This commit is contained in:
2025-04-02 11:21:43 +08:00
parent 1e1182ad38
commit 3f3aab3d45
4 changed files with 48 additions and 37 deletions

View File

@@ -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(),