cqp há 3 meses atrás
pai
commit
26c04187c8
1 ficheiros alterados com 5 adições e 5 exclusões
  1. 5 5
      app/Http/Controllers/Api/ScreenController.php

+ 5 - 5
app/Http/Controllers/Api/ScreenController.php

@@ -433,7 +433,8 @@ class ScreenController extends BaseController
 
     }
 
-    public function systemDataList($data){
+    public function systemDataList(Request $request){
+        $data = $request->all();
         $model = SystemL::where('del_time',0)
             ->select('*')
             ->orderBy('time','desc');
@@ -558,8 +559,7 @@ class ScreenController extends BaseController
     public function work_order(Request $request){
         // 获取当前时间戳
         $currentTimestamp = time();
-        $timestamp = strtotime("-3 months", $currentTimestamp);
-        $startOfDay = strtotime(date('Y-m-d 00:00:00', $timestamp));
+        $startOfDay = strtotime(date('Y-m-d 00:00:00', $currentTimestamp));
         $endOfDay = strtotime(date('Y-m-d 23:59:59', $currentTimestamp));
 
         $result = DispatchSub::where('del_time',0)
@@ -592,10 +592,10 @@ class ScreenController extends BaseController
      * @return array
      */
     public function nu_work_order(Request $request){
-        $startOfDay = strtotime(date('Y-m-d 00:00:00', strtotime("-20days")));
+        $startOfDay = strtotime(date('Y-m-1 00:00:00', strtotime("-20days")));
 
         $result = DispatchSub::where('del_time',0)
-//            ->where('dispatch_time_start',">=", $startOfDay)
+            ->where('crt_time',">=", $startOfDay)
             ->where('finished_num',0)
             ->select('dispatch_no','product_title','technology_name','dispatch_quantity as product_num','process_id','sale_orders_product_id')
             ->orderBy('id','desc')