Kaynağa Gözat

封装的报表类方法

gogs 2 ay önce
ebeveyn
işleme
281f8f270a
1 değiştirilmiş dosya ile 0 ekleme ve 27 silme
  1. 0 27
      app/Service/StatisticService.php

+ 0 - 27
app/Service/StatisticService.php

@@ -464,33 +464,6 @@ class StatisticService extends StatisticCommonService
         return [true, $item_month_list];
         return [true, $item_month_list];
     }
     }
 
 
-    private function commonRule($data)
-    {
-        if (!empty($data['year'])) {
-            $return = $this->getYearRangeInfo($data['year']);
-            if (is_null($return)) return [false, '年度格式错误'];
-            list($data['month_start'], $data['month_end']) = $return;
-        } else {
-            if (isset($data['time']) && !empty($data['time'])) {
-                $start = $this->changeDateToDate($data['time'][0]);
-                $end = $this->changeDateToDate($data['time'][1], true);
-                $data['month_start'] = date("Y-m-d", $start);
-                $data['month_end'] = date("Y-m-d", $end);
-            }
-        }
-
-        if (!isset($data['month_start'])) $month_start = date('Y-01-01');
-        else $month_start = date('Y-m-01', strtotime($data['month_start']));
-        if (!isset($data['month_end'])) $month_end = date('Y-01-01', strtotime('+1 year', strtotime($month_start)));
-        else {
-            $start_year = date('Y', strtotime($month_start));
-            $end_year = date('Y', strtotime($data['month_end']));
-            if ($start_year != $end_year) return [false, "查询不得跨年!", ""];
-            $month_end = date('Y-m-01', strtotime($data['month_end'] . ' +1 month'));
-        }
-
-        return [true, strtotime($month_start), strtotime($month_end)];
-    }
 
 
     /**
     /**
      * 根据前端 ISO 时间字符串获取该年份的起止日期和时间戳
      * 根据前端 ISO 时间字符串获取该年份的起止日期和时间戳