|
@@ -4,6 +4,7 @@ namespace App\Console\Commands;
|
|
|
|
|
|
use App\Imports\chatOrder;
|
|
use App\Imports\chatOrder;
|
|
use App\Imports\Docter\DocterInfo;
|
|
use App\Imports\Docter\DocterInfo;
|
|
|
|
+use App\Imports\Docter\DocterOrganizationInfo;
|
|
use App\Imports\Docter\OrganizationInfo;
|
|
use App\Imports\Docter\OrganizationInfo;
|
|
use App\Models\Organization;
|
|
use App\Models\Organization;
|
|
use Illuminate\Console\Command;
|
|
use Illuminate\Console\Command;
|
|
@@ -54,8 +55,17 @@ class ImportDocter extends Command
|
|
if($type == 'organization'){
|
|
if($type == 'organization'){
|
|
$this->makeOrganization($file_path);
|
|
$this->makeOrganization($file_path);
|
|
}
|
|
}
|
|
|
|
+ if($type == 'docter_organization'){
|
|
|
|
+ $this->makeDocterOrganization($file_path);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * 导入医生要分为3个步骤
|
|
|
|
+ * 1.先导入机构模块
|
|
|
|
+ * 2.先导入医生模块
|
|
|
|
+ * 3.再导入医生机构模块
|
|
|
|
+ * */
|
|
//医生模块
|
|
//医生模块
|
|
public function makeDocter($file_path)
|
|
public function makeDocter($file_path)
|
|
{
|
|
{
|
|
@@ -67,6 +77,17 @@ class ImportDocter extends Command
|
|
|
|
|
|
Excel::import(new DocterInfo(), $filePath);
|
|
Excel::import(new DocterInfo(), $filePath);
|
|
}
|
|
}
|
|
|
|
+ //医生机构模块
|
|
|
|
+ public function makeDocterOrganization($file_path)
|
|
|
|
+ {
|
|
|
|
+ $this->importsDocterOrganization($file_path);
|
|
|
|
+ }
|
|
|
|
+ public function importsDocterOrganization($filePath)
|
|
|
|
+ {
|
|
|
|
+ $filePath = './public/import/' . $filePath . '.xls';
|
|
|
|
+
|
|
|
|
+ Excel::import(new DocterOrganizationInfo(), $filePath);
|
|
|
|
+ }
|
|
|
|
|
|
//机构模块
|
|
//机构模块
|
|
public function makeOrganization($file_path)
|
|
public function makeOrganization($file_path)
|