haozi 5 年 前
コミット
d3c66bcb8b
2 ファイル変更7 行追加1 行削除
  1. 0 1
      app/OracleBasCustomer.php
  2. 7 0
      app/Services/WarehouseService.php

+ 0 - 1
app/OracleBasCustomer.php

@@ -12,5 +12,4 @@ class OracleBasCustomer extends Model
 
     protected $connection="oracle";
     protected $table="BAS_CUSTOMER";
-    protected $fillable=['customerid','customer_type','descr_c','active_flag','defaultskulotid'];
 }

+ 7 - 0
app/Services/WarehouseService.php

@@ -92,6 +92,13 @@ class WarehouseService
         return Cache::remember("WareHouse_{$code}",config('cache.expirations.warehouse'),function()use($code){
             $wareHouse =  Warehouse::query()->where('code',$code)->first();
             if($wareHouse)return $wareHouse;
+//            $bas_customer = app('OracleBasCustomerService')->first(['CustomerId'=>$code,'Customer_Type'=>'WH']);
+//            if(!$bas_customer) {
+//                OracleBasCustomer::query()->insert([
+//                    'customerid'=>$code,'customer_type'=>'WH','descr_c'=>$code,'descr_e'=>$code,'addwho'=>'system','active_flag'=>'Y','defaultskulotid'=>'STANDARD','addtime'=>Carbon::now()->toDateTimeString(),'edittime'=>Carbon::now()->toDateTimeString()
+//                ]);
+//                $bas_customer = app('OracleBasCustomerService')->first(['CustomerId'=>$code,'Customer_Type'=>'WH']);
+//            }
             return Warehouse::query()->create(['name'=>$code,'code'=>$code]);
         });
     }