소스 검색

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

loustwo 4 년 전
부모
커밋
920d864828

+ 1 - 3
app/Http/ApiControllers/InventoryController.php

@@ -196,9 +196,7 @@ class InventoryController
             $stockService->updateInventory($task_id);
         }
         $notStocktakingList=$service->getUnInventoryTaskList($task_id);
-        $this->response([
-            "notStocktakingList" => $notStocktakingList,
-        ]);
+        $this->response($notStocktakingList);
     }
 
     /**

+ 4 - 4
app/Http/Controllers/InventoryAccountController.php

@@ -329,21 +329,21 @@ class InventoryAccountController extends Controller
         if (is_null($count)) return ['success' => false, 'data' => '盘点数不能为空!'];
         if ($produced_at || $valid_at || $batch_number) {
             /** @var InventoryAccountService $inventoryAccountMission */
-            $inventoryAccountService = app('inventoryAccountService');
+            $inventoryAccountService = app('InventoryAccountService');
             $inventoryAccountMission = $inventoryAccountService->盘点生产日期_失效日期_批号有改动任务($id, $count, $inventoryId, $produced_at, $valid_at, $batch_number);
             if (!$inventoryAccountMission) return ['success' => false, 'data' => '盘点生产日期_失效日期_批号有改动任务失败!'];
             /** @var InventoryAccountService $inventoryService */
-            $inventoryService = app('inventoryAccountService');
+            $inventoryService = app('InventoryAccountService');
             $inventoryAccount = $inventoryService->updateInventory($inventoryId);
             $stockInventoryPersons = $inventoryAccountMission[0]->stockInventoryPersons;
             return ['success' => true, 'inventoryMission' => $inventoryAccountMission, 'inventory' => $inventoryAccount, 'stockInventoryPersons' => $stockInventoryPersons];
         } else {
             /** @var InventoryAccountService $inventoryAccountMission */
-            $inventoryAccountService = app('inventoryAccountService');
+            $inventoryAccountService = app('InventoryAccountService');
             $inventoryAccountMission = $inventoryAccountService->盘点选中任务($id, $count, $inventoryId);
             if (!$inventoryAccountMission) return ['success' => false, 'data' => '盘点选中任务失败!'];
             /** @var InventoryAccountService $inventoryService */
-            $inventoryService = app('inventoryAccountService');
+            $inventoryService = app('InventoryAccountService');
             $inventoryAccount = $inventoryService->updateInventory($inventoryId);
             $stockInventoryPersons = $inventoryAccountMission->stockInventoryPersons;
             return ['success' => true, 'inventoryMission' => $inventoryAccountMission, 'inventory' => $inventoryAccount, 'stockInventoryPersons' => $stockInventoryPersons];

+ 6 - 2
app/Http/Controllers/TestController.php

@@ -179,7 +179,12 @@ class TestController extends Controller
         dd($c($a));
     }
     public function test(Request $request)
-    {$user = User::query()->where("name","yanyuanmin")->first();
+    {
+        foreach (Batch::query()->where("created_at",">=","2021-12-18 00:00:00")->get() as $bat){
+            $this->assignBatch($bat->code);
+        }
+        dd("OK");
+        $user = User::query()->where("name","yanyuanmin")->first();
         dd($user->id);
         dd($codes = app('OwnerService')->getQuery($user->id)->select("code")->pluck("code"));
 
@@ -229,7 +234,6 @@ class TestController extends Controller
 
     public function test123(){
 
-        dd(Str::contains('承运商处理','承运商',));
 //        dd(WorkOrderDetail::query()->orderByDesc('id')->first());
     }
 

+ 2 - 0
app/Providers/AppServiceProvider.php

@@ -31,6 +31,7 @@ use App\Services\DemandProcessService;
 use App\Services\FeatureService;
 use App\Services\ForeignHaiRoboticsService;
 use App\Services\InventoryAccountMissionService;
+use App\Services\InventoryAccountService;
 use App\Services\InventoryCompareService;
 use App\Services\LaborReportsCountingRecordService;
 use App\Services\LogisticSFService;
@@ -232,6 +233,7 @@ class AppServiceProvider extends ServiceProvider
 
     private function loadingService(){
         app()->singleton('AllInventoryService',AllInventoryService::class);
+        app()->singleton('InventoryAccountService',InventoryAccountService::class);
         app()->singleton('AndroidInventoryService',AndroidInventoryService::class);
         app()->singleton('AuthorityService',AuthorityService::class);
         app()->singleton('BatchService',BatchService::class);