|
@@ -125,8 +125,8 @@ abstract class BaseDataBiServies
|
|
|
->field('count('.$this->countField.') AS count, date_format('.$this->timeFieldName.', "%Y%m") AS month')
|
|
|
->where($where)
|
|
|
->whereTime($this->timeFieldName, '>=', date('Y-m-01 00:00:00', strtotime('-5 months')))
|
|
|
- ->group('month')
|
|
|
- ->order('month', 'asc')
|
|
|
+ ->group(date_format($this->timeFieldName, "%Y%m"))
|
|
|
+ ->order(date_format($this->timeFieldName, "%Y%m"), 'asc')
|
|
|
->select()
|
|
|
->toArray();
|
|
|
return $months;
|
|
@@ -151,22 +151,17 @@ abstract class BaseDataBiServies
|
|
|
// 获取今天是本周第几日
|
|
|
$w = date('w');
|
|
|
$days = false;
|
|
|
- var_dump(9);
|
|
|
if($j > $w) {
|
|
|
$days = $this->_getMonthDayData($where);
|
|
|
} else {
|
|
|
$days = $this->_getWeekDayData($where);
|
|
|
}
|
|
|
- var_dump(1);
|
|
|
// 获取本月每日检查数量
|
|
|
$months = $this->_fillMonthDayData($days);
|
|
|
- var_dump(2);
|
|
|
// 获取本周每日检查数量
|
|
|
$weeks = $this->_fillWeekDayData($days);
|
|
|
- var_dump(3);
|
|
|
// 获取今日检查数量
|
|
|
$day = $this->_fillDayCount($days);
|
|
|
- var_dump(4);
|
|
|
return [
|
|
|
'months' => $months,
|
|
|
'weeks' => $weeks,
|
|
@@ -243,8 +238,8 @@ abstract class BaseDataBiServies
|
|
|
->field('count('.$this->countField.') AS count, date_format('.$this->timeFieldName.', "%Y%m%d") AS day')
|
|
|
->where($where)
|
|
|
->whereMonth($this->timeFieldName)
|
|
|
- ->group('date_format('.$this->timeFieldName.', "%Y%m%d") ')
|
|
|
- ->order('date_format('.$this->timeFieldName.', "%Y%m%d") ', 'asc')
|
|
|
+ ->group(date_format($this->timeFieldName, "%Y%m%d"))
|
|
|
+ ->order(date_format($this->timeFieldName, "%Y%m%d"), 'asc')
|
|
|
->select()
|
|
|
->toArray();
|
|
|
return $days;
|
|
@@ -283,8 +278,8 @@ abstract class BaseDataBiServies
|
|
|
->field('count('.$this->countField.') AS count, date_format('.$this->timeFieldName.', "%Y%m%d") AS day')
|
|
|
->where($where)
|
|
|
->whereWeek($this->timeFieldName)
|
|
|
- ->group('day')
|
|
|
- ->order('day', 'asc')
|
|
|
+ ->group(date_format($this->timeFieldName, "%Y%m%d"))
|
|
|
+ ->order(date_format($this->timeFieldName, "%Y%m%d"), 'asc')
|
|
|
->select()
|
|
|
->toArray();
|
|
|
return $days;
|