<?php
//Obfuscated by YAK Pro - Php Obfuscator 2.0.13 at 2025-05-27 11:01:58
 namespace App\Http\Controllers\Admin; use App\Http\Controllers\Controller; use App\Jobs\GenerateCsvReportFund; use App\Jobs\GenerateCsvReportOne; use App\Jobs\GenerateExcelReportFund; use App\Jobs\GenerateExcelReportOne; use App\Jobs\GenerateExcelReportTwo; use App\Jobs\GenerateExcelReportThree; use App\ReportJob; use Illuminate\Http\Request; use Illuminate\Support\Arr; use Carbon\Carbon; use Illuminate\Validation\Rule; use Validator; class ReportController extends Controller { const ITEM_PER_PAGE = 100; public function generate(Request $request) { goto o6p1M; qjYQS: GenerateCsvReportOne::dispatch($IL3cY, $eYbNW)->onQueue(config("\161\165\145\x75\145\x2e\143\157\x6e\156\x65\x63\x74\x69\157\156\x73\x2e\162\x65\x64\x69\163\56\161\165\x65\x75\x65")); dbI8g: o4JfO: goto wQRRx; o6p1M: $eDKoa = Validator::make($request->all(), ["\164\x79\x70\x65" => ["\162\145\x71\x75\151\x72\145\x64", "\151\156\x74\x65\147\145\162", Rule::in([0, 1, 2, 3])], "\x66\x6f\x72\x6d\141\164" => ["\x72\x65\x71\x75\x69\162\x65\144"], "\163\164\141\x74\165\163" => ["\x72\145\161\x75\151\162\x65\x64"]]); if (!$eDKoa->fails()) { goto tNG8M; } return response()->json(["\145\162\x72\x6f\162\163" => $eDKoa->errors()], 403); goto hxTf_; hxTf_: tNG8M: $params = $request->all(); $eYbNW = ["\160\162\x65\x76\151\x6f\165\163\137\171\x65\141\162\x73" => $params["\x70\x72\145\x76\x69\x6f\165\163\x5f\x79\x65\141\x72\163"] ?? null, "\171\x65\141\162\163" => $params["\x79\x65\141\162\163"] ?? null, "\145\x6d\x70\154\157\171\145\145\137\x6e\x61\x6d\145" => $params["\145\155\x70\x6c\x6f\x79\145\145\x5f\x6e\x61\155\x65"] ?? null, "\x73\x74\x61\x74\x75\163" => isset($params["\x73\164\x61\164\x75\x73"]) && in_array($params["\x73\164\x61\x74\165\163"], [1, 2, 3, 4]) ? $params["\163\164\141\164\x75\163"] : null]; goto b2mdK; a89H0: if ($params["\164\171\x70\x65"] == 0) { goto VudWv; } if ($params["\x74\x79\x70\x65"] == 1) { goto D1xTO; } if ($params["\164\171\x70\x65"] == 2) { goto gFmrP; } goto gGOS5; gGOS5: GenerateExcelReportFund::dispatch($IL3cY, $eYbNW)->onQueue(config("\161\x75\145\165\x65\56\x63\x6f\x6e\x6e\145\143\x74\x69\157\x6e\x73\56\x72\x65\144\151\x73\x2e\161\165\145\165\x65")); goto P1BQb; gFmrP: goto p_3Qq; iTrT5: GenerateExcelReportOne::dispatch($IL3cY, $eYbNW)->onQueue(config("\x71\x75\x65\165\x65\56\143\x6f\x6e\156\145\143\164\x69\x6f\x6e\163\56\162\145\144\x69\x73\x2e\161\x75\x65\165\145")); goto dbI8g; qwcL1: goto qjYQS; W_exc: D1xTO: GenerateExcelReportTwo::dispatch($IL3cY, $eYbNW)->onQueue(config("\161\x75\x65\165\145\x2e\x63\x6f\156\156\145\143\x74\x69\x6f\156\163\x2e\x72\145\144\x69\x73\56\161\165\145\165\x65")); HWNrC: goto SyOSy; SyOSy: goto o4JfO; VudWv: if (isset($params["\x66\x6f\x72\155\141\x74"]) && $params["\146\157\162\x6d\141\164"] == "\143\x73\166") { goto qwcL1; } goto iTrT5; p_3Qq: GenerateExcelReportThree::dispatch($IL3cY, $eYbNW)->onQueue(config("\x71\165\145\x75\x65\56\x63\157\156\x6e\x65\143\164\x69\x6f\x6e\163\x2e\x72\145\144\x69\x73\x2e\161\x75\145\x75\145")); P1BQb: goto HWNrC; goto W_exc; wQRRx: return response()->json(["\163\164\x61\164\x75\x73" => "\x70\x65\156\144\x69\x6e\147", "\143\x6f\x64\x65" => $Jb05S, "\155\x65\x73\163\141\x67\145" => "\x50\162\157\143\x65\163\163\x69\x6e\147\40\164\x6f\40\147\x65\x6e\145\162\x61\x74\145\x20\162\145\x70\x6f\x72\x74"], 200); goto XFLM3; b2mdK: $WOlfq = Carbon::now()->format("\x59\x6d\144\x48\x69\x73"); $Jb05S = md5(rand(1000, 9999) . $WOlfq); $IL3cY = ReportJob::create(["\143\x6f\x64\x65" => $Jb05S, "\164\x79\160\145" => $params["\x74\171\x70\x65"], "\163\x74\x61\164\165\x73" => "\x70\145\x6e\x64\x69\156\x67", "\143\162\x65\x61\x74\x65\144\137\141\x74" => now(), "\x75\160\x64\x61\x74\145\x64\137\141\164" => now()]); goto a89H0; XFLM3: } public function checkProgress($waLhQ) { goto syiP6; syiP6: $IL3cY = ReportJob::where("\143\157\x64\x65", $waLhQ)->first(); if (!(!$IL3cY || $IL3cY->status == "\146\x61\x69\x6c\145\144")) { goto teUXl; } return response()->json(["\x73\x74\x61\164\x75\163" => "\x65\x72\x72\x6f\162", "\x63\157\144\145" => $waLhQ, "\155\x65\163\163\x61\x67\145" => "\x52\x65\x70\x6f\162\164\40\x6a\157\142\x20\146\141\x69\x6c\x65\144"], 200); goto LIS7O; LIS7O: teUXl: if (!($IL3cY->status == "\x73\165\x63\x63\x65\x73\x73" && $IL3cY->file != null)) { goto Y7uMZ; } return response()->json(["\x73\x74\x61\x74\x75\x73" => "\x73\x75\143\143\x65\163\x73", "\143\x6f\144\145" => $waLhQ, "\155\145\x73\163\141\x67\145" => "\123\x75\143\x63\145\163\x73\x66\x75\154\154\x79\40\147\x65\x6e\145\x72\141\164\145\144\40\x72\x65\x70\157\162\x74", "\x75\162\x6c" => url("\162\x65\160\157\162\164\57" . basename($IL3cY->file))], 200); goto w4dGP; w4dGP: Y7uMZ: return response()->json(["\x73\x74\x61\164\165\163" => "\160\145\156\x64\151\156\x67", "\143\x6f\144\145" => $waLhQ, "\155\x65\x73\163\141\147\145" => "\122\145\x70\157\162\x74\x20\x6a\157\142\40\x69\163\40\163\x74\151\x6c\x6c\40\160\x72\x6f\x63\145\163\163\151\x6e\x67"], 200); goto J4ori; J4ori: } }