created_at = config('sync.commodity_sync.created_at'); $last_time = ValueStore::query()->where('name', $this->created_at)->value('value'); $startDate = \Illuminate\Support\Carbon::now()->subSeconds(65); $this->service = app(CommodityBarcodeService::class); $this->bas_skus = OracleBasSKU::query() ->select('customerid', 'sku', 'descr_c', 'alternate_sku1', 'alternate_sku2', 'alternate_sku3', 'skulength', 'skuwidth', 'skuhigh', 'cube', 'packid', 'addtime', 'edittime') ->where('addTime', '>=', $last_time ?? $startDate) ->orderByDesc('addtime') ->get(); } public function testCreateBarcodeByWms() { if ($this->bas_skus->isEmpty()) { $this->assertEmpty($this->bas_skus); return; } $this->service->createBarcodeByWms($this->bas_skus); $this->commodityBarcodes=$this->service->getByWms($this->bas_skus); if ($this->commodityBarcodes) $this->assertNotNull($this->commodityBarcodes); } public function tearDown(): void { parent::tearDown(); // TODO: Change the autogenerated stub } }