From 8e779124ddf00224681646e70a028934c4668a00 Mon Sep 17 00:00:00 2001 From: yangsh Date: Mon, 19 Jan 2026 14:52:53 +0900 Subject: [PATCH] =?UTF-8?q?=ED=98=84=EC=9E=A5=ED=99=95=EC=9D=B8=20V2=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Config/Routes.php | 10 + app/Controllers/Article/Receipt2.php | 145 ++++ app/Models/article/ReceiptModel.php | 45 +- app/Views/pages/article/lists2.php | 3 - app/Views/pages/article/receipt/lists2.php | 840 +++++++++++++++++++++ 5 files changed, 1034 insertions(+), 9 deletions(-) create mode 100644 app/Controllers/Article/Receipt2.php create mode 100644 app/Views/pages/article/receipt/lists2.php diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 443d115..1e4d5b0 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -124,6 +124,16 @@ $routes->group('', ['namespace' => 'App\Controllers\Article'], static function ( $routes->get('excel', 'GroundCnt::excel'); }); + /** + * 현장확인V2 매물 접수 현황 + */ + $routes->group('article/receipt2', static function ($routes) { + $routes->get('lists', 'Receipt2::lists'); + + $routes->get('getResultList', 'Receipt2::getResultList'); + $routes->get('excel', 'Receipt2::excel'); + }); + }); diff --git a/app/Controllers/Article/Receipt2.php b/app/Controllers/Article/Receipt2.php new file mode 100644 index 0000000..9ec487d --- /dev/null +++ b/app/Controllers/Article/Receipt2.php @@ -0,0 +1,145 @@ +model = new ReceiptModel(); + $this->codeModel = new CodeModel(); + } + + public function lists(): string + { + $codes = $this->codeModel->getCodeLists(['NHN_DEAL_TYPE', 'CP_ID', 'ARTICLE_TYPE', 'VRFCREQ_WAY', 'STEP_VERIFICATION']); // 코드조회 + $sido = $this->model->getAreaList(); // 지역조회 + $bonbu = $this->model->getBonbuList(); + $team = $this->model->getTeamList(); + $user = $this->model->getUserList(); + + $this->data['sido'] = $sido; + $this->data['bonbu'] = $bonbu; + $this->data['team'] = $team; + $this->data['user'] = $user; + $this->data['codes'] = $codes; + + + return view("pages/article/receipt/lists2", $this->data); + } + + public function getResultList() + { + $start = (int) $this->request->getGet('start') ?: 0; + $end = (int) $this->request->getGet('length') ?: 10; + + $data = [ + 'rcpt_atclno' => $this->request->getGet('rcpt_atclno'), // 매물ID + 'schDateGb' => $this->request->getGet('schDateGb'), // 일자유형 + 'sdate' => $this->request->getGet('sdate'), // 시작일 + 'edate' => $this->request->getGet('edate'), // 종료일 + + 'bonbu' => $this->request->getGet('bonbu'), // 본부 + 'team' => $this->request->getGet('team'), // 팀 + 'user' => $this->request->getGet('user'), // 담당자 + + 'sido' => $this->request->getGet('sido'), // 시도 + 'gugun' => $this->request->getGet('gugun'), // 시군구 + 'dong' => $this->request->getGet('dong'), // 읍면동 + + 'rcpt_stat1' => $this->request->getGet('rcpt_stat1'), // 상태1 + 'rcpt_stat2' => $this->request->getGet('rcpt_stat2'), // 상태2 + 'rcpt_stat3' => $this->request->getGet('rcpt_stat3'), // 상태3 + + 'rcpt_product_info1' => $this->request->getGet('rcpt_product_info1'), // 거래구분 + 'exp_movie_yn' => $this->request->getGet('exp_movie_yn'), // 동영상촬영여부 + 'conf_img_yn' => $this->request->getGet('conf_img_yn'), // 홍보확인서여부 + 'parcel_out_yn' => $this->request->getGet('parcel_out_yn'), // 분양권 + 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // CPID + 'rcpt_product' => $this->request->getGet('rcpt_product'), // 매물종류 + 'exp_spc_yn' => $this->request->getGet('exp_spc_yn'), // 면적확인 + 'check_list_img_yn' => $this->request->getGet('check_list_img_yn'), // 체크리스트 + 'ground_plan_yn' => $this->request->getGet('ground_plan_yn'), // 평면도유무 + 'ground_plan' => $this->request->getGet('ground_plan'), // 평면도요청 + + 'direct_trad_yn' => $this->request->getGet('direct_trad_yn'), // 직거래 + 'image_360_yn' => $this->request->getGet('image_360_yn'), // 360촬영여부 + + 'isSiteVRVerification' => $this->request->getGet('isSiteVRVerification'), // 검증방식 + 'isPromotionApply' => $this->request->getGet('isPromotionApply'), // 프로모션 + + 'srchType' => $this->request->getGet('srchType'), // 검색유형 + 'srchTxt' => $this->request->getGet('srchTxt'), // 검색어 + ]; + + $totalCount = $this->model->getTotalCount($data); + + $datas = $this->model->getResultList($start, $end, $data); + + return $this->response->setJSON(body: [ + 'recordsTotal' => $totalCount, + 'recordsFiltered' => $totalCount, + 'data' => $datas, + ]); + } + + // 엑셀 다운로드 + public function excel() + { + try { + + $data = [ + 'rcpt_atclno' => $this->request->getGet('rcpt_atclno'), // 매물ID + 'schDateGb' => $this->request->getGet('schDateGb'), // 일자유형 + 'sdate' => $this->request->getGet('sdate'), // 시작일 + 'edate' => $this->request->getGet('edate'), // 종료일 + + 'bonbu' => $this->request->getGet('bonbu'), // 본부 + 'team' => $this->request->getGet('team'), // 팀 + 'user' => $this->request->getGet('user'), // 담당자 + + 'sido' => $this->request->getGet('sido'), // 시도 + 'gugun' => $this->request->getGet('gugun'), // 시군구 + 'dong' => $this->request->getGet('dong'), // 읍면동 + + 'rcpt_stat1' => $this->request->getGet('rcpt_stat1'), // 상태1 + 'rcpt_stat2' => $this->request->getGet('rcpt_stat2'), // 상태2 + 'rcpt_stat3' => $this->request->getGet('rcpt_stat3'), // 상태3 + + 'rcpt_product_info1' => $this->request->getGet('rcpt_product_info1'), // 거래구분 + 'exp_movie_yn' => $this->request->getGet('exp_movie_yn'), // 동영상촬영여부 + 'conf_img_yn' => $this->request->getGet('conf_img_yn'), // 홍보확인서여부 + 'parcel_out_yn' => $this->request->getGet('parcel_out_yn'), // 분양권 + 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // CPID + 'rcpt_product' => $this->request->getGet('rcpt_product'), // 매물종류 + 'exp_spc_yn' => $this->request->getGet('exp_spc_yn'), // 면적확인 + 'check_list_img_yn' => $this->request->getGet('check_list_img_yn'), // 체크리스트 + 'ground_plan_yn' => $this->request->getGet('ground_plan_yn'), // 평면도유무 + 'ground_plan' => $this->request->getGet('ground_plan'), // 평면도요청 + + 'direct_trad_yn' => $this->request->getGet('direct_trad_yn'), // 직거래 + 'image_360_yn' => $this->request->getGet('image_360_yn'), // 360촬영여부 + + 'isSiteVRVerification' => $this->request->getGet('isSiteVRVerification'), // 검증방식 + 'isPromotionApply' => $this->request->getGet('isPromotionApply'), // 프로모션 + + 'srchType' => $this->request->getGet('srchType'), // 검색유형 + 'srchTxt' => $this->request->getGet('srchTxt'), // 검색어 + ]; + + $datas = $this->model->getExcelList($data); + + return $this->response->setJSON(body: [ + 'data' => $datas, + ]); + + } catch (\Exception $e) { + $e->getPrevious()->getTraceAsString(); + } + } +} \ No newline at end of file diff --git a/app/Models/article/ReceiptModel.php b/app/Models/article/ReceiptModel.php index 651a3f1..b67bbc2 100644 --- a/app/Models/article/ReceiptModel.php +++ b/app/Models/article/ReceiptModel.php @@ -186,14 +186,15 @@ class ReceiptModel extends Model } $builder->where('a.rcpt_tm >= DATE_ADD(CURDATE(), INTERVAL -3 MONTH)', null, false); + $builder->where('b.use_yn', 'Y'); if (!empty($data['rcpt_atclno'])) { $builder->where('a.rcpt_atclno', $data['rcpt_atclno']); } else { - if ($data['schDateGb'] == '1') { + if ($data['schDateGb'] == '2') { $builder->where('a.rcpt_tm >=', $data['sdate'] . ' 00:00:00'); $builder->where('a.rcpt_tm <=', $data['edate'] . ' 23:59:59'); - } else if ($data['schDateGb'] == '2') { + } else { $builder->where('b.rsrv_date >=', $data['sdate'] . ' 00:00:00'); $builder->where('b.rsrv_date <=', $data['edate'] . ' 23:59:59'); } @@ -322,6 +323,16 @@ class ReceiptModel extends Model $builder->where('a.image_360_yn', 'N'); } + // 검증방식 + if (!empty($data['isSiteVRVerification'])) { + $builder->where('a.isSiteVRVerification', $data['isSiteVRVerification']); + } + + // 프로모션 + if (!empty($data['isPromotionApply'])) { + $builder->where('a.isPromotionApply', $data['isPromotionApply']); + } + if (!empty($data['srchTxt'])) { // 중개사 if ($data['srchType'] == '1') { @@ -514,14 +525,15 @@ class ReceiptModel extends Model } $builder->where('a.rcpt_tm >= DATE_ADD(CURDATE(), INTERVAL -3 MONTH)', null, false); + $builder->where('b.use_yn', 'Y'); if (!empty($data['rcpt_atclno'])) { $builder->where('a.rcpt_atclno', $data['rcpt_atclno']); } else { - if ($data['schDateGb'] == '1') { + if ($data['schDateGb'] == '2') { $builder->where('a.rcpt_tm >=', $data['sdate'] . ' 00:00:00'); $builder->where('a.rcpt_tm <=', $data['edate'] . ' 23:59:59'); - } else if ($data['schDateGb'] == '2') { + } else { $builder->where('b.rsrv_date >=', $data['sdate'] . ' 00:00:00'); $builder->where('b.rsrv_date <=', $data['edate'] . ' 23:59:59'); } @@ -650,6 +662,16 @@ class ReceiptModel extends Model $builder->where('a.image_360_yn', 'N'); } + // 검증방식 + if (!empty($data['isSiteVRVerification'])) { + $builder->where('a.isSiteVRVerification', $data['isSiteVRVerification']); + } + + // 프로모션 + if (!empty($data['isPromotionApply'])) { + $builder->where('a.isPromotionApply', $data['isPromotionApply']); + } + if (!empty($data['srchTxt'])) { // 중개사 if ($data['srchType'] == '1') { @@ -790,14 +812,15 @@ class ReceiptModel extends Model } $builder->where('a.rcpt_tm >= DATE_ADD(CURDATE(), INTERVAL -3 MONTH)', null, false); + $builder->where('b.use_yn', 'Y'); if (!empty($data['rcpt_atclno'])) { $builder->where('a.rcpt_atclno', $data['rcpt_atclno']); } else { - if ($data['schDateGb'] == '1') { + if ($data['schDateGb'] == '2') { $builder->where('a.rcpt_tm >=', $data['sdate'] . ' 00:00:00'); $builder->where('a.rcpt_tm <=', $data['edate'] . ' 23:59:59'); - } else if ($data['schDateGb'] == '2') { + } else { $builder->where('b.rsrv_date >=', $data['sdate'] . ' 00:00:00'); $builder->where('b.rsrv_date <=', $data['edate'] . ' 23:59:59'); } @@ -926,6 +949,16 @@ class ReceiptModel extends Model $builder->where('a.image_360_yn', 'N'); } + // 검증방식 + if (!empty($data['isSiteVRVerification'])) { + $builder->where('a.isSiteVRVerification', $data['isSiteVRVerification']); + } + + // 프로모션 + if (!empty($data['isPromotionApply'])) { + $builder->where('a.isPromotionApply', $data['isPromotionApply']); + } + if (!empty($data['srchTxt'])) { // 중개사 if ($data['srchType'] == '1') { diff --git a/app/Views/pages/article/lists2.php b/app/Views/pages/article/lists2.php index 10250e5..a9855c3 100644 --- a/app/Views/pages/article/lists2.php +++ b/app/Views/pages/article/lists2.php @@ -67,9 +67,6 @@
- - -
diff --git a/app/Views/pages/article/receipt/lists2.php b/app/Views/pages/article/receipt/lists2.php new file mode 100644 index 0000000..d4d46a4 --- /dev/null +++ b/app/Views/pages/article/receipt/lists2.php @@ -0,0 +1,840 @@ + +extend('layouts/main') ?> + +section('content') ?> + + + +

현장확인V2 매물 접수 현황

+ +
+
+
+ + + +
+
+ + +
+ +
+ +
+ + + ~ + +
+
+ +
+ +
+ + + +
+
+ +
+ +
+ + + +
+
+ +
+ +
+ + + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ + +
+
+ + + +
+
+ +
+
+
+ +
+ +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
검증방식프로모션현재상태매물ID접수(등록)일자예약일자방문희망시간촬영완료일자CP ID중개사명주소매물종류거래구분관할조직(팀)방문담당분양권홍보확인서
+
+ +
+
+
+ + + + + + +endSection() ?> \ No newline at end of file -- 2.49.1