Explorar o código

临时增加海柔二期机器人操作口

zhouzhendong %!s(int64=4) %!d(string=hai) anos
pai
achega
6ad9430033

+ 12 - 0
app/Http/Controllers/TestController.php

@@ -5,7 +5,10 @@ namespace App\Http\Controllers;
 use App\Components\AsyncResponse;
 use App\Components\Database;
 use App\Components\ErrorPush;
+use App\Services\WaybillService;
+use App\Waybill;
 use Illuminate\Http\Request;
+use Illuminate\Support\Facades\DB;
 
 class TestController extends Controller
 {
@@ -27,6 +30,15 @@ class TestController extends Controller
         }
     }
     public function test(){
+        $arr = DB::connection("oracle")->select(DB::raw("SELECT LOCATIONID FROM INV_LOT_LOC_ID
+where LOCATIONID like 'IDE%' and CUSTOMERID in ('PUHE')
+group by CUSTOMERID,LOCATIONID order by CUSTOMERID"));
+        $str = "";
+
+        foreach ($arr as $item){
+            $str .= '"'.$item->locationid.'",';
+        }
+        dd($str);
     }
 }
 

+ 0 - 1
app/Services/DbOpenService.php

@@ -27,7 +27,6 @@ class DbOpenService
             "Accept" => "application/json"
         ];
         $body = $this->formatWaybillData($waybill);
-
         try {
             $response = httpPost(config('api_logistic.DB.prod.uri')['create_order'], $body, $header);
             if (!$response["result"])return null;

+ 17 - 14
resources/views/station/monitor/show.blade.php

@@ -451,19 +451,22 @@
                         if(obj.dataType !== "heartbeat"){
                             this.box = obj.code;
                             let list = [];
-                            (JSON.parse(obj.list)).forEach(info => {
-                                list.push({
-                                    status : "待处理",
-                                    commodity : {
-                                        name : "",
-                                        barcodes : [
-                                            {code : info.barcode},
-                                            {code : info.barcodeAs},
-                                        ],
-                                    },
-                                    amount : info.quantity
+                            let arr = (JSON.parse(obj.list));
+                            if (arr && arr.length>0){
+                                arr.forEach(info => {
+                                    list.push({
+                                        status : "待处理",
+                                        commodity : {
+                                            name : "",
+                                            barcodes : [
+                                                {code : info.barcode},
+                                                {code : info.barcodeAs},
+                                            ],
+                                        },
+                                        amount : info.quantity
+                                    })
                                 })
-                            })
+                            }
                             this.list = list;
                         }
                     });
@@ -575,7 +578,7 @@
                         type: "get",
                         success : (res,status)=>{
                             if (res.code === 200 && res.data){
-                                window.tempTip.success("开始执行");
+                                window.tempTip.showSuccess("开始执行");
                             } else {
                                 window.tempTip.show(res.message);
                             }
@@ -617,7 +620,7 @@
                         data: JSON.stringify(obj),
                         success : (res,status)=>{
                             if (res.code === 200 && res.data){
-                                window.tempTip.success("开始执行");
+                                window.tempTip.showSuccess("开始执行");
                             } else {
                                 window.tempTip.show(res.message);
                             }