| Code Coverage
| Classes and Traits | Functions and Methods | Lines
Total | 0.00% covered (danger) | 0.00% | 0 / 1 | 0.00% covered (danger) | 0.00% | 0 / 8 | CRAP | 0.00% covered (danger) | 0.00% | 0 / 21
TestController | 0.00% covered (danger) | 0.00% | 0 / 1 | 0.00% covered (danger) | 0.00% | 0 / 8 | 72.00 | 0.00% covered (danger) | 0.00% | 0 / 21
__construct | 0.00% covered (danger) | 0.00% | 0 / 1 | 2.00 | 0.00% covered (danger) | 0.00% | 0 / 2
method | 0.00% covered (danger) | 0.00% | 0 / 1 | 2.00 | 0.00% covered (danger) | 0.00% | 0 / 1
tj | 0.00% covered (danger) | 0.00% | 0 / 1 | 2.00 | 0.00% covered (danger) | 0.00% | 0 / 2
injectJS | 0.00% covered (danger) | 0.00% | 0 / 1 | 2.00 | 0.00% covered (danger) | 0.00% | 0 / 4
tj2 | 0.00% covered (danger) | 0.00% | 0 / 1 | 2.00 | 0.00% covered (danger) | 0.00% | 0 / 4
excelIt | 0.00% covered (danger) | 0.00% | 0 / 1 | 2.00 | 0.00% covered (danger) | 0.00% | 0 / 2
featureIt | 0.00% covered (danger) | 0.00% | 0 / 1 | 2.00 | 0.00% covered (danger) | 0.00% | 0 / 2
newSku | 0.00% covered (danger) | 0.00% | 0 / 1 | 2.00 | 0.00% covered (danger) | 0.00% | 0 / 4

1 | <?php
2 |
3 | namespace App\Http\Controllers;
4 |
5 |
6 | use App\Batch;
7 | use App\Events\CancelOrder;
8 | use App\Order;
9 | use App\Rejected;
10 | use App\RejectedBillItem;
11 | use App\Role;
12 | use App\User;
13 | use Carbon\Carbon;
14 | use Illuminate\Database\Eloquent\Collection;
15 | use Illuminate\Http\Request;
16 | use Illuminate\Support\Facades\Gate;
17 | use Zttp\Zttp;
18 |
19 | class TestController extends Controller
20 | {
21 | private $data=[];
22 | public function __construct()
23 | {
24 | $this->data["active_test"]="active";
25 | }
26 | public function method(Request $request,$method)
27 | {
28 | return call_user_func([$this, $method],$request);
29 | }
30 | function tj(Request $request){
31 |
32 | (new LogisticNumberFeatureController())->getFeatures('773015828745698');
33 | }
34 | function injectJS(Request $request){
35 | $items=RejectedBillItem::whereHas('rejectedBill',function($query){
36 | return $query->where('id_owner',2);
37 | })->where('created_at','>','2019-12-09 13:00:00')->where('created_at','<','2019-12-09 18:00:00')->get();
38 | (new RejectedBillItemController())->collectionsToPackConfirm($items);
39 | }
40 | public function tj2(Request $request)
41 | {
42 | $rejected = Rejected::find(10);
43 | $rejectedJianshang=new \App\Http\Controllers\api\jianshang\RejectedController();
44 | dd( $rejectedJianshang->sendRejected($rejected));
45 | }
46 | public function excelIt()
47 | {
48 | $excel=new ExcelController();
49 | return $excel->makeExcel();
50 | }
51 | public function featureIt()
52 | {
53 | LogisticNumberFeatureController::loadRecentRejectedsToFeatures(5,2500);
54 | }
55 | public function newSku()
56 | {
57 | $url='http://bswcs/api/sorting/flux/newSku';
58 | $response = Zttp::post($url, [
59 | 'request'=>[
60 | [
61 | "SKU"=> "1234567890",
62 | "NAME"=> "瑞士莲**巧克力",
63 | "Alternate_SKU1"=> "1122334455",
64 | "GrossWeight"=> "1.2",
65 | "Cube"=> "0.75",
66 | "SKULength"=> "0.25",
67 | "SKUWidth"=> "0.15",
68 | "SKUHigh"=> "0.05"
69 | ],
70 | [
71 | "SKU"=> "1234567892",
72 | "NAME"=> "跳跳饼",
73 | "Alternate_SKU1"=> "",
74 | "GrossWeight"=> "1.3",
75 | "Cube"=> "0.75",
76 | "SKULength"=> "0.25",
77 | "SKUWidth"=> "0.15",
78 | "SKUHigh"=> "0.25"
79 | ],
80 | ]
81 | ]);
82 | return $response->json();
83 | }
84 | }