Kaynağa Gözat

Merge branch 'zzd' of ssh://was.baoshi56.com:10022/var/git/bswas

LD 4 yıl önce
ebeveyn
işleme
bd126a6e0d

+ 3 - 1
app/Http/Controllers/StorageController.php

@@ -140,7 +140,9 @@ class StorageController extends Controller
             "station_id" => null,
         ]);
         //重新调取料箱
-        if (!app("ForeignHaiRoboticsService")->paddingCacheShelf(Station::query()->whereIn("code",$boxes)->get()))$this->error("已无可用料箱,部分库位填充失败");
+        $result = app("ForeignHaiRoboticsService")->paddingCacheShelf(Station::query()->whereIn("code",$boxes)->get());
+        if ($result===null)$this->error("任务下发错误,检查日志");
+        if ($result===false)$this->error("已无可用料箱,部分库位填充失败");
         $this->success(["data"=>$data,"boxes"=>$boxes]);
     }
 

+ 5 - 15
app/Http/Controllers/TestController.php

@@ -141,21 +141,11 @@ class TestController extends Controller
 
     public function test1()
     {
-        ini_set('max_execution_time',-1);
-        DeliveryAppointment::query()->with("details")->whereNotNull("asn_number")->get()->each(function ($d){
-            $asn = preg_split('/[,, ]+/is', $d->asn_number);
-            if ($asn && strlen($d->asn_number)>=13){
-                Store::query()->whereIn("asn_code",$asn)->where("owner_id",$d->owner_id)
-                ->with("storeItems")->get()->each(function ($store)use($d){
-                    $store->storeItems->each(function ($item)use($d){
-                        $de = DeliveryAppointmentDetail::query()->where("delivery_appointment_id",$d->id)
-                            ->where("commodity_id",$item->commodity_id)->first();
-                        if ($de && $item->expected_amount && $de->amount!=$item->expected_amount)$de->update(["amount"=>$item->expected_amount]);
-                    });
-                });
-            }
-        });
-        dd("OK");
+        $stations = Station::query()->select("id")->where("parent_id",6);
+        $storages = \App\Storage::query()->with("station:id,code")->whereIn("station_id",$stations)->where(function (Builder $query){
+            $query->whereNotNull("material_box_id")->orWhere("status",1);
+        })->get();
+        dd(array_column($storages->toArray(),"id"));
     }
 
     public function test2()

+ 3 - 1
app/Services/ForeignHaiRoboticsService.php

@@ -514,7 +514,9 @@ class ForeignHaiRoboticsService
             $stationCollection->add($station->code);
             $blacklist[] = $box->id;
         }
-        $this->fetchGroup_multiLocation($stationCollection,$collection,'','立架出至缓存架');
+        if ($stationCollection->count()>0){
+            if (!$this->fetchGroup_multiLocation($stationCollection,$collection,'','立架出至缓存架')) return null;
+        }
         return $stations->count()==$stationCollection->count();
     }
 }

+ 25 - 25
resources/sass/text.scss

@@ -13,30 +13,30 @@
     -o-animation: changeshadow 2s linear infinite;
 }
 @keyframes changeshadow {
-    0%{ text-shadow: 0 0 4px red}
-    50%{ text-shadow: 0 0 40px red}
-    100%{ text-shadow: 0 0 4px red}
+    0%{ text-shadow: 0px 0px 4px red}
+    50%{ text-shadow: 0px 0px 40px red}
+    100%{ text-shadow: 0px 0px 4px red}
 }
 /* 添加兼容性前缀 */
 @-webkit-keyframes changeshadow {
-    0%{ text-shadow: 0 0 4px red}
-    50%{ text-shadow: 0 0 40px red}
-    100%{ text-shadow: 0 0 4px red}
+    0%{ text-shadow: 0px 0px 4px red}
+    50%{ text-shadow: 0px 0px 40px red}
+    100%{ text-shadow: 0px 0px 4px red}
 }
 @-moz-keyframes changeshadow {
-    0%{ text-shadow: 0 0 4px red}
-    50%{ text-shadow: 0 0 40px red}
-    100%{ text-shadow: 0 0 4px red}
+    0%{ text-shadow: 0px 0px 4px red}
+    50%{ text-shadow: 0px 0px 40px red}
+    100%{ text-shadow: 0px 0px 4px red}
 }
 @-ms-keyframes changeshadow {
-    0%{ text-shadow: 0 0 4px red}
-    50%{ text-shadow: 0 0 40px red}
-    100%{ text-shadow: 0 0 4px red}
+    0%{ text-shadow: 0px 0px 4px red}
+    50%{ text-shadow: 0px 0px 40px red}
+    100%{ text-shadow: 0px 0px 4px red}
 }
 @-o-keyframes changeshadow {
-    0%{ text-shadow: 0 0 4px red}
-    50%{ text-shadow: 0 0 40px red}
-    100%{ text-shadow: 0 0 4px red}
+    0%{ text-shadow: 0px 0px 4px red}
+    50%{ text-shadow: 0px 0px 40px red}
+    100%{ text-shadow: 0px 0px 4px red}
 }
 
 
@@ -105,7 +105,7 @@
     text-align: center;
     border: 1px solid rgba(0,0,0,.2);
     border-radius: 0.3rem;
-    margin-right: 0;
+    margin-right: 0px;
 }
 //圆角边框
 .fillet{
@@ -115,12 +115,12 @@
 //放大标记
 .sign{
     transform: scale(1.2);
-    box-shadow: 0 0 9px 3px #999;
+    box-shadow: 0px 0px 9px 3px #999;
 }
 //放大标记-略小
 .sign-sm{
     transform: scale(1.05);
-    box-shadow: 0 0 9px 3px #999;
+    box-shadow: 0px 0px 9px 3px #999;
 }
 //分隔线
 .hr-info{
@@ -148,12 +148,12 @@
 .scrollbar::-webkit-scrollbar-thumb {
     /*滚动条里面小方块*/
     border-radius: 10px;
-    box-shadow   : inset 0 0 5px rgba(0, 0, 0, 0.2);
+    box-shadow   : inset 0px 0px 5px rgba(0, 0, 0, 0.2);
     background   : #535353;
 }
 .scrollbar::-webkit-scrollbar-track {
     /*滚动条里面轨道*/
-    box-shadow   : inset 0 0 5px rgba(0, 0, 0, 0.2);
+    box-shadow   : inset 0px 0px 5px rgba(0, 0, 0, 0.2);
     border-radius: 10px;
     background   : #ededed;
 }
@@ -207,7 +207,7 @@
 
 //选中的黑色阴影效果
 .box-shadow-dark{
-    box-shadow: 0 0 10px 5px rgba(0,0,0,0.9);
+    box-shadow: 0px 0px 10px 5px rgba(0,0,0,0.9);
     z-index:100;
     position:relative;
 }
@@ -258,7 +258,7 @@
         border: 1px solid #d3d3d3;
         width: 20px;
         height: 20px;
-        margin-bottom: 0;
+        margin-bottom: 0px;
         display: inline-block;
         text-align: center;
         vertical-align: bottom;
@@ -288,11 +288,11 @@
     width: 38px;
     height: 38px;
     padding: 12px;
-    margin: 0 12px 12px 0;
+    margin: 0px 12px 12px 0px;
     text-align: center;
     cursor: pointer;
     border-radius: 3px;
     font-size: 14px;
-    box-shadow: 0 0 0 1px #ddd;
+    box-shadow: 0px 0px 0px 1px #ddd;
     color: inherit;
-}
+}