wesley 6 years ago
parent
commit
c27756cf2c
1 changed files with 6 additions and 6 deletions
  1. 6 6
      app/Imports/CompanyInfoImport.php

+ 6 - 6
app/Imports/CompanyInfoImport.php

xqd xqd
@@ -17,11 +17,11 @@ class CompanyInfoImport implements ToCollection
         foreach ($collection as $key => $row){
             if ($key == 0 ) continue;
             if(strpos($row[0],'国税局') || strpos($row[0],'税务')){
-                $isExisted = CompanyInfoModel::where('companyName',$row[3])->first();
-
-                if($isExisted){
-                    $company_id = $isExisted->id;
-                }else{
+//                $isExisted = CompanyInfoModel::where('companyName',$row[3])->first();
+//
+//                if($isExisted){
+//                    $company_id = $isExisted->id;
+//                }else{
                     $data['companyName'] = $row[3];
                     $data['legalPerson'] = $row[5];
                     $data['startDate'] = str_replace('/','-',$row[1]);
@@ -32,7 +32,7 @@ class CompanyInfoImport implements ToCollection
 
                     $res = CompanyInfoModel::create($data);
                     $company_id = $res->id;
-                }
+//                }
 
                 if($row[6]){
                     CompanyContactsModel::create([