| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace App\Http\Controllers;
- use App\Components\AsyncResponse;
- use App\Components\Database;
- use App\Components\ErrorPush;
- use App\Exceptions\Exception;
- use App\Rejected;
- use App\RejectedBill;
- use App\RejectedBillItem;
- use App\Services\WaybillService;
- use App\User;
- use App\Waybill;
- use Illuminate\Database\Eloquent\Collection;
- use Illuminate\Http\Request;
- use Illuminate\Support\Facades\Auth;
- use Illuminate\Support\Facades\DB;
- use Illuminate\Support\Facades\Hash;
- use Illuminate\Support\Facades\Http;
- use Zttp\Zttp;
- class TestController extends Controller
- {
- use AsyncResponse, ErrorPush, Database;
- const ASNREFERENCE_2 = 'ASNREFERENCE2';
- public function __construct()
- {
- $this->data["active_test"] = "active";
- }
- public function method(Request $request, $method)
- {
- try {
- return call_user_func([$this, $method], $request);
- }catch (\BadMethodCallException $e){
- dd("方法不存在");
- }
- }
- public function test()
- {
- $url = config('api.java.base').config('api.java.device.picking.getContainerOfWave');
- $get = Http::get($url, ["container" => "JH028"]);
- $result = $get->json();
- if ($result["code"] != 200) {
- return response()->json(['result'=>'failure','fail_info'=>$result["message"]])->setEncodingOptions(JSON_UNESCAPED_UNICODE);
- }
- dd($result["data"]);
- }
- }
|