diff --git a/Application/Admin/Controller/FinancialSummaryController.class.php b/Application/Admin/Controller/FinancialSummaryController.class.php index 7fcb028c0..4dd97fdc8 100644 --- a/Application/Admin/Controller/FinancialSummaryController.class.php +++ b/Application/Admin/Controller/FinancialSummaryController.class.php @@ -43,7 +43,7 @@ class FinancialSummaryController extends AdminController public function updateStatement() { $temp = date('Y',time()).'-'.(date('m',time())-1); - $params = "cd ".ROOTTTTT.";php admin.php FinancialSummarySet/setMonthFinancialSummary/recount/1/count_date/{$temp}"; + $params = "php admin.php FinancialSummarySet/setMonthFinancialSummary/recount/1/count_date/{$temp}"; $r = D("CmdTasks")->addTask("FinancialSummary",$params); if($r){ $this->ajaxReturn(["success"=>"ok"]); diff --git a/Application/Admin/Model/CmdTasksModel.class.php b/Application/Admin/Model/CmdTasksModel.class.php index c85f59722..8e9d47b19 100644 --- a/Application/Admin/Model/CmdTasksModel.class.php +++ b/Application/Admin/Model/CmdTasksModel.class.php @@ -41,12 +41,15 @@ class CmdTasksModel extends Model{ } } //插入任务 - public function addTask($type,$params,$need_tasksid = true) + public function addTask($type,$params,$need_tasksid = true,$need_path=true) { $task = $this->field("end_time")->where(['status'=>"1",'type'=>$type])->order("id desc")->find(); if(!empty($task)){ return false; } + if($need_path){ + $params = "cd ".ROOTTTTT.";".$params; + } if($need_tasksid){ $params = rtrim($params,";").'/taskid/{$taskid};'; }