NASER add tahesab sanad list and fix som issues

This commit is contained in:
gholak tala
2026-04-06 08:27:10 +00:00
parent 76a344f9f2
commit e079ba0435
2 changed files with 33 additions and 8 deletions
@@ -363,14 +363,37 @@ class TahesabController extends Controller
{
$tahesab = Http::withoutVerifying()->withHeaders([
'Content-Type' => 'application/json',
'DBName'=> 'tahesabDB1',
'Authorization'=> 'Bearer K7F5P8H2Q1O4I8M8M4J3L4L3W8N2A2P6I2T4I8N4E2T2N2D7O7Y5K3W6P2N4G3X2T1T4C5V4I1X2T6S1'
])->post('https://217.114.40.30:8081/', ["CheckHealth" => [] ])->json();
'DBName' => $this->Config('tahesab_db'),
'Authorization' => "Bearer " . $this->Config('tahesab_token'),
])->post((string)env('TAHESAB'), [
"CheckHealth" => []
])->json();
return $tahesab;
// if($tahesab['Api_Status'] === "OK" && $tahesab['DB_Status'] === "OK"){
// return true;
// }else{
// return false;
// }
}
public function sanadList()
{
$tahesab = Http::withoutVerifying()->withHeaders([
'Content-Type' => 'application/json',
'DBName' => $this->Config('tahesab_db'),
'Authorization' => "Bearer " . $this->Config('tahesab_token'),
])->post((string)env('TAHESAB'), [
"DoListAsnad" => [
10, /*Count_Last,*/
"", /*Moshtari_Code,*/
"", /*"AzTarikhShamsi"*/
(string)Verta::instance(Carbon::now()->format('Y-m-d')), /*"TaTarikhShamsi"*/
"", /*"FilterNoSanad"*/
0, /*Jens_Felez*/
]
])->json();
return $tahesab;
if($tahesab['Api_Status'] === "OK" && $tahesab['DB_Status'] === "OK"){
return true;
}else{
return false;
}
}
}