edit-licheb-statics
This commit is contained in:
@@ -24,19 +24,27 @@ class Statistics extends Wxapp{
|
||||
//统计客户
|
||||
protected function get_cust(){
|
||||
$season = $this->input_param('season');
|
||||
!strlen($season) && $season = ceil((date('n'))/3)-1;//当月是第几季度
|
||||
$season_data = $this->season_data($season+1);
|
||||
$days = getMonth($season+1);
|
||||
//!strlen($season) && $season = ceil((date('n'))/3)-1;//当月是第几季度
|
||||
//$season_data = $this->season_data($season+1);
|
||||
//$days = getMonth($season+1);
|
||||
!strlen($season) && $season = date('n')-1;//当前月份
|
||||
$month = $season+1;
|
||||
$season_data = $this->months();
|
||||
$series = [];
|
||||
$bizs = [];
|
||||
$months_arr = [];
|
||||
foreach($days as $val){
|
||||
$months_arr[] = [
|
||||
'cn' => date('n月',strtotime($val)),
|
||||
's_time' => date('Y-m-01 00:00:00',strtotime($val)),
|
||||
'e_time' => date('Y-m-t 23:59:59',strtotime($val)),
|
||||
];
|
||||
}
|
||||
//foreach($days as $val){
|
||||
// $months_arr[] = [
|
||||
// 'cn' => date('n月',strtotime($val)),
|
||||
// 's_time' => date('Y-m-01 00:00:00',strtotime($val)),
|
||||
// 'e_time' => date('Y-m-t 23:59:59',strtotime($val)),
|
||||
// ];
|
||||
//}
|
||||
$months_arr[] = [
|
||||
'cn' => $season_data[$season],
|
||||
's_time' => date("Y-{$month}-01 00:00:00"),
|
||||
'e_time' => date("Y-{$month}-t 23:59:59"),
|
||||
];
|
||||
$biz_id_arr = explode(',',$this->session['biz_id']);
|
||||
if($biz_id_arr){
|
||||
$bizs_lists = $this->biz_model->get_by_id_arr($biz_id_arr,'id,biz_name',true);
|
||||
@@ -566,6 +574,14 @@ class Statistics extends Wxapp{
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取月份
|
||||
*/
|
||||
private function months(){
|
||||
$months = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'];
|
||||
return $months;
|
||||
}
|
||||
/**
|
||||
* 获取季度
|
||||
* @param int $season 当前季度
|
||||
|
||||
Reference in New Issue
Block a user