From 8b621a065e381e16ba0cac8f84109490348d0308 Mon Sep 17 00:00:00 2001 From: yangsh Date: Fri, 6 Feb 2026 10:38:18 +0900 Subject: [PATCH] =?UTF-8?q?=ED=98=84=EC=9E=A5=ED=99=95=EC=9D=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Config/Routes.php | 2 + app/Controllers/Article/Receipt.php | 199 ++- app/Libraries/NaverApiClient.php | 72 ++ app/Models/article/DeptModel.php | 16 + app/Models/article/ReceiptModel.php | 276 ++++- app/Views/pages/article/receipt/detail.php | 1306 ++++++++++++++++++-- 6 files changed, 1732 insertions(+), 139 deletions(-) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 55d373b..903ee9f 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -67,11 +67,13 @@ $routes->group('', ['namespace' => 'App\Controllers\Article'], static function ( $routes->get('excel', 'Receipt::excel'); $routes->post('saveTel', 'Receipt::saveTel'); // 연락가능전화 저장 + $routes->post('resDbYn', 'Receipt::resDbYn'); // 거주여부 저장 $routes->post('resGround', 'Receipt::resGround'); // 평면도요청 저장 $routes->post('assignRegist', 'Receipt::assignRegist'); // 예약확정 저장 $routes->post('requestMovie', 'Receipt::requestMovie'); // 동영상 촬영여부저장 $routes->post('requestMessage', 'Receipt::requestMessage'); // 중개사메모 저장 $routes->post('rsrvcancel', 'Receipt::rsrvcancel'); // 예약취소 + $routes->post('chgStatus', 'Receipt::chgStatus'); // 상태변경 $routes->post('sendSms', 'Receipt::sendSms'); // 문자발송 $routes->post('saveRecInfo', 'Receipt::saveRecInfo'); // 거주인정보저장 $routes->post('uploadFile', 'Receipt::uploadFile'); // 파일업로드 diff --git a/app/Controllers/Article/Receipt.php b/app/Controllers/Article/Receipt.php index 668e300..fbfbec4 100644 --- a/app/Controllers/Article/Receipt.php +++ b/app/Controllers/Article/Receipt.php @@ -5,8 +5,11 @@ use App\Controllers\BaseController; use App\Libraries\Common; use App\Libraries\MyUpload; +use App\Libraries\NaverApiClient; +use App\Models\article\DeptModel; use App\Models\article\ReceiptModel; use App\Models\common\CodeModel; +use Exception; class Receipt extends BaseController { @@ -143,6 +146,7 @@ class Receipt extends BaseController // 상세화면 public function detail($id) { + $naver = new NaverApiClient(); $id = (string) $id; if ($id === '') { @@ -161,6 +165,10 @@ class Receipt extends BaseController $team = $this->model->getTeamList(); log_message('info', '[Receipt::detail] getTeamList {ms}ms', ['ms' => (int) ((microtime(true) - $t2) * 1000)]); + $damdang = $this->model->getUserList(); + + + // sms 코드 $sms = []; foreach ($codes as $c) { @@ -209,6 +217,9 @@ class Receipt extends BaseController $tmCount = $this->model->getUsrRsrvDateTmCount($id); log_message('info', '[Receipt::detail] getUsrRsrvDateTmCount {ms}ms', ['ms' => (int) ((microtime(true) - $t10) * 1000)]); + // 당일 방문예정 매물. + $assignList = $this->model->getAssignReceiptListByUser($data['rsrv_date'], $data['usr_sq'], array($id)); + // 체크리스트 조회 $t11 = microtime(true); if ($data['exp_photo_yn'] === "N") { @@ -217,13 +228,30 @@ class Receipt extends BaseController $result_check = []; } + $pdept = ''; + if (!empty($data['dept_sq'])) { + $pdept = $this->model->getDeptDetail($data['dept_sq']); + } else { + $pdept = $this->model->getDeptDetail($data['region_dept_sq']); + } + $complexList = []; $ptpList = []; + // print_r($data); + // exit; + if ($data['comp_sq'] == '2') { - // $callApi = new CallApi(); + // 아파트단지목록 + $complexList = $naver->complexList($data['rcpt_dong']); + + // 평형목록 + $ptpList = $naver->ptpList($data['rcpt_hscp_no']); } + // print_r($ptpList); + // exit; + 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)]); @@ -231,9 +259,13 @@ class Receipt extends BaseController $this->data['codes'] = $codes; $this->data['bonbu'] = $bonbu; $this->data['team'] = $team; + $this->data['damdang'] = $damdang; + $this->data['pdept'] = $pdept; + $this->data['sms'] = $sms; $this->data['data'] = $data; + $this->data['assignList'] = $assignList; $this->data['history'] = $history; $this->data['dupleGroundPlan'] = $dupleGroundPlan; @@ -247,6 +279,9 @@ class Receipt extends BaseController $this->data['tmCount'] = $tmCount; $this->data['result_check'] = $result_check; + $this->data['complexList'] = $complexList; + $this->data['ptpList'] = $ptpList; + return view("pages/article/receipt/detail", $this->data); } @@ -275,6 +310,48 @@ class Receipt extends BaseController } } + // 거주여부 저장 + public function resDbYn() + { + $naver = new NaverApiClient(); + + try { + + $rcpt_key = $this->request->getPost('rcpt_key'); + $rcpt_sq = $this->request->getPost('rcpt_sq'); + $rsrv_sq = $this->request->getPost('rsrv_sq'); + $res_yn = $this->request->getPost('resYn'); + $dbUsageAgrYn = $this->request->getPost('dbUsageAgrYn'); + + $this->model->saveResDB($rcpt_sq, $rsrv_sq, $res_yn, $dbUsageAgrYn); + + $receipt = $this->getDetail($rcpt_key); + if ($res_yn == 'Y') { + $isResidentsExist = true; + } else { + $isResidentsExist = false; + } + + $api_result = $naver->residentsExistence($rcpt_key, $isResidentsExist); + + + if (!isset($api_result['result'])) { + throw new \Exception('API 통신오류입니다.\n다시 저장하여 주십시요.'); + } + + return $this->response->setJSON([ + 'code' => '0', + 'msg' => 'success' + ]); + + } catch (\Exception $e) { + return $this->response->setJSON([ + 'code' => '9', + 'msg' => $e->getMessage(), + ]); + } + } + // 평면도요청 저장 public function resGround() { @@ -302,13 +379,42 @@ class Receipt extends BaseController // 예약확정 저장 public function assignRegist() { + $naver = new NaverApiClient(); + $deptModel = new DeptModel(); + try { + //전달받은 값 + $rcpt_sq = $this->request->getPost('rcpt_sq'); + $rcpt_key = $this->request->getPost('rcpt_key'); + $rsrv_sq = $this->request->getPost('rsrv_sq'); + $rsrv_date = $this->request->getPost('rsrv_date'); + $rsrv_tm_ap = $this->request->getPost('rsrv_tm_ap'); + $rsrv_tm_hour = $this->request->getPost('rsrv_tm_hour'); + $bonbu = $this->request->getPost('bonbu'); + $dept_sq = $this->request->getPost('dept_sq'); + $usr_sq = $this->request->getPost('usr_sq'); + + $bonbuInfo = $deptModel->getDeptDetail($bonbu); + $deptInfo = $deptModel->getDeptDetail($dept_sq); + $userInfo = $this->model->getUserDetail($usr_sq); + $receipt = $this->model->getDetail($rcpt_key); + + /*** 네이버 연동[s] ***/ + $na_result = $naver->reserveSuccess($rcpt_key, 'Y', $bonbuInfo['dept_nm'], $deptInfo['dept_nm'], $userInfo['usr_nm'], $userInfo['usr_tel1'], $rsrv_date, $rsrv_tm_ap); + /*** 네이버 연동[e] ***/ + + if (array_key_exists('result', $na_result)) { //네이버연동 상태변경 완료 + $result = $this->model->assignRegist($rcpt_sq, $rsrv_date, $rsrv_tm_ap, $rsrv_tm_hour, $dept_sq, $usr_sq, $receipt); + + return $this->response->setJSON([ + 'code' => '0', + 'msg' => 'success' + ]); + } else { + throw new \Exception($na_result['message']); + } - return $this->response->setJSON([ - 'code' => '0', - 'msg' => 'success' - ]); } catch (\Exception $e) { return $this->response->setJSON([ @@ -371,10 +477,44 @@ class Receipt extends BaseController // 예약취소 public function rsrvcancel() { + $naver = new NaverApiClient(); + try { + //전달받은 값 + $rcpt_sq = $this->request->getPost('rcpt_sq'); + $rsrv_sq = $this->request->getPost('rsrv_sq'); + $rcpt_key = $this->request->getPost('rcpt_key'); + $result_cd2 = $this->request->getPost('result_cd2'); + $result_cd3 = $this->request->getPost('result_cd3'); + $result_msg = $this->request->getPost('result_msg'); + $rcpt_stat1 = $this->request->getPost('rcpt_stat1'); + $receipt = $this->model->getDetail($rcpt_key); + /*** 네이버 연동[s] ***/ + if ($result_cd2 == '9010' || $result_cd2 == '9020') { //예약취소 + $na_result = $naver->reserveFail($rcpt_key, "E11", $result_msg); + } else if ($result_cd2 == '9030') { + if ($rcpt_stat1 == '70') { + throw new \Exception('방문전 취소 할 수 없습니다.'); + } else { + $na_result = $naver->shootFail($rcpt_key, "E21", $result_msg); + } + } else if ($result_cd2 == '9040') { + $na_result = $naver->shootFail($rcpt_key, "E22", $result_msg); + } else if ($result_cd2 == '9045') { + $na_result = $naver->shootFail($rcpt_key, "E23", $result_msg); + } else if ($result_cd2 == '9050') { + $na_result = $naver->inspectFail($rcpt_key, 'E31', $result_msg); + } + /*** 네이버 연동[e] ***/ + if (array_key_exists('result', $na_result)) { //네이버연동 상태변경 완료 + $result = $this->model->rsrvcancel($rcpt_sq, $rsrv_sq, $result_cd2, $result_cd3, $result_msg, $receipt); + + } else { + throw new \Exception($na_result['message']); + } return $this->response->setJSON([ 'code' => '0', @@ -389,6 +529,55 @@ class Receipt extends BaseController } } + // 상태변경 + public function chgStatus() + { + try { + + $rcpt_sq = $this->request->getPost('rcpt_sq'); + $rcpt_key = $this->request->getPost('rcpt_key'); + $rcpt_stat = $this->request->getGet('rcpt_stat'); + $rsrv_sq = $this->request->getPost('rsrv_sq'); + $req_rec_yn = $this->request->getGet('reqRecYn'); + + $rsrv_date = $this->request->getPost('rsrv_date'); + $rsrv_tm_ap = $this->request->getPost('rsrv_tm_ap'); + $rsrv_tm_hour = $this->request->getPost('rsrv_tm_hour'); + $bonbu = $this->request->getPost('bonbu'); + $dept_sq = $this->request->getPost('dept_sq'); + $usr_sq = $this->request->getPost('usr_sq'); + + $rletTypeCd = $this->request->getGet('rletTypeCd'); + + // 파라미터 디버그 로깅 + $p = [ + 'rcpt_sq' => $rcpt_sq, + 'rcpt_key' => $rcpt_key, + 'rcpt_stat' => $rcpt_stat, + 'rsrv_sq' => $rsrv_sq, + 'req_rec_yn' => $req_rec_yn, + 'rsrv_date' => $rsrv_date, + 'rsrv_tm_ap' => $rsrv_tm_ap, + 'rsrv_tm_hour' => $rsrv_tm_hour, + 'bonbu' => $bonbu, + 'dept_sq' => $dept_sq, + 'usr_sq' => $usr_sq, + 'rletTypeCd' => $rletTypeCd, + ]; + + + print_r($p); + exit; + + + } catch (\Exception $e) { + return $this->response->setJSON([ + 'code' => '9', + 'msg' => $e->getMessage(), + ]); + } + } + // 문자발송 public function sendSms() diff --git a/app/Libraries/NaverApiClient.php b/app/Libraries/NaverApiClient.php index 6d3c5ec..7f8d253 100644 --- a/app/Libraries/NaverApiClient.php +++ b/app/Libraries/NaverApiClient.php @@ -363,6 +363,78 @@ class NaverApiClient return $this->request('POST', $url, $postData); } + /** + * 현장확인 거주인 여부 변경 + */ + public function residentsExistence($reserveNumber, $isResidentsExist) + { + $url = $this->commonModel->getCompanyInfo(3); + $url = $url['api_server'] . "/residents/existence"; + + $postData = [ + 'reserveNumber' => $reserveNumber, + 'isResidentsExist' => $isResidentsExist + ]; + + return $this->request('POST', $url, $postData); + } + + /** + * 예약확인 완료 + */ + public function reserveSuccess($reserveNo, $modyfyYn, $agency, $team, $staff, $staffTel, $reserveYmd, $apm) + { + $url = $this->commonModel->getCompanyInfo(3); + $url = $url['api_server'] . "/site/reserveSuccess.nhn"; + + $getData = ['reserveNo' => $reserveNo, 'modyfyYn' => $modyfyYn, 'agency' => $agency, 'team' => $team, 'staff' => $staff, 'staffTel' => $staffTel, 'reserveYmd' => $reserveYmd, 'apm' => $apm]; + + return $this->request('POST', $url, $getData); + } + + /** + * 예약확인 실패 + */ + public function reserveFail($reserveNo, $errorCode, $etcTxt) + { + $url = $this->commonModel->getCompanyInfo(3); + $url = $url['api_server'] . "/site/reserveFail.nhn"; + + $getData = ['reserveNo' => $reserveNo, 'errorCode' => $errorCode, 'errorDesc' => $etcTxt]; + + return $this->request('POST', $url, $getData); + } + + /** + * 촬영 실패 + */ + public function shootFail($reserveNo, $errorCode, $etcTxt) + { + $url = $this->commonModel->getCompanyInfo(3); + $url = $url['api_server'] . "/site/shootFail.nhn"; + + $getData = ['reserveNo' => $reserveNo, 'errorCode' => $errorCode, 'errorDesc' => $etcTxt]; + + return $this->request('POST', $url, $getData); + } + + /** + * 현장확인2 및 썸네일 검수 실패 + */ + public function inspectFail($reserveNumber, $failDescription) + { + $url = $this->commonModel->getCompanyInfo(3); + $url = $url['api_server'] . "/site/vr/inspect/fail"; + + $postData = [ + 'reserveNumber' => $reserveNumber, + 'failDescription' => $failDescription + ]; + + return $this->request('POST', $url, $postData); + } + + /** * CURL 공통 실행 함수 */ diff --git a/app/Models/article/DeptModel.php b/app/Models/article/DeptModel.php index 8c82f82..34e6706 100644 --- a/app/Models/article/DeptModel.php +++ b/app/Models/article/DeptModel.php @@ -115,6 +115,22 @@ class DeptModel extends Model return $query->getResultArray(); } + /** + * 부서검색(상세) + */ + public function getDeptDetail($dept_sq) + { + $sql = "SELECT dept_sq, pdept_sq, dept_nm, dept_desc, dept_head, use_yn, depth, insert_tm, insert_usr, update_tm, update_usr, lft, rgt" . + " FROM departments" . + " WHERE dept_sq = ?"; + + $data = array($dept_sq); + $query = $this->db->query($sql, $data); + $row = $query->getRowArray(); + + return $row; + } + // 조직별통계 public function getDeptStatistics($data) { diff --git a/app/Models/article/ReceiptModel.php b/app/Models/article/ReceiptModel.php index 1274dc6..0bb1ece 100644 --- a/app/Models/article/ReceiptModel.php +++ b/app/Models/article/ReceiptModel.php @@ -149,6 +149,31 @@ class ReceiptModel extends Model return $query->getResultArray(); } + /** + * 사용자 상세정보 + */ + public function getUserDetail($usr_sq) + { + $builder = $this->db->table('users a'); + + $builder->select(" + a.usr_sq, + a.dept_sq, + a.usr_id, + a.usr_nm, + a.usr_level, + a.usr_tel1, + a.usr_tel2, + b.dept_nm + ", false); + + $builder->join('departments b', 'a.dept_sq = b.dept_sq', 'left'); + $builder->where('a.usr_sq', $usr_sq); + + return $builder->get()->getRowArray(); + + } + public function getTotalCount($data) { $usr_sq = session('usr_sq'); @@ -1179,10 +1204,27 @@ class ReceiptModel extends Model $builder->where('a.rcpt_key', $id); - return $builder->get()->getRowArray(); } + /** + * 사용자의 지정일자에 배정된 목록을 가져온다. (시간, 위치만...) + */ + public function getAssignReceiptListByUser($rsrv_date, $usr_sq, $arrExcept = []) + { + $sql = "SELECT a.rcpt_key, a.rcpt_atclno, a.rcpt_x, a.rcpt_y, b.rsrv_tm_ap, b.rsrv_tm_hour" . + " FROM receipt a" . + " INNER JOIN result b ON b.rcpt_sq = a.rcpt_sq AND b.usr_sq = ? AND b.rsrv_date = ?" . + " WHERE a.rcpt_key not in (?)"; + $except_rcptKey = implode(',', $arrExcept); + $data = array($usr_sq, $rsrv_date, $except_rcptKey); + $query = $this->db->query($sql, $data); + $res = $query->getResultArray(); + + + return $res; + } + public function getDupleGP($rcpt_key, $rcpt_sido, $rcpt_gugun, $rcpt_dong, $rcpt_hscp_nm, $rcpt_dtl_addr, $rcpt_ho) { $sql = "select rcpt_sq, c.rcpt_key, c.photo_save_dt from" . @@ -1426,6 +1468,40 @@ class ReceiptModel extends Model ]; } + // 거주여부 저장 + public function saveResDB($rcpt_sq, $rsrv_sq, $resYn, $dbUsageAgrYn) + { + $this->db->transStart(); + $usr_id = session('usr_id'); + + $sql = "SELECT result_cd3, resYn, dbUsageAgrYn FROM result WHERE rsrv_sq = ?"; + $data = array($rsrv_sq); + $query = $this->db->query($sql, $data); + $row = $query->getRowArray(); + + $sql = "UPDATE result" . + " SET resYn = ?" . + " ,dbUsageAgrYn = ?" . + " WHERE rsrv_sq = ?" . + " AND rcpt_sq = ?"; + $data = array($resYn, $dbUsageAgrYn, $rsrv_sq, $rcpt_sq); + + if ($this->db->query($sql, $data) === false) { + return [ + 'success' => false, + 'msg' => '저장실패', + ]; + } + + $this->saveChangedHistory($rcpt_sq, $row['result_cd3'], 'C24', $usr_id, $row['resYn'] . "|" . $row['dbUsageAgrYn']); + + $this->db->transComplete(); + + return [ + 'success' => true, + ]; + } + // 평면도요청 저장 public function saveGround($rcpt_sq, $ground_plan) { @@ -2044,4 +2120,202 @@ class ReceiptModel extends Model } } + + /** + * 배정자 등록 + */ + public function assignRegist($rcpt_sq, $rsrv_date, $rsrv_tm_ap, $rsrv_tm_hour, $dept_sq, $usr_sq, $receipt) + { + // 세션정보 + $usr_id = session('usr_id'); + $reg_usr_sq = session('usr_sq'); + + $this->db->transStart(); + + // 변경전 기존 데이터 가져오기 + $org_sql = "SELECT * FROM result WHERE rcpt_sq = ?"; + $query = $this->db->query($org_sql, [$rcpt_sq]); + $row = $query->getRowArray(); + + // 예약확인 + $sql1 = "UPDATE result" . + " SET rsrv_date = ?" . + " ,rsrv_tm_ap = ?" . + " ,rsrv_tm_hour = ?" . + " ,rsrv_save_dt = now()" . + " ,update_tm = now()" . + " ,update_usr = ?" . + " WHERE rcpt_sq = ?"; + + $data1 = [ + $rsrv_date, + $rsrv_tm_ap, + $rsrv_tm_hour, + $reg_usr_sq, + $rcpt_sq + ]; + + if ($this->db->query($sql1, $data1) === false) { + return [ + 'success' => false, + 'msg' => '저장 실패', + ]; + } + + // 배정 + $sql2 = "UPDATE result" . + " SET dept_sq = ?" . + " ,usr_sq = ?" . + " ,result_cd1 = 20" . + " ,result_cd2 = 2000" . + " ,result_cd3 = 200000" . + " ,update_usr = ?" . + " ,update_tm = now()" . + " ,assign_save_dt = now()" . + " ,rsrv_cplt_dt = now()" . + " WHERE rcpt_sq = ?"; + + $data2 = [ + $dept_sq, + $usr_sq, + $reg_usr_sq, + $rcpt_sq + ]; + + if ($this->db->query($sql2, $data2) === false) { + return [ + 'success' => false, + 'msg' => '저장 실패', + ]; + } + + // 매물상태 변경 + $rcpt_sql = "UPDATE receipt" . + " SET rcpt_stat = 200000" . + " WHERE rcpt_sq = ?"; + $this->db->query($rcpt_sql, [$rcpt_sq]); + + // 정보변경이력 저장 + if (!empty($row)) { + $remark = "{$row['rsrv_date']} {$row['rsrv_tm_ap']} {$row['rsrv_tm_hour']}시 -> {$rsrv_date} {$rsrv_tm_ap} {$rsrv_tm_hour}시"; + } else { + $remark = "{$receipt['rsrv_date']} {$receipt['rsrv_tm_ap']} -> {$rsrv_date} {$rsrv_tm_hour}"; + } + + $this->saveChangedHistory($rcpt_sq, '200000', 'C11', $usr_id, $remark); + + $this->db->transComplete(); + + + return [ + 'success' => true, + ]; + } + + + /** + * 취소 + */ + public function rsrvcancel($rcpt_sq, $rsrv_sq, $result_cd2, $result_cd3, $result_msg, $receipt) + { + // 세션정보 + $usr_id = session('usr_id'); + $usr_sq = session('usr_sq'); + $usr_nm = session('usr_nm'); + + // 변경전 기존 데이터 가져오기 + $org_sql = "SELECT * FROM result WHERE rcpt_sq = ?"; + $query = $this->db->query($org_sql, [$rcpt_sq]); + $row = $query->getRowArray(); + + $this->db->transStart(); + + if ($result_cd2 == "9050") { + $sql = "UPDATE result" . + " SET result_cd1 = '90'" . + " ,result_cd2 = ?" . + " ,result_cd3 = ?" . + " ,result_msg = ?" . + " ,check_fail_dt = now()" . + " ,update_usr = ?" . + " ,update_tm = now()" . + " WHERE rsrv_sq = ?"; + } else { + $sql = "UPDATE result" . + " SET result_cd1 = '90'" . + " ,result_cd2 = ?" . + " ,result_cd3 = ?" . + " ,result_msg = ?" . + " ,cancel_dt = now()" . + " ,update_usr = ?" . + " ,update_tm = now()" . + " WHERE rsrv_sq = ?"; + } + + $data = [ + $result_cd2, + $result_cd3, + $result_msg, + $usr_sq, + $rsrv_sq + ]; + + $res = $this->db->query($sql, $data); + + if (!$res) { + $return = [ + 'success' => false, + 'msg' => '저장실패', + ]; + } else { + // 매물상태 변경 + $rcpt_sql = "UPDATE receipt" . + " SET rcpt_stat = ?" . + " WHERE rcpt_sq = ?"; + $rcpt_data = [$result_cd3, $rcpt_sq]; + $this->db->query($rcpt_sql, $rcpt_data); + + // 정보변경이력 저장 + if (!empty($row['result_msg'])) { + $remark = $row['result_msg'] . " -> " . $result_msg; + } else { + $remark = $result_msg; + } + $this->saveChangedHistory($rcpt_sq, $result_cd3, 'C5', $usr_id, $remark); + + // 문자발송 + if ($result_cd2 == "9010" || $result_cd2 == "9020") { + // 접수취소, 예약취소 + $this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S2', $receipt); + } else if ($result_cd2 == "9030") { + // 방문전 취소 + $this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S4', $receipt); + } else if ($result_cd2 == "9040") { + // 방문후 취소 + $this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S5', $receipt); + $this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S5-1', $receipt); + } else if ($result_cd2 == "9045") { + // 촬영후 취소 + $this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S6', $receipt); + } + + if ($result_cd3 == "905010") { + // 거주인녹취실패 취소(검수실패) + $this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S9', $receipt); + $this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S9-1', $receipt); + } else if ($result_cd3 == "905020") { + // 홍보확인서 미수취 취소(검수실패) + $this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S11', $receipt); + $this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S11-1', $receipt); + } + + $return = [ + 'success' => true, + ]; + } + + $this->db->transComplete(); + + return $return; + } } \ No newline at end of file diff --git a/app/Views/pages/article/receipt/detail.php b/app/Views/pages/article/receipt/detail.php index aeb29b6..f399229 100644 --- a/app/Views/pages/article/receipt/detail.php +++ b/app/Views/pages/article/receipt/detail.php @@ -1,5 +1,6 @@ extend('layouts/main') ?> @@ -53,84 +54,93 @@ $usr_level = session('usr_level'); -
-
+
+ + + + + + + + + + + + + + +
+
-
-
- - - - - - - - - - - -
- 매물ID : - - - CP ID : - -
+
+
+ + + + + + + + + + + +
+ 매물ID : + + + CP ID : + +
+
+ +
+
공인 중개사 정보
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
중개사ID중개사명
대표전화담당자전화
검증방식 + 현장V2" + : "현장"; ?> + 연락가능전화 + +
+ + +
+
+ +
-
-
공인 중개사 정보
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
중개사ID중개사명
대표전화담당자전화
검증방식 - 현장V2" - : "현장"; ?> - 연락가능전화 - -
- - -
-
- -
-
- - - - - - - - +
매물 정보
@@ -197,7 +207,7 @@ $usr_level = session('usr_level');
+ value="" size="50" disabled="disabled" /> @@ -237,7 +247,17 @@ $usr_level = session('usr_level'); 단지명 - + + + + 가격 평형 - + + + + + + + + + " size="8" maxlength="3" disabled="disabled" style="width: 100px;" /> + / - - + + + + + + +
+ 전용면적 값 : +       + 공급면적 값 : +
+
+ + + / + + + + + + + + + + + + + + + + + + + + + + + +
+ 면적확인파일1
+ 방 - + + + 면적확인파일2 @@ -411,7 +545,8 @@ $usr_level = session('usr_level'); No Image
- + @@ -436,12 +571,12 @@ $usr_level = session('usr_level');
- - @@ -451,11 +586,13 @@ $usr_level = session('usr_level'); - - @@ -492,7 +629,7 @@ $usr_level = session('usr_level');
- + @@ -614,9 +751,10 @@ $usr_level = session('usr_level'); @@ -645,7 +790,16 @@ $usr_level = session('usr_level');
@@ -780,7 +934,7 @@ $usr_level = session('usr_level');
- +
@@ -2045,49 +2199,50 @@ $usr_level = session('usr_level');
- - -
-
-
정보변경 이력
-
- - - - - - - - - - - - - - - - - + + +
+
+
정보변경 이력
+
+
진행상태변경내용처리자(ID)처리일시세부내용
- - - - - - - - - -
+ + + + + + + + + + + + + + + + + - -
진행상태변경내용처리자(ID)처리일시세부내용
+ + + + + + + + + +
+ +
-
+ - + section('modals') ?> + +