transfer_419_3

This commit is contained in:
dengbw
2022-04-19 15:39:29 +08:00
committed by lccsw
parent eee7cd6d16
commit a680e7d035
2 changed files with 22 additions and 2 deletions
+8 -1
View File
@@ -97,10 +97,14 @@ class Userslog extends HD_Controller
$temp = ['uname' => $uname, 'biz_type' => $biz_type, 'biz_name' => $biz_name, 'defeats' => $v['defeats']
, 'a_num' => $v['a_num'], 'orders' => $v['orders'], 'bills' => $v['bills'], 'follows' => $v['follows']
, 'log_date' => $v['log_date']];
$customer_json = $v['customer_json'] ? json_decode($v['customer_json'], true) : [];
foreach ($offlineSources as $key1 => $value1) {
$nums = intval($v['customer_' . $key1]);
if ($params['size'] == 10000) {//导出使用
$temp['customer_' . $key1] = $nums;
foreach ($value1['list'] as $key2 => $value2) {
$temp['customer_' . $key2] = intval($customer_json[$key1]['list'][$key2]['num']);
}
}
if ($nums) {
$customers += $nums;
@@ -160,7 +164,10 @@ class Userslog extends HD_Controller
}
$indexs = ['biz_name' => '门店', 'uname' => '顾问', 'customers' => '客户数'];
foreach ($offlineSources as $key1 => $value1) {
$indexs['customer_' . $key1] = $value1['name'];
$indexs['customer_' . $key1] = '【'.$value1['name'].'】';
foreach ($value1['list'] as $key2 => $value2) {
$indexs['customer_' . $key2] = $value2;
}
}
$indexs['a_num'] = '进店数';
$indexs['follows'] = '跟进数';
+14 -1
View File
@@ -372,8 +372,21 @@ class Customers extends Wxapp
}
}
strlen($is_top) && $up_data['is_top'] = $is_top;
$t_num && $up_data['t_num = t_num+1'] = null;
if ($a_num || $t_num) {
$day = date('Y-m-d');
if ($a_num) {//判断今日是否到店
$re = $this->customer_oplogs_model->get(['customer_id' => $id, 'type' => 4,
'c_time >=' => strtotime($day . ' 00:00:00'), 'c_time <=' => strtotime($day . ' 23:59:59')]);
$re && $a_num = 0;
}
if ($t_num) {//判断今日是否试驾
$re = $this->customer_oplogs_model->get(['customer_id' => $id, 'type' => 5,
'c_time >=' => strtotime($day . ' 00:00:00'), 'c_time <=' => strtotime($day . ' 23:59:59')]);
$re && $t_num = 0;
}
}
$a_num && $up_data['a_num = a_num+1'] = null;
$t_num && $up_data['t_num = t_num+1'] = null;
$result = true;
if ($up_data) {
$a_log = '';//到店