아파트 평면도 상세 페이지 추가

This commit is contained in:
yangsh
2025-12-29 13:50:46 +09:00
parent ab39be9602
commit e0672d325c
7 changed files with 1432 additions and 36 deletions

View File

@@ -217,15 +217,156 @@ class Ground extends BaseController
throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound();
}
$bonbu = $this->model->getBonbuList();
$team = $this->model->getTeamList();
$user = $this->model->getUserList();
// 상세정보
$apt = $this->model->getDetail($rcpt_no, $hscp_no);
// 동일단지
$rdata = $this->model->getDetailLists($rcpt_no, $hscp_no);
// 변경이력
$history = $this->model->getHistory($rcpt_no);
return view("pages/article/detail2", [
'bonbu' => $bonbu,
'team' => $team,
'user' => $user,
'apt' => $apt,
'rdata' => $rdata,
'history' => $history,
]);
}
// 메모저장
public function saveMemo()
{
try {
$data = [
'rcpt_no' => $this->request->getPost('rcpt_no'),
'memo' => $this->request->getPost('memo'),
];
// UPDATE apt_ground
$this->model->saveMemo($data);
return $this->response->setJSON([
'code' => '0',
'msg' => 'success'
]);
} catch (\Exception $e) {
return $this->response->setJSON([
'code' => '9',
'msg' => $e->getMessage(),
]);
}
}
// 담당자 변경
public function saveKeeper()
{
try {
$data = [
'rcpt_no' => $this->request->getPost('rcpt_no'),
'bonbu' => $this->request->getPost('bonbu'),
'team' => $this->request->getPost('team'),
'user' => $this->request->getPost('user'),
];
// UPDATE apt_ground
$this->model->saveKeeper($data);
return $this->response->setJSON([
'code' => '0',
'msg' => 'success'
]);
} catch (\Exception $e) {
return $this->response->setJSON([
'code' => '9',
'msg' => $e->getMessage(),
]);
}
}
// 단지상태변경
public function statusChange()
{
$lib = new MyUpload();
try {
$type = $this->request->getPost('type');
$rcpt_no = $this->request->getPost('rcpt_no');
if ($type === "phoX") {
$apt = $this->model->getDetail($rcpt_no, "");
if (!empty($apt['pho_no'])) {
$path = $apt['file_path'] . "" . $apt['filenm_up'];
$lib->deleteFile($path);
}
}
// UPDATE apt_ground
$this->model->statusChange($rcpt_no, $type);
return $this->response->setJSON([
'code' => '0',
'msg' => 'success'
]);
} catch (\Exception $e) {
return $this->response->setJSON([
'code' => '9',
'msg' => $e->getMessage(),
]);
}
}
// 단지 특이사항 저장
public function saveNote()
{
try {
$rcpt_no = $this->request->getPost('rcpt_no');
$data = [
'rcpt_no' => $rcpt_no,
'note' => $this->request->getPost('note'),
];
// UPDATE apt_ground
$this->model->saveNote($data);
return $this->response->setJSON([
'code' => '0',
'msg' => 'success'
]);
} catch (\Exception $e) {
return $this->response->setJSON([
'code' => '9',
'msg' => $e->getMessage(),
]);
}
}
// 파일업로드(평면도)