수정 본

This commit is contained in:
2026-03-10 18:57:09 +09:00
parent 13dfb3e112
commit 9650707caf
11 changed files with 2701 additions and 964 deletions

View File

@@ -31,6 +31,7 @@ class Assign extends BaseController
{
$start = (int) $this->request->getGet('start') ?: 0;
$end = (int) $this->request->getGet('length') ?: 10;
$draw = (int) $this->request->getGet('draw') ?: 1;
$data = [
'bonbu' => $this->request->getGet('bonbu'),
@@ -42,12 +43,18 @@ class Assign extends BaseController
'srchTxt' => $this->request->getGet('srchTxt'),
];
$totalCount = $this->assignModel->getTotalCount($data);
$datas = $this->assignModel->getUserList($start, $end, $data);
// 첫 번째 행에서 total_count 추출 (없으면 0)
$totalCount = !empty($datas) ? (int)$datas[0]['total_count'] : 0;
// 각 행에서 total_count 컬럼 제거
foreach ($datas as &$row) {
unset($row['total_count']);
}
return $this->response->setJSON(body: [
'draw' => $draw,
'recordsTotal' => $totalCount,
'recordsFiltered' => $totalCount,
'data' => $datas,