licheb_607
This commit is contained in:
@@ -28,12 +28,12 @@ class Licheb extends HD_Controller
|
||||
{
|
||||
$params = $this->input->get();
|
||||
$hour = date('H.i');
|
||||
if (($hour > 00.00 && $hour < 03.00) || $params['sd']) {
|
||||
if (($hour > 00.00 && $hour < 02.00) || $params['sd']) {
|
||||
if ($params['sd']) {
|
||||
echo "开始执行客户回访[{$hour}]<br>";
|
||||
}
|
||||
} else {
|
||||
echo '[00.00-03.00]执客户回访[' . $hour . ']<br>';
|
||||
echo '[00.00-02.00]执客户回访[' . $hour . ']<br>';
|
||||
return;
|
||||
}
|
||||
$this->load->model('receiver/receiver_customers_visit_data_model', 'mdCustomerVisitData');
|
||||
@@ -72,21 +72,18 @@ class Licheb extends HD_Controller
|
||||
if (!$re_cust) {
|
||||
continue;
|
||||
}
|
||||
$ret = $this->mdCustomerVisitData->update(['status' => 3], ['id' => $value['id']]);
|
||||
if ($ret) {
|
||||
$where_vis = ['c_id' => $value['c_id'], 'sales_id' => $value['sales_id'], 't_day' => $today];
|
||||
$re_vis = $this->mdCustomerVisitData->get($where_vis);
|
||||
if (!$re_vis) {//新增明天延期数据
|
||||
$where_vis['pid'] = $value['pid'] ? $value['pid'] : $value['id'];//逾期id
|
||||
$where_vis['biz_id'] = $value['biz_id'];
|
||||
$where_vis['status'] = 3;
|
||||
$where_vis['level'] = $value['level'];
|
||||
$where_vis['c_time'] = time();
|
||||
$add_id = $this->mdCustomerVisitData->add($where_vis);
|
||||
if ($add_id) {//更新回访时间
|
||||
$this->mdCustomers->update(['visit_time' => $today], ['id' => $value['c_id']]);
|
||||
$params['sd'] && $log[] = $where_vis;
|
||||
}
|
||||
$where_vis = ['c_id' => $value['c_id'], 'sales_id' => $value['sales_id'], 't_day' => $today];
|
||||
$re_vis = $this->mdCustomerVisitData->get($where_vis);
|
||||
if (!$re_vis) {//新增明天延期数据
|
||||
$where_vis['pid'] = $value['pid'] ? $value['pid'] : $value['id'];//逾期id
|
||||
$where_vis['biz_id'] = $value['biz_id'];
|
||||
$where_vis['status'] = 3;
|
||||
$where_vis['level'] = $value['level'];
|
||||
$where_vis['c_time'] = time();
|
||||
$add_id = $this->mdCustomerVisitData->add($where_vis);
|
||||
if ($add_id) {//更新回访时间
|
||||
$this->mdCustomers->update(['visit_time' => $today], ['id' => $value['c_id']]);
|
||||
$params['sd'] && $log[] = $where_vis;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,12 +113,12 @@ class Licheb extends HD_Controller
|
||||
{
|
||||
$params = $this->input->get();
|
||||
$hour = date('H.i');
|
||||
if (($hour > 00.00 && $hour < 03.00) || $params['sd']) {
|
||||
if (($hour > 02.00 && $hour < 04.00) || $params['sd']) {
|
||||
if ($params['sd']) {
|
||||
echo "开始执行库顾问日志[{$hour}]<br>";
|
||||
}
|
||||
} else {
|
||||
echo '[00.00-03.00]执行顾问日志[' . $hour . ']<br>';
|
||||
echo '[02.00-04.00]执行顾问日志[' . $hour . ']<br>';
|
||||
return;
|
||||
}
|
||||
$this->load->model('app/licheb/app_licheb_users_model', 'mdUsers');
|
||||
|
||||
Reference in New Issue
Block a user