|
|
@@ -223,7 +223,7 @@ Class OwnerService
|
|
|
$collect = collect();
|
|
|
if(count($codes) == 0)return $collect;
|
|
|
foreach ($codes as $code) {
|
|
|
- $collect->push($this->getOwnerByCode($code));
|
|
|
+ $collect = $collect->push($this->getOwnerByCode($code));
|
|
|
}
|
|
|
return $collect;
|
|
|
}
|
|
|
@@ -232,7 +232,7 @@ Class OwnerService
|
|
|
return Cache::remember("getOwnerByCode_{$code}", config('cache.expirations.owners'), function ()use($code){
|
|
|
$owner = Owner::query()->where('code',$code)->first();
|
|
|
if($owner) return $owner;
|
|
|
- $basCustomer = app('OracleBasCustomerService')->first(['Customer_Type'=>'OW','CustomerID'=>$code]);
|
|
|
+ $basCustomer = app('OracleBasCustomerService')->first(['Customer_Type'=>'OW','CustomerID'=>$code]);
|
|
|
if(!$basCustomer)return null;
|
|
|
return Owner::query()->create(['name'=>$basCustomer['descr_c'],'code'=>$basCustomer['customerid']]);
|
|
|
});
|