All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 1m2s
- 修正 Alpine.js 作用域問題,恢復效期編輯彈窗功能 - 整合機台日誌與效期管理至主列表頁 (Index) - 優化大螢幕貨道格線佈局,解決日期折行問題 - 縮小彈窗字體與內距,調整為極簡奢華風 UI - 新增貨道效期與批號欄位之 Migration 與模型關聯 - 補齊中、英、日三語系翻譯檔
38 lines
817 B
PHP
38 lines
817 B
PHP
<?php
|
|
|
|
namespace App\Jobs\Machine;
|
|
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Foundation\Queue\Queueable;
|
|
|
|
class ProcessRestockReport implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
protected $data;
|
|
|
|
/**
|
|
* Create a new job instance.
|
|
*/
|
|
public function __construct(array $data)
|
|
{
|
|
$this->data = $data;
|
|
}
|
|
|
|
/**
|
|
* Execute the job.
|
|
*/
|
|
public function handle(\App\Services\Machine\MachineService $machineService): void
|
|
{
|
|
$serialNo = $this->data['serial_no'] ?? null;
|
|
$slotsData = $this->data['slots'] ?? [];
|
|
|
|
if (!$serialNo) return;
|
|
|
|
$machine = \App\Models\Machine\Machine::where('serial_no', $serialNo)->first();
|
|
if ($machine) {
|
|
$machineService->syncSlots($machine, $slotsData);
|
|
}
|
|
}
|
|
}
|