diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index 1531c99e6..cbaf8468c 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -114,7 +114,7 @@ class CompanyStatementSetController extends Controller { $this->promoteCompanyStatement(1,$stime); $this->promoteCompanyStatement(2,$stime); $this->officeCompanyStatement($stime); //官方结算 - echo "∟----推广公司月结&补点统计ok".PHP_EOL; + echo "∟----官方/推广公司月结&补点统计ok".PHP_EOL; $this->promoteUserPool(1,$stime); $this->promoteUserPool(2,$stime); @@ -129,7 +129,7 @@ class CompanyStatementSetController extends Controller { $this->promoteCompanyStatement(1,$stime); $this->promoteCompanyStatement(2,$stime); $this->officeCompanyStatement($stime); //官方结算 - echo "∟----推广公司月结&补点统计ok".PHP_EOL; + echo "∟----官方/推广公司月结&补点统计ok".PHP_EOL; } if($company == "pu"){ $this->promoteUserPool(1,$stime); diff --git a/Application/Admin/Controller/FinancialSummaryController.class.php b/Application/Admin/Controller/FinancialSummaryController.class.php index 4dd97fdc8..a286b1638 100644 --- a/Application/Admin/Controller/FinancialSummaryController.class.php +++ b/Application/Admin/Controller/FinancialSummaryController.class.php @@ -165,6 +165,12 @@ class FinancialSummaryController extends AdminController } public function menuAuth() { + + $isCan = D("CmdTasks")->isCanAddTask("FinancialSummary"); + if(!$isCan){ + return []; + } + $mentBtn = [ "updateStatement"=>"重算金额" ]; diff --git a/Application/Admin/Model/CmdTasksModel.class.php b/Application/Admin/Model/CmdTasksModel.class.php index c923c197b..b3f15a73e 100644 --- a/Application/Admin/Model/CmdTasksModel.class.php +++ b/Application/Admin/Model/CmdTasksModel.class.php @@ -43,10 +43,8 @@ class CmdTasksModel extends Model{ //插入任务 public function addTask($type,$params,$need_path=true) { - $task = $this->field("end_time")->where(['status'=>["in","0,1"],'type'=>$type])->order("id desc")->find(); - if(!empty($task)){ - return false; - } + if(!$this->isCanAddTask($type)) return false; + if($need_path){ if(IS_WIN){ $p = explode(':',ROOTTTTT); @@ -64,4 +62,13 @@ class CmdTasksModel extends Model{ ]; return $this->add($save); } + //验证任务 + public function isCanAddTask($type) + { + $task = $this->field("end_time")->where(['status'=>["in","0,1"],'type'=>$type])->order("id desc")->find(); + if(!empty($task)){ + return false; + } + return true; + } } \ No newline at end of file diff --git a/Application/Admin/View/FinancialSummary/index.html b/Application/Admin/View/FinancialSummary/index.html index ea49c1fc8..a1a4968aa 100644 --- a/Application/Admin/View/FinancialSummary/index.html +++ b/Application/Admin/View/FinancialSummary/index.html @@ -72,9 +72,9 @@