Просмотр исходного кода

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

LD 4 лет назад
Родитель
Сommit
64adc8f0a4

+ 1 - 1
app/Http/Controllers/RejectedController.php

@@ -422,7 +422,7 @@ class RejectedController extends Controller
             "logistic_number"=>"原单单号","logistic_number_return"=>"退回单号","logistic_name"=>"退回公司",
             "fee_collected"=>"到付费用","loaded"=>"是否入库",
             "item_barcode"=>"商品条码","item_name"=>"商品名称",
-            "item_amount"=>"商品数量","quality_label_name"=>"商品质量","operator_name"=>"录入人","remark"=>"退单备注"
+            "item_amount"=>"商品数量","quality_label_name"=>"商品质量","item_remark"=>"备注","operator_name"=>"录入人","remark"=>"退单备注"
         ])->direct();
     }
 

+ 4 - 0
app/Http/Controllers/StorageController.php

@@ -123,6 +123,10 @@ class StorageController extends Controller
         StationTask::query()->where("status","!=",'完成')->whereIn("station_id",$station)->update([
             "status" => "完成"
         ]);
+        Storage::query()->whereIn("station_id",$station)->update([
+            "status" => 1,
+            "station_id" => null,
+        ]);
 
         //重新调取料箱
         app("ForeignHaiRoboticsService")->paddingCacheShelf(Station::query()->whereIn("code",$boxes)->get());

+ 30 - 1
app/Http/Controllers/TestController.php

@@ -28,6 +28,7 @@ use App\LaborReportStatus;
 use App\Log;
 use App\Logistic;
 use App\MaterialBox;
+use App\MaterialBoxModel;
 use App\MeasuringMachine;
 use App\Menu;
 use App\Notifications\SendEmailNotification;
@@ -127,7 +128,35 @@ class TestController extends Controller
     }
     public function test()
     {
-        \App\Authority::query()->firstOrCreate(["name" => "入库管理-入库预约-预约管理-卸货完成"],["name" => "入库管理-入库预约-预约管理-卸货完成","alias_name"=>"入库管理-入库预约-预约管理-卸货完成"]);
+        ini_set('max_execution_time', 2500);
+        $model = MaterialBoxModel::query()->create([
+            "code" => "common"
+        ]);
+        $sql = <<<sql
+    select * from INV_LOT_LOC_ID where traceid = '*' and locationid like 'IDE%'
+sql;
+        foreach (DB::connection("oracle")->select(DB::raw($sql)) as $inv){
+            $materialBox = MaterialBox::query()->firstOrCreate(["code"=>$inv->locationid],[
+                "code" => $inv->locationid,
+                "material_box_model_id"=>$model
+            ]);
+            $owner = Owner::query()->firstOrCreate([
+                "code" => $inv->customerid
+            ],[
+                "code" => $inv->customerid,
+                "name" => $inv->customerid,
+            ]);
+            $commodity = Commodity::query()->where("owner_id",$owner->id)->where("sku",$inv->sku)->first();
+            if (!$commodity){
+                dump($inv->customerid." | ".$inv->sku);
+                continue;
+            }
+            \App\Storage::query()->create([
+                "material_box_id" => $materialBox->id,
+                "commodity_id" => $commodity->id,
+                "amount" => $inv->qty,
+            ]);
+        }
     }
     public function orderCreateBill()
     {

+ 0 - 2
app/Services/ForeignHaiRoboticsService.php

@@ -530,8 +530,6 @@ class ForeignHaiRoboticsService
             $stationCollection->add($station->code);
             $blacklist[] = $box->id;
         }
-        //TODO
-        LogService::log("补充料箱","填充入口",json_encode($stationCollection->toArray(),JSON_UNESCAPED_UNICODE).' | '.json_encode($collection->toArray(),JSON_UNESCAPED_UNICODE));
         $this->fetchGroup_multiLocation($stationCollection,$collection,'','立架出至缓存架');
     }
 }

+ 5 - 1
app/Services/PackageStatisticsService.php

@@ -25,10 +25,14 @@ class PackageStatisticsService
             ->leftJoin('orders','order_packages.order_id','orders.id')
                 ->selectRaw('orders.owner_id,logistic_id');
 
+        if ($params["logistic_id"] ?? false){
+            $logistics = explode(",",$params["logistic_id"]);
+            $query->whereIn("logistic_id",$logistics);
+            unset($params["logistic_id"]);
+        }
         $columnQueryRules=[
             'created_at_start' => ['alias' => 'weighed_at','startDate' => ":00"],
             'created_at_end' => ['alias' => 'weighed_at','endDate' => ":59"],
-            'logistic_id' => ['multi' => ','],
             'owner_id' => ['multi' => ','],
         ];
         $query = $query->groupBy('order_packages.owner_id','logistic_id');

+ 1 - 0
app/Services/RejectedService.php

@@ -128,6 +128,7 @@ class RejectedService
             ->selectRaw('rejected_bill_items.created_at item_created_at,
                 rejected_bill_items.barcode_goods item_barcode,
                 rejected_bill_items.name_goods item_name,
+                rejected_bill_items.remark item_remark,
                 rejected_bill_items.amount item_amount,
                 rejected_bill_items.batch_number item_batch_number,
                 rejected_bill_items.made_at item_made_at,

+ 2 - 2
resources/views/customer/project/create.blade.php

@@ -97,13 +97,13 @@
                     owner_group_id : "{{$owner->user_owner_group_id ?? ''}}",
                     user_workgroup_id : "{{$owner->user_workgroup_id ?? ''}}",
                     warehouse_id : "{{ $owner->warehouse_id ?? ''}}",
-                    tax_rate_id : "{{$owner->is_tax_exist}}"==='Y' ? '0' : "{{$owner->tax_rate_id ?? ''}}",
+                    tax_rate_id : "{{$owner->is_tax_exist ?? ''}}"==='Y' ? '0' : "{{$owner->tax_rate_id ?? ''}}",
                     linkman : "{{$owner->linkman ?? ''}}",
                     phone_number : "{{$owner->phone_number ?? ''}}",
                     description : "{{$owner->description ?? ''}}",
                     waring_line_on : "{{$owner->waring_line_on ?? ''}}",
                     subjection : "{{$owner->subjection ?? ''}}",
-                    is_tax_exist : "{{$owner->is_tax_exist}}"==='Y',
+                    is_tax_exist : "{{$owner->is_tax_exist ?? ''}}"==='Y',
                 },
                 ownerTemp : {},
                 customers : [