Commit 39f7d601 authored by zhuwei's avatar zhuwei

验证判断表是否创建

parent edcfb412
...@@ -13,6 +13,7 @@ use app\model\AAgents; ...@@ -13,6 +13,7 @@ use app\model\AAgents;
use app\model\UPhoneFollowUp; use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpTemporary; use app\model\UPhoneFollowUpTemporary;
use app\model\Users; use app\model\Users;
use app\task\controller\FollowUpTask;
class PhoneFollowUpService class PhoneFollowUpService
{ {
...@@ -21,6 +22,11 @@ class PhoneFollowUpService ...@@ -21,6 +22,11 @@ class PhoneFollowUpService
public function __construct($site_id) public function __construct($site_id)
{ {
$date = date("Y-m-d", time());
$t_follow_up_task = new FollowUpTask();
if(!$t_follow_up_task->isExistTable($date, $site_id)){
return false;
}
$this->phoneFollowUp = new UPhoneFollowUp($site_id); $this->phoneFollowUp = new UPhoneFollowUp($site_id);
$this->phoneFollowUpTemporary = new UPhoneFollowUpTemporary($site_id); $this->phoneFollowUpTemporary = new UPhoneFollowUpTemporary($site_id);
} }
......
...@@ -19,8 +19,6 @@ class UPhoneFollowUpTemporary extends BaseModel ...@@ -19,8 +19,6 @@ class UPhoneFollowUpTemporary extends BaseModel
function __construct($site_id) function __construct($site_id)
{ {
$date = date("Y-m-d", time()); $date = date("Y-m-d", time());
$t_follow_up_task = new FollowUpTask();
$t_follow_up_task->isExistTable($date, $site_id);
$this->UPhoneFollowUp = Db($this->table."_".$site_id."_".$date); $this->UPhoneFollowUp = Db($this->table."_".$site_id."_".$date);
$this->siteId = $site_id; $this->siteId = $site_id;
} }
......
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