cqpCow 2 anni fa
parent
commit
0fbc6316a1
2 ha cambiato i file con 469 aggiunte e 2 eliminazioni
  1. 457 0
      app/Http/Controllers/Api/TestController.php
  2. 12 2
      routes/api.php

+ 457 - 0
app/Http/Controllers/Api/TestController.php

@@ -74,6 +74,463 @@ public function testData(Request $request){
 }
 
 
+public function order_process1(Request $request) {
+    $arr = [
+        0 => ['Code' => "S23070197", 'CustomerName' => "方侦涛", 'rate' => 20],
+        1 => ['Code' => "S23070196", 'CustomerName' => "杭州速方", 'rate' => 20],
+        2 => ['Code' => "S23070194", 'CustomerName' => "杭州速方", 'rate' => 19],
+        3 => ['Code' => "S23070193", 'CustomerName' => "方侦涛", 'rate' => 19],
+        4 => ['Code' => "S23070180", 'CustomerName' => "杭州速方", 'rate' => 16],
+        5 => ['Code' => "S23070179", 'CustomerName' => "杭州速方", 'rate' => 16],
+        6 => ['Code' => "S23070178", 'CustomerName' => "杭州速方", 'rate' => 16],
+        7 => ['Code' => "S23070177", 'CustomerName' => "杭州速方", 'rate' => 16],
+        8 => ['Code' => "S23070176", 'CustomerName' => "杭州速方", 'rate' => 16],
+        9 => ['Code' => "S23070175", 'CustomerName' => "杭州速方", 'rate' => 15],
+        10 => ['Code' => "S23070174", 'CustomerName' => "杭州速方", 'rate' => 15],
+        11 => ['Code' => "S23070173", 'CustomerName' => "杭州速方", 'rate' => 15],
+        12 => ['Code' => "S23070172", 'CustomerName' => "杭州速方", 'rate' => 15],
+        13 => ['Code' => "S23070171", 'CustomerName' => "杭州速方", 'rate' => 15],
+        14 => ['Code' => "S23070170", 'CustomerName' => "杭州速方", 'rate' => 15],
+        15 => ['Code' => "S23070169", 'CustomerName' => "杭州速方", 'rate' => 14],
+        16 => ['Code' => "S23070144", 'CustomerName' => "方侦涛", 'rate' => 88],
+        17 => ['Code' => "S23070142", 'CustomerName' => "王玉", 'rate' => 84],
+        18 => ['Code' => "S23070141", 'CustomerName' => "王玉", 'rate' => 82],
+        19 => ['Code' => "S23070136", 'CustomerName' => "杭州速方", 'rate' => 72],
+        20 => ['Code' => "S23070135", 'CustomerName' => "杭州速方", 'rate' => 70],
+        21 => ['Code' => "S23070133", 'CustomerName' => "杭州速方", 'rate' => 66],
+        22 => ['Code' => "S23070126", 'CustomerName' => "杭州速方", 'rate' => 52],
+        23 => ['Code' => "S23070125", 'CustomerName' => "杭州速方", 'rate' => 50],
+        24 => ['Code' => "S23070124", 'CustomerName' => "王玉", 'rate' => 48],
+        25 => ['Code' => "S23070122", 'CustomerName' => "方侦涛", 'rate' => 44],
+        26 => ['Code' => "S23070120", 'CustomerName' => "杭州速方", 'rate' => 40],
+        27 => ['Code' => "S23070115", 'CustomerName' => "杭州速方", 'rate' => 30],
+        28 => ['Code' => "S23070114", 'CustomerName' => "杭州速方", 'rate' => 29],
+        29 => ['Code' => "S23070113", 'CustomerName' => "方侦涛", 'rate' => 26],
+        30 => ['Code' => "S23070109", 'CustomerName' => "方侦涛", 'rate' => 18],
+    ];
+    return $this->json_return(200,'',$arr);
+}
+
+
+public function project_region(Request $request){
+    $arr = [
+        "all_num" => 2373,
+        "num" => 188,
+    ];
+    return $this->json_return(200,'',$arr);
+}
+
+public function output_value_month1(Request $request){
+        $arr = [
+            [
+                "value"=> "2023-01-01",
+                "num"=> "0"
+            ],
+            [
+                "value"=> "2023-01-02",
+                "num"=> "0"
+            ],
+            [
+                "value"=> "2023-01-03",
+                "num"=> "0"
+            ],
+            [
+                "value"=> "2023-01-04",
+                "num"=> "0"
+            ],
+            [
+                "value"=> "2023-01-05",
+                "num"=> "0",
+            ],
+            ["num" => 0]
+        ];
+    return $this->json_return(200,'',$arr);
+}
+
+public function output_value_efficiency(Request $request){
+   $arr = [
+       [
+           "time"=> "2023-01-01",
+           "output"=> "0"
+       ],
+       [
+           "time"=> "2023-01-02",
+           "output"=> "0"
+       ],
+       [
+           "time"=> "2023-01-03",
+           "output"=> "2711"
+       ],
+       [
+           "time"=> "2023-01-04",
+           "output"=> "2239"
+       ],
+       [
+           "time"=> "2023-01-05",
+           "output"=> "1101"
+       ],
+       [
+           "output"=> 0
+       ]
+   ];
+    return $this->json_return(200,'',$arr);
+}
+
+public function capacity(Request $request){
+    $arr = [
+        [
+            [
+                "title"=> "直贴",
+                "rate"=> "70"
+            ],
+            [
+                "title"=> "包装",
+                "rate"=> "50"
+            ]
+        ],
+    ];
+    return $this->json_return(200,'',['data' => $arr]);
+
+}
+
+
 
+public function product_num(Request $request){
+    $arr = [
+        [
+            "machine_day_num"=> "4903.69",
+            "machine_month_num"=> "139.64",
+            "machine_week_num"=> "47.21",
+            "break_day_num"=> "0",
+            "break_month_num"=> "10",
+            "break_week_num"=> "3",
+            "start_time"=> date("Y-m-d H:i:s",time()),
+            "day_num"=> "766",
+            "week_num"=> "4598",
+            "month_num"=> "14489",
+            "rate"=> "72"
+        ],
+        [
+            "machine_day_num"=> "469591.19",
+            "machine_month_num"=> "107.03",
+            "machine_week_num"=> "35.23",
+            "break_day_num"=> 0,
+            "break_month_num"=> "210",
+            "break_week_num"=> "18",
+            "start_time"=> date("Y-m-d H:i:s",time()),
+            "day_num"=> 0,
+            "week_num"=> "2353",
+            "month_num"=> "6255",
+            "rate"=> 0
+        ],
+        [
+            "machine_day_num"=> "0",
+            "machine_month_num"=> "14.02",
+            "machine_week_num"=> "6.88",
+            "break_day_num"=> "0",
+            "break_month_num"=> "0",
+            "break_week_num"=> "0",
+            "start_time"=> date("Y-m-d H:i:s",time()),
+            "day_num"=> "0",
+            "week_num"=> "494",
+            "month_num"=> "3058",
+            "rate"=> "0"
+        ],
+        [
+            "machine_day_num"=> "4903.77",
+            "machine_month_num"=> "149.14",
+            "machine_week_num"=> "56.72",
+            "break_day_num"=> "0",
+            "break_month_num"=> "0",
+            "break_week_num"=> "0",
+            "start_time"=> date("Y-m-d H:i:s",time()),
+            "day_num"=> "626",
+            "week_num"=> "4460",
+            "month_num"=> "13034",
+            "rate"=> "48"
+        ]
+    ];
+    return $this->json_return(200,'',$arr);
+}
+
+public function work_order(Request $request){
+    $arr = [
+        "K23070127_1_8"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"四边锯清边",
+    "product_num"=>6,
+    "finish_num"=>0
+  ],
+  "K23070127_1_5"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"压门",
+    "product_num"=>6,
+    "finish_num"=>0
+  ],
+  "K23070127_1_41"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"凹槽喷漆",
+    "product_num"=>6,
+    "finish_num"=>0
+  ],
+  "K23070127_1_40"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"凹槽刷漆",
+    "product_num"=>6,
+    "finish_num"=>0
+  ],
+  "K23070127_1_12"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"雕刻",
+    "product_num"=>6,
+    "finish_num"=>0
+  ],
+  "K23070127_1_3"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"电子锯开料",
+    "product_num"=>6,
+    "finish_num"=>0
+  ],
+  "K23070127_1_46"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"发货",
+    "product_num"=>12,
+    "finish_num"=>0
+  ],
+  "K23070127_1_43"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"包装",
+    "product_num"=>12,
+    "finish_num"=>0
+  ],
+  "K23070127_1_39"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"面检",
+    "product_num"=>12,
+    "finish_num"=>0
+  ],
+  "K23070127_1_36"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"面漆",
+    "product_num"=>12,
+    "finish_num"=>0
+  ],
+  "K23070127_1_37"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"底检",
+    "product_num"=>12,
+    "finish_num"=>0
+  ],
+  "K23070127_1_33"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"打磨",
+    "product_num"=>12,
+    "finish_num"=>0
+  ],
+  "K23070127_1_11"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"配套质检",
+    "product_num"=>12,
+    "finish_num"=>0
+  ],
+  "K23070127_1_28"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"订背面条",
+    "product_num"=>6,
+    "finish_num"=>0
+  ],
+  "K23070127_1_27"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"组装",
+    "product_num"=>6,
+    "finish_num"=>0
+  ],
+  "K23070127_1_26"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"开横板启口",
+    "product_num"=>6,
+    "finish_num"=>0
+  ],
+  "K23070127_1_24"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"开组装槽",
+    "product_num"=>6,
+    "finish_num"=>0
+  ],
+  "K23070127_1_10"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"UV",
+    "product_num"=>12,
+    "finish_num"=>0
+  ],
+  "K23070127_1_7"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"封边",
+    "product_num"=>12,
+    "finish_num"=>0
+  ],
+  "K23070127_1_23"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"单开门",
+    "procedure"=>"数控开料",
+    "product_num"=>6,
+    "finish_num"=>0
+  ],
+  "K23070127_4_46"=>[
+        "order_no"=>"K23070127",
+    "product_title"=>"双垭口",
+    "procedure"=>"发货",
+    "product_num"=>1,
+    "finish_num"=>0
+  ]
+    ];
+
+    return $this->json_return(200,'',$arr);
+}
+
+public function nu_work_order(Request $request){
+    $arr = [
+        "K23070188_1_28"=>[
+        "order_no"=>"K23070188",
+    "product_title"=>"单开门",
+    "procedure"=>"订背面条",
+    "product_num"=>8
+  ],
+  "K23070188_1_27"=>[
+        "order_no"=>"K23070188",
+    "product_title"=>"单开门",
+    "procedure"=>"组装",
+    "product_num"=>8
+  ],
+  "K23070188_1_26"=>[
+        "order_no"=>"K23070188",
+    "product_title"=>"单开门",
+    "procedure"=>"开横板启口",
+    "product_num"=>8
+  ],
+  "K23070188_1_24"=>[
+        "order_no"=>"K23070188",
+    "product_title"=>"单开门",
+    "procedure"=>"开组装槽",
+    "product_num"=>8
+  ],
+  "K23070188_1_23"=>[
+        "order_no"=>"K23070188",
+    "product_title"=>"单开门",
+    "procedure"=>"数控开料",
+    "product_num"=>8
+  ],
+  "K23070188_1_46"=>[
+        "order_no"=>"K23070188",
+    "product_title"=>"单开门",
+    "procedure"=>"发货",
+    "product_num"=>16
+  ],
+  "K23070188_1_43"=>[
+        "order_no"=>"K23070188",
+    "product_title"=>"单开门",
+    "procedure"=>"包装",
+    "product_num"=>16
+  ],
+  "K23070188_1_39"=>[
+        "order_no"=>"K23070188",
+    "product_title"=>"单开门",
+    "procedure"=>"面检",
+    "product_num"=>16
+  ],
+  "K23070188_1_36"=>[
+        "order_no"=>"K23070188",
+    "product_title"=>"单开门",
+    "procedure"=>"面漆",
+    "product_num"=>16
+  ],
+  "K23070188_1_35"=>[
+        "order_no"=>"K23070188",
+    "product_title"=>"单开门",
+    "procedure"=>"底漆",
+    "product_num"=>16
+  ],
+  "K23070188_1_37"=>[
+        "order_no"=>"K23070188",
+    "product_title"=>"单开门",
+    "procedure"=>"底检",
+    "product_num"=>16
+  ],
+  "K23070188_1_33"=>[
+        "order_no"=>"K23070188",
+    "product_title"=>"单开门",
+    "procedure"=>"打磨",
+    "product_num"=>16
+  ],
+  "K23070188_1_11"=>[
+        "order_no"=>"K23070188",
+    "product_title"=>"单开门",
+    "procedure"=>"配套质检",
+    "product_num"=>16
+  ],
+  "K23070188_1_7"=>[
+        "order_no"=>"K23070188",
+    "product_title"=>"单开门",
+    "procedure"=>"封边",
+    "product_num"=>16
+  ],
+  "K23070188_1_8"=>[
+        "order_no"=>"K23070188",
+    "product_title"=>"单开门",
+    "procedure"=>"四边锯清边",
+    "product_num"=>8
+  ],
+  "K23070188_1_5"=>[
+        "order_no"=>"K23070188",
+    "product_title"=>"单开门",
+    "procedure"=>"压门",
+    "product_num"=>8
+  ],
+    "D22120382_1_7" => [
+        "order_no"=> "D22120382",
+      "product_title"=>"单开门",
+      "procedure"=>"封边",
+      "product_num"=>4
+    ],
+    "D22120382_1_11" => [
+        "order_no"=>"D22120382",
+    "product_title"=>"单开门",
+    "procedure"=>"四边锯清边",
+    "product_num"=>2
+    ],
+   "D22120382_1_24" => [
+   "order_no"=>"D22120382",
+  "product_title"=>"单开门",
+  "procedure"=>"开组装槽",
+  "product_num"=>2
+  ],
+  "D22120382_1_26" =>[
+      "order_no"=>"D22120382",
+  "product_title"=>"单开门",
+  "procedure"=>"开横板启口",
+  "product_num"=>2
+],
+];
+    return $this->json_return(200,'',$arr);
+}
 
 }

+ 12 - 2
routes/api.php

@@ -19,12 +19,22 @@ Route::middleware('auth:api')->get('/user', function (Request $request) {
 
 Route::any('login', 'Api\LoginController@login');
 Route::any('loginMobile', 'Api\LoginController@loginMobile');
-Route::any('test', 'Api\TestController@aa');
-Route::any('testData','Api\TestController@testData');
 Route::any('getHeaderWord', 'Api\HeaderWordController@getHeaderWord');
 Route::any('getHeaderSetting', 'Api\HeaderWordController@getHeaderSettings');
 Route::any('deviceList', 'Api\Device\DeviceController@deviceList');
 Route::any('fyy_set','Api\FyyOrderController@setFyy');
+
+//测试接口
+Route::any('test', 'Api\TestController@aa');
+Route::any('testData','Api\TestController@testData');
+Route::any('order_process1','Api\TestController@order_process1');
+Route::any('project_region','Api\TestController@project_region');
+Route::any('output_value_month1','Api\TestController@output_value_month1');
+Route::any('output_value_efficiency','Api\TestController@output_value_efficiency');
+Route::any('capacity','Api\TestController@capacity');
+Route::any('product_num','Api\TestController@product_num');
+Route::any('work_order','Api\TestController@work_order');
+Route::any('nu_work_order','Api\TestController@nu_work_order');
 Route::group(['middleware'=> ['checkLogin']],function ($route){
     $route->any('HeaderSettingsAdd', 'Api\HeaderWordController@add');
     $route->any('HeaderSettingsDetail', 'Api\HeaderWordController@detail');