浏览代码

时间段调整

q 1 年之前
父节点
当前提交
d61f1b99bc
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Modules/OpcData/Http/Controllers/Api/CarIllegalDownController.php

+ 2 - 2
Modules/OpcData/Http/Controllers/Api/CarIllegalDownController.php

@@ -151,9 +151,9 @@ class CarIllegalDownController extends BaseController
         $sqlStr = /** @lang text */
             "select count(case when warn_start_time >= '{$startTime}'
                 and warn_start_time < '{$endTime}' then car_num end)con from (
-                select car_num, warn_start_time from down_car_speed_warn where statis_date = '2023-11-08'
+                select car_num, warn_start_time from down_car_speed_warn where statis_date = '".date("Y-m-d", strtotime($startTime))."'
                 union all
-                select car_num, warn_start_time from down_car_run_red_light_warn where statis_date = '2023-11-08'
+                select car_num, warn_start_time from down_car_run_red_light_warn where statis_date = '".date("Y-m-d", strtotime($startTime))."'
             ) t";
 
         return $this->executeSql($sqlStr, 4, $mineCode);