diff --git a/app/Controllers/Article/Receipt.php b/app/Controllers/Article/Receipt.php
index c0122ea..9008a65 100644
--- a/app/Controllers/Article/Receipt.php
+++ b/app/Controllers/Article/Receipt.php
@@ -1338,4 +1338,66 @@ class Receipt extends BaseController
]);
}
}
+
+ public function modifyPriceInfo(){
+ try {
+ $rcpt_sq = $this->request->getPost('rcpt_sq'); // 필수
+ $rcpt_key = $this->request->getPost('rcpt_key'); // 필수
+ $rcpt_no = $this->request->getPost('rcpt_no'); // 선택
+ $trade_type = $this->request->getPost('trade_type'); // 거래구분
+ $rcpt_product_info2 = $this->request->getPost('rcpt_product_info2'); // 보증금
+ $rcpt_product_info3 = $this->request->getPost('rcpt_product_info3'); // 월세
+ $rcpt_product_info4 = $this->request->getPost('rcpt_product_info4'); // 분양가
+ $rcpt_product_info5 = $this->request->getPost('rcpt_product_info5'); // 프리미엄
+ $rcpt_ptp_no = $this->request->getPost('rcpt_ptp_no'); // 단지정보
+ $rcpt_hscp_no = $this->request->getPost('rcpt_hscp_no'); // 평형정보
+
+ // 거래유형에 따른 가격 정보 제한
+ $return = limitHscpMarketPriceInfo($trade_type, $rcpt_hscp_no, $rcpt_ptp_no, $rcpt_product_info2);
+ if (empty($return)){
+
+ }
+
+ if (empty($rcpt_sq) || empty($trade_type)) {
+ return $this->response->setJSON([
+ 'code' => '1',
+ 'msg' => '필수 파라미터가 누락되었습니다.'
+ ]);
+ }
+
+ $params = [
+ 'rcpt_sq' => $rcpt_sq,
+ 'rcpt_key' => $rcpt_key,
+ 'rcpt_no' => $rcpt_no,
+ 'trade_type' => $trade_type,
+ 'rcpt_product_info2' => $rcpt_product_info2,
+ 'rcpt_product_info3' => $rcpt_product_info3,
+ 'rcpt_product_info4' => $rcpt_product_info4,
+ 'rcpt_product_info5' => $rcpt_product_info5,
+ 'rcpt_ptp_no' => $rcpt_ptp_no,
+ 'rcpt_hscp_no' => $rcpt_hscp_no,
+ ];
+
+ $result = $this->model->modifyPriceInfo($params);
+
+ if (!$result['success']) {
+ return $this->response->setJSON([
+ 'code' => '1',
+ 'msg' => $result['msg'] ?? '가격 정보 수정 실패'
+ ]);
+ }
+
+ return $this->response->setJSON([
+ 'code' => '0',
+ 'msg' => '가격 정보가 수정되었습니다.'
+ ]);
+
+ } catch (\Exception $e) {
+ log_message('error', 'modifyPriceInfo error: ' . $e->getMessage());
+ return $this->response->setJSON([
+ 'code' => '1',
+ 'msg' => '가격 정보 수정 중 에러가 발생했습니다: ' . $e->getMessage()
+ ]);
+ }
+ }
}
\ No newline at end of file
diff --git a/app/Controllers/Manage/WorkerLog.php b/app/Controllers/Manage/WorkerLog.php
index eef9da1..f5072f8 100644
--- a/app/Controllers/Manage/WorkerLog.php
+++ b/app/Controllers/Manage/WorkerLog.php
@@ -81,27 +81,35 @@ class WorkerLog extends BaseController
$lines = file($filePath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
foreach ($lines as $line) {
- // 로그 포맷: [2025-12-22 10:30:45] [INFO] [NaverWorker::run:95] 메시지
- if (preg_match('/\[(.+?)\]\s*\[(.+?)\]\s*(?:\[(.+?)\]\s*)?(.+)/', $line, $matches)) {
- $logs[] = [
- 'timestamp' => $matches[1],
- 'level' => $matches[2],
- 'location' => $matches[3] ?? '',
- 'message' => $matches[4]
- ];
- } else {
- // 파싱 실패한 경우 원본 그대로
- $logs[] = [
- 'timestamp' => date('Y-m-d H:i:s'),
- 'level' => 'UNKNOWN',
- 'location' => '',
- 'message' => $line
- ];
- }
+ $logs[] = $this->parseLogLine($line);
}
return $logs;
}
+
+ /**
+ * 로그 한 줄 파싱
+ */
+ private function parseLogLine($line)
+ {
+ // 로그 포맷: [2025-12-22 10:30:45] [INFO] [NaverWorker::run:95] 메시지
+ if (preg_match('/\[(.+?)\]\s*\[(.+?)\]\s*(?:\[(.+?)\]\s*)?(.+)/', $line, $matches)) {
+ return [
+ 'timestamp' => $matches[1],
+ 'level' => $matches[2],
+ 'location' => $matches[3] ?? '',
+ 'message' => $matches[4]
+ ];
+ }
+
+ // 파싱 실패한 경우 원본 그대로
+ return [
+ 'timestamp' => date('Y-m-d H:i:s'),
+ 'level' => 'UNKNOWN',
+ 'location' => '',
+ 'message' => $line
+ ];
+ }
/**
* 로그 파일이 존재하는 날짜 목록 가져오기
@@ -151,14 +159,7 @@ class WorkerLog extends BaseController
$newLines = array_slice($lines, $lastId);
foreach ($newLines as $line) {
- if (preg_match('/\[(.+?)\]\s*\[(.+?)\]\s*(?:\[(.+?)\]\s*)?(.+)/', $line, $matches)) {
- $newLogs[] = [
- 'timestamp' => $matches[1],
- 'level' => $matches[2],
- 'location' => $matches[3] ?? '',
- 'message' => $matches[4]
- ];
- }
+ $newLogs[] = $this->parseLogLine($line);
}
}
}
diff --git a/app/Controllers/V2/BaseV2Controller.php b/app/Controllers/V2/BaseV2Controller.php
new file mode 100644
index 0000000..5f7cf04
--- /dev/null
+++ b/app/Controllers/V2/BaseV2Controller.php
@@ -0,0 +1,163 @@
+codeModel = new CodeModel();
+ $this->model = $this->createModel();
+ }
+
+ abstract protected function createModel();
+ abstract protected function getCodeKeys(): array;
+ abstract protected function getViewName(): string;
+ abstract protected function getSearchKeys(): array;
+
+ public function lists(): string
+ {
+ $codes = $this->codeModel->getCodeLists($this->getCodeKeys());
+ $sido = $this->model->getAreaList();
+ $bonbu = $this->model->getBonbuList();
+ $team = $this->model->getTeamList();
+ $user = $this->model->getUserList();
+
+ $this->data['codes'] = $codes;
+ $this->data['sido'] = $sido;
+ $this->data['bonbu'] = $bonbu;
+ $this->data['team'] = $team;
+ $this->data['user'] = $user;
+
+ return view($this->getViewName(), $this->data);
+ }
+
+ public function getResultList()
+ {
+ $start = (int) $this->request->getGet('start') ?: 0;
+ $end = (int) $this->request->getGet('length') ?: 10;
+
+ $data = $this->buildSearchData();
+
+ $totalCount = $this->model->getTotalCount($data);
+ $datas = $this->model->getResultList($start, $end, $data);
+
+ return $this->response->setJSON([
+ 'recordsTotal' => $totalCount,
+ 'recordsFiltered' => $totalCount,
+ 'data' => $datas,
+ ]);
+ }
+
+ public function excel()
+ {
+ try {
+ $data = $this->buildSearchData();
+ $datas = $this->model->getExcelList($data);
+
+ return $this->response->setJSON(['data' => $datas]);
+
+ } catch (\Exception $e) {
+ $e->getPrevious()->getTraceAsString();
+ }
+ }
+
+ /**
+ * getSearchKeys()에 정의된 키만 GET에서 수집해서 배열로 반환
+ */
+ protected function buildSearchData(): array
+ {
+ $data = [];
+ foreach ($this->getSearchKeys() as $key) {
+ $rawValue = $this->request->getGet($key);
+ $data[$key] = $this->normalizeSearchValue($key, $rawValue);
+ }
+ return $data;
+ }
+
+ /**
+ * 공통 파라미터 정규화
+ * - null/공백은 빈 문자열로 통일
+ * - 문자열은 trim 처리
+ * - 날짜 키(date 포함)는 형식 검증 실패 시 빈 문자열로 처리
+ */
+ protected function normalizeSearchValue(string $key, $value)
+ {
+ if (is_array($value)) {
+ return array_map(static function ($item) {
+ if ($item === null) {
+ return '';
+ }
+ if (is_string($item)) {
+ $item = trim($item);
+ return $item === '' ? '' : $item;
+ }
+ return $item;
+ }, $value);
+ }
+
+ if ($value === null) {
+ return '';
+ }
+
+ if (is_string($value)) {
+ $value = trim($value);
+ if ($value === '') {
+ return '';
+ }
+ }
+
+ if ($this->isDateKey($key) && !$this->isValidDateValue((string) $value)) {
+ return '';
+ }
+
+ return $value;
+ }
+
+ /**
+ * 날짜 성격 파라미터 판별
+ * 예: receipt_sdate, receipt_edate, complete_sdate, stat_complete_date 등
+ */
+ protected function isDateKey(string $key): bool
+ {
+ return strpos($key, 'date') !== false;
+ }
+
+ /**
+ * 허용 날짜 형식 검증
+ * - YYYY-MM-DD
+ * - YYYYMMDD
+ */
+ protected function isValidDateValue(string $value): bool
+ {
+ if (preg_match('/^\d{4}-\d{2}-\d{2}$/', $value) === 1) {
+ [$year, $month, $day] = explode('-', $value);
+ return checkdate((int) $month, (int) $day, (int) $year);
+ }
+
+ if (preg_match('/^\d{8}$/', $value) === 1) {
+ $year = substr($value, 0, 4);
+ $month = substr($value, 4, 2);
+ $day = substr($value, 6, 2);
+ return checkdate((int) $month, (int) $day, (int) $year);
+ }
+
+ return false;
+ }
+}
diff --git a/app/Controllers/V2/M701.php b/app/Controllers/V2/M701.php
index 5704551..933c469 100644
--- a/app/Controllers/V2/M701.php
+++ b/app/Controllers/V2/M701.php
@@ -1,130 +1,60 @@
model = new M701Model();
- $this->codeModel = new CodeModel();
+ return new M701Model();
}
- public function lists(): string
+ protected function getCodeKeys(): array
{
-
- $codes = $this->codeModel->getCodeLists(['STEP_VERIFICATION', 'VRFCREQ_WAY', 'CP_ID', 'ARTICLE_TYPE']); // 코드조회
- $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/v2/m701/lists", $this->data);
+ return ['STEP_VERIFICATION', 'VRFCREQ_WAY', 'CP_ID', 'ARTICLE_TYPE'];
}
- public function getResultList()
+ protected function getViewName(): string
{
- $start = (int) $this->request->getGet('start') ?: 0;
- $end = (int) $this->request->getGet('length') ?: 10;
+ return 'pages/v2/m701/lists';
+ }
- $data = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1
- 'vrfc_type_sub' => $this->request->getGet('vrfc_type_sub'), // 검증방식2
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'rlet_type_cd' => $this->request->getGet('rlet_type_cd'), // 매물종류
- 'reference_file_url_yn' => $this->request->getGet('reference_file_url_yn'), // 참고용
- 'corp_own' => $this->request->getGet('corp_own'), // 법인
+ protected function getSearchKeys(): array
+ {
+ return [
+ 'atcl_no',
+ 'stat_cd',
+ 'realtor_nm',
+ 'charger_gbn',
+ 'assign_yn',
+ 'receipt_sdate',
+ 'receipt_edate',
+ 'complete_sdate',
+ 'complete_edate',
+ 'srcSido',
+ 'srcGugun',
+ 'srcDong',
+ 'bonbu',
+ 'team',
+ 'damdang',
+ 'vrfcreq_way',
+ 'vrfc_type_sub',
+ 'rcpt_cpid',
+ 'rlet_type_cd',
+ 'reference_file_url_yn',
+ 'corp_own',
];
-
- $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 = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1
- 'vrfc_type_sub' => $this->request->getGet('vrfc_type_sub'), // 검증방식2
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'rlet_type_cd' => $this->request->getGet('rlet_type_cd'), // 매물종류
- 'reference_file_url_yn' => $this->request->getGet('reference_file_url_yn'), // 참고용
- 'corp_own' => $this->request->getGet('corp_own'), // 법인
- ];
-
- $datas = $this->model->getExcelList($data);
-
- return $this->response->setJSON(body: [
- 'data' => $datas,
- ]);
-
- } catch (\Exception $e) {
- $e->getPrevious()->getTraceAsString();
- }
- }
-
-
-
- // 상세화면
public function detail($id = null)
{
$id = (int) $id;
@@ -1700,5 +1630,3 @@ class M701 extends BaseController
}
}
}
-
-
diff --git a/app/Controllers/V2/M702.php b/app/Controllers/V2/M702.php
index 9f8e0c4..dfc4e53 100644
--- a/app/Controllers/V2/M702.php
+++ b/app/Controllers/V2/M702.php
@@ -1,123 +1,58 @@
model = new M702Model();
- $this->codeModel = new CodeModel();
+ return new M702Model();
}
- public function lists()
+ protected function getCodeKeys(): array
{
- $codes = $this->codeModel->getCodeLists(['STEP_VERIFICATION', 'VRFCREQ_WAY', 'CP_ID', 'ARTICLE_TYPE']); // 코드조회
- $sido = $this->model->getAreaList(); // 지역조회
- $bonbu = $this->model->getBonbuList();
- $team = $this->model->getTeamList();
- $user = $this->model->getUserList();
-
- $this->data['codes'] = $codes;
- $this->data['sido'] = $sido;
- $this->data['bonbu'] = $bonbu;
- $this->data['team'] = $team;
- $this->data['user'] = $user;
-
- return view("pages/v2/m702/lists", $this->data);
+ return ['STEP_VERIFICATION', 'VRFCREQ_WAY', 'CP_ID', 'ARTICLE_TYPE'];
}
-
- public function getResultList()
+ protected function getViewName(): string
{
- $start = (int) $this->request->getGet('start') ?: 0;
- $end = (int) $this->request->getGet('length') ?: 10;
+ return 'pages/v2/m702/lists';
+ }
- $data = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1
- 'vrfc_type_sub' => $this->request->getGet('vrfc_type_sub'), // 검증방식2
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'rlet_type_cd' => $this->request->getGet('rlet_type_cd'), // 매물종류
- 'corp_own' => $this->request->getGet('corp_own'), // 법인
+ protected function getSearchKeys(): array
+ {
+ return [
+ 'atcl_no',
+ 'stat_cd',
+ 'realtor_nm',
+ 'charger_gbn',
+ 'assign_yn',
+ 'receipt_sdate',
+ 'receipt_edate',
+ 'complete_sdate',
+ 'complete_edate',
+ 'srcSido',
+ 'srcGugun',
+ 'srcDong',
+ 'bonbu',
+ 'team',
+ 'damdang',
+ 'vrfcreq_way',
+ 'vrfc_type_sub',
+ 'rcpt_cpid',
+ 'rlet_type_cd',
+ 'corp_own',
];
-
- $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 = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1
- 'vrfc_type_sub' => $this->request->getGet('vrfc_type_sub'), // 검증방식2
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'rlet_type_cd' => $this->request->getGet('rlet_type_cd'), // 매물종류
- 'corp_own' => $this->request->getGet('corp_own'), // 법인
- ];
-
- $datas = $this->model->getExcelList($data);
-
- return $this->response->setJSON(body: [
- 'data' => $datas,
- ]);
-
- } catch (\Exception $e) {
- $e->getPrevious()->getTraceAsString();
- }
- }
-
-
- // 배정변경
public function updateAssign()
{
try {
@@ -1213,4 +1148,4 @@ class M702 extends BaseController
]);
}
}
-}
\ No newline at end of file
+}
diff --git a/app/Controllers/V2/M703.php b/app/Controllers/V2/M703.php
index 1e6dfd4..f15c1af 100644
--- a/app/Controllers/V2/M703.php
+++ b/app/Controllers/V2/M703.php
@@ -1,129 +1,59 @@
model = new M703Model();
- $this->codeModel = new CodeModel();
+ return new M703Model();
}
- public function lists()
+ protected function getCodeKeys(): array
{
- $codes = $this->codeModel->getCodeLists(['CP_ID', 'STEP_VERIFICATION', 'RECEIPT_STATUS3', 'FAX_CORP']); // 코드조회
- $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/v2/m703/lists", $this->data);
+ return ['CP_ID', 'STEP_VERIFICATION', 'RECEIPT_STATUS3', 'FAX_CORP'];
}
- public function getResultList()
+ protected function getViewName(): string
{
- $start = (int) $this->request->getGet('start') ?: 0;
- $end = (int) $this->request->getGet('length') ?: 10;
+ return 'pages/v2/m703/lists';
+ }
- $data = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'chk_atcl_no' => $this->request->getGet('chk_atcl_no'), // 매물번호입력
- 'caller_no' => $this->request->getGet('caller_no'), // 발신팩스번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1
- 'vrfc_type_sub' => $this->request->getGet('vrfc_type_sub'), // 검증방식2
- 'target_yn' => $this->request->getGet('target_yn'), // 홍보확인서여부
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'chk_rec' => $this->request->getGet('chk_rec'), // 동의서 유무
- 'fax_corp' => $this->request->getGet('fax_corp'), // 팩스업체
+ protected function getSearchKeys(): array
+ {
+ return [
+ 'atcl_no',
+ 'chk_atcl_no',
+ 'caller_no',
+ 'stat_cd',
+ 'realtor_nm',
+ 'charger_gbn',
+ 'assign_yn',
+ 'receipt_sdate',
+ 'receipt_edate',
+ 'complete_sdate',
+ 'complete_edate',
+ 'srcSido',
+ 'srcGugun',
+ 'srcDong',
+ 'bonbu',
+ 'team',
+ 'damdang',
+ 'vrfcreq_way',
+ 'vrfc_type_sub',
+ 'target_yn',
+ 'rcpt_cpid',
+ 'chk_rec',
+ 'fax_corp',
];
-
- $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 = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'chk_atcl_no' => $this->request->getGet('chk_atcl_no'), // 매물번호입력
- 'caller_no' => $this->request->getGet('caller_no'), // 발신팩스번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1
- 'vrfc_type_sub' => $this->request->getGet('vrfc_type_sub'), // 검증방식2
- 'target_yn' => $this->request->getGet('target_yn'), // 홍보확인서여부
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'chk_rec' => $this->request->getGet('chk_rec'), // 동의서 유무
- 'fax_corp' => $this->request->getGet('fax_corp'), // 팩스업체
- ];
-
- $datas = $this->model->getExcelList($data);
-
- return $this->response->setJSON(body: [
- 'data' => $datas,
- ]);
-
- } catch (\Exception $e) {
- $e->getPrevious()->getTraceAsString();
- }
- }
-
-
- // 상세화면
public function detail($id)
{
$naver = new NaverApiClient();
@@ -621,4 +551,4 @@ class M703 extends BaseController
return redirect()->to('/m703/m703a/detail/' . $fax['fax_sq']);
}
-}
\ No newline at end of file
+}
diff --git a/app/Controllers/V2/M704.php b/app/Controllers/V2/M704.php
index 600f14f..ea47aee 100644
--- a/app/Controllers/V2/M704.php
+++ b/app/Controllers/V2/M704.php
@@ -1,128 +1,60 @@
model = new M704Model();
- $this->codeModel = new CodeModel();
+ return new M704Model();
}
- public function lists(): string
+ protected function getCodeKeys(): array
{
- $codes = $this->codeModel->getCodeLists(['STEP_VERIFICATION', 'VRFCREQ_WAY', 'CP_ID', 'TEL_FAIL_CAUSE', 'ARTICLE_TYPE']); // 코드조회
- $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/v2/m704/lists", $this->data);
+ return ['STEP_VERIFICATION', 'VRFCREQ_WAY', 'CP_ID', 'TEL_FAIL_CAUSE', 'ARTICLE_TYPE'];
}
-
- public function getResultList()
+ protected function getViewName(): string
{
- $start = (int) $this->request->getGet('start') ?: 0;
- $end = (int) $this->request->getGet('length') ?: 10;
+ return 'pages/v2/m704/lists';
+ }
- $data = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'stat_complete_date' => $this->request->getGet('stat_complete_date'), // 진행상태별시간유형
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 진행상태별시간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 진행상태별시간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1
- 'vrfc_type_sub' => $this->request->getGet('vrfc_type_sub'), // 검증방식2
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'rlet_type_cd' => $this->request->getGet('rlet_type_cd'), // 매물종류
- 'reference_file_url_yn' => $this->request->getGet('reference_file_url_yn'), // 참고용
- 'corp_own' => $this->request->getGet('corp_own'), // 법인
+ protected function getSearchKeys(): array
+ {
+ return [
+ 'atcl_no',
+ 'stat_cd',
+ 'realtor_nm',
+ 'charger_gbn',
+ 'assign_yn',
+ 'receipt_sdate',
+ 'receipt_edate',
+ 'stat_complete_date',
+ 'complete_sdate',
+ 'complete_edate',
+ 'srcSido',
+ 'srcGugun',
+ 'srcDong',
+ 'bonbu',
+ 'team',
+ 'damdang',
+ 'vrfcreq_way',
+ 'vrfc_type_sub',
+ 'rcpt_cpid',
+ 'rlet_type_cd',
+ 'reference_file_url_yn',
+ 'corp_own',
];
-
- $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 = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'stat_complete_date' => $this->request->getGet('stat_complete_date'), // 진행상태별시간유형
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 진행상태별시간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 진행상태별시간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1
- 'vrfc_type_sub' => $this->request->getGet('vrfc_type_sub'), // 검증방식2
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'rlet_type_cd' => $this->request->getGet('rlet_type_cd'), // 매물종류
- 'reference_file_url_yn' => $this->request->getGet('reference_file_url_yn'), // 참고용
- 'corp_own' => $this->request->getGet('corp_own'), // 법인
- ];
-
- $datas = $this->model->getExcelList($data);
-
- return $this->response->setJSON(body: [
- 'data' => $datas,
- ]);
-
- } catch (\Exception $e) {
- $e->getPrevious()->getTraceAsString();
- }
- }
-
-
- // 상세화면
public function detail($id)
{
$naver = new NaverApiClient();
@@ -865,4 +797,4 @@ class M704 extends BaseController
]);
}
}
-}
\ No newline at end of file
+}
diff --git a/app/Controllers/V2/M705.php b/app/Controllers/V2/M705.php
index 0a94f22..9131eab 100644
--- a/app/Controllers/V2/M705.php
+++ b/app/Controllers/V2/M705.php
@@ -1,86 +1,60 @@
model = new M705Model();
- $this->codeModel = new CodeModel();
+ return new M705Model();
}
- public function lists(): string
+ protected function getCodeKeys(): array
{
- $codes = $this->codeModel->getCodeLists(['STEP_VERIFICATION', 'VRFCREQ_WAY', 'CP_ID', 'TEL_FAIL_CAUSE', 'ARTICLE_TYPE']); // 코드조회
- $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/v2/m705/lists", $this->data);
+ return ['STEP_VERIFICATION', 'VRFCREQ_WAY', 'CP_ID', 'TEL_FAIL_CAUSE', 'ARTICLE_TYPE'];
}
- public function getResultList()
+ protected function getViewName(): string
{
- $start = (int) $this->request->getGet('start') ?: 0;
- $end = (int) $this->request->getGet('length') ?: 10;
+ return 'pages/v2/m705/lists';
+ }
- $data = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1
- 'vrfc_type_sub' => $this->request->getGet('vrfc_type_sub'), // 검증방식2
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'rlet_type_cd' => $this->request->getGet('rlet_type_cd'), // 매물종류
- 'chk_spc_yn' => $this->request->getGet('chk_spc_yn'), // 면적여부
- 'reference_file_url_yn' => $this->request->getGet('reference_file_url_yn'), // 참고용
- 'corp_own' => $this->request->getGet('corp_own'), // 법인
+ protected function getSearchKeys(): array
+ {
+ return [
+ 'atcl_no',
+ 'stat_cd',
+ 'realtor_nm',
+ 'charger_gbn',
+ 'assign_yn',
+ 'receipt_sdate',
+ 'receipt_edate',
+ 'complete_sdate',
+ 'complete_edate',
+ 'srcSido',
+ 'srcGugun',
+ 'srcDong',
+ 'bonbu',
+ 'team',
+ 'damdang',
+ 'vrfcreq_way',
+ 'vrfc_type_sub',
+ 'rcpt_cpid',
+ 'rlet_type_cd',
+ 'chk_spc_yn',
+ 'reference_file_url_yn',
+ 'corp_own',
];
-
- $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 getNotAssign()
{
try {
@@ -750,4 +724,4 @@ class M705 extends BaseController
]);
}
}
-}
\ No newline at end of file
+}
diff --git a/app/Controllers/V2/M706.php b/app/Controllers/V2/M706.php
index 5195060..7062422 100644
--- a/app/Controllers/V2/M706.php
+++ b/app/Controllers/V2/M706.php
@@ -1,117 +1,54 @@
model = new M706Model();
- $this->codeModel = new CodeModel();
+ return new M706Model();
}
- public function lists(): string
+ protected function getCodeKeys(): array
{
- $codes = $this->codeModel->getCodeLists(['STEP_VERIFICATION', 'VRFCREQ_WAY', 'CP_ID']); // 코드조회
- $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/v2/m706/lists", $this->data);
+ return ['STEP_VERIFICATION', 'VRFCREQ_WAY', 'CP_ID'];
}
- public function getResultList()
+ protected function getViewName(): string
{
- $start = (int) $this->request->getGet('start') ?: 0;
- $end = (int) $this->request->getGet('length') ?: 10;
+ return 'pages/v2/m706/lists';
+ }
- $data = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
+ protected function getSearchKeys(): array
+ {
+ return [
+ 'atcl_no',
+ 'stat_cd',
+ 'realtor_nm',
+ 'charger_gbn',
+ 'assign_yn',
+ 'receipt_sdate',
+ 'receipt_edate',
+ 'complete_sdate',
+ 'complete_edate',
+ 'srcSido',
+ 'srcGugun',
+ 'srcDong',
+ 'bonbu',
+ 'team',
+ 'damdang',
+ 'vrfcreq_way',
+ 'rcpt_cpid',
];
-
- $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 = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- ];
-
- $datas = $this->model->getExcelList($data);
-
- return $this->response->setJSON(body: [
- 'data' => $datas,
- ]);
-
- } catch (\Exception $e) {
- $e->getPrevious()->getTraceAsString();
- }
- }
-
-
- // 상세화면
public function detail($id)
{
$naver = new NaverApiClient();
@@ -619,4 +556,4 @@ class M706 extends BaseController
]);
}
}
-}
\ No newline at end of file
+}
diff --git a/app/Controllers/V2/M708.php b/app/Controllers/V2/M708.php
index bb2d8a2..e983a59 100644
--- a/app/Controllers/V2/M708.php
+++ b/app/Controllers/V2/M708.php
@@ -1,125 +1,59 @@
model = new M708Model();
- $this->codeModel = new CodeModel();
+ return new M708Model();
}
- public function lists(): string
+ protected function getCodeKeys(): array
{
- $codes = $this->codeModel->getCodeLists(['CP_ID', 'STEP_VERIFICATION', 'RECEIPT_STATUS3', 'ARTICLE_TYPE']); // 코드조회
- $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/v2/m708/lists", $this->data);
+ return ['CP_ID', 'STEP_VERIFICATION', 'RECEIPT_STATUS3', 'ARTICLE_TYPE'];
}
- public function getResultList()
+ protected function getViewName(): string
{
- $start = (int) $this->request->getGet('start') ?: 0;
- $end = (int) $this->request->getGet('length') ?: 10;
+ return 'pages/v2/m708/lists';
+ }
- $data = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'chk_atcl_no' => $this->request->getGet('chk_atcl_no'), // 매물번호입력
- 'caller_no' => $this->request->getGet('caller_no'), // 발신팩스번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'target_yn' => $this->request->getGet('target_yn'), // 홍보확인서여부
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'rlet_type_cd' => $this->request->getGet('rlet_type_cd'), // 매물종류
- 'rcpt_v2' => $this->request->getGet('rcpt_v2'), // 검증방식
+ protected function getSearchKeys(): array
+ {
+ return [
+ 'atcl_no',
+ 'chk_atcl_no',
+ 'caller_no',
+ 'stat_cd',
+ 'realtor_nm',
+ 'charger_gbn',
+ 'assign_yn',
+ 'receipt_sdate',
+ 'receipt_edate',
+ 'complete_sdate',
+ 'complete_edate',
+ 'srcSido',
+ 'srcGugun',
+ 'srcDong',
+ 'bonbu',
+ 'team',
+ 'damdang',
+ 'target_yn',
+ 'rcpt_cpid',
+ 'rlet_type_cd',
+ 'rcpt_v2',
];
-
- $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 = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'chk_atcl_no' => $this->request->getGet('chk_atcl_no'), // 매물번호입력
- 'caller_no' => $this->request->getGet('caller_no'), // 발신팩스번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'target_yn' => $this->request->getGet('target_yn'), // 홍보확인서여부
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'rlet_type_cd' => $this->request->getGet('rlet_type_cd'), // 매물종류
- 'rcpt_v2' => $this->request->getGet('rcpt_v2'), // 검증방식
- ];
-
- $datas = $this->model->getExcelList($data);
-
- return $this->response->setJSON(body: [
- 'data' => $datas,
- ]);
-
- } catch (\Exception $e) {
- $e->getPrevious()->getTraceAsString();
- }
- }
-
-
- // 상세화면
public function detail($id)
{
$id = (string) $id;
@@ -643,4 +577,4 @@ class M708 extends BaseController
}
}
-}
\ No newline at end of file
+}
diff --git a/app/Controllers/V2/M709.php b/app/Controllers/V2/M709.php
index 3a3589e..39417f6 100644
--- a/app/Controllers/V2/M709.php
+++ b/app/Controllers/V2/M709.php
@@ -1,120 +1,55 @@
model = new M709Model();
- $this->codeModel = new CodeModel();
+ return new M709Model();
}
- public function lists(): string
+ protected function getCodeKeys(): array
{
- $codes = $this->codeModel->getCodeLists(['CP_ID', 'STEP_VERIFICATION', 'RECEIPT_STATUS3', 'ARTICLE_TYPE']); // 코드조회
- $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/v2/m709/lists", $this->data);
+ return ['CP_ID', 'STEP_VERIFICATION', 'RECEIPT_STATUS3', 'ARTICLE_TYPE'];
}
-
- public function getResultList()
+ protected function getViewName(): string
{
- $start = (int) $this->request->getGet('start') ?: 0;
- $end = (int) $this->request->getGet('length') ?: 10;
+ return 'pages/v2/m709/lists';
+ }
- $data = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'chk_atcl_no' => $this->request->getGet('chk_atcl_no'), // 매물번호입력
- 'caller_no' => $this->request->getGet('caller_no'), // 발신팩스번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'target_yn' => $this->request->getGet('target_yn'), // 홍보확인서여부
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'rlet_type_cd' => $this->request->getGet('rlet_type_cd'), // 매물종류
- 'rcpt_v2' => $this->request->getGet('rcpt_v2'), // 검증방식
+ protected function getSearchKeys(): array
+ {
+ return [
+ 'atcl_no',
+ 'chk_atcl_no',
+ 'caller_no',
+ 'stat_cd',
+ 'realtor_nm',
+ 'charger_gbn',
+ 'assign_yn',
+ 'receipt_sdate',
+ 'receipt_edate',
+ 'complete_sdate',
+ 'complete_edate',
+ 'srcSido',
+ 'srcGugun',
+ 'srcDong',
+ 'bonbu',
+ 'team',
+ 'damdang',
+ 'target_yn',
+ 'rcpt_cpid',
+ 'rlet_type_cd',
+ 'rcpt_v2',
];
-
- $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 = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'chk_atcl_no' => $this->request->getGet('chk_atcl_no'), // 매물번호입력
- 'caller_no' => $this->request->getGet('caller_no'), // 발신팩스번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'target_yn' => $this->request->getGet('target_yn'), // 홍보확인서여부
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'rlet_type_cd' => $this->request->getGet('rlet_type_cd'), // 매물종류
- 'rcpt_v2' => $this->request->getGet('rcpt_v2'), // 검증방식
- ];
-
- $datas = $this->model->getExcelList($data);
-
- return $this->response->setJSON(body: [
- 'data' => $datas,
- ]);
- } catch (\Exception $e) {
- $e->getPrevious()->getTraceAsString();
- }
- }
-
-
- // 상세화면
public function detail($id)
{
$id = (string) $id;
@@ -395,4 +330,4 @@ class M709 extends BaseController
]);
}
}
-}
\ No newline at end of file
+}
diff --git a/app/Controllers/V2/M712.php b/app/Controllers/V2/M712.php
index c393640..af42849 100644
--- a/app/Controllers/V2/M712.php
+++ b/app/Controllers/V2/M712.php
@@ -1,128 +1,59 @@
model = new M712Model();
- $this->codeModel = new CodeModel();
+ return new M712Model();
}
- public function lists(): string
+ protected function getCodeKeys(): array
{
- $codes = $this->codeModel->getCodeLists(['STEP_VERIFICATION', 'VRFCREQ_WAY', 'CP_ID', 'ARTICLE_TYPE']); // 코드조회
- $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/v2/m712/lists", $this->data);
+ return ['STEP_VERIFICATION', 'VRFCREQ_WAY', 'CP_ID', 'ARTICLE_TYPE'];
}
-
- public function getResultList()
+ protected function getViewName(): string
{
- $start = (int) $this->request->getGet('start') ?: 0;
- $end = (int) $this->request->getGet('length') ?: 10;
+ return 'pages/v2/m712/lists';
+ }
- $data = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1
- 'vrfc_type_sub' => $this->request->getGet('vrfc_type_sub'), // 검증방식2
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'rlet_type_cd' => $this->request->getGet('rlet_type_cd'), // 매물종류
- 'reference_file_url_yn' => $this->request->getGet('reference_file_url_yn'), // 참고용
- 'ownerTypeCode' => $this->request->getGet('ownerTypeCode'), // 소유자 구분
- 'document_not_received_yn' => $this->request->getGet('document_not_received_yn'), // 서류미수취
+ protected function getSearchKeys(): array
+ {
+ return [
+ 'atcl_no',
+ 'stat_cd',
+ 'realtor_nm',
+ 'charger_gbn',
+ 'assign_yn',
+ 'receipt_sdate',
+ 'receipt_edate',
+ 'complete_sdate',
+ 'complete_edate',
+ 'srcSido',
+ 'srcGugun',
+ 'srcDong',
+ 'bonbu',
+ 'team',
+ 'damdang',
+ 'vrfcreq_way',
+ 'vrfc_type_sub',
+ 'rcpt_cpid',
+ 'rlet_type_cd',
+ 'reference_file_url_yn',
+ 'ownerTypeCode',
+ 'document_not_received_yn',
];
-
- $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 = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1
- 'vrfc_type_sub' => $this->request->getGet('vrfc_type_sub'), // 검증방식2
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'rlet_type_cd' => $this->request->getGet('rlet_type_cd'), // 매물종류
- 'reference_file_url_yn' => $this->request->getGet('reference_file_url_yn'), // 참고용
- 'ownerTypeCode' => $this->request->getGet('ownerTypeCode'), // 소유자 구분
- 'document_not_received_yn' => $this->request->getGet('document_not_received_yn'), // 서류미수취
- ];
-
- $datas = $this->model->getExcelList($data);
-
- return $this->response->setJSON(body: [
- 'data' => $datas,
- ]);
-
- } catch (\Exception $e) {
- $e->getPrevious()->getTraceAsString();
- }
- }
-
-
- // 상세화면
public function detail($id): string
{
@@ -738,4 +669,4 @@ class M712 extends BaseController
]);
}
}
-}
\ No newline at end of file
+}
diff --git a/app/Controllers/V2/M713.php b/app/Controllers/V2/M713.php
index 6168f78..e9cbf2c 100644
--- a/app/Controllers/V2/M713.php
+++ b/app/Controllers/V2/M713.php
@@ -1,127 +1,59 @@
model = new M713Model();
- $this->codeModel = new CodeModel();
+ return new M713Model();
}
-
- public function lists(): string
+ protected function getCodeKeys(): array
{
- $codes = $this->codeModel->getCodeLists(['STEP_VERIFICATION', 'VRFCREQ_WAY', 'CP_ID', 'ARTICLE_TYPE']); // 코드조회
- $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/v2/m713/lists", $this->data);
+ return ['STEP_VERIFICATION', 'VRFCREQ_WAY', 'CP_ID', 'ARTICLE_TYPE'];
}
- public function getResultList()
+ protected function getViewName(): string
{
- $start = (int) $this->request->getGet('start') ?: 0;
- $end = (int) $this->request->getGet('length') ?: 10;
+ return 'pages/v2/m713/lists';
+ }
- $data = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1
- 'vrfc_type_sub' => $this->request->getGet('vrfc_type_sub'), // 검증방식2
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'rlet_type_cd' => $this->request->getGet('rlet_type_cd'), // 매물종류
- 'chk_spc_yn' => $this->request->getGet('chk_spc_yn'), // 면적확인
- 'reference_file_url_yn' => $this->request->getGet('reference_file_url_yn'), // 참고용
- 'corp_own' => $this->request->getGet('corp_own'), // 법인소유
+ protected function getSearchKeys(): array
+ {
+ return [
+ 'atcl_no',
+ 'stat_cd',
+ 'realtor_nm',
+ 'charger_gbn',
+ 'assign_yn',
+ 'receipt_sdate',
+ 'receipt_edate',
+ 'complete_sdate',
+ 'complete_edate',
+ 'srcSido',
+ 'srcGugun',
+ 'srcDong',
+ 'bonbu',
+ 'team',
+ 'damdang',
+ 'vrfcreq_way',
+ 'vrfc_type_sub',
+ 'rcpt_cpid',
+ 'rlet_type_cd',
+ 'chk_spc_yn',
+ 'reference_file_url_yn',
+ 'corp_own',
];
-
- $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 = [
- 'atcl_no' => $this->request->getGet('atcl_no'), // 매물번호
- 'stat_cd' => $this->request->getGet('stat_cd'), // 현재상태
- 'realtor_nm' => $this->request->getGet('realtor_nm'), // 중개소
- 'charger_gbn' => $this->request->getGet('charger_gbn'), // 배정여부
- 'assign_yn' => $this->request->getGet('assign_yn'), // 배정여부2
- 'receipt_sdate' => $this->request->getGet('receipt_sdate'), // 접수기간1
- 'receipt_edate' => $this->request->getGet('receipt_edate'), // 접수기간2
- 'complete_sdate' => $this->request->getGet('complete_sdate'), // 완료기간1
- 'complete_edate' => $this->request->getGet('complete_edate'), // 완료기간2
- 'srcSido' => $this->request->getGet('srcSido'), // 시도
- 'srcGugun' => $this->request->getGet('srcGugun'), // 시군구
- 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
- 'bonbu' => $this->request->getGet('bonbu'), // 본부
- 'team' => $this->request->getGet('team'), // 팀
- 'damdang' => $this->request->getGet('damdang'), // 담당
- 'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1
- 'vrfc_type_sub' => $this->request->getGet('vrfc_type_sub'), // 검증방식2
- 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
- 'rlet_type_cd' => $this->request->getGet('rlet_type_cd'), // 매물종류
- 'chk_spc_yn' => $this->request->getGet('chk_spc_yn'), // 면적확인
- 'reference_file_url_yn' => $this->request->getGet('reference_file_url_yn'), // 참고용
- 'corp_own' => $this->request->getGet('corp_own'), // 법인소유
- ];
-
- $datas = $this->model->getExcelList($data);
-
- return $this->response->setJSON(body: [
- 'data' => $datas,
- ]);
-
- } catch (\Exception $e) {
- $e->getPrevious()->getTraceAsString();
- }
- }
-
-
- // 상세화면
public function detail($id): string
{
$naver = new NaverApiClient();
@@ -760,4 +692,4 @@ class M713 extends BaseController
]);
}
}
-}
\ No newline at end of file
+}
diff --git a/app/Helpers/function_helper.php b/app/Helpers/function_helper.php
index ed95de6..3d33269 100644
--- a/app/Helpers/function_helper.php
+++ b/app/Helpers/function_helper.php
@@ -7,13 +7,14 @@ if (!function_exists('limitHscpMarketPriceInfo')) {
* @param string $ptp_no 평형코드
* @param string $atcl_amt 가격
*/
- function limitHscpMarketPriceInfo($CI, $trade_type, $hscp_no, $ptp_no, $atcl_amt)
+ function limitHscpMarketPriceInfo($trade_type, $hscp_no, $ptp_no, $atcl_amt)
{
$return = array();
if (!empty($hscp_no) && !empty($ptp_no)) {
- $hscpMarketPriceInfo = $CI->call_kiso_api->hscpMarketPriceInfo($hscp_no, $ptp_no);
+ $naver = new \App\Libraries\NaverApiClient();
+ $hscpMarketPriceInfo = $naver->hscpMarketPriceInfo($hscp_no, $ptp_no);
if (isset($hscpMarketPriceInfo['error'])) { //결과값 확인
if ($hscpMarketPriceInfo['error']['code'] == 'VC027') {
diff --git a/app/Libraries/NaverApiClient.php b/app/Libraries/NaverApiClient.php
index 75aad31..a658fa0 100644
--- a/app/Libraries/NaverApiClient.php
+++ b/app/Libraries/NaverApiClient.php
@@ -174,6 +174,25 @@ class NaverApiClient
return $this->request('POST', $url, $reportData);
}
+ /**
+ * 특정 단지/평형 시세조회()
+ * @param string hscpNo 단지번호
+ * @param string ptpNo 평형번호
+ * API: GET /confirms/hscpMarketPriceInfo.nhn?hscpNo={단지번호}&ptpNo={평형번호}
+ */
+ public function hscpMarketPriceInfo($hscpNo, $ptpNo){
+ $url = '/confirms/hscpMarketPriceInfo.nhn';
+ $url = $this->commonModel->getCompanyInfo(3);
+ $url = $url['api_server'] . $url;
+ $data = [
+ 'hscpNo' => $hscpNo,
+ 'ptpNo' => $ptpNo
+ ];
+
+ return $this->request('GET', $url, $data);
+ }
+
+
public function submitSyncResult(string $reserveNoList): ?array
{
$url = "{$this->baseUrl}/site/submitSyncResult.nhn";
diff --git a/app/Models/article/ReceiptModel.php b/app/Models/article/ReceiptModel.php
index ae0c1cc..48a8ad8 100644
--- a/app/Models/article/ReceiptModel.php
+++ b/app/Models/article/ReceiptModel.php
@@ -1215,10 +1215,8 @@ class ReceiptModel extends Model
$builder->join('result b', 'b.rcpt_sq = a.rcpt_sq', 'inner');
$builder->join('region_codes c', 'a.rcpt_dong = c.region_cd', 'left');
$builder->join('departments d', 'b.dept_sq = d.dept_sq', 'left');
-
-
$builder->where('a.rcpt_key', $id);
-
+
return $builder->get()->getRowArray();
}
diff --git a/app/Models/v2/BaseV2Model.php b/app/Models/v2/BaseV2Model.php
new file mode 100644
index 0000000..97f6259
--- /dev/null
+++ b/app/Models/v2/BaseV2Model.php
@@ -0,0 +1,119 @@
+db->query($sql, [$gugun]);
+
+ } else if (!empty($sido)) {
+ $chk_sido = substr($sido, '0', '2');
+
+ if ($chk_sido === '36') {
+ $sido = substr($sido, '0', '4');
+ $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm " .
+ "FROM region_codes a " .
+ "LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,4),'000000') " .
+ "WHERE a.region_cd LIKE concat(?, '%') " .
+ "AND a.region_cd NOT LIKE '%000000' " .
+ "AND a.region_cd LIKE '%00' " .
+ "AND a.use_yn = 'Y' " .
+ "AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000')) " .
+ "ORDER BY a.region_nm ASC";
+ } else {
+ $sido = substr($sido, '0', '2');
+ $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
+ " FROM region_codes a" .
+ " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,2),'00000000')" .
+ " WHERE a.region_cd LIKE concat(?, '%')" .
+ " AND a.region_cd NOT LIKE '%00000000'" .
+ " AND a.region_cd LIKE '%00000'" .
+ " AND a.use_yn = 'Y'" .
+ " AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000'))" .
+ " ORDER BY a.region_nm ASC";
+ }
+
+ $query = $this->db->query($sql, [$sido]);
+ } else {
+ $sql = "SELECT a.region_cd, a.region_nm " .
+ "FROM region_codes a " .
+ "WHERE (a.region_cd LIKE '%00000000' " .
+ "AND a.use_yn = 'Y') " .
+ "OR region_cd = 3611000000;";
+
+ $query = $this->db->query($sql);
+ }
+
+ return $query->getResultArray();
+ }
+
+ // 소속본부 조회
+ public function getBonbuList()
+ {
+ $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 depth = 1" .
+ " AND use_yn = 'Y'" .
+ " ORDER BY lft";
+
+ $query = $this->db->query($sql);
+
+ return $query->getResultArray();
+ }
+
+ // 소속팀 조회
+ public function getTeamList()
+ {
+ $sql = "SELECT dept_sq, pdept_sq, dept_nm" .
+ " FROM departments" .
+ " WHERE depth = 2" .
+ " AND use_yn = 'Y'" .
+ " ORDER BY dept_nm";
+
+ $query = $this->db->query($sql);
+
+ return $query->getResultArray();
+ }
+
+ // 담당자 조회
+ public function getUserList()
+ {
+ $sql = "SELECT
+ a.usr_sq, a.usr_id, a.usr_nm, a.dept_sq
+ FROM users a
+ WHERE
+ a.usr_level IN ('3','4','40','5','50','6','60','61','62','7','8','70')
+ AND a.use_yn = 'Y'
+ AND EXISTS (
+ SELECT 'x' FROM departments a1 INNER JOIN departments a2 ON a2.lft BETWEEN a1.lft AND a1.rgt AND a2.use_yn = 'Y'
+ WHERE 1=1 AND a2.dept_sq = a.dept_sq AND a1.use_yn = 'Y'
+ )
+ ORDER BY a.usr_level DESC, a.usr_nm ASC ";
+
+ $query = $this->db->query($sql);
+
+ return $query->getResultArray();
+ }
+}
diff --git a/app/Models/v2/M701Model.php b/app/Models/v2/M701Model.php
index 1ea4c34..fef4099 100644
--- a/app/Models/v2/M701Model.php
+++ b/app/Models/v2/M701Model.php
@@ -2,121 +2,11 @@
namespace App\Models\v2;
use App\Models\webfax\FaxModel;
-use CodeIgniter\Model;
+use App\Models\v2\BaseV2Model;
-class M701Model extends Model
+class M701Model extends BaseV2Model
{
- // 지역 목록 조회
- public function getAreaList($sido = '', $gugun = '')
- {
-
- if (!empty($gugun)) {
- $gugun = substr($gugun, '0', '5');
-
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,5),'00000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000'" .
- " AND a.region_cd LIKE '%00'" .
- " AND a.use_yn = 'Y'" .
- " ORDER BY a.region_nm ASC";
-
- $query = $this->db->query($sql, [$gugun]);
-
- } else if (!empty($sido)) {
- $chk_sido = substr($sido, '0', '2');
-
- if ($chk_sido === '36') {
- $sido = substr($sido, '0', '4');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm " .
- "FROM region_codes a " .
- "LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,4),'000000') " .
- "WHERE a.region_cd LIKE concat(?, '%') " .
- "AND a.region_cd NOT LIKE '%000000' " .
- "AND a.region_cd LIKE '%00' " .
- "AND a.use_yn = 'Y' " .
- "AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000')) " .
- "ORDER BY a.region_nm ASC";
- } else {
- $sido = substr($sido, '0', '2');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,2),'00000000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000000'" .
- " AND a.region_cd LIKE '%00000'" .
- " AND a.use_yn = 'Y'" .
- " AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000'))" .
- " ORDER BY a.region_nm ASC";
- }
-
- $query = $this->db->query($sql, [$sido]);
- } else {
- $sql = "SELECT a.region_cd, a.region_nm " .
- "FROM region_codes a " .
- "WHERE (a.region_cd LIKE '%00000000' " .
- "AND a.use_yn = 'Y') " .
- "OR region_cd = 3611000000;";
-
- $query = $this->db->query($sql);
- }
-
-
- return $query->getResultArray();
- }
-
- // 소속본부조회
- public function getBonbuList()
- {
- $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 depth = 1" .
- " AND use_yn = 'Y'" .
- " ORDER BY lft";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 소속팀 조회
- public function getTeamList()
- {
- $sql = "SELECT dept_sq, pdept_sq, dept_nm" .
- " FROM departments" .
- " WHERE depth = 2" .
- " AND use_yn = 'Y'" .
- " ORDER BY dept_nm";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 유저 조회
- public function getUserList()
- {
- $sql = "SELECT
- a.usr_sq, a.usr_id, a.usr_nm, a.dept_sq
- FROM users a
- WHERE
- a.usr_level IN ('3','4','40','5','50','6','60','61','62','7','8','70')
- AND a.use_yn = 'Y'
- AND EXISTS (
- SELECT 'x' FROM departments a1 INNER JOIN departments a2 ON a2.lft BETWEEN a1.lft AND a1.rgt AND a2.use_yn = 'Y'
- WHERE 1=1 AND a2.dept_sq = a.dept_sq AND a1.use_yn = 'Y'
- )
- ORDER BY a.usr_level DESC, a.usr_nm ASC ";
-
- $query = $this->db->query($sql);
-
- return $query->getResultArray();
- }
-
public function getTotalCount($data)
{
$sql = "SELECT
diff --git a/app/Models/v2/M702Model.php b/app/Models/v2/M702Model.php
index a53312f..07e7a96 100644
--- a/app/Models/v2/M702Model.php
+++ b/app/Models/v2/M702Model.php
@@ -2,119 +2,10 @@
namespace App\Models\v2;
use App\Models\webfax\FaxModel;
-use CodeIgniter\Model;
+use App\Models\v2\BaseV2Model;
-class M702Model extends Model
+class M702Model extends BaseV2Model
{
- // 지역 목록 조회
- public function getAreaList($sido = '', $gugun = '')
- {
-
- if (!empty($gugun)) {
- $gugun = substr($gugun, '0', '5');
-
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,5),'00000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000'" .
- " AND a.region_cd LIKE '%00'" .
- " AND a.use_yn = 'Y'" .
- " ORDER BY a.region_nm ASC";
-
- $query = $this->db->query($sql, [$gugun]);
-
- } else if (!empty($sido)) {
- $chk_sido = substr($sido, '0', '2');
-
- if ($chk_sido === '36') {
- $sido = substr($sido, '0', '4');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm " .
- "FROM region_codes a " .
- "LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,4),'000000') " .
- "WHERE a.region_cd LIKE concat(?, '%') " .
- "AND a.region_cd NOT LIKE '%000000' " .
- "AND a.region_cd LIKE '%00' " .
- "AND a.use_yn = 'Y' " .
- "AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000')) " .
- "ORDER BY a.region_nm ASC";
- } else {
- $sido = substr($sido, '0', '2');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,2),'00000000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000000'" .
- " AND a.region_cd LIKE '%00000'" .
- " AND a.use_yn = 'Y'" .
- " AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000'))" .
- " ORDER BY a.region_nm ASC";
- }
-
- $query = $this->db->query($sql, [$sido]);
- } else {
- $sql = "SELECT a.region_cd, a.region_nm " .
- "FROM region_codes a " .
- "WHERE (a.region_cd LIKE '%00000000' " .
- "AND a.use_yn = 'Y') " .
- "OR region_cd = 3611000000;";
-
- $query = $this->db->query($sql);
- }
-
-
- return $query->getResultArray();
- }
-
- // 소속본부조회
- public function getBonbuList()
- {
- $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 depth = 1" .
- " AND use_yn = 'Y'" .
- " ORDER BY lft";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 소속팀 조회
- public function getTeamList()
- {
- $sql = "SELECT dept_sq, pdept_sq, dept_nm" .
- " FROM departments" .
- " WHERE depth = 2" .
- " AND use_yn = 'Y'" .
- " ORDER BY dept_nm";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 유저 조회
- public function getUserList()
- {
- $sql = "SELECT
- a.usr_sq, a.usr_id, a.usr_nm, a.dept_sq
- FROM users a
- WHERE
- a.usr_level IN ('3','4','40','5','50','6','60','61','62','7','8','70')
- AND a.use_yn = 'Y'
- AND EXISTS (
- SELECT 'x' FROM departments a1 INNER JOIN departments a2 ON a2.lft BETWEEN a1.lft AND a1.rgt AND a2.use_yn = 'Y'
- WHERE 1=1 AND a2.dept_sq = a.dept_sq AND a1.use_yn = 'Y'
- )
- ORDER BY a.usr_level DESC, a.usr_nm ASC ";
-
- $query = $this->db->query($sql);
-
- return $query->getResultArray();
- }
public function getTotalCount($data)
{
diff --git a/app/Models/v2/M703Model.php b/app/Models/v2/M703Model.php
index 7bbb5c6..80f9887 100644
--- a/app/Models/v2/M703Model.php
+++ b/app/Models/v2/M703Model.php
@@ -3,119 +3,10 @@ namespace App\Models\v2;
use App\Models\receipt\ReceiptModel;
use App\Models\webfax\FaxModel;
-use CodeIgniter\Model;
+use App\Models\v2\BaseV2Model;
-class M703Model extends Model
+class M703Model extends BaseV2Model
{
- // 지역 목록 조회
- public function getAreaList($sido = '', $gugun = '')
- {
-
- if (!empty($gugun)) {
- $gugun = substr($gugun, '0', '5');
-
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,5),'00000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000'" .
- " AND a.region_cd LIKE '%00'" .
- " AND a.use_yn = 'Y'" .
- " ORDER BY a.region_nm ASC";
-
- $query = $this->db->query($sql, [$gugun]);
-
- } else if (!empty($sido)) {
- $chk_sido = substr($sido, '0', '2');
-
- if ($chk_sido === '36') {
- $sido = substr($sido, '0', '4');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm " .
- "FROM region_codes a " .
- "LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,4),'000000') " .
- "WHERE a.region_cd LIKE concat(?, '%') " .
- "AND a.region_cd NOT LIKE '%000000' " .
- "AND a.region_cd LIKE '%00' " .
- "AND a.use_yn = 'Y' " .
- "AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000')) " .
- "ORDER BY a.region_nm ASC";
- } else {
- $sido = substr($sido, '0', '2');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,2),'00000000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000000'" .
- " AND a.region_cd LIKE '%00000'" .
- " AND a.use_yn = 'Y'" .
- " AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000'))" .
- " ORDER BY a.region_nm ASC";
- }
-
- $query = $this->db->query($sql, [$sido]);
- } else {
- $sql = "SELECT a.region_cd, a.region_nm " .
- "FROM region_codes a " .
- "WHERE (a.region_cd LIKE '%00000000' " .
- "AND a.use_yn = 'Y') " .
- "OR region_cd = 3611000000;";
-
- $query = $this->db->query($sql);
- }
-
-
- return $query->getResultArray();
- }
-
- // 소속본부조회
- public function getBonbuList()
- {
- $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 depth = 1" .
- " AND use_yn = 'Y'" .
- " ORDER BY lft";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 소속팀 조회
- public function getTeamList()
- {
- $sql = "SELECT dept_sq, pdept_sq, dept_nm" .
- " FROM departments" .
- " WHERE depth = 2" .
- " AND use_yn = 'Y'" .
- " ORDER BY dept_nm";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 유저 조회
- public function getUserList()
- {
- $sql = "SELECT
- a.usr_sq, a.usr_id, a.usr_nm, a.dept_sq
- FROM users a
- WHERE
- a.usr_level IN ('3','4','40','5','50','6','60','61','62','7','8','70')
- AND a.use_yn = 'Y'
- AND EXISTS (
- SELECT 'x' FROM departments a1 INNER JOIN departments a2 ON a2.lft BETWEEN a1.lft AND a1.rgt AND a2.use_yn = 'Y'
- WHERE 1=1 AND a2.dept_sq = a.dept_sq AND a1.use_yn = 'Y'
- )
- ORDER BY a.usr_level DESC, a.usr_nm ASC ";
-
- $query = $this->db->query($sql);
-
- return $query->getResultArray();
- }
public function getTotalCount($data)
{
diff --git a/app/Models/v2/M704Model.php b/app/Models/v2/M704Model.php
index e6e45ad..f79a36c 100644
--- a/app/Models/v2/M704Model.php
+++ b/app/Models/v2/M704Model.php
@@ -2,119 +2,10 @@
namespace App\Models\v2;
use App\Models\webfax\FaxModel;
-use CodeIgniter\Model;
+use App\Models\v2\BaseV2Model;
-class M704Model extends Model
+class M704Model extends BaseV2Model
{
- // 지역 목록 조회
- public function getAreaList($sido = '', $gugun = '')
- {
-
- if (!empty($gugun)) {
- $gugun = substr($gugun, '0', '5');
-
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,5),'00000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000'" .
- " AND a.region_cd LIKE '%00'" .
- " AND a.use_yn = 'Y'" .
- " ORDER BY a.region_nm ASC";
-
- $query = $this->db->query($sql, [$gugun]);
-
- } else if (!empty($sido)) {
- $chk_sido = substr($sido, '0', '2');
-
- if ($chk_sido === '36') {
- $sido = substr($sido, '0', '4');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm " .
- "FROM region_codes a " .
- "LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,4),'000000') " .
- "WHERE a.region_cd LIKE concat(?, '%') " .
- "AND a.region_cd NOT LIKE '%000000' " .
- "AND a.region_cd LIKE '%00' " .
- "AND a.use_yn = 'Y' " .
- "AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000')) " .
- "ORDER BY a.region_nm ASC";
- } else {
- $sido = substr($sido, '0', '2');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,2),'00000000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000000'" .
- " AND a.region_cd LIKE '%00000'" .
- " AND a.use_yn = 'Y'" .
- " AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000'))" .
- " ORDER BY a.region_nm ASC";
- }
-
- $query = $this->db->query($sql, [$sido]);
- } else {
- $sql = "SELECT a.region_cd, a.region_nm " .
- "FROM region_codes a " .
- "WHERE (a.region_cd LIKE '%00000000' " .
- "AND a.use_yn = 'Y') " .
- "OR region_cd = 3611000000;";
-
- $query = $this->db->query($sql);
- }
-
-
- return $query->getResultArray();
- }
-
- // 소속본부조회
- public function getBonbuList()
- {
- $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 depth = 1" .
- " AND use_yn = 'Y'" .
- " ORDER BY lft";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 소속팀 조회
- public function getTeamList()
- {
- $sql = "SELECT dept_sq, pdept_sq, dept_nm" .
- " FROM departments" .
- " WHERE depth = 2" .
- " AND use_yn = 'Y'" .
- " ORDER BY dept_nm";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 유저 조회
- public function getUserList()
- {
- $sql = "SELECT
- a.usr_sq, a.usr_id, a.usr_nm, a.dept_sq
- FROM users a
- WHERE
- a.usr_level IN ('3','4','40','5','50','6','60','61','62','7','8','70')
- AND a.use_yn = 'Y'
- AND EXISTS (
- SELECT 'x' FROM departments a1 INNER JOIN departments a2 ON a2.lft BETWEEN a1.lft AND a1.rgt AND a2.use_yn = 'Y'
- WHERE 1=1 AND a2.dept_sq = a.dept_sq AND a1.use_yn = 'Y'
- )
- ORDER BY a.usr_level DESC, a.usr_nm ASC ";
-
- $query = $this->db->query($sql);
-
- return $query->getResultArray();
- }
public function getTotalCount($data)
{
diff --git a/app/Models/v2/M705Model.php b/app/Models/v2/M705Model.php
index f166c11..02d943a 100644
--- a/app/Models/v2/M705Model.php
+++ b/app/Models/v2/M705Model.php
@@ -1,119 +1,10 @@
db->query($sql, [$gugun]);
-
- } else if (!empty($sido)) {
- $chk_sido = substr($sido, '0', '2');
-
- if ($chk_sido === '36') {
- $sido = substr($sido, '0', '4');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm " .
- "FROM region_codes a " .
- "LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,4),'000000') " .
- "WHERE a.region_cd LIKE concat(?, '%') " .
- "AND a.region_cd NOT LIKE '%000000' " .
- "AND a.region_cd LIKE '%00' " .
- "AND a.use_yn = 'Y' " .
- "AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000')) " .
- "ORDER BY a.region_nm ASC";
- } else {
- $sido = substr($sido, '0', '2');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,2),'00000000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000000'" .
- " AND a.region_cd LIKE '%00000'" .
- " AND a.use_yn = 'Y'" .
- " AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000'))" .
- " ORDER BY a.region_nm ASC";
- }
-
- $query = $this->db->query($sql, [$sido]);
- } else {
- $sql = "SELECT a.region_cd, a.region_nm " .
- "FROM region_codes a " .
- "WHERE (a.region_cd LIKE '%00000000' " .
- "AND a.use_yn = 'Y') " .
- "OR region_cd = 3611000000;";
-
- $query = $this->db->query($sql);
- }
-
-
- return $query->getResultArray();
- }
-
- // 소속본부조회
- public function getBonbuList()
- {
- $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 depth = 1" .
- " AND use_yn = 'Y'" .
- " ORDER BY lft";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 소속팀 조회
- public function getTeamList()
- {
- $sql = "SELECT dept_sq, pdept_sq, dept_nm" .
- " FROM departments" .
- " WHERE depth = 2" .
- " AND use_yn = 'Y'" .
- " ORDER BY dept_nm";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 유저 조회
- public function getUserList()
- {
- $sql = "SELECT
- a.usr_sq, a.usr_id, a.usr_nm, a.dept_sq
- FROM users a
- WHERE
- a.usr_level IN ('3','4','40','5','50','6','60','61','62','7','8','70')
- AND a.use_yn = 'Y'
- AND EXISTS (
- SELECT 'x' FROM departments a1 INNER JOIN departments a2 ON a2.lft BETWEEN a1.lft AND a1.rgt AND a2.use_yn = 'Y'
- WHERE 1=1 AND a2.dept_sq = a.dept_sq AND a1.use_yn = 'Y'
- )
- ORDER BY a.usr_level DESC, a.usr_nm ASC ";
-
- $query = $this->db->query($sql);
-
- return $query->getResultArray();
- }
public function getTotalCount($data)
{
diff --git a/app/Models/v2/M706Model.php b/app/Models/v2/M706Model.php
index f7fa936..5f0a386 100644
--- a/app/Models/v2/M706Model.php
+++ b/app/Models/v2/M706Model.php
@@ -2,119 +2,10 @@
namespace App\Models\v2;
use App\Models\webfax\FaxModel;
-use CodeIgniter\Model;
+use App\Models\v2\BaseV2Model;
-class M706Model extends Model
+class M706Model extends BaseV2Model
{
- // 지역 목록 조회
- public function getAreaList($sido = '', $gugun = '')
- {
-
- if (!empty($gugun)) {
- $gugun = substr($gugun, '0', '5');
-
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,5),'00000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000'" .
- " AND a.region_cd LIKE '%00'" .
- " AND a.use_yn = 'Y'" .
- " ORDER BY a.region_nm ASC";
-
- $query = $this->db->query($sql, [$gugun]);
-
- } else if (!empty($sido)) {
- $chk_sido = substr($sido, '0', '2');
-
- if ($chk_sido === '36') {
- $sido = substr($sido, '0', '4');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm " .
- "FROM region_codes a " .
- "LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,4),'000000') " .
- "WHERE a.region_cd LIKE concat(?, '%') " .
- "AND a.region_cd NOT LIKE '%000000' " .
- "AND a.region_cd LIKE '%00' " .
- "AND a.use_yn = 'Y' " .
- "AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000')) " .
- "ORDER BY a.region_nm ASC";
- } else {
- $sido = substr($sido, '0', '2');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,2),'00000000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000000'" .
- " AND a.region_cd LIKE '%00000'" .
- " AND a.use_yn = 'Y'" .
- " AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000'))" .
- " ORDER BY a.region_nm ASC";
- }
-
- $query = $this->db->query($sql, [$sido]);
- } else {
- $sql = "SELECT a.region_cd, a.region_nm " .
- "FROM region_codes a " .
- "WHERE (a.region_cd LIKE '%00000000' " .
- "AND a.use_yn = 'Y') " .
- "OR region_cd = 3611000000;";
-
- $query = $this->db->query($sql);
- }
-
-
- return $query->getResultArray();
- }
-
- // 소속본부조회
- public function getBonbuList()
- {
- $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 depth = 1" .
- " AND use_yn = 'Y'" .
- " ORDER BY lft";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 소속팀 조회
- public function getTeamList()
- {
- $sql = "SELECT dept_sq, pdept_sq, dept_nm" .
- " FROM departments" .
- " WHERE depth = 2" .
- " AND use_yn = 'Y'" .
- " ORDER BY dept_nm";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 유저 조회
- public function getUserList()
- {
- $sql = "SELECT
- a.usr_sq, a.usr_id, a.usr_nm, a.dept_sq
- FROM users a
- WHERE
- a.usr_level IN ('3','4','40','5','50','6','60','61','62','7','8','70')
- AND a.use_yn = 'Y'
- AND EXISTS (
- SELECT 'x' FROM departments a1 INNER JOIN departments a2 ON a2.lft BETWEEN a1.lft AND a1.rgt AND a2.use_yn = 'Y'
- WHERE 1=1 AND a2.dept_sq = a.dept_sq AND a1.use_yn = 'Y'
- )
- ORDER BY a.usr_level DESC, a.usr_nm ASC ";
-
- $query = $this->db->query($sql);
-
- return $query->getResultArray();
- }
public function getTotalCount($data)
{
diff --git a/app/Models/v2/M708Model.php b/app/Models/v2/M708Model.php
index 8bffccf..74ab923 100644
--- a/app/Models/v2/M708Model.php
+++ b/app/Models/v2/M708Model.php
@@ -3,119 +3,10 @@ namespace App\Models\v2;
use App\Models\receipt\ReceiptModel;
use App\Models\webfax\FaxModel;
-use CodeIgniter\Model;
+use App\Models\v2\BaseV2Model;
-class M708Model extends Model
+class M708Model extends BaseV2Model
{
- // 지역 목록 조회
- public function getAreaList($sido = '', $gugun = '')
- {
-
- if (!empty($gugun)) {
- $gugun = substr($gugun, '0', '5');
-
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,5),'00000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000'" .
- " AND a.region_cd LIKE '%00'" .
- " AND a.use_yn = 'Y'" .
- " ORDER BY a.region_nm ASC";
-
- $query = $this->db->query($sql, [$gugun]);
-
- } else if (!empty($sido)) {
- $chk_sido = substr($sido, '0', '2');
-
- if ($chk_sido === '36') {
- $sido = substr($sido, '0', '4');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm " .
- "FROM region_codes a " .
- "LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,4),'000000') " .
- "WHERE a.region_cd LIKE concat(?, '%') " .
- "AND a.region_cd NOT LIKE '%000000' " .
- "AND a.region_cd LIKE '%00' " .
- "AND a.use_yn = 'Y' " .
- "AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000')) " .
- "ORDER BY a.region_nm ASC";
- } else {
- $sido = substr($sido, '0', '2');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,2),'00000000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000000'" .
- " AND a.region_cd LIKE '%00000'" .
- " AND a.use_yn = 'Y'" .
- " AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000'))" .
- " ORDER BY a.region_nm ASC";
- }
-
- $query = $this->db->query($sql, [$sido]);
- } else {
- $sql = "SELECT a.region_cd, a.region_nm " .
- "FROM region_codes a " .
- "WHERE (a.region_cd LIKE '%00000000' " .
- "AND a.use_yn = 'Y') " .
- "OR region_cd = 3611000000;";
-
- $query = $this->db->query($sql);
- }
-
-
- return $query->getResultArray();
- }
-
- // 소속본부조회
- public function getBonbuList()
- {
- $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 depth = 1" .
- " AND use_yn = 'Y'" .
- " ORDER BY lft";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 소속팀 조회
- public function getTeamList()
- {
- $sql = "SELECT dept_sq, pdept_sq, dept_nm" .
- " FROM departments" .
- " WHERE depth = 2" .
- " AND use_yn = 'Y'" .
- " ORDER BY dept_nm";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 유저 조회
- public function getUserList()
- {
- $sql = "SELECT
- a.usr_sq, a.usr_id, a.usr_nm, a.dept_sq
- FROM users a
- WHERE
- a.usr_level IN ('3','4','40','5','50','6','60','61','62','7','8','70')
- AND a.use_yn = 'Y'
- AND EXISTS (
- SELECT 'x' FROM departments a1 INNER JOIN departments a2 ON a2.lft BETWEEN a1.lft AND a1.rgt AND a2.use_yn = 'Y'
- WHERE 1=1 AND a2.dept_sq = a.dept_sq AND a1.use_yn = 'Y'
- )
- ORDER BY a.usr_level DESC, a.usr_nm ASC ";
-
- $query = $this->db->query($sql);
-
- return $query->getResultArray();
- }
public function getTotalCount($data)
{
diff --git a/app/Models/v2/M709Model.php b/app/Models/v2/M709Model.php
index 3ef43f0..8be3a38 100644
--- a/app/Models/v2/M709Model.php
+++ b/app/Models/v2/M709Model.php
@@ -1,119 +1,10 @@
db->query($sql, [$gugun]);
-
- } else if (!empty($sido)) {
- $chk_sido = substr($sido, '0', '2');
-
- if ($chk_sido === '36') {
- $sido = substr($sido, '0', '4');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm " .
- "FROM region_codes a " .
- "LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,4),'000000') " .
- "WHERE a.region_cd LIKE concat(?, '%') " .
- "AND a.region_cd NOT LIKE '%000000' " .
- "AND a.region_cd LIKE '%00' " .
- "AND a.use_yn = 'Y' " .
- "AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000')) " .
- "ORDER BY a.region_nm ASC";
- } else {
- $sido = substr($sido, '0', '2');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,2),'00000000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000000'" .
- " AND a.region_cd LIKE '%00000'" .
- " AND a.use_yn = 'Y'" .
- " AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000'))" .
- " ORDER BY a.region_nm ASC";
- }
-
- $query = $this->db->query($sql, [$sido]);
- } else {
- $sql = "SELECT a.region_cd, a.region_nm " .
- "FROM region_codes a " .
- "WHERE (a.region_cd LIKE '%00000000' " .
- "AND a.use_yn = 'Y') " .
- "OR region_cd = 3611000000;";
-
- $query = $this->db->query($sql);
- }
-
-
- return $query->getResultArray();
- }
-
- // 소속본부조회
- public function getBonbuList()
- {
- $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 depth = 1" .
- " AND use_yn = 'Y'" .
- " ORDER BY lft";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 소속팀 조회
- public function getTeamList()
- {
- $sql = "SELECT dept_sq, pdept_sq, dept_nm" .
- " FROM departments" .
- " WHERE depth = 2" .
- " AND use_yn = 'Y'" .
- " ORDER BY dept_nm";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 유저 조회
- public function getUserList()
- {
- $sql = "SELECT
- a.usr_sq, a.usr_id, a.usr_nm, a.dept_sq
- FROM users a
- WHERE
- a.usr_level IN ('3','4','40','5','50','6','60','61','62','7','8','70')
- AND a.use_yn = 'Y'
- AND EXISTS (
- SELECT 'x' FROM departments a1 INNER JOIN departments a2 ON a2.lft BETWEEN a1.lft AND a1.rgt AND a2.use_yn = 'Y'
- WHERE 1=1 AND a2.dept_sq = a.dept_sq AND a1.use_yn = 'Y'
- )
- ORDER BY a.usr_level DESC, a.usr_nm ASC ";
-
- $query = $this->db->query($sql);
-
- return $query->getResultArray();
- }
// 사용자 부서 조회
public function getDepartmentPath($usr_sq)
diff --git a/app/Models/v2/M710Model.php b/app/Models/v2/M710Model.php
index 3c876d5..615870e 100644
--- a/app/Models/v2/M710Model.php
+++ b/app/Models/v2/M710Model.php
@@ -1,121 +1,11 @@
db->query($sql, [$gugun]);
-
- } else if (!empty($sido)) {
- $chk_sido = substr($sido, '0', '2');
-
- if ($chk_sido === '36') {
- $sido = substr($sido, '0', '4');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm " .
- "FROM region_codes a " .
- "LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,4),'000000') " .
- "WHERE a.region_cd LIKE concat(?, '%') " .
- "AND a.region_cd NOT LIKE '%000000' " .
- "AND a.region_cd LIKE '%00' " .
- "AND a.use_yn = 'Y' " .
- "AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000')) " .
- "ORDER BY a.region_nm ASC";
- } else {
- $sido = substr($sido, '0', '2');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,2),'00000000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000000'" .
- " AND a.region_cd LIKE '%00000'" .
- " AND a.use_yn = 'Y'" .
- " AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000'))" .
- " ORDER BY a.region_nm ASC";
- }
-
- $query = $this->db->query($sql, [$sido]);
- } else {
- $sql = "SELECT a.region_cd, a.region_nm " .
- "FROM region_codes a " .
- "WHERE (a.region_cd LIKE '%00000000' " .
- "AND a.use_yn = 'Y') " .
- "OR region_cd = 3611000000;";
-
- $query = $this->db->query($sql);
- }
-
-
- return $query->getResultArray();
- }
-
- // 소속본부조회
- public function getBonbuList()
- {
- $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 depth = 1" .
- " AND use_yn = 'Y'" .
- " ORDER BY lft";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 소속팀 조회
- public function getTeamList()
- {
- $sql = "SELECT dept_sq, pdept_sq, dept_nm" .
- " FROM departments" .
- " WHERE depth = 2" .
- " AND use_yn = 'Y'" .
- " ORDER BY dept_nm";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 유저 조회
- public function getUserList()
- {
- $sql = "SELECT
- a.usr_sq, a.usr_id, a.usr_nm, a.dept_sq
- FROM users a
- WHERE
- a.usr_level IN ('3','4','40','5','50','6','60','61','62','7','8','70')
- AND a.use_yn = 'Y'
- AND EXISTS (
- SELECT 'x' FROM departments a1 INNER JOIN departments a2 ON a2.lft BETWEEN a1.lft AND a1.rgt AND a2.use_yn = 'Y'
- WHERE 1=1 AND a2.dept_sq = a.dept_sq AND a1.use_yn = 'Y'
- )
- ORDER BY a.usr_level DESC, a.usr_nm ASC ";
-
- $query = $this->db->query($sql);
-
- return $query->getResultArray();
- }
-
public function getTotalCount($data)
{
$sql = "SELECT
diff --git a/app/Models/v2/M711Model.php b/app/Models/v2/M711Model.php
index ba60776..1cae065 100644
--- a/app/Models/v2/M711Model.php
+++ b/app/Models/v2/M711Model.php
@@ -1,9 +1,9 @@
db->query($sql, [$gugun]);
-
- } else if (!empty($sido)) {
- $chk_sido = substr($sido, '0', '2');
-
- if ($chk_sido === '36') {
- $sido = substr($sido, '0', '4');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm " .
- "FROM region_codes a " .
- "LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,4),'000000') " .
- "WHERE a.region_cd LIKE concat(?, '%') " .
- "AND a.region_cd NOT LIKE '%000000' " .
- "AND a.region_cd LIKE '%00' " .
- "AND a.use_yn = 'Y' " .
- "AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000')) " .
- "ORDER BY a.region_nm ASC";
- } else {
- $sido = substr($sido, '0', '2');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,2),'00000000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000000'" .
- " AND a.region_cd LIKE '%00000'" .
- " AND a.use_yn = 'Y'" .
- " AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000'))" .
- " ORDER BY a.region_nm ASC";
- }
-
- $query = $this->db->query($sql, [$sido]);
- } else {
- $sql = "SELECT a.region_cd, a.region_nm " .
- "FROM region_codes a " .
- "WHERE (a.region_cd LIKE '%00000000' " .
- "AND a.use_yn = 'Y') " .
- "OR region_cd = 3611000000;";
-
- $query = $this->db->query($sql);
- }
-
-
- return $query->getResultArray();
- }
-
- // 소속본부조회
- public function getBonbuList()
- {
- $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 depth = 1" .
- " AND use_yn = 'Y'" .
- " ORDER BY lft";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 소속팀 조회
- public function getTeamList()
- {
- $sql = "SELECT dept_sq, pdept_sq, dept_nm" .
- " FROM departments" .
- " WHERE depth = 2" .
- " AND use_yn = 'Y'" .
- " ORDER BY dept_nm";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 유저 조회
- public function getUserList()
- {
- $sql = "SELECT
- a.usr_sq, a.usr_id, a.usr_nm, a.dept_sq
- FROM users a
- WHERE
- a.usr_level IN ('3','4','40','5','50','6','60','61','62','7','8','70')
- AND a.use_yn = 'Y'
- AND EXISTS (
- SELECT 'x' FROM departments a1 INNER JOIN departments a2 ON a2.lft BETWEEN a1.lft AND a1.rgt AND a2.use_yn = 'Y'
- WHERE 1=1 AND a2.dept_sq = a.dept_sq AND a1.use_yn = 'Y'
- )
- ORDER BY a.usr_level DESC, a.usr_nm ASC ";
-
- $query = $this->db->query($sql);
-
- return $query->getResultArray();
- }
public function getTotalCount($data)
{
diff --git a/app/Models/v2/M713Model.php b/app/Models/v2/M713Model.php
index 36c7e91..dafee37 100644
--- a/app/Models/v2/M713Model.php
+++ b/app/Models/v2/M713Model.php
@@ -1,119 +1,10 @@
db->query($sql, [$gugun]);
-
- } else if (!empty($sido)) {
- $chk_sido = substr($sido, '0', '2');
-
- if ($chk_sido === '36') {
- $sido = substr($sido, '0', '4');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm " .
- "FROM region_codes a " .
- "LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,4),'000000') " .
- "WHERE a.region_cd LIKE concat(?, '%') " .
- "AND a.region_cd NOT LIKE '%000000' " .
- "AND a.region_cd LIKE '%00' " .
- "AND a.use_yn = 'Y' " .
- "AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000')) " .
- "ORDER BY a.region_nm ASC";
- } else {
- $sido = substr($sido, '0', '2');
- $sql = "SELECT a.region_cd, TRIM(REPLACE(a.region_nm, b.region_nm, '')) region_nm" .
- " FROM region_codes a" .
- " LEFT JOIN region_codes b ON b.region_cd = CONCAT(SUBSTR(a.region_cd,1,2),'00000000')" .
- " WHERE a.region_cd LIKE concat(?, '%')" .
- " AND a.region_cd NOT LIKE '%00000000'" .
- " AND a.region_cd LIKE '%00000'" .
- " AND a.use_yn = 'Y'" .
- " AND EXISTS (SELECT 'x' FROM region_codes c WHERE c.region_cd LIKE CONCAT(SUBSTR(a.region_cd,1,5),'%') AND c.region_cd > CONCAT(SUBSTR(a.region_cd,1,5),'00000'))" .
- " ORDER BY a.region_nm ASC";
- }
-
- $query = $this->db->query($sql, [$sido]);
- } else {
- $sql = "SELECT a.region_cd, a.region_nm " .
- "FROM region_codes a " .
- "WHERE (a.region_cd LIKE '%00000000' " .
- "AND a.use_yn = 'Y') " .
- "OR region_cd = 3611000000;";
-
- $query = $this->db->query($sql);
- }
-
-
- return $query->getResultArray();
- }
-
- // 소속본부조회
- public function getBonbuList()
- {
- $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 depth = 1" .
- " AND use_yn = 'Y'" .
- " ORDER BY lft";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 소속팀 조회
- public function getTeamList()
- {
- $sql = "SELECT dept_sq, pdept_sq, dept_nm" .
- " FROM departments" .
- " WHERE depth = 2" .
- " AND use_yn = 'Y'" .
- " ORDER BY dept_nm";
-
- $query = $this->db->query($sql);
-
-
- return $query->getResultArray();
- }
-
- // 유저 조회
- public function getUserList()
- {
- $sql = "SELECT
- a.usr_sq, a.usr_id, a.usr_nm, a.dept_sq
- FROM users a
- WHERE
- a.usr_level IN ('3','4','40','5','50','6','60','61','62','7','8','70')
- AND a.use_yn = 'Y'
- AND EXISTS (
- SELECT 'x' FROM departments a1 INNER JOIN departments a2 ON a2.lft BETWEEN a1.lft AND a1.rgt AND a2.use_yn = 'Y'
- WHERE 1=1 AND a2.dept_sq = a.dept_sq AND a1.use_yn = 'Y'
- )
- ORDER BY a.usr_level DESC, a.usr_nm ASC ";
-
- $query = $this->db->query($sql);
-
- return $query->getResultArray();
- }
public function getTotalCount($data)
{
diff --git a/app/Views/layouts/partials/datatables_bs5_css.php b/app/Views/layouts/partials/datatables_bs5_css.php
new file mode 100644
index 0000000..b839ca2
--- /dev/null
+++ b/app/Views/layouts/partials/datatables_bs5_css.php
@@ -0,0 +1,2 @@
+
+
diff --git a/app/Views/layouts/partials/datatables_bs5_js.php b/app/Views/layouts/partials/datatables_bs5_js.php
new file mode 100644
index 0000000..593ac88
--- /dev/null
+++ b/app/Views/layouts/partials/datatables_bs5_js.php
@@ -0,0 +1,3 @@
+
+
+
diff --git a/app/Views/layouts/partials/datatables_css.php b/app/Views/layouts/partials/datatables_css.php
new file mode 100644
index 0000000..a885531
--- /dev/null
+++ b/app/Views/layouts/partials/datatables_css.php
@@ -0,0 +1,2 @@
+
+
diff --git a/app/Views/layouts/partials/datatables_js.php b/app/Views/layouts/partials/datatables_js.php
new file mode 100644
index 0000000..ca7486a
--- /dev/null
+++ b/app/Views/layouts/partials/datatables_js.php
@@ -0,0 +1,2 @@
+
+
diff --git a/app/Views/layouts/partials/datatables_v2_layout_helpers.php b/app/Views/layouts/partials/datatables_v2_layout_helpers.php
new file mode 100644
index 0000000..9007d08
--- /dev/null
+++ b/app/Views/layouts/partials/datatables_v2_layout_helpers.php
@@ -0,0 +1,67 @@
+
\ No newline at end of file
diff --git a/app/Views/pages/article/processible/datecount.php b/app/Views/pages/article/processible/datecount.php
index c9a78c3..858ffda 100644
--- a/app/Views/pages/article/processible/datecount.php
+++ b/app/Views/pages/article/processible/datecount.php
@@ -4,104 +4,38 @@
table th {
text-align: center;
}
-
- .tab-header {
- display: inline;
- }
-
-
처리가능 수량관리
-