| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace App\Http\Controllers;
- use App\Owner;
- use App\Services\OwnerBillReportArchiveService;
- use App\Services\SettlementIndemnityFeeService;
- use Illuminate\Http\Request;
- class SettlementIndemnityFeeController extends Controller implements \App\Interfaces\SettlementBillControllerInterface
- {
- use \App\Traits\SettlementBillTrait;
- /** @var SettlementIndemnityFeeService $service */
- private $service;
- /** @var OwnerBillReportArchiveService $archiveService */
- private $archiveService;
- /**
- * OwnerDischargeTaskSettlementBillController constructor.
- */
- public function __construct()
- {
- $this->service = app('SettlementIndemnityFeeService');
- $this->archiveService = app('OwnerBillReportArchiveService');
- }
- //
- public function index(Request $request)
- {
- $paginateParams = $request->input();
- list($permittingOwnerIds, $counting_month, $owner_id) = $this->getRequestParams($request->year, $request->month, $request->owner_id);
- $details = $this->service->get([
- 'counting_month' => $counting_month,
- 'owner_id' => $owner_id,
- 'paginateParams' => $paginateParams,
- ]);
- $owners = Owner::query()->selectRaw("id,name")->whereIn('id', $permittingOwnerIds)->get();
- $owner = Owner::query()->selectRaw("name,id")->find($owner_id);
- $isArchived = $this->archiveService->isArchived($counting_month, $owner_id, $this->service::TYPE);
- $request = $this->buildRequest($request, $counting_month,$owner_id);
- $totalFee = $details->sum('baoshi_indemnity_money');
- return view('finance.settlementBills.indemnityFee.index', compact('details', 'paginateParams', 'owners', 'owner', 'request', 'isArchived','totalFee'));
- }
- public function export(Request $request)
- {
- }
- }
|