service = app(OrderService::class); } /** * @test */ public function testGetParamByOrderHeader() { $orderHeader = OracleDOCOrderHeader::query()->where('sostatus',99)->orderByDesc('addtime')->first(); $orderHeaders = OracleDOCOrderHeader::query() ->where('sostatus',99) ->where('addtime','>=',$orderHeader->addtime) ->get(); app(ShopService::class)->getByWmsOrders($orderHeaders); app(OwnerService::class)->getByWmsOrders($orderHeaders); app(LogisticService::class)->getByWmsOrders($orderHeaders); app(WarehouseService::class)->getByWmsOrders($orderHeaders); $param = $this->service->getParamByOrderHeader($orderHeader); $this->assertNotNull($param); $this->assertNotEmpty($param['code']); $this->assertNotEmpty($param['owner_id']); $this->assertNotNull($param['logistic_id']); $this->assertNotEmpty($param['consignee_name']); $this->assertNotEmpty($param['consignee_phone']); $this->assertNotEmpty($param['province']); $this->assertNotEmpty($param['city']); $this->assertNotEmpty($param['district']); $this->assertNotEmpty($param['address']); $this->assertNotEmpty($param['client_code']); $this->assertNotEmpty($param['wms_edittime']); $this->assertNotEmpty($param['wms_status']); $this->assertNotEmpty($param['updated_at']); $this->assertNotEmpty($param['created_at']); $this->assertNotEmpty($param['warehouse_id']); } }