Quellcode durchsuchen

时间段调整

q vor 1 Jahr
Ursprung
Commit
d61f1b99bc

+ 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);