From 04c28d79f24f98db6ceeb00dd5c13a730428957d Mon Sep 17 00:00:00 2001 From: yangsh Date: Thu, 29 Jan 2026 09:26:32 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A1=B0=ED=9A=8C=EC=86=8D=EB=8F=84=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controllers/Article/Receipt.php | 36 ++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/app/Controllers/Article/Receipt.php b/app/Controllers/Article/Receipt.php index 962014b..e2c0bca 100644 --- a/app/Controllers/Article/Receipt.php +++ b/app/Controllers/Article/Receipt.php @@ -142,15 +142,23 @@ class Receipt extends BaseController // 상세화면 public function detail($id) { - $id = (int) $id; + $id = (string) $id; - if ($id <= 0) { + if ($id === '') { throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound(); } + $t0 = microtime(true); $codes = $this->codeModel->getCodeLists(['TRADE_TYPE', 'RECEIPT_STATUS2', 'RECEIPT_STATUS3', 'SMS_MSG_TYPE', 'SMS_MSG_TYPE2']); // 코드조회 + log_message('info', '[Receipt::detail] getCodeLists {ms}ms', ['ms' => (int) ((microtime(true) - $t0) * 1000)]); + + $t1 = microtime(true); $bonbu = $this->model->getBonbuList(); + log_message('info', '[Receipt::detail] getBonbuList {ms}ms', ['ms' => (int) ((microtime(true) - $t1) * 1000)]); + + $t2 = microtime(true); $team = $this->model->getTeamList(); + log_message('info', '[Receipt::detail] getTeamList {ms}ms', ['ms' => (int) ((microtime(true) - $t2) * 1000)]); // sms 코드 $sms = []; @@ -159,35 +167,57 @@ class Receipt extends BaseController array_push($sms, $c); } + $t3 = microtime(true); $data = $this->model->getDetail($id); - $history = $this->model->getHistory($id); + log_message('info', '[Receipt::detail] getDetail {ms}ms', ['ms' => (int) ((microtime(true) - $t3) * 1000)]); + $t4 = microtime(true); + $history = $this->model->getHistory($id); + log_message('info', '[Receipt::detail] getHistory {ms}ms', ['ms' => (int) ((microtime(true) - $t4) * 1000)]); + + $t5 = microtime(true); if ($data['rcpt_jibun_addr']) { $dupleGroundPlan = $this->model->getDupleGP_na($id, $data['rcpt_sido'], $data['rcpt_gugun'], $data['rcpt_dong'], $data['rcpt_hscp_nm'], $data['rcpt_dtl_addr'], $data['rcpt_li_addr'], $data['rcpt_jibun_addr'], $data['rcpt_etc_addr']); } else { $dupleGroundPlan = $this->model->getDupleGP($id, $data['rcpt_sido'], $data['rcpt_gugun'], $data['rcpt_dong'], $data['rcpt_hscp_nm'], $data['rcpt_dtl_addr'], $data['rcpt_ho']); } + log_message('info', '[Receipt::detail] getDupleGP {ms}ms', ['ms' => (int) ((microtime(true) - $t5) * 1000)]); + $t6 = microtime(true); $aptGround = $this->model->getAptGround($data['rcpt_dong'] ?? ''); + log_message('info', '[Receipt::detail] getAptGround {ms}ms', ['ms' => (int) ((microtime(true) - $t6) * 1000)]); // 이미지 파일리스트 + $t7 = microtime(true); $images = $this->model->getImageList2($data['rsrv_sq']); + log_message('info', '[Receipt::detail] getImageList2 {ms}ms', ['ms' => (int) ((microtime(true) - $t7) * 1000)]); + + $t8 = microtime(true); $imgs_count = $this->model->getImageCountByType($data['rsrv_sq']); + log_message('info', '[Receipt::detail] getImageCountByType {ms}ms', ['ms' => (int) ((microtime(true) - $t8) * 1000)]); $imgs_count = convertArrayToHashTable($imgs_count, 'img_type', 'img_cnt'); //녹취파일 + $t9 = microtime(true); $record = $this->model->getRecordInfo($data['rsrv_sq']); + log_message('info', '[Receipt::detail] getRecordInfo {ms}ms', ['ms' => (int) ((microtime(true) - $t9) * 1000)]); // 시간대별통계 + $t10 = microtime(true); $tmCount = $this->model->getUsrRsrvDateTmCount($id); + log_message('info', '[Receipt::detail] getUsrRsrvDateTmCount {ms}ms', ['ms' => (int) ((microtime(true) - $t10) * 1000)]); // 체크리스트 조회 + $t11 = microtime(true); if ($data['exp_photo_yn'] === "N") { $result_check = $this->model->getChecklist($data['rsrv_sq']); } else { $result_check = []; } + log_message('info', '[Receipt::detail] getChecklist {ms}ms', ['ms' => (int) ((microtime(true) - $t11) * 1000)]); + + log_message('info', '[Receipt::detail] total {ms}ms', ['ms' => (int) ((microtime(true) - $t0) * 1000)]); $this->data['codes'] = $codes; $this->data['bonbu'] = $bonbu;