diff --git a/app/Actions/Dealer/CalculateUnsettledManageSubsidies.php b/app/Actions/Dealer/CalculateUnsettledManageSubsidies.php deleted file mode 100644 index 6294cbc8..00000000 --- a/app/Actions/Dealer/CalculateUnsettledManageSubsidies.php +++ /dev/null @@ -1,20 +0,0 @@ -where('user_id', $dealer->user_id)->sum('total_amount'); - - return bcmul($total, '1', 2); - } -} diff --git a/app/Actions/Dealer/CalculateUnsettledPurchaseAmount.php b/app/Actions/Dealer/CalculateUnsettledPurchaseAmount.php deleted file mode 100644 index 1436244c..00000000 --- a/app/Actions/Dealer/CalculateUnsettledPurchaseAmount.php +++ /dev/null @@ -1,24 +0,0 @@ -where('path', 'like', "{$dealer->userInfo->full_path}%") - ->sum('total_amount'); - - return bcmul($total, '1', 2); - } -} diff --git a/app/Endpoint/Api/Http/Controllers/Dealer/ManageSubsidyController.php b/app/Endpoint/Api/Http/Controllers/Dealer/ManageSubsidyController.php index a0099bc9..bd7a33b5 100644 --- a/app/Endpoint/Api/Http/Controllers/Dealer/ManageSubsidyController.php +++ b/app/Endpoint/Api/Http/Controllers/Dealer/ManageSubsidyController.php @@ -3,7 +3,6 @@ namespace App\Endpoint\Api\Http\Controllers\Dealer; use App\Actions\Dealer\CalculateManageSubsidiesOfCurrentPeriod; -use App\Actions\Dealer\CalculateUnsettledManageSubsidies; use App\Endpoint\Api\Http\Controllers\Controller; use Illuminate\Http\Request; @@ -13,20 +12,18 @@ class ManageSubsidyController extends Controller * 管理津贴统计 * * @param \Illuminate\Http\Request $request - * @param \App\Actions\Dealer\CalculateUnsettledManageSubsidies $calculateUnsettledManageSubsidies * @param \App\Actions\Dealer\CalculateManageSubsidiesOfCurrentPeriod $calculateManageSubsidiesOfCurrentPeriod * @return \Illuminate\Http\JsonResponse */ public function statistics( Request $request, - CalculateUnsettledManageSubsidies $calculateUnsettledManageSubsidies, CalculateManageSubsidiesOfCurrentPeriod $calculateManageSubsidiesOfCurrentPeriod, ) { $user = $request->user(); return response()->json([ // 未结算的管理津贴 - 'unsettled_manage_subsidies' => $calculateUnsettledManageSubsidies->handle($user->dealer), + 'unsettled_manage_subsidies' => '0.00', // 本期已结算的管理津贴 'current_period_manage_subsidies'=> $calculateManageSubsidiesOfCurrentPeriod->handle($user->dealer), ]);