|
@@ -6,6 +6,7 @@ use App\Imports\chatOrder;
|
|
use App\Imports\Docter\DocterInfo;
|
|
use App\Imports\Docter\DocterInfo;
|
|
use App\Imports\Docter\DocterOrganizationInfo;
|
|
use App\Imports\Docter\DocterOrganizationInfo;
|
|
use App\Imports\Docter\OrganizationInfo;
|
|
use App\Imports\Docter\OrganizationInfo;
|
|
|
|
+use App\Imports\User\PatientsInfo;
|
|
use App\Imports\User\UserInfo;
|
|
use App\Imports\User\UserInfo;
|
|
use App\Models\Organization;
|
|
use App\Models\Organization;
|
|
use Illuminate\Console\Command;
|
|
use Illuminate\Console\Command;
|
|
@@ -53,7 +54,11 @@ class ImportUser extends Command
|
|
if($type == 'user'){
|
|
if($type == 'user'){
|
|
$this->makeUser($file_path);
|
|
$this->makeUser($file_path);
|
|
}
|
|
}
|
|
|
|
+ if($type == 'patiens'){
|
|
|
|
+ $this->makePatiens($file_path);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ //导入用户
|
|
public function makeUser($file_path)
|
|
public function makeUser($file_path)
|
|
{
|
|
{
|
|
$this->importsUser($file_path);
|
|
$this->importsUser($file_path);
|
|
@@ -63,4 +68,14 @@ class ImportUser extends Command
|
|
$filePath = './public/import/' . $filePath . '.xls';
|
|
$filePath = './public/import/' . $filePath . '.xls';
|
|
Excel::import(new UserInfo(), $filePath);
|
|
Excel::import(new UserInfo(), $filePath);
|
|
}
|
|
}
|
|
|
|
+ //导入患者
|
|
|
|
+ public function makePatiens($file_path)
|
|
|
|
+ {
|
|
|
|
+ $this->importsPatiens($file_path);
|
|
|
|
+ }
|
|
|
|
+ public function importsPatiens($filePath)
|
|
|
|
+ {
|
|
|
|
+ $filePath = './public/import/' . $filePath . '.xls';
|
|
|
|
+ Excel::import(new PatientsInfo(), $filePath);
|
|
|
|
+ }
|
|
}
|
|
}
|