Обновление 1.0
Some checks failed
Build and Push Docker Image / test (push) Has been cancelled
Build and Push Docker Image / build (push) Has been cancelled

This commit is contained in:
brusnitsyn
2026-01-13 18:54:48 +09:00
parent bb36ef3a40
commit 76c5f6705e
7 changed files with 164 additions and 19 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Http\Controllers;
use App\Http\Resources\ArchiveInfoResource;
use App\Models\ArchiveInfo;
use App\Models\Mis\SttMedicalHistory;
use Illuminate\Http\Request;
@@ -35,4 +36,26 @@ class ArchiveInfoController extends Controller
return $hasCreated;
}
public function check(Request $request)
{
$data = $request->validate([
'id' => 'required',
]);
$archive = ArchiveInfo::where('mis_history_id', $data['id'])
->orWhere('foxpro_history_id', $data['id'])
->first();
if (isset($archive)) {
return response()->json([
'id' => $archive->mis_history_id ?? $archive->foxpro_history_id,
'type' => $archive->mis_history_id ? 'mis' : 'foxpro',
]);
}
return response()->json([
'message' => 'Карты нет в архиве'
])->setStatusCode(404);
}
}