| xqd
@@ -6,6 +6,7 @@ use App\Imports\chatOrder;
|
|
|
use App\Imports\Docter\DocterInfo;
|
|
|
use App\Imports\Docter\DocterOrganizationInfo;
|
|
|
use App\Imports\Docter\OrganizationInfo;
|
|
|
+use App\Imports\Docter\OrganizationOffice;
|
|
|
use App\Models\Organization;
|
|
|
use Illuminate\Console\Command;
|
|
|
use Maatwebsite\Excel\Facades\Excel;
|
| xqd
@@ -55,8 +56,11 @@ class ImportDocter extends Command
|
|
|
if($type == 'organization'){
|
|
|
$this->makeOrganization($file_path);
|
|
|
}
|
|
|
- if($type == 'docter_organization'){
|
|
|
- $this->makeDocterOrganization($file_path);
|
|
|
+// if($type == 'docter_organization'){
|
|
|
+// $this->makeDocterOrganization($file_path);
|
|
|
+// }
|
|
|
+ if($type == 'organization_office'){
|
|
|
+ $this->makeOrganizationOffice($file_path);
|
|
|
}
|
|
|
}
|
|
|
|
| xqd
@@ -73,31 +77,42 @@ class ImportDocter extends Command
|
|
|
}
|
|
|
public function imports($filePath)
|
|
|
{
|
|
|
- $filePath = './public/import/' . $filePath . '.xls';
|
|
|
-
|
|
|
+ $filePath = './public/import/' . $filePath . '.xlsx';
|
|
|
Excel::import(new DocterInfo(), $filePath);
|
|
|
}
|
|
|
- //医生机构模块
|
|
|
- public function makeDocterOrganization($file_path)
|
|
|
+// //医生机构模块
|
|
|
+// public function makeDocterOrganization($file_path)
|
|
|
+// {
|
|
|
+// $this->importsDocterOrganization($file_path);
|
|
|
+// }
|
|
|
+// public function importsDocterOrganization($filePath)
|
|
|
+// {
|
|
|
+// $filePath = './public/import/' . $filePath . '.xlsx';
|
|
|
+//
|
|
|
+// Excel::import(new DocterOrganizationInfo(), $filePath);
|
|
|
+// }
|
|
|
+
|
|
|
+ //机构模块
|
|
|
+ public function makeOrganization($file_path)
|
|
|
{
|
|
|
- $this->importsDocterOrganization($file_path);
|
|
|
+ $this->importsOrganization($file_path);
|
|
|
}
|
|
|
- public function importsDocterOrganization($filePath)
|
|
|
+ public function importsOrganization($filePath)
|
|
|
{
|
|
|
- $filePath = './public/import/' . $filePath . '.xls';
|
|
|
+ $filePath = './public/import/' . $filePath . '.xlsx';
|
|
|
|
|
|
- Excel::import(new DocterOrganizationInfo(), $filePath);
|
|
|
+ Excel::import(new OrganizationInfo(), $filePath);
|
|
|
}
|
|
|
|
|
|
- //机构模块
|
|
|
- public function makeOrganization($file_path)
|
|
|
+ //机构科室模块
|
|
|
+ public function makeOrganizationOffice($file_path)
|
|
|
{
|
|
|
- $this->importsOrganization($file_path);
|
|
|
+ $this->importsOrganizationOffice($file_path);
|
|
|
}
|
|
|
- public function importsOrganization($filePath)
|
|
|
+ public function importsOrganizationOffice($filePath)
|
|
|
{
|
|
|
$filePath = './public/import/' . $filePath . '.xls';
|
|
|
|
|
|
- Excel::import(new OrganizationInfo(), $filePath);
|
|
|
+ Excel::import(new OrganizationOffice(), $filePath);
|
|
|
}
|
|
|
}
|