Commit ee779f73 authored by zhuwei's avatar zhuwei

bug

parent 4d9e5ebc
...@@ -105,8 +105,8 @@ class Member extends Basic{ ...@@ -105,8 +105,8 @@ class Member extends Basic{
$where['a.create_time'] = ['between time', [$params['start_date']. ' 00:00:00', $params['end_date'] . ' 23:59:59']]; $where['a.create_time'] = ['between time', [$params['start_date']. ' 00:00:00', $params['end_date'] . ' 23:59:59']];
}else{ }else{
if (empty($params['id']) && empty($params['phone'])) { if (empty($params['id']) && empty($params['phone'])) {
//$time_ = date('Y-m-d H:i:s', strtotime("-1 day")); //$time_ = date('Y-m-d H:i:s', strtotime("-1 day"));//根据create_time排除保护期客户-废弃
//$where['a.create_time'] = array( 'lt', $time_ ); //$where['a.create_time'] = array( 'lt', $time_ );//根据create_time排除保护期客户-废弃
//排除排除保护期内的客户 //排除排除保护期内的客户
$time_now = date('Y-m-d H:i:s');//当前时间 $time_now = date('Y-m-d H:i:s');//当前时间
//protect_time 将截止日期大于当前时间的数据排除掉 //protect_time 将截止日期大于当前时间的数据排除掉
......
...@@ -105,15 +105,10 @@ class PerformanceInfo extends Basic ...@@ -105,15 +105,10 @@ class PerformanceInfo extends Basic
$field .= 'Oorder.house_id'; $field .= 'Oorder.house_id';
$return = $this->oBargainModel->performancelInfo($where,$field,$pageSize,$pageNo); $return = $this->oBargainModel->performancelInfo($where,$field,$pageSize,$pageNo);
/*o_partial_commission表查询实收数据 2018-10-10 10:35:42 朱伟*/
//$m_commission = new OPartialCommission();
foreach ($return as $key => $val) { foreach ($return as $key => $val) {
//$return_ = $m_commission->getPracticalFee($val["id"]); //商铺地址只显示前3位,后面*替代
//$return[$key]['practical_fee'] = $return_[0]['practical_fee'] ? $return_[0]['practical_fee'] : 0;
//截取字符串前3位
$return[$key]['landmark'] = $val["internal_address"] ? mb_substr($val["internal_address"],0,3,'utf-8').'****' : ''; $return[$key]['landmark'] = $val["internal_address"] ? mb_substr($val["internal_address"],0,3,'utf-8').'****' : '';
}
}//end
$return_total = $this->oBargainModel->performancelInfoTotal($where,$field); $return_total = $this->oBargainModel->performancelInfoTotal($where,$field);
$field = 'sum(Obargain.scale_fee) as scale_fee_sum'; $field = 'sum(Obargain.scale_fee) as scale_fee_sum';
...@@ -184,7 +179,7 @@ class PerformanceInfo extends Basic ...@@ -184,7 +179,7 @@ class PerformanceInfo extends Basic
$field .= 'District.district_name,'; $field .= 'District.district_name,';
$field .= 'Obargain.scale,'; $field .= 'Obargain.scale,';
$field .= 'Obargain.scale_fee,'; $field .= 'Obargain.scale_fee,';
$field .= 'Obargain.practical_fee'; $field .= 'PartialCommission.practical_fee';
$return = $this->oBargainModel->performancelInfoExcel($where,$field); $return = $this->oBargainModel->performancelInfoExcel($where,$field);
if(!$return){ if(!$return){
...@@ -192,7 +187,7 @@ class PerformanceInfo extends Basic ...@@ -192,7 +187,7 @@ class PerformanceInfo extends Basic
} }
$export = new ExportExcelUntil(); $export = new ExportExcelUntil();
$e_data_new = [];
foreach ($return as $key => $v) { foreach ($return as $key => $v) {
$e_data_old['create_time'] = $v['create_time'];//提交时间 $e_data_old['create_time'] = $v['create_time'];//提交时间
...@@ -206,10 +201,6 @@ class PerformanceInfo extends Basic ...@@ -206,10 +201,6 @@ class PerformanceInfo extends Basic
$e_data_old['trade_type'] = "好处费"; $e_data_old['trade_type'] = "好处费";
} }
/*o_partial_commission表查询实收数据 2018-10-10 10:35:42 朱伟*/
$m_commission = new OPartialCommission();
$return_ = $m_commission->getPracticalFee($v["id"]);
$practical_fee = $return_[0]['practical_fee'] ? $return_[0]['practical_fee'] : 0;//end
//商铺地址截取字符串前3位,后面做隐藏 --暂时不用,后期可直接解除注释 //商铺地址截取字符串前3位,后面做隐藏 --暂时不用,后期可直接解除注释
//$landmark = $v["landmark"] ? mb_substr($v["landmark"],0,3,'utf-8').'****' : ''; //$landmark = $v["landmark"] ? mb_substr($v["landmark"],0,3,'utf-8').'****' : '';
...@@ -222,12 +213,12 @@ class PerformanceInfo extends Basic ...@@ -222,12 +213,12 @@ class PerformanceInfo extends Basic
$e_data_old['district_name'] = $v['store_name'];//所属部门 $e_data_old['district_name'] = $v['store_name'];//所属部门
$e_data_old['scale'] = $v['scale'];//分佣比例 $e_data_old['scale'] = $v['scale'];//分佣比例
$e_data_old['scale_fee'] = $v['scale_fee'];//应收佣金 $e_data_old['scale_fee'] = $v['scale_fee'];//应收佣金
$e_data_old['practical_fee'] = $practical_fee;//实收佣金 $e_data_old['practical_fee'] = $v['practical_fee'];//实收佣金
$e_data_new[]=$e_data_old; $e_data_new[]=$e_data_old;
} }
$title = [ '提交时间', '成交类型', '商铺地址', '商铺编号', '分佣提成方', '所属部门门店', '分佣比例', '应收佣金', '实收佣金' ]; $title = [ '提交时间', '成交类型', '商铺地址', '商铺编号', '分佣提成方', '所属部门门店', '分佣比例', '应收佣金', '实收佣金' ];
$export->exportTable('业绩明细', $e_data_new, 10, '业绩明细表', $title); $export->exportTable('业绩明细', $e_data_new, count($e_data_new[0]), '业绩明细表', $title);
return ''; return '';
} }
......
...@@ -1405,6 +1405,8 @@ class OBargainModel extends Model ...@@ -1405,6 +1405,8 @@ class OBargainModel extends Model
->join("a_agents Agent", "Obargain.agent_id = Agent.id", "left") ->join("a_agents Agent", "Obargain.agent_id = Agent.id", "left")
->join('a_store Store', 'Agent.store_id = Store.id', 'left') ->join('a_store Store', 'Agent.store_id = Store.id', 'left')
->join('a_district District', 'Agent.district_id = District.id', 'left') ->join('a_district District', 'Agent.district_id = District.id', 'left')
->join('o_partial_commission PartialCommission', 'PartialCommission.bargain_id = Obargain.id', 'left')
->where($where) ->where($where)
->order("Obargain.create_time desc") ->order("Obargain.create_time desc")
->select(); ->select();
......
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