Commit 829dd352 authored by yinxiaoling's avatar yinxiaoling

下载失败数据

parent 4b4112c0
...@@ -156,7 +156,7 @@ class StrategySetController extends Controller ...@@ -156,7 +156,7 @@ class StrategySetController extends Controller
if (empty($excelFile)){ if (empty($excelFile)){
return $this->errorWithInfo('表单验证失败', 401); return $this->errorWithInfo('表单验证失败', 401);
} }
$url = storage_path()."\\import\\".$excelFile.'.xlsx'; $url = storage_path()."/import/".$excelFile.'.xlsx';
try{ try{
if (file_exists($url) == false){ if (file_exists($url) == false){
return $this->errorWithInfo('文件不存在,下载失败', 401); return $this->errorWithInfo('文件不存在,下载失败', 401);
......
...@@ -38,7 +38,7 @@ class CheckApiKey ...@@ -38,7 +38,7 @@ class CheckApiKey
$user = Redis::get($rKey); $user = Redis::get($rKey);
$user = json_decode($user,true); $user = json_decode($user,true);
if ($api_key != $user['api_key']){ if ($api_key != $user['api_key']){
return $this->errorWithInfo('key验证不通过', 401,1001); return $this->errorWithInfo('账号已在其他地方登录', 401,1001);//key验证不通过
} }
} }
......
...@@ -105,7 +105,7 @@ class StrategyService ...@@ -105,7 +105,7 @@ class StrategyService
$failDataTitle = ['姓名','*手机号码','值班日期','失败原因']; $failDataTitle = ['姓名','*手机号码','值班日期','失败原因'];
array_unshift($failData, $failDataTitle); array_unshift($failData, $failDataTitle);
$failExcelName = "导入失败数据_".date('YmdHis'); $failExcelName = "导入失败数据_".date('YmdHis');
//dump($failExcelName);
$failFile = $this->storeExcelStyle($failExcelName, $failData,'','import'); $failFile = $this->storeExcelStyle($failExcelName, $failData,'','import');
//$failDataFile = $failExcelName.'.xlsx'; //$failDataFile = $failExcelName.'.xlsx';
if ($failFile){ if ($failFile){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment