|
@@ -938,13 +938,13 @@ public function nu_work_order(Request $request){
|
|
|
// }
|
|
|
|
|
|
public function testaa(Request $request){
|
|
|
- $data = $request->all();
|
|
|
+ $data = $request->all();
|
|
|
|
|
|
- $url = $data['url'];
|
|
|
- $post = $data['post'];
|
|
|
- $header = $data['header'];
|
|
|
+ $url = $data['url'];
|
|
|
+ $post = $data['post'];
|
|
|
+ $header = $data['header'];
|
|
|
|
|
|
- $curl = curl_init();
|
|
|
+ $curl = curl_init();
|
|
|
|
|
|
curl_setopt_array($curl, array(
|
|
|
CURLOPT_URL => $url,
|
|
@@ -961,24 +961,7 @@ public function testaa(Request $request){
|
|
|
$response = curl_exec($curl);
|
|
|
curl_close($curl);
|
|
|
return $this->json_return(200,'',json_decode($response,true));
|
|
|
-
|
|
|
- curl_setopt_array($curl, array(
|
|
|
- CURLOPT_URL => $data['url'],
|
|
|
- CURLOPT_RETURNTRANSFER => true,
|
|
|
- CURLOPT_ENCODING => '',
|
|
|
- CURLOPT_MAXREDIRS => 10,
|
|
|
- CURLOPT_TIMEOUT => 0,
|
|
|
- CURLOPT_FOLLOWLOCATION => true,
|
|
|
- CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
|
|
- CURLOPT_CUSTOMREQUEST => 'POST',
|
|
|
- CURLOPT_POSTFIELDS => json_encode($data['post']),
|
|
|
- CURLOPT_HTTPHEADER => $header,
|
|
|
- ));
|
|
|
-
|
|
|
- $response = curl_exec($curl);
|
|
|
- curl_close($curl);
|
|
|
- return $this->json_return(200,'',json_decode($response,true));
|
|
|
- }
|
|
|
+}
|
|
|
|
|
|
public function testa(Request $request){
|
|
|
$data = $request->all();
|
|
@@ -1004,7 +987,7 @@ public function testa(Request $request){
|
|
|
return $this->json_return(200,'',json_decode($response,true));
|
|
|
}
|
|
|
|
|
|
- public function testaa1(Request $request){
|
|
|
+public function testaa1(Request $request){
|
|
|
$curl = curl_init();
|
|
|
|
|
|
curl_setopt_array($curl, array(
|
|
@@ -1030,7 +1013,30 @@ public function testa(Request $request){
|
|
|
echo $response;
|
|
|
}
|
|
|
|
|
|
- public function testapp(){
|
|
|
+public function testapp(){
|
|
|
+ $curl=curl_init();
|
|
|
+
|
|
|
+ curl_setopt_array($curl,array(
|
|
|
+ CURLOPT_URL=>'http://121.36.142.167:7774/jbl/api/module-data/dispatch_orders/page',
|
|
|
+CURLOPT_RETURNTRANSFER=>true,
|
|
|
+CURLOPT_ENCODING=>'',
|
|
|
+CURLOPT_MAXREDIRS=>10,
|
|
|
+CURLOPT_TIMEOUT=>0,
|
|
|
+CURLOPT_FOLLOWLOCATION=>true,
|
|
|
+CURLOPT_HTTP_VERSION=>CURL_HTTP_VERSION_1_1,
|
|
|
+CURLOPT_CUSTOMREQUEST=>'POST',
|
|
|
+CURLOPT_POSTFIELDS=>'{"direction":"DESC","property":"id","fromClientType":"pc","number":0,"sorts":[],"rules":[{"field":"dispatch_orders.dispatch_no","option":"LIKE_ANYWHERE","values":["PG2023081400027"]},{"field":"product_no","option":"LIKE_ANYWHERE","values":["BC030101000001"]}],"size":15,"specialConditions":[],"workflowSearchBean":{},"dynamicFormCode":"dispatch_orders","dynamicFormTable":null,"ignoreField":true,"developmentSystemId":null,"debugFlag":true}',
|
|
|
+CURLOPT_HTTPHEADER=>array(
|
|
|
+ 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiYXV0aCI6IlJPTEVfSU5ORVJfVVNFUixST0xFX0FETUlOLFJPTEVfSU5URVJGQUNFIiwidG9rZW5JZCI6IjM1IiwiZXhwIjoxNjk0Njc0MTE0fQ.L3Di3K_cpF0rWSgvzbcLufLm8bkCxd3Y-xudfKzSm4F-qdpDr0hYWWQP5K5BYTNuZnu4tWpGmSW2KRHU0pjt-A',
|
|
|
+'Content-Type:application/json',
|
|
|
+),
|
|
|
+));
|
|
|
+
|
|
|
+$response=curl_exec($curl);
|
|
|
+
|
|
|
+curl_close($curl);
|
|
|
+dump(json_decode($response,true));die;
|
|
|
+
|
|
|
$str = '{"result":[{"id":121,"finished_num":0,"dispatch_quantity":100,"out_order_no_time":"1691683200","process_id":9,"dispatch_no":"20230811001","order_product_id":119,"sale_orders_product_id":4499,"order_no":"2023081116917417502029","product_no":"00031412","product_title":"\u65b0\u897f\u5170\u677e","price":"10.0000000000","customer_name":"\u6c5f\u897f\u5fb7\u514b\u65af\u8bfa\uff08\u4e0a\u6d77\u5ba6\u821f\u53a8\u5177\u6709\u9650\u516c\u53f8\uff09"}],"data":{"id":[121],"quantity":["10"],"team_id":[68],"equipment_id":[8],"waste":[[]],"finish_id":[0]}}';
|
|
|
$data = json_decode($str,true);
|
|
|
list($status,$msg) = (new FinishedOrderService())->addInJob($data['result'],$data['data']);
|