argument('type'); $file_path = $this->argument('filepath'); //路径相对于项目根目录即 /public if(empty($type) || empty($file_path)){ dd('请输入完整参数'); } //图文咨询订单导入 if($type == 'chat'){ $this->makeChat($file_path); } } public function makeChat($file_path) { $this->imports($file_path); } public function imports($filePath) { $filePath = './public/import/' . $filePath . '.xls'; Excel::import(new chatOrder(), $filePath); //delete from bm_docter_settings where docter_id = 10002; //delete from bm_order_packs where order_id in (select docter_id from bm_orders where docter_id=10002 ); //delete from bm_order_patients where order_id in (select id from bm_orders where docter_id=10002 ); //delete from bm_order_vaccines where order_id in (select id from bm_orders where docter_id=10002 ); //delete from bm_order_nurses where order_id in (select id from bm_orders where docter_id= 10002); //delete from bm_docters where id = 10002; //delete from bm_docter_organization where docter_id = 10002; } }