فهرست منبع

注册InventoryAccountService

haozi 4 سال پیش
والد
کامیت
135beb24c7
2فایلهای تغییر یافته به همراه6 افزوده شده و 4 حذف شده
  1. 4 4
      app/Http/Controllers/InventoryAccountController.php
  2. 2 0
      app/Providers/AppServiceProvider.php

+ 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];

+ 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;
@@ -231,6 +232,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);