cqp 2 месяцев назад
Родитель
Сommit
5a6e237a30
2 измененных файлов с 3 добавлено и 3 удалено
  1. 2 2
      app/Service/StatisticsService.php
  2. 1 1
      routes/api.php

+ 2 - 2
app/Service/StatisticsService.php

@@ -13,7 +13,7 @@ use Illuminate\Support\Facades\DB;
 class StatisticsService extends Service
 {
     public function statisticsEmployeeCommon($data,$user){
-        if(empty($data['order_time'][0]) || ! empty($data['order_time'][1])) return [false, '时间不能为空'];
+        if(empty($data['order_time'][0]) || empty($data['order_time'][1])) return [false, '时间不能为空'];
 
         list($start_time, $end_time) = $this->changeDateToTimeStampAboutRange($data['order_time'],false);
         if ($start_time === null || $end_time === null || $start_time > $end_time) return [false, "时间的区间无效"];
@@ -146,7 +146,7 @@ class StatisticsService extends Service
     }
 
     public function statisticsDeviceCommon($data,$user, $field = []){
-        if(empty($data['order_time'][0]) || ! empty($data['order_time'][1])) return [false, '时间不能为空'];
+        if(empty($data['order_time'][0]) || empty($data['order_time'][1])) return [false, '时间不能为空'];
 
         list($start_time, $end_time) = $this->changeDateToTimeStampAboutRange($data['order_time'],false);
         if ($start_time === null || $end_time === null || $start_time > $end_time) return [false, "时间的区间无效"];

+ 1 - 1
routes/api.php

@@ -118,7 +118,7 @@ Route::group(['middleware'=> ['checkLogin']],function ($route){
 
     //统计
     $route->any('statisticsEmployee', 'Api\StatisticsController@statisticsEmployee');
-    $route->any('statisticsEmployee', 'Api\StatisticsController@statisticsEmployee');
+    $route->any('statisticsDevice', 'Api\StatisticsController@statisticsDevice');
 
     //获取默认表头
     $route->any('getTableHead','Api\TableHeadController@tableHeadGet');