Merge branch 'master' of http://192.168.10.243:3000/owrainfo/confirms
This commit is contained in:
@@ -85,6 +85,7 @@ class Filters extends BaseFilters
|
||||
'index.php/login/*', // /index.php/login/*
|
||||
'register', // 회원가입 등
|
||||
'register/*',
|
||||
'/listfax/listfax/getLists',
|
||||
'kiso/*', // 필요하면 API는 예외
|
||||
],
|
||||
],
|
||||
|
||||
@@ -18,6 +18,7 @@ $routes->get('/home', 'Home\Home::dashboard');
|
||||
|
||||
$routes->get('/home/viewStatData', 'Home\Home::viewStatData'); // 실적조회
|
||||
$routes->get('/home/getHomeFaxCount', 'Home\Home::getHomeFaxCount'); // 팩스조회
|
||||
$routes->get('/listfax/listfax/getLists', 'Listfax\ListFax::getLists'); // 팩스수신확인
|
||||
|
||||
/**
|
||||
* 공통 API
|
||||
@@ -51,13 +52,29 @@ $routes->group('board', ['namespace' => 'App\Controllers\Board'], function ($rou
|
||||
$routes->get('notice/download/(:num)', 'Notice::download/$1');
|
||||
});
|
||||
|
||||
/**
|
||||
* 현장확인매물관리
|
||||
*/
|
||||
$routes->group('', ['namespace' => 'App\Controllers\Article'], static function ($routes) {
|
||||
/**
|
||||
* 현장확인매물 내역
|
||||
*/
|
||||
$routes->group('article', static function ($routes) {
|
||||
$routes->get('receipt/lists', 'Receipt::lists');
|
||||
$routes->get('receipt/detail/(:num)', 'Receipt::detail/$1');
|
||||
|
||||
$routes->get('receipt/getResultList', 'Receipt::getResultList');
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 실적관리
|
||||
* 일반확인매물관리
|
||||
*/
|
||||
$routes->group('', ['namespace' => 'App\Controllers\V2'], static function ($routes) {
|
||||
/**
|
||||
* 일반확인매물관리
|
||||
* 확인매물현황
|
||||
*/
|
||||
$routes->group('m701', static function ($routes) {
|
||||
$routes->get('m701a/lists', 'M701::lists');
|
||||
@@ -68,6 +85,222 @@ $routes->group('', ['namespace' => 'App\Controllers\V2'], static function ($rout
|
||||
*/
|
||||
$routes->get('m701a/getResultList', 'M701::getResultList');
|
||||
$routes->get('m701a/excel', 'M701::excel');
|
||||
$routes->post('m701a/chgArticleStatus', 'M701::chgArticleStatus'); // 상태정보변경
|
||||
|
||||
$routes->post('m701a/saveMemo', 'M701::saveMemo'); // 메모저장
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* 배정매물현황
|
||||
*/
|
||||
$routes->group('m702', static function ($routes) {
|
||||
$routes->get('m702a/lists', 'M702::lists');
|
||||
$routes->get('m702a/detail/(:num)', 'M702::detail/$1');
|
||||
|
||||
/**
|
||||
* 배정매물현황 - API
|
||||
*/
|
||||
$routes->get('m702a/getResultList', 'M702::getResultList');
|
||||
$routes->get('m702a/excel', 'M702::excel');
|
||||
$routes->post('m702a/updateAssign', 'M702::updateAssign'); // 배정변경
|
||||
// 서류누락
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 홍보확인서현황
|
||||
*/
|
||||
$routes->group('m703', static function ($routes) {
|
||||
$routes->get('m703a/lists', 'M703::lists');
|
||||
$routes->get('m703a/detail/(:num)', 'M703::detail/$1');
|
||||
|
||||
/**
|
||||
* 홍보확인서현황 - API
|
||||
*/
|
||||
$routes->get('m703a/getResultList', 'M703::getResultList');
|
||||
$routes->get('m703a/excel', 'M703::excel');
|
||||
$routes->post('m703a/saveBunyang', 'M703::saveBunyang'); // 현장확인저장
|
||||
$routes->post('m703a/saveOthers', 'M703::saveOthers'); // 홍보확인서아님
|
||||
$routes->post('m703a/saveDuplicate', 'M703::saveDuplicate'); // 중복
|
||||
$routes->post('m703a/saveBubun', 'M703::saveBubun'); // 부분수신
|
||||
$routes->post('m703a/saveFaxImgs', 'M703::saveFaxImgs'); // 매물정보변경
|
||||
$routes->post('m703a/getNextFaxImgs', 'M703::getNextFaxImgs'); // 다음매물정보조회
|
||||
$routes->post('m703a/saveRequestMessage', 'M703::saveRequestMessage'); // 중개사요청사항저장
|
||||
$routes->post('m703a/saveResult', 'M703::saveResult'); // 결과저장
|
||||
|
||||
/**
|
||||
* 홍보확인서 확인
|
||||
*/
|
||||
$routes->get('m703a/find', 'M703::find');
|
||||
});
|
||||
|
||||
/**
|
||||
* 전화확인매물현황
|
||||
*/
|
||||
$routes->group('m704', static function ($routes) {
|
||||
$routes->get('m704a/lists', 'M704::lists');
|
||||
$routes->get('m704a/detail/(:num)', 'M704::detail/$1');
|
||||
|
||||
/**
|
||||
* 전화확인매물현황 - API
|
||||
*/
|
||||
$routes->get('m704a/getResultList', 'M704::getResultList');
|
||||
$routes->get('m704a/excel', 'M704::excel');
|
||||
$routes->post('m704a/uploadFile', 'M704::uploadFile'); // 파일업로드
|
||||
$routes->post('m704a/saveMemo', 'M704::saveMemo'); // 메모저장
|
||||
$routes->post('m704a/getNextFaxImgs', 'M704::getNextFaxImgs'); // 다음매물확인
|
||||
});
|
||||
|
||||
/**
|
||||
* 등기부등본확인매물현황
|
||||
*/
|
||||
$routes->group('m705', static function ($routes) {
|
||||
$routes->get('m705a/lists', 'M705::lists');
|
||||
$routes->get('m705a/detail/(:num)', 'M705::detail/$1');
|
||||
|
||||
/**
|
||||
* 등기부등본확인매물현황 - API
|
||||
*/
|
||||
$routes->get('m705a/getResultList', 'M705::getResultList');
|
||||
$routes->get('m705a/excel', 'M705::excel');
|
||||
|
||||
$routes->post('m705a/rotateImage', 'M705::rotateImage'); // 이미지 회전
|
||||
$routes->post('m705a/saveCorp', 'M705::saveCorp'); // 법인저장
|
||||
$routes->post('m705a/uploadFile', 'M705::uploadFile'); // 파일업로드
|
||||
|
||||
$routes->post('m705a/getNextInfo', 'M705::getNextInfo'); // 다음매물확인
|
||||
$routes->post('m705a/nextRegi', 'M705::saveRegi'); // 매물저장
|
||||
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* 1차 재검증 매물현황
|
||||
*/
|
||||
$routes->group('m706', static function ($routes) {
|
||||
$routes->get('m706a/lists', 'M706::lists');
|
||||
$routes->get('m706a/detail/(:num)', 'M706::detail/$1');
|
||||
|
||||
/**
|
||||
* 1차 재검증 매물현황 - API
|
||||
*/
|
||||
$routes->get('m706a/getResultList', 'M706::getResultList');
|
||||
$routes->get('m706a/excel', 'M706::excel');
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* 현장확인매물 홍보확인서
|
||||
*/
|
||||
$routes->group('m708', static function ($routes) {
|
||||
$routes->get('m708a/lists', 'M708::lists');
|
||||
$routes->get('m708a/detail/(:num)', 'M708::detail/$1');
|
||||
|
||||
/**
|
||||
* 1차 재검증 매물현황 - API
|
||||
*/
|
||||
$routes->get('m708a/getResultList', 'M708::getResultList');
|
||||
$routes->get('m708a/excel', 'M708::excel');
|
||||
$routes->post('m708a/rotateImage', 'M708::rotateImage'); // 이미지 회전
|
||||
$routes->get('m708a/getArticleInfo', 'M708::getArticleInfo'); // 매물검색
|
||||
$routes->post('m708a/saveNotArticle', 'M708::saveNotArticle'); // 홍보확인서 아님 저장
|
||||
$routes->post('m708a/saveDuplImgs', 'M708::saveDuplImgs'); // 중복으로 저장
|
||||
$routes->post('m708a/saveMobileBunyang', 'M708::saveMobileBunyang'); // 모바일분양권 저장
|
||||
$routes->post('m708a/saveBunyang', 'M708::saveBunyang'); // 분양권 저장
|
||||
$routes->post('m708a/saveRequestMessage', 'M708::saveRequestMessage'); // 중개인 요청사항 저장
|
||||
$routes->post('m708a/saveResult', 'M708::saveResult'); // 결과저장
|
||||
$routes->post('m708a/saveBunyangCnt', 'M708::saveBunyangCnt'); // 분양계약서저장
|
||||
$routes->post('m708a/getNextFaxImgs', 'M708::getNextFaxImgs'); // 다음매물
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* 모바일 추가 서류
|
||||
*/
|
||||
$routes->group('m709', static function ($routes) {
|
||||
$routes->get('m709a/lists', 'M709::lists');
|
||||
$routes->get('m709a/detail/(:num)', 'M709::detail/$1');
|
||||
|
||||
/**
|
||||
* 모바일 추가 서류 - API
|
||||
*/
|
||||
$routes->get('m709a/getResultList', 'M709::getResultList');
|
||||
$routes->get('m709a/excel', 'M709::excel');
|
||||
$routes->post('m709a/rotateImage', 'M709::rotateImage'); // 이미지 회전
|
||||
$routes->get('m709a/getArticleInfo', 'M709::getArticleInfo'); // 매물검색
|
||||
$routes->post('m709a/saveNotArticle', 'M709::saveNotArticle'); // 홍보확인서 아님 저장
|
||||
$routes->post('m709a/saveDuplImgs', 'M709::saveDuplImgs'); // 중복으로 저장
|
||||
$routes->post('m709a/saveAddress', 'M709::saveAddress'); // 정보 저장
|
||||
$routes->post('m709a/saveImageArticle', 'M709::saveImageArticle'); // 확인결과저장
|
||||
$routes->post('m709a/getNextFaxImgs', 'M709::getNextFaxImgs'); // 다음매물
|
||||
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 전송대기매물현황
|
||||
*/
|
||||
$routes->group('m710', static function ($routes) {
|
||||
$routes->get('m710a/lists', 'M710::lists');
|
||||
|
||||
/**
|
||||
* 모바일 추가 서류 - API
|
||||
*/
|
||||
$routes->get('m710a/getResultList', 'M710::getResultList');
|
||||
$routes->get('m710a/excel', 'M710::excel');
|
||||
$routes->get('m710a/sendApi', 'M710::sendApi'); // 전송요청 api 저장
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* 모바일 자동검증
|
||||
*/
|
||||
$routes->group('m711', static function ($routes) {
|
||||
$routes->get('m711a/lists', 'M711::lists');
|
||||
|
||||
/**
|
||||
* 모바일 자동검증 - API
|
||||
*/
|
||||
$routes->get('m711a/getResultList', 'M711::getResultList');
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* 신홍보확인서 현황
|
||||
*/
|
||||
$routes->group('m712', static function ($routes) {
|
||||
$routes->get('m712a/lists', 'M712::lists');
|
||||
$routes->get('m712a/detail/(:num)', 'M712::detail/$1');
|
||||
|
||||
/**
|
||||
* 신홍보확인서 현황 - API
|
||||
*/
|
||||
$routes->get('m712a/getResultList', 'M712::getResultList');
|
||||
$routes->post('m712a/rotateImage', 'M712::rotateImage'); // 이미지 회전
|
||||
$routes->post('m712a/uploadFile', 'M712::uploadFile'); // 파일업로드
|
||||
$routes->post('m712a/saveNotReceived', 'M712::saveNotReceived'); // 서류미수취 저장
|
||||
$routes->post('m712a/saveRegi', 'M712::saveRegi'); // 매물저장
|
||||
$routes->post('m712a/nextRegi', 'M712::nextRegi'); // 다음매물
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* 모바일확인V2 매물현황
|
||||
*/
|
||||
$routes->group('m713', static function ($routes) {
|
||||
$routes->get('m713a/lists', 'M713::lists');
|
||||
$routes->get('m713a/detail/(:num)', 'M713::detail/$1');
|
||||
|
||||
/**
|
||||
* 모바일확인V2 매물현황 - API
|
||||
*/
|
||||
$routes->get('m713a/getResultList', 'M713::getResultList');
|
||||
$routes->get('m713a/excel', 'M713::excel');
|
||||
$routes->post('m713a/rotateImage', 'M713::rotateImage'); // 이미지 회전
|
||||
$routes->post('m713a/saveCorpOwn', 'M713::saveCorpOwn'); // 법인매물저장
|
||||
$routes->post('m713a/saveRegi', 'M713::saveRegi'); // 매물저장
|
||||
$routes->post('m713a/nextRegi', 'M713::nextRegi'); // 다음매물
|
||||
|
||||
});
|
||||
|
||||
|
||||
176
app/Controllers/Article/Receipt.php
Normal file
176
app/Controllers/Article/Receipt.php
Normal file
@@ -0,0 +1,176 @@
|
||||
<?php
|
||||
namespace App\Controllers\Article;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Models\article\ReceiptModel;
|
||||
use App\Models\common\CodeModel;
|
||||
|
||||
class Receipt extends BaseController
|
||||
{
|
||||
private $model, $codeModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->model = new ReceiptModel();
|
||||
$this->codeModel = new CodeModel();
|
||||
}
|
||||
|
||||
public function lists(): string
|
||||
{
|
||||
$codes = $this->codeModel->getCodeLists(['NHN_DEAL_TYPE', 'CP_ID', 'ARTICLE_TYPE', 'VRFCREQ_WAY', 'STEP_VERIFICATION']); // 코드조회
|
||||
$sido = $this->model->getAreaList(); // 지역조회
|
||||
$bonbu = $this->model->getBonbuList();
|
||||
$team = $this->model->getTeamList();
|
||||
$user = $this->model->getUserList();
|
||||
|
||||
$this->data['sido'] = $sido;
|
||||
$this->data['bonbu'] = $bonbu;
|
||||
$this->data['team'] = $team;
|
||||
$this->data['user'] = $user;
|
||||
$this->data['codes'] = $codes;
|
||||
|
||||
|
||||
return view("pages/article/receipt/lists", $this->data);
|
||||
}
|
||||
|
||||
public function getResultList()
|
||||
{
|
||||
$start = (int) $this->request->getGet('start') ?: 0;
|
||||
$end = (int) $this->request->getGet('length') ?: 10;
|
||||
|
||||
$data = [
|
||||
'rcpt_atclno' => $this->request->getGet('rcpt_atclno'), // 매물ID
|
||||
'schDateGb' => $this->request->getGet('schDateGb'), // 일자유형
|
||||
'sdate' => $this->request->getGet('sdate'), // 시작일
|
||||
'edate' => $this->request->getGet('edate'), // 종료일
|
||||
|
||||
'bonbu' => $this->request->getGet('bonbu'), // 본부
|
||||
'team' => $this->request->getGet('team'), // 팀
|
||||
'user' => $this->request->getGet('user'), // 담당자
|
||||
|
||||
'sido' => $this->request->getGet('sido'), // 시도
|
||||
'gugun' => $this->request->getGet('gugun'), // 시군구
|
||||
'dong' => $this->request->getGet('dong'), // 읍면동
|
||||
|
||||
'rcpt_stat1' => $this->request->getGet('rcpt_stat1'), // 상태1
|
||||
'rcpt_stat2' => $this->request->getGet('rcpt_stat2'), // 상태2
|
||||
'rcpt_stat3' => $this->request->getGet('rcpt_stat3'), // 상태3
|
||||
|
||||
'rcpt_product_info1' => $this->request->getGet('rcpt_product_info1'), // 거래구분
|
||||
'exp_movie_yn' => $this->request->getGet('exp_movie_yn'), // 동영상촬영여부
|
||||
'conf_img_yn' => $this->request->getGet('conf_img_yn'), // 홍보확인서여부
|
||||
'parcel_out_yn' => $this->request->getGet('parcel_out_yn'), // 분양권
|
||||
'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // CPID
|
||||
'rcpt_product' => $this->request->getGet('rcpt_product'), // 매물종류
|
||||
'exp_spc_yn' => $this->request->getGet('exp_spc_yn'), // 면적확인
|
||||
'check_list_img_yn' => $this->request->getGet('check_list_img_yn'), // 체크리스트
|
||||
'ground_plan_yn' => $this->request->getGet('ground_plan_yn'), // 평면도유무
|
||||
'ground_plan' => $this->request->getGet('ground_plan'), // 평면도요청
|
||||
|
||||
'direct_trad_yn' => $this->request->getGet('direct_trad_yn'), // 직거래
|
||||
'image_360_yn' => $this->request->getGet('image_360_yn'), // 360촬영여부
|
||||
'srchType' => $this->request->getGet('srchType'), // 검색유형
|
||||
'srchTxt' => $this->request->getGet('srchTxt'), // 검색어
|
||||
];
|
||||
|
||||
$totalCount = $this->model->getTotalCount($data);
|
||||
|
||||
$datas = $this->model->getResultList($start, $end, $data);
|
||||
|
||||
return $this->response->setJSON(body: [
|
||||
'recordsTotal' => $totalCount,
|
||||
'recordsFiltered' => $totalCount,
|
||||
'data' => $datas,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
// 엑셀 다운로드
|
||||
public function excel()
|
||||
{
|
||||
try {
|
||||
|
||||
$data = [
|
||||
'rcpt_atclno' => $this->request->getGet('rcpt_atclno'), // 매물ID
|
||||
'schDateGb' => $this->request->getGet('schDateGb'), // 일자유형
|
||||
'sdate' => $this->request->getGet('sdate'), // 시작일
|
||||
'edate' => $this->request->getGet('edate'), // 종료일
|
||||
|
||||
'bonbu' => $this->request->getGet('bonbu'), // 본부
|
||||
'team' => $this->request->getGet('team'), // 팀
|
||||
'user' => $this->request->getGet('user'), // 담당자
|
||||
|
||||
'sido' => $this->request->getGet('sido'), // 시도
|
||||
'gugun' => $this->request->getGet('gugun'), // 시군구
|
||||
'dong' => $this->request->getGet('dong'), // 읍면동
|
||||
|
||||
'rcpt_stat1' => $this->request->getGet('rcpt_stat1'), // 상태1
|
||||
'rcpt_stat2' => $this->request->getGet('rcpt_stat2'), // 상태2
|
||||
'rcpt_stat3' => $this->request->getGet('rcpt_stat3'), // 상태3
|
||||
|
||||
'rcpt_product_info1' => $this->request->getGet('rcpt_product_info1'), // 거래구분
|
||||
'exp_movie_yn' => $this->request->getGet('exp_movie_yn'), // 동영상촬영여부
|
||||
'conf_img_yn' => $this->request->getGet('conf_img_yn'), // 홍보확인서여부
|
||||
'parcel_out_yn' => $this->request->getGet('parcel_out_yn'), // 분양권
|
||||
'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // CPID
|
||||
'rcpt_product' => $this->request->getGet('rcpt_product'), // 매물종류
|
||||
'exp_spc_yn' => $this->request->getGet('exp_spc_yn'), // 면적확인
|
||||
'check_list_img_yn' => $this->request->getGet('check_list_img_yn'), // 체크리스트
|
||||
'ground_plan_yn' => $this->request->getGet('ground_plan_yn'), // 평면도유무
|
||||
'ground_plan' => $this->request->getGet('ground_plan'), // 평면도요청
|
||||
|
||||
'direct_trad_yn' => $this->request->getGet('direct_trad_yn'), // 직거래
|
||||
'image_360_yn' => $this->request->getGet('image_360_yn'), // 360촬영여부
|
||||
'srchType' => $this->request->getGet('srchType'), // 검색유형
|
||||
'srchTxt' => $this->request->getGet('srchTxt'), // 검색어
|
||||
];
|
||||
|
||||
$datas = $this->model->getExcelList($data);
|
||||
|
||||
return $this->response->setJSON(body: [
|
||||
'data' => $datas,
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
$e->getPrevious()->getTraceAsString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 상세화면
|
||||
public function detail($id)
|
||||
{
|
||||
$id = (int) $id;
|
||||
|
||||
if ($id <= 0) {
|
||||
throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
$codes = $this->codeModel->getCodeLists(['TRADE_TYPE', 'RECEIPT_STATUS2', 'RECEIPT_STATUS3', 'SMS_MSG_TYPE']); // 코드조회
|
||||
$bonbu = $this->model->getBonbuList();
|
||||
$team = $this->model->getTeamList();
|
||||
|
||||
$data = $this->model->getDetail($id);
|
||||
$history = $this->model->getHistory($id);
|
||||
|
||||
$aptGround = $this->model->getAptGround($data['rcpt_dong']);
|
||||
|
||||
|
||||
// 시간대별통계
|
||||
$tmCount = $this->model->getUsrRsrvDateTmCount($id);
|
||||
|
||||
$this->data['codes'] = $codes;
|
||||
$this->data['bonbu'] = $bonbu;
|
||||
$this->data['team'] = $team;
|
||||
|
||||
$this->data['data'] = $data;
|
||||
$this->data['history'] = $history;
|
||||
|
||||
$this->data['apt_ground'] = $aptGround;
|
||||
|
||||
$this->data['tmCount'] = $tmCount;
|
||||
|
||||
|
||||
return view("pages/article/receipt/detail", $this->data);
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,8 @@ use App\Models\listfax\ListFaxModel;
|
||||
class ListFax extends BaseController
|
||||
{
|
||||
|
||||
private $listfaxModel;
|
||||
|
||||
private $todo = ''; // 검색, 엑셀다운 구분
|
||||
private $menuid = ''; // 레프트메뉴아이디
|
||||
|
||||
@@ -38,6 +40,10 @@ class ListFax extends BaseController
|
||||
|
||||
private $pars = [];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->listfaxModel = new ListFaxModel();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
@@ -133,8 +139,7 @@ class ListFax extends BaseController
|
||||
// CI3: $base_uri = '/listfax/listfax/lists';
|
||||
$base_uri = '/listfax/listfax/lists';
|
||||
|
||||
// CI3: $this->load->model('v2/listfax_model', 'listfax_model');
|
||||
$listfaxModel = new ListFaxModel();
|
||||
// CI3: $this->load->model('v2/listfax_model', 'listfax_model');
|
||||
|
||||
// CI3: $this->load->helper('array_helper');
|
||||
helper(filenames: 'array'); // array_helper => array 로 이름 바꿨다면 이렇게
|
||||
@@ -149,7 +154,7 @@ class ListFax extends BaseController
|
||||
'total' => 0,
|
||||
];
|
||||
} else {
|
||||
$resultData = $listfaxModel->getLists(
|
||||
$resultData = $this->listfaxModel->getLists(
|
||||
$this->todo,
|
||||
$this->page,
|
||||
$this->pagesize,
|
||||
@@ -185,4 +190,26 @@ class ListFax extends BaseController
|
||||
return view('listfax/listfax/lists', $data);
|
||||
}
|
||||
|
||||
|
||||
public function getLists()
|
||||
{
|
||||
$start = (int) $this->request->getGet('start') ?: 0;
|
||||
$end = (int) $this->request->getGet('length') ?: 10;
|
||||
|
||||
|
||||
$data = [
|
||||
'caller_no' => $this->request->getGet('caller_no'),
|
||||
];
|
||||
|
||||
$totalCount = $this->listfaxModel->getTotalCount($data);
|
||||
|
||||
$datas = $this->listfaxModel->getResultList($start, $end, $data);
|
||||
|
||||
return $this->response->setJSON(body: [
|
||||
'recordsTotal' => $totalCount,
|
||||
'recordsFiltered' => $totalCount,
|
||||
'data' => $datas,
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -128,17 +128,97 @@ class M701 extends BaseController
|
||||
|
||||
$codes = $this->codeModel->getCodeLists(['VRFCREQ_WAY', 'CONFIRM_RESULT_D11', 'CONFIRM_RESULT_T11', 'CONSULTANT_COMMENT', 'STEP_VERIFICATION', 'TEL_FAIL_CAUSE']); // 코드조회
|
||||
|
||||
$record = $this->model->getRecordInfo($id, '1'); // 홍보확인서
|
||||
$regist = $this->model->getRecordInfo($id, '2'); // 등기부등본
|
||||
$tel = $this->model->getRecordInfo($id, '3'); // 녹취파일
|
||||
$memo = $this->model->getMemo($id); // 메모
|
||||
|
||||
$data = $this->model->getDetail($id);
|
||||
|
||||
$history = $this->model->getHistory($id);
|
||||
|
||||
$this->data['codes'] = $codes;
|
||||
|
||||
$this->data['record'] = $record;
|
||||
$this->data['regist'] = $regist;
|
||||
$this->data['tel'] = $tel;
|
||||
$this->data['memo'] = $memo;
|
||||
|
||||
$this->data['data'] = $data;
|
||||
$this->data['history'] = $history;
|
||||
|
||||
|
||||
return view("pages/v2/m701/detail", $this->data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 상태변경
|
||||
public function chgArticleStatus()
|
||||
{
|
||||
|
||||
try {
|
||||
|
||||
$usrLvl = session('usr_level');
|
||||
|
||||
if (in_array($usrLvl, ['1', '60', '70', '80'])) {
|
||||
|
||||
$data = [
|
||||
'vr_sq' => $this->request->getPost('vr_sq'),
|
||||
'stat_cd' => $this->request->getPost('stat_cd'),
|
||||
];
|
||||
|
||||
// update v2_chg_stat, v2_modify_info, v2_vrfc_req
|
||||
$this->model->chgArticleStatus($data);
|
||||
|
||||
} else {
|
||||
return $this->response->setJSON([
|
||||
'code' => '6',
|
||||
'msg' => '권한이 없습니다.'
|
||||
]);
|
||||
}
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success'
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 전화정보>메모저장
|
||||
public function saveMemo()
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
$data = [
|
||||
'vr_sq' => $this->request->getPost('vr_sq'),
|
||||
'memo' => $this->request->getPost('memo'),
|
||||
];
|
||||
|
||||
// UPDATE v2_vrfc_req
|
||||
$this->model->saveMemo($data);
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success'
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
195
app/Controllers/V2/M702.php
Normal file
195
app/Controllers/V2/M702.php
Normal file
@@ -0,0 +1,195 @@
|
||||
<?php
|
||||
namespace App\Controllers\V2;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Models\common\CodeModel;
|
||||
use App\Models\v2\M702Model;
|
||||
|
||||
class M702 extends BaseController
|
||||
{
|
||||
private $model;
|
||||
private $codeModel;
|
||||
public function __construct()
|
||||
{
|
||||
$this->model = new M702Model();
|
||||
$this->codeModel = new CodeModel();
|
||||
}
|
||||
|
||||
public function lists()
|
||||
{
|
||||
$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);
|
||||
}
|
||||
|
||||
|
||||
public function getResultList()
|
||||
{
|
||||
$start = (int) $this->request->getGet('start') ?: 0;
|
||||
$end = (int) $this->request->getGet('length') ?: 10;
|
||||
|
||||
$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'), // 법인
|
||||
];
|
||||
|
||||
$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 {
|
||||
|
||||
$type = $this->request->getPost('type');
|
||||
$rows = $this->request->getPost('rows');
|
||||
$damdang = $this->request->getPost(index: 'damdang2');
|
||||
|
||||
$rows = json_decode($rows, true);
|
||||
|
||||
if (count($rows) > 0) {
|
||||
|
||||
foreach ($rows as $row) {
|
||||
|
||||
$params = [
|
||||
'vr_sq' => $row['vr_sq'],
|
||||
'type' => $type,
|
||||
'damdang' => $damdang,
|
||||
];
|
||||
|
||||
// UPDATE v2_article_info, v2_vrfc_req
|
||||
$this->model->updateAssign($params);
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => '데이터 누락'
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success'
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 상세화면
|
||||
public function detail($id)
|
||||
{
|
||||
$id = (int) $id;
|
||||
|
||||
if ($id <= 0) {
|
||||
throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
$codes = $this->codeModel->getCodeLists(['VRFCREQ_WAY', 'CONFIRM_RESULT_D11', 'CONFIRM_RESULT_T11', 'CONSULTANT_COMMENT', 'TEL_FAIL_CAUSE']); // 코드조회
|
||||
|
||||
$record = $this->model->getRecordInfo($id, '1'); // 홍보확인서
|
||||
$regist = $this->model->getRecordInfo($id, '2'); // 등기부등본
|
||||
$tel = $this->model->getRecordInfo($id, '3'); // 녹취파일
|
||||
$memo = $this->model->getMemo($id); // 메모
|
||||
|
||||
$data = $this->model->getDetail($id);
|
||||
$history = $this->model->getHistory($id);
|
||||
|
||||
|
||||
$this->data['codes'] = $codes;
|
||||
|
||||
$this->data['record'] = $record;
|
||||
$this->data['regist'] = $regist;
|
||||
$this->data['tel'] = $tel;
|
||||
$this->data['memo'] = $memo;
|
||||
|
||||
$this->data['data'] = $data;
|
||||
$this->data['history'] = $history;
|
||||
|
||||
return view("pages/v2/m702/detail", $this->data);
|
||||
}
|
||||
}
|
||||
621
app/Controllers/V2/M703.php
Normal file
621
app/Controllers/V2/M703.php
Normal file
@@ -0,0 +1,621 @@
|
||||
<?php
|
||||
namespace App\Controllers\V2;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Models\common\CodeModel;
|
||||
use App\Models\results\M415Model;
|
||||
use App\Models\v2\M703Model;
|
||||
use App\Models\v2\M710Model;
|
||||
|
||||
class M703 extends BaseController
|
||||
{
|
||||
|
||||
private $model, $codeModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->model = new M703Model();
|
||||
$this->codeModel = new CodeModel();
|
||||
}
|
||||
|
||||
public function lists()
|
||||
{
|
||||
$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);
|
||||
}
|
||||
|
||||
public function getResultList()
|
||||
{
|
||||
$start = (int) $this->request->getGet('start') ?: 0;
|
||||
$end = (int) $this->request->getGet('length') ?: 10;
|
||||
|
||||
$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'), // 팩스업체
|
||||
];
|
||||
|
||||
$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)
|
||||
{
|
||||
$id = (int) $id;
|
||||
|
||||
if ($id <= 0) {
|
||||
throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
$codes = $this->codeModel->getCodeLists(['CONFIRM_RESULT_D11', 'CONSULTANT_COMMENT', 'TRADE_TYPE', 'VRFCREQ_WAY']); // 코드조회
|
||||
|
||||
$data = $this->model->getDetail($id);
|
||||
|
||||
|
||||
$article = null;
|
||||
$confirm = null;
|
||||
if (!empty($data)) {
|
||||
switch ($data['work_type']) {
|
||||
case "1": // 현장확인 매물
|
||||
$article = $this->model->getArticleInfo1($data['atcl_no']);
|
||||
$article['stat_cd'] = $data['stat_cd'];
|
||||
$confirm = $this->model->getV2Confirm($data['vr_sq'], $data['work_type']);
|
||||
break;
|
||||
case "2": // 일반확인 매물
|
||||
$article = $this->model->getArticleInfo2($data['atcl_no']);
|
||||
$confirm = $this->model->getV2Confirm($data['vr_sq']);
|
||||
break;
|
||||
}
|
||||
|
||||
$this->data['article'] = $article;
|
||||
$this->data['confirm'] = $confirm;
|
||||
}
|
||||
|
||||
// 단지번호
|
||||
$hscp_info = [];
|
||||
if (!empty($article['hscp_no'])) {
|
||||
$apt_rlet_type_cd = ['A01', 'A02', 'A03', 'A04', 'B01', 'B02', 'B03'];
|
||||
$villa_rlet_type_cd = ['A05', 'A06'];
|
||||
if (in_array($article['rlet_type_cd'], $apt_rlet_type_cd)) { // apt 단지
|
||||
// $detail_hscp = $this->call_kiso_api->aptDetail($article['hscp_no']);
|
||||
}
|
||||
|
||||
if (in_array($article['rlet_type_cd'], $villa_rlet_type_cd)) { // villa 단지
|
||||
// $detail_hscp = $this->call_kiso_api->villaDetail($article['hscp_no']);
|
||||
}
|
||||
|
||||
$this->data['hscp_info'] = $hscp_info;
|
||||
}
|
||||
|
||||
|
||||
$memo = $this->model->getMomo($data['vr_sq']);
|
||||
$history = $this->model->getHistory($data['vr_sq'], $data['work_type']);
|
||||
|
||||
$this->data['codes'] = $codes;
|
||||
|
||||
$this->data['data'] = $data;
|
||||
$this->data['memo'] = $memo;
|
||||
$this->data['history'] = $history;
|
||||
|
||||
|
||||
|
||||
return view("pages/v2/m703/detail", $this->data);
|
||||
}
|
||||
|
||||
// 현장확인 저장
|
||||
public function saveBunyang()
|
||||
{
|
||||
try {
|
||||
|
||||
$fax_sq = $this->request->getPost('fax_sq');
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
$atcl_no = $this->request->getPost('atcl_no');
|
||||
//$work_type = $this->request->getPost('work_type');
|
||||
$work_type = '1';
|
||||
$result_d11 = $this->request->getPost('result_d11');
|
||||
$comment_d11 = $this->request->getPost('comment_d11');
|
||||
|
||||
$fax_conf_yn_1 = $this->request->getPost('fax_conf_yn_1');
|
||||
$fax_conf_yn_2 = $this->request->getPost('fax_conf_yn_2');
|
||||
$fax_conf_yn_3 = $this->request->getPost('fax_conf_yn_3');
|
||||
|
||||
$fax_conf_info_1 = $this->request->getPost('fax_conf_info_1');
|
||||
$fax_conf_info_2 = $this->request->getPost('fax_conf_info_2');
|
||||
$fax_conf_info_3 = $this->request->getPost('fax_conf_info_3');
|
||||
|
||||
$resyn = $this->request->getPost('resYn');
|
||||
$dbusageagryn = $this->request->getPost('dbUsageAgrYn');
|
||||
$memo1 = $this->request->getPost('memo_vie'); //메모
|
||||
$memo2 = $this->request->getPost('memo_cal'); //메모
|
||||
|
||||
if (empty($memo1)) {
|
||||
$memo = $memo2;
|
||||
} else {
|
||||
$memo = $memo1;
|
||||
}
|
||||
|
||||
$this->model->saveReceiptFax($memo, $fax_sq, $vr_sq, $atcl_no, $work_type, $result_d11, $comment_d11, $fax_conf_yn_1, $fax_conf_yn_2, $fax_conf_yn_3, $fax_conf_info_1, $fax_conf_info_2, $fax_conf_info_3);
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success'
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 홍보확인서 아님
|
||||
public function saveOthers()
|
||||
{
|
||||
try {
|
||||
|
||||
$fax_sq = $this->request->getPost('fax_sq');
|
||||
|
||||
$this->model->saveNotArticleFax($fax_sq);
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success'
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 중복저장
|
||||
public function saveDuplicate()
|
||||
{
|
||||
try {
|
||||
|
||||
$fax_sq = $this->request->getPost('fax_sq');
|
||||
$atcl_no = $this->request->getPost('atcl_no');
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
|
||||
$this->model->saveDuplicateFax($fax_sq, $atcl_no, $vr_sq);
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success'
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 부분수신
|
||||
public function saveBubun()
|
||||
{
|
||||
try {
|
||||
|
||||
$fax_sq = $this->request->getPost('fax_sq');
|
||||
|
||||
|
||||
$this->model->saveBubunFax($fax_sq);
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success'
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 매물정보 변경
|
||||
public function saveFaxImgs()
|
||||
{
|
||||
try {
|
||||
|
||||
$vr_sq = $this->request->getPost('vr_sq'); // 확인요청순번
|
||||
$atcl_no = $this->request->getPost('atcl_no'); // 매물번호
|
||||
$fax_sq = $this->request->getPost('fax_sq'); // fax 순번
|
||||
$trade_type = $this->request->getPost('trade_type'); // 거래구분
|
||||
$deal_amt = $this->request->getPost('deal_amt'); // 매매가
|
||||
$wrrnt_amt = $this->request->getPost('wrrnt_amt'); // 전세가
|
||||
$lease_amt = $this->request->getPost('lease_amt'); // 월세가
|
||||
$isale_amt = $this->request->getPost('isale_amt'); // 분양가
|
||||
$prem_amt = $this->request->getPost('prem_amt'); // 프리미엄
|
||||
|
||||
|
||||
$this->model->saveFaxImgInfo($fax_sq, $vr_sq, $atcl_no, $trade_type, $deal_amt, $wrrnt_amt, $lease_amt, $isale_amt, $prem_amt);
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success'
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 중개사 요청사항(메모) 저장
|
||||
public function saveRequestMessage()
|
||||
{
|
||||
try {
|
||||
|
||||
$rcpt_sq = $this->request->getPost('vr_sq');
|
||||
$atcl_no = $this->request->getPost('atcl_no');
|
||||
$fax_sq = $this->request->getPost('fax_sq'); // FAX 순번
|
||||
$msg = $this->request->getPost('msg');
|
||||
|
||||
$rsrv_sq = $this->request->getPost('rsrv_sq');
|
||||
|
||||
// UPDATE result
|
||||
$this->model->saveRequestMessage($rcpt_sq, $rsrv_sq, $msg);
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success'
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 다음 매물정보 조회
|
||||
public function getNextFaxImgs()
|
||||
{
|
||||
try {
|
||||
|
||||
$curr_fax_sq = $this->request->getPost('curr_fax_sq');
|
||||
|
||||
$data = $this->model->getNextFaxImgs($curr_fax_sq);
|
||||
|
||||
if (empty($data)) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => 'FAX 이미지가 존재하지 않습니다.'
|
||||
]);
|
||||
} else {
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
'data' => $data
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 결과저장
|
||||
public function saveResult()
|
||||
{
|
||||
try {
|
||||
|
||||
$fax_sq = $this->request->getPost('fax_sq');
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
$atcl_no = $this->request->getPost('atcl_no');
|
||||
$work_type = $this->request->getPost('work_type');
|
||||
$result_d11 = $this->request->getPost('result_d11');
|
||||
$comment_d11 = $this->request->getPost('comment_d11');
|
||||
|
||||
$fax_conf_yn_1 = $this->request->getPost('fax_conf_yn_1');
|
||||
$fax_conf_yn_2 = $this->request->getPost('fax_conf_yn_2');
|
||||
$fax_conf_yn_3 = $this->request->getPost('fax_conf_yn_3');
|
||||
|
||||
$fax_conf_info_1 = $this->request->getPost('fax_conf_info_1');
|
||||
$fax_conf_info_2 = $this->request->getPost('fax_conf_info_2');
|
||||
$fax_conf_info_3 = $this->request->getPost('fax_conf_info_3');
|
||||
|
||||
$resyn = $this->request->getPost('resYn');
|
||||
$dbusageagryn = $this->request->getPost('dbUsageAgrYn');
|
||||
$memo = $this->request->getPost('memo_cal'); //메모
|
||||
|
||||
$m415 = new M415Model();
|
||||
|
||||
|
||||
$article = $this->model->getArticleInfo2($atcl_no, $vr_sq);
|
||||
$v2_vrfc_req = $this->model->get_v2_vrfc_req($vr_sq);
|
||||
|
||||
$stat = intval($article['stat_cd']);
|
||||
if ($stat > 40) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => '이미 저장된 데이터입니다.',
|
||||
]);
|
||||
} else if ($stat == 19) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => '해당 매물은 등록 취소된 매물입니다.',
|
||||
]);
|
||||
} else {
|
||||
|
||||
//거주여부 & DB활용동의여부 수정 UPDATE
|
||||
if (!empty($resyn)) {
|
||||
$this->model->updateResDB($resyn, $dbusageagryn, $vr_sq);
|
||||
}
|
||||
|
||||
// DB에 결과를 저장한다.
|
||||
$return = $this->model->saveArticleFAX($memo, $fax_sq, $vr_sq, $atcl_no, $work_type, $result_d11, $comment_d11, $fax_conf_yn_1, $fax_conf_yn_2, $fax_conf_yn_3, $fax_conf_info_1, $fax_conf_info_2, $fax_conf_info_3);
|
||||
|
||||
if (empty($return['code']) && $work_type == "2") {
|
||||
// 검증센터에 데이터를 전송한다.
|
||||
$m710Model = new M710Model();
|
||||
$sendData = $this->model->getDataConfirmAPI($vr_sq);
|
||||
|
||||
$h_yn = $this->model->get_send_yn('H');
|
||||
if ($h_yn['stop_yn'] == 'N') { //전송금지
|
||||
//1.해당매물정보를v2_stop_api_save_info에다 넣음
|
||||
$m710Model->insert_v2_stop_api_save_info($sendData['atclNo'], $vr_sq, 'H', $fax_sq);
|
||||
|
||||
//2.아무렇지않게 행동한다
|
||||
$send_result['result'] = 'success';
|
||||
} else {
|
||||
// $this->load->library('call_kiso_api');
|
||||
// $send_result = $this->call_kiso_api->confirm($sendData['atclNo'], $sendData['success'], $sendData['checkList'], $sendData['charger'], $sendData['modifyInfo'], $sendData['date']);
|
||||
}
|
||||
|
||||
if ($send_result['result'] == 'success') {
|
||||
$this->model->InsCharger($vr_sq);
|
||||
|
||||
// DB에 상태값을 전송완료로 저장한다.
|
||||
if (empty($sendData['success'])) {
|
||||
$stat_cd = '39'; // 서류/전화 확인 실패
|
||||
$this->model->saveChangeStep($fax_sq, $vr_sq, $stat_cd); // 전송완료 상태로 변경
|
||||
|
||||
if ($fax_conf_info_3 != 'Y' || intval($sendData['try_cnt']) < 1) {
|
||||
$stat_cd = '30';
|
||||
$this->model->saveChangeStep($fax_sq, $vr_sq, $stat_cd);
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => '의뢰인 정보 불일치로 저장되었습니다.',
|
||||
]);
|
||||
}
|
||||
|
||||
if ($sendData['try_cnt'] >= '1') {
|
||||
$stat_cd = '69'; // 검증실패
|
||||
$this->model->saveChangeStep($fax_sq, $vr_sq, $stat_cd); // 전송완료 상태로 변경
|
||||
|
||||
//★ 검증실패면 검증실패시간 업데이트하고 검증소요시간, 전체소요시간 산출
|
||||
//1.서류전화 들어온시간
|
||||
$insert_tm = $m415->getFaxSaveTime($vr_sq);
|
||||
//2.서류/전화 불일치 시간
|
||||
$tel_doc_conf_dt = $m415->getFaxFailTimeForHistory($vr_sq);
|
||||
//3.검증실패시간
|
||||
$finishTime = $m415->get_69_ForHistory($vr_sq);
|
||||
//3.해당 정보를 테이블에 넣는다
|
||||
$m415->insert_v2_time_required_Conf_Done($atcl_no, $article['cpid'], $article['vrfc_type'], $insert_tm['recv_time'], $tel_doc_conf_dt['insert_tm'], $finishTime['insert_tm']);
|
||||
|
||||
$this->model->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0302', '1', 'add'); // 최종실패로 저장
|
||||
|
||||
} else {
|
||||
//★ 1차실패니까 검증실패시간 업데이트하고 검증소요시간 산출
|
||||
//1.서류전화 들어온시간
|
||||
$insert_tm = $m415->getFaxSaveTime($vr_sq);
|
||||
//2.서류/전화 불일치 시간
|
||||
$tel_doc_conf_dt = $m415->getFaxFailTimeForHistory($vr_sq);
|
||||
//3.해당 정보를 테이블에 넣는다
|
||||
$sf = 'F';
|
||||
$m415->insert_v2_time_required_Conf($atcl_no, $article['cpid'], $article['vrfc_type'], $insert_tm['recv_time'], $tel_doc_conf_dt['insert_tm'], $sf);
|
||||
|
||||
$this->model->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0301', '1', 'add'); // 1차실패로 저장
|
||||
}
|
||||
|
||||
$this->model->increseTryCnt($vr_sq);
|
||||
|
||||
if ($result_d11 == '20013') {
|
||||
$this->model->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0203', '1', 'add'); // 기타로 저장
|
||||
} else {
|
||||
$this->model->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0202', '1', 'add'); // 불일치로 저장
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
log_message('debug', '703 save stat_cd = 35 start ::: ' . $vr_sq);
|
||||
$stat_cd = '35'; // 서류/전화 확인 성공
|
||||
$this->model->saveChangeStep($fax_sq, $vr_sq, $stat_cd); // 전송완료 상태로 변경
|
||||
|
||||
if ($article['vrfc_type_sub'] == "D2") {
|
||||
log_message('debug', '703 save stat_cd = 35 D2 ::: ' . $vr_sq);
|
||||
$rgbk_confirm = $this->model->getRgbk_confirm($vr_sq);
|
||||
|
||||
if ($rgbk_confirm == '1') {
|
||||
log_message('debug', '703 save stat_cd = 35 rgbk_confirm ::: ' . $vr_sq);
|
||||
if ($this->model->check_chg_stat49($vr_sq)) {
|
||||
log_message('debug', '703 save stat_cd = 40 savechangeStep ::: ' . $vr_sq);
|
||||
$stat_cd = '40';
|
||||
$this->model->saveChangeStep($fax_sq, $vr_sq, $stat_cd); // 등기부등본 확인중 상태로 변경..
|
||||
}
|
||||
|
||||
//★등기 로 넘어갈때
|
||||
//1.서류전화 들어온시간
|
||||
$insert_tm = $m415->getFaxSaveTime($vr_sq);
|
||||
log_message('debug', '703 save stat_cd = 35 insert_tm ::: ' . $insert_tm['recv_time']);
|
||||
//2.서류/전화 확인일자
|
||||
$tel_doc_conf_dt = $m415->get_cert_ing_TimeForHistory($vr_sq);
|
||||
log_message('debug', '703 save stat_cd = 35 tel_doc_conf_dt ::: ' . $tel_doc_conf_dt['insert_tm']);
|
||||
|
||||
//3.해당 정보를 테이블에 넣는다
|
||||
if (empty($tel_doc_conf_dt)) {
|
||||
$tel_doc_conf_dt['insert_tm'] = date("Y-m-d H:i:s");
|
||||
log_message('debug', '703 save stat_cd = 35 tel_doc_conf_dt null ::: ' . $tel_doc_conf_dt['insert_tm']);
|
||||
}
|
||||
|
||||
$sf = 'T';
|
||||
$m415->insert_v2_time_required_Conf($atcl_no, $article['cpid'], $article['vrfc_type'], $insert_tm['recv_time'], $tel_doc_conf_dt['insert_tm'], $sf);
|
||||
log_message('debug', '703 save stat_cd = 35 insert_v2_time_required_Conf ::: ' . json_encode(array($atcl_no, $article['cpid'], $article['vrfc_type'], $insert_tm['recv_time'], $tel_doc_conf_dt['insert_tm'], $sf)));
|
||||
|
||||
$this->model->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0201', '1', 'add'); // 일치로 저장
|
||||
|
||||
} else {
|
||||
$stat_cd = '60';
|
||||
$this->model->saveChangeStep($fax_sq, $vr_sq, $stat_cd); // 검증완료 상태로 변경
|
||||
|
||||
//★검증완료일때
|
||||
//0.불일치 이력이 있는지 확인
|
||||
$cnt = $m415->getFaxFailTimeForHistory($vr_sq);
|
||||
if (empty($cnt)) { //검증완료일땐 불일치가없어야 통계포함된다
|
||||
//1.서류전화 들어온시간
|
||||
$insert_tm = $m415->getFaxSaveTime($vr_sq);
|
||||
//2.서류/전화 확인일자
|
||||
$tel_doc_conf_dt = $m415->getConfTimeForHistory($vr_sq);
|
||||
//3.검증시간
|
||||
$finishTime = $m415->get_60_ForHistory($vr_sq);
|
||||
//3.해당 정보를 테이블에 넣는다
|
||||
$m415->insert_v2_time_required_Conf_Done($atcl_no, $article['cpid'], $article['vrfc_type'], $insert_tm['recv_time'], $tel_doc_conf_dt['insert_tm'], $finishTime['insert_tm']);
|
||||
}
|
||||
$this->model->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0205', '1', 'add'); // 홍보확인서완료 등기부등본확인 안함 저장
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
$return = $send_result['error'];
|
||||
$err_time = date("Y-m-d H:i:s");
|
||||
$this->model->saveApiErr($fax_sq, $send_result['error']['code'], $send_result['error']['message'], $err_time, $v2_vrfc_req['atcl_no']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 홍보확인서 확인
|
||||
public function find()
|
||||
{
|
||||
$fax = $this->model->getOneFax();
|
||||
|
||||
if (empty($fax)) {
|
||||
return redirect()->back()
|
||||
->with('alert', '새로운 FAX가 존재하지 않습니다.');
|
||||
}
|
||||
|
||||
|
||||
return redirect()->to('/m703/m703a/detail/' . $fax['fax_sq']);
|
||||
}
|
||||
}
|
||||
282
app/Controllers/V2/M704.php
Normal file
282
app/Controllers/V2/M704.php
Normal file
@@ -0,0 +1,282 @@
|
||||
<?php
|
||||
namespace App\Controllers\V2;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Libraries\MyUpload;
|
||||
use App\Models\common\CodeModel;
|
||||
use App\Models\v2\M704Model;
|
||||
|
||||
class M704 extends BaseController
|
||||
{
|
||||
private $model, $codeModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->model = new M704Model();
|
||||
$this->codeModel = new CodeModel();
|
||||
}
|
||||
|
||||
public function lists(): string
|
||||
{
|
||||
$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);
|
||||
}
|
||||
|
||||
|
||||
public function getResultList()
|
||||
{
|
||||
$start = (int) $this->request->getGet('start') ?: 0;
|
||||
$end = (int) $this->request->getGet('length') ?: 10;
|
||||
|
||||
$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'), // 법인
|
||||
];
|
||||
|
||||
$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)
|
||||
{
|
||||
$id = (int) $id;
|
||||
|
||||
if ($id <= 0) {
|
||||
throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
$codes = $this->codeModel->getCodeLists(['VRFCREQ_WAY', 'CONFIRM_RESULT_D11', 'CONFIRM_RESULT_T11', 'TEL_FAIL_CAUSE']); // 코드조회
|
||||
|
||||
$data = $this->model->getDetail($id);
|
||||
$memo = $this->model->getMemo($id);
|
||||
$history = $this->model->getHistory($id);
|
||||
|
||||
$regist2 = $this->model->oneGetRecordInfo($id, "2"); //등기부등본
|
||||
$phone_list = $this->model->getPhoneNumber(); // 주택임대사업자번호 리스트
|
||||
$tel = $this->model->getRecordInfo($id, '3'); //녹취파일
|
||||
|
||||
$this->data['codes'] = $codes;
|
||||
|
||||
$this->data['data'] = $data;
|
||||
$this->data['memo'] = $memo;
|
||||
$this->data['history'] = $history;
|
||||
$this->data['regist2'] = $regist2;
|
||||
$this->data['phone_list'] = $phone_list;
|
||||
$this->data['tel'] = $tel;
|
||||
|
||||
return view("pages/v2/m704/detail", $this->data);
|
||||
}
|
||||
|
||||
// 파일업로드
|
||||
public function uploadFile()
|
||||
{
|
||||
$lib = new MyUpload();
|
||||
|
||||
try {
|
||||
$usr_id = session('usr_id');
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
|
||||
$file = $this->request->getFile('file');
|
||||
|
||||
if ($file && $file->isValid() && !$file->hasMoved()) {
|
||||
|
||||
$uploadPath = "/upload/v2_file/multi_" . $vr_sq . "/";
|
||||
|
||||
$arrUploadfile = [];
|
||||
if ($file->isValid() && !$file->hasMoved()) {
|
||||
$uploadData = $lib->do_upload2($file, $uploadPath);
|
||||
|
||||
if ($uploadData !== false) {
|
||||
$arrUploadfile[] = $uploadData;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($arrUploadfile)) {
|
||||
foreach ($arrUploadfile as $key => $uploadFile) {
|
||||
$data = [
|
||||
'vr_sq' => $vr_sq,
|
||||
// 'file_sq' => $this->request->getPost('file_sq'),
|
||||
'orig_name' => $uploadFile['origin_name'],
|
||||
'new_name' => $uploadFile['file_name'],
|
||||
'file_path' => $uploadPath, // 필요에 따라 상대경로로만 저장
|
||||
'ext' => '.' . $uploadFile['ext'],
|
||||
'size' => $file->getSize(),
|
||||
'img_yn' => null,
|
||||
'img_height' => null,
|
||||
'img_width' => null,
|
||||
'usr_id' => $usr_id,
|
||||
];
|
||||
}
|
||||
|
||||
if (!empty($data)) {
|
||||
// 파일업로드 이력 저장
|
||||
$this->model->saveChangedHistory($vr_sq, '30', 'C26', $usr_id, '녹취파일 업로드');
|
||||
|
||||
// 파일업로드 정보 저장
|
||||
$this->model->saveFileInfo($data);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success'
|
||||
]);
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 메모저장
|
||||
public function saveMemo()
|
||||
{
|
||||
try {
|
||||
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
$memo = $this->request->getPost('memo');
|
||||
|
||||
$data = [
|
||||
$memo,
|
||||
$vr_sq,
|
||||
];
|
||||
|
||||
// UPDATE v2_vrfc_req
|
||||
$this->model->saveMemo($data);
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success'
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 다음 매물정보 조회
|
||||
public function getNextTelInfo()
|
||||
{
|
||||
try {
|
||||
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
|
||||
$data = $this->model->getNextTelInfo($vr_sq);
|
||||
|
||||
if (empty($data)) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => '전화매물이 존재하지 않습니다.'
|
||||
]);
|
||||
} else {
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
'data' => $data
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
350
app/Controllers/V2/M705.php
Normal file
350
app/Controllers/V2/M705.php
Normal file
@@ -0,0 +1,350 @@
|
||||
<?php
|
||||
namespace App\Controllers\V2;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Libraries\Common;
|
||||
use App\Libraries\MyUpload;
|
||||
use App\Models\common\CodeModel;
|
||||
use App\Models\v2\M705Model;
|
||||
|
||||
class M705 extends BaseController
|
||||
{
|
||||
|
||||
private $model, $codeModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->model = new M705Model();
|
||||
$this->codeModel = new CodeModel();
|
||||
}
|
||||
|
||||
public function lists(): string
|
||||
{
|
||||
$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);
|
||||
}
|
||||
|
||||
public function getResultList()
|
||||
{
|
||||
$start = (int) $this->request->getGet('start') ?: 0;
|
||||
$end = (int) $this->request->getGet('length') ?: 10;
|
||||
|
||||
$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'), // 법인
|
||||
];
|
||||
|
||||
$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 {
|
||||
|
||||
$res = $this->model->getNotAssign();
|
||||
|
||||
if (empty($res)) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => '미배정건이 존재하지 않습니다.'
|
||||
]);
|
||||
}
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
'res' => $res['vr_sq'],
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 엑셀 다운로드
|
||||
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)
|
||||
{
|
||||
$id = (int) $id;
|
||||
|
||||
if ($id <= 0) {
|
||||
throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
$codes = $this->codeModel->getCodeLists(['VRFCREQ_WAY', 'CONFIRM_RESULT_D11', 'CONFIRM_RESULT_T11', 'TRADE_TYPE', 'CERT_UNCNFRM_STATUS']); // 코드조회
|
||||
|
||||
$data = $this->model->getDetail($id);
|
||||
$record = $this->model->getRecordInfo($id, '1'); // 홍보확인서
|
||||
$regist = $this->model->getRecordInfo($id, '2'); // 등기부등본
|
||||
$memo = $this->model->getMemo($id); // 메모
|
||||
$display = $this->model->getDisplay('M705_detail');
|
||||
$reference = $this->model->getAllRecordInfo($id, '7'); //참고용파일 (2017.09.26 추가)
|
||||
|
||||
$this->data['codes'] = $codes;
|
||||
$this->data['data'] = $data;
|
||||
$this->data['record'] = $record;
|
||||
$this->data['regist'] = $regist;
|
||||
$this->data['memo'] = $memo;
|
||||
$this->data['display'] = $display;
|
||||
$this->data['reference'] = $reference;
|
||||
|
||||
return view("pages/v2/m705/detail", $this->data);
|
||||
}
|
||||
|
||||
// 이미지회전
|
||||
public function rotateImage()
|
||||
{
|
||||
$common = new Common();
|
||||
|
||||
try {
|
||||
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
$degress = $this->request->getPost('degress');
|
||||
|
||||
if (empty($degrees) || !is_numeric($degrees)) {
|
||||
$degrees = 90;
|
||||
}
|
||||
|
||||
$regist = $this->model->getRecordInfo($vr_sq, '2');
|
||||
$fullPath = $regist['file_path'] . $regist['file_name'];
|
||||
$fullPath = $_SERVER['DOCUMENT_ROOT'] . $common->realpath_to_webpath($fullPath);
|
||||
|
||||
$degrees = (float) $degrees;
|
||||
|
||||
$im = new \Imagick($fullPath);
|
||||
|
||||
// 배경색(회전 시 빈 공간 채우는 색). 투명 원하면 'transparent'
|
||||
$im->setImageBackgroundColor(new \ImagickPixel('white'));
|
||||
|
||||
// 회전
|
||||
$im->rotateImage($im->getImageBackgroundColor(), $degrees);
|
||||
|
||||
// 포맷/압축 유지(옵션)
|
||||
$im->setImageCompressionQuality(90);
|
||||
|
||||
// 덮어쓰기
|
||||
$im->writeImage($fullPath);
|
||||
|
||||
$im->clear();
|
||||
$im->destroy();
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 법인저장
|
||||
public function saveCorp()
|
||||
{
|
||||
try {
|
||||
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
$atcl_no = $this->request->getPost('atcl_no');
|
||||
|
||||
$this->model->saveCorp($vr_sq, $atcl_no);
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 파일업로드
|
||||
public function uploadFile()
|
||||
{
|
||||
$lib = new MyUpload();
|
||||
|
||||
try {
|
||||
$usr_id = session('usr_id');
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
|
||||
$file = $this->request->getFile('file');
|
||||
|
||||
if ($file && $file->isValid() && !$file->hasMoved()) {
|
||||
|
||||
$uploadPath = "/upload/v2_file/" . $vr_sq . "/";
|
||||
|
||||
$arrUploadfile = [];
|
||||
if ($file->isValid() && !$file->hasMoved()) {
|
||||
$uploadData = $lib->do_upload2($file, $uploadPath);
|
||||
|
||||
if ($uploadData !== false) {
|
||||
$arrUploadfile[] = $uploadData;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($arrUploadfile)) {
|
||||
foreach ($arrUploadfile as $key => $uploadFile) {
|
||||
$data = [
|
||||
'vr_sq' => $vr_sq,
|
||||
// 'file_sq' => $this->request->getPost('file_sq'),
|
||||
'orig_name' => $uploadFile['origin_name'],
|
||||
'new_name' => $uploadFile['file_name'],
|
||||
'file_path' => $uploadPath, // 필요에 따라 상대경로로만 저장
|
||||
'ext' => '.' . $uploadFile['ext'],
|
||||
'size' => $file->getSize(),
|
||||
'img_yn' => null,
|
||||
'img_height' => null,
|
||||
'img_width' => null,
|
||||
'usr_id' => $usr_id,
|
||||
];
|
||||
}
|
||||
|
||||
if (!empty($data)) {
|
||||
|
||||
// 파일업로드 정보 저장
|
||||
$this->model->saveFileInfo($data);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success'
|
||||
]);
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 다음매물 확인
|
||||
public function getNextInfo()
|
||||
{
|
||||
try {
|
||||
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
|
||||
$data = $this->model->getNextInfo($vr_sq);
|
||||
|
||||
if (empty($data)) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => '등기부등본 이미지가 존재하지 않습니다.'
|
||||
]);
|
||||
} else {
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
'resw' => $data['vr_sq']
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
139
app/Controllers/V2/M706.php
Normal file
139
app/Controllers/V2/M706.php
Normal file
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
namespace App\Controllers\V2;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Models\common\CodeModel;
|
||||
use App\Models\v2\M706Model;
|
||||
|
||||
class M706 extends BaseController
|
||||
{
|
||||
private $model, $codeModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->model = new M706Model();
|
||||
$this->codeModel = new CodeModel();
|
||||
}
|
||||
|
||||
public function lists(): string
|
||||
{
|
||||
$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);
|
||||
}
|
||||
|
||||
public function getResultList()
|
||||
{
|
||||
$start = (int) $this->request->getGet('start') ?: 0;
|
||||
$end = (int) $this->request->getGet('length') ?: 10;
|
||||
|
||||
$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'), // 매체사
|
||||
];
|
||||
|
||||
$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)
|
||||
{
|
||||
$id = (int) $id;
|
||||
|
||||
if ($id <= 0) {
|
||||
throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
$codes = $this->codeModel->getCodeLists(['VRFCREQ_WAY', 'CONFIRM_RESULT_D11', 'CONFIRM_RESULT_T11', 'CONSULTANT_COMMENT', 'TEL_FAIL_CAUSE']); // 코드조회
|
||||
$record = $this->model->getRecordInfo($id, '1'); //홍보확인서
|
||||
$regist = $this->model->getRecordInfo($id, '2'); //등기부등본
|
||||
|
||||
$data = $this->model->getDetail($id);
|
||||
$memo = $this->model->getMemo($id);
|
||||
$history = $this->model->getHistory($id);
|
||||
|
||||
$this->data['codes'] = $codes;
|
||||
$this->data['regist'] = $regist;
|
||||
$this->data['record'] = $record;
|
||||
|
||||
$this->data['data'] = $data;
|
||||
$this->data['memo'] = $memo;
|
||||
$this->data['history'] = $history;
|
||||
|
||||
|
||||
return view("pages/v2/m706/detail", $this->data);
|
||||
|
||||
}
|
||||
}
|
||||
458
app/Controllers/V2/M708.php
Normal file
458
app/Controllers/V2/M708.php
Normal file
@@ -0,0 +1,458 @@
|
||||
<?php
|
||||
namespace App\Controllers\V2;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Libraries\Common;
|
||||
use App\Models\common\CodeModel;
|
||||
use App\Models\v2\M708Model;
|
||||
|
||||
class M708 extends BaseController
|
||||
{
|
||||
private $model, $codeModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->model = new M708Model();
|
||||
$this->codeModel = new CodeModel();
|
||||
}
|
||||
|
||||
public function lists(): string
|
||||
{
|
||||
$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);
|
||||
}
|
||||
|
||||
public function getResultList()
|
||||
{
|
||||
$start = (int) $this->request->getGet('start') ?: 0;
|
||||
$end = (int) $this->request->getGet('length') ?: 10;
|
||||
|
||||
$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'), // 검증방식
|
||||
];
|
||||
|
||||
$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 = (int) $id;
|
||||
|
||||
if ($id <= 0) {
|
||||
throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
$codes = $this->codeModel->getCodeLists(['CONFIRM_RESULT_D11', 'CONSULTANT_COMMENT']); // 코드조회
|
||||
|
||||
$data = $this->model->getDetail($id);
|
||||
$memo = $this->model->getMemo($id);
|
||||
|
||||
|
||||
$article = null;
|
||||
$confirm = null;
|
||||
if (!empty($data)) {
|
||||
switch ($data['work_type']) {
|
||||
case "1": // 현장확인 매물
|
||||
$article = $this->model->getArticleInfo1($data['atcl_no']);
|
||||
$article['stat_cd'] = $data['stat_cd'];
|
||||
$confirm = $this->model->getV2Confirm($data['vr_sq'], $data['work_type']);
|
||||
break;
|
||||
case "2": // 일반확인 매물
|
||||
$article = $this->model->getArticleInfo2($data['atcl_no']);
|
||||
$confirm = $this->model->getV2Confirm($data['vr_sq']);
|
||||
break;
|
||||
}
|
||||
|
||||
$this->data['article'] = $article;
|
||||
$this->data['confirm'] = $confirm;
|
||||
}
|
||||
|
||||
$history = $this->model->getHistory($data['vr_sq']);
|
||||
|
||||
$this->data['codes'] = $codes;
|
||||
$this->data['data'] = $data;
|
||||
$this->data['memo'] = $memo;
|
||||
$this->data['history'] = $history;
|
||||
|
||||
|
||||
return view("pages/v2/m708/detail", $this->data);
|
||||
}
|
||||
|
||||
|
||||
// 이미지회전
|
||||
public function rotateImage()
|
||||
{
|
||||
$common = new Common();
|
||||
|
||||
try {
|
||||
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
$degress = $this->request->getPost('degress');
|
||||
|
||||
if (empty($degrees) || !is_numeric($degrees)) {
|
||||
$degrees = 90;
|
||||
}
|
||||
|
||||
$regist = $this->model->getRecordInfo($vr_sq, '2');
|
||||
$fullPath = $regist['file_path'] . $regist['file_name'];
|
||||
$fullPath = $_SERVER['DOCUMENT_ROOT'] . $common->realpath_to_webpath($fullPath);
|
||||
|
||||
$degrees = (float) $degrees;
|
||||
|
||||
$im = new \Imagick($fullPath);
|
||||
|
||||
// 배경색(회전 시 빈 공간 채우는 색). 투명 원하면 'transparent'
|
||||
$im->setImageBackgroundColor(new \ImagickPixel('white'));
|
||||
|
||||
// 회전
|
||||
$im->rotateImage($im->getImageBackgroundColor(), $degrees);
|
||||
|
||||
// 포맷/압축 유지(옵션)
|
||||
$im->setImageCompressionQuality(90);
|
||||
|
||||
// 덮어쓰기
|
||||
$im->writeImage($fullPath);
|
||||
|
||||
$im->clear();
|
||||
$im->destroy();
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 매물검색
|
||||
public function getArticleInfo()
|
||||
{
|
||||
try {
|
||||
|
||||
$atcl_no = $this->request->getGet('atcl_no');
|
||||
|
||||
$row = $this->model->getArticleInfo($atcl_no);
|
||||
|
||||
|
||||
if (empty($row)) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => '매물이 존재하지 않습니다.',
|
||||
]);
|
||||
}
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
'atcl_no' => $row['vr_sq'],
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 홍보확인서 아님 저장
|
||||
public function saveNotArticle()
|
||||
{
|
||||
try {
|
||||
|
||||
$fax_sq = $this->request->getPost('fax_sq');
|
||||
|
||||
$this->model->saveNotArticle($fax_sq);
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 중복으로 저장
|
||||
public function saveDuplImgs()
|
||||
{
|
||||
try {
|
||||
|
||||
$fax_sq = $this->request->getPost('fax_sq');
|
||||
$atcl_no = $this->request->getPost('atcl_no');
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
|
||||
$this->model->saveDuplImgs($fax_sq, $atcl_no, $vr_sq);
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 모바일 분양권 저장
|
||||
public function saveMobileBunyang()
|
||||
{
|
||||
try {
|
||||
|
||||
$fax_sq = $this->request->getPost('fax_sq');
|
||||
$atcl_no = $this->request->getPost('atcl_no');
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
|
||||
$this->model->saveMobileBunyang($fax_sq, $atcl_no, $vr_sq);
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 분양권 저장
|
||||
public function saveBunyang()
|
||||
{
|
||||
try {
|
||||
|
||||
$fax_sq = $this->request->getPost('fax_sq');
|
||||
|
||||
$this->model->saveBunyang($fax_sq);
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 중개인 요청사항 저장
|
||||
public function saveRequestMessage()
|
||||
{
|
||||
$rcpt_sq = $this->request->getPost('vr_sq');
|
||||
$atcl_no = $this->request->getPost('atcl_no');
|
||||
$fax_sq = $this->request->getPost('fax_sq'); // FAX 순번
|
||||
$msg = $this->request->getPost('msg');
|
||||
|
||||
$rsrv_sq = $this->request->getPost('rsrv_sq');
|
||||
|
||||
// UPDATE result
|
||||
$this->model->saveRequestMessage($rcpt_sq, $rsrv_sq, $msg);
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success'
|
||||
]);
|
||||
}
|
||||
|
||||
// 확인결과 저장
|
||||
public function saveResult()
|
||||
{
|
||||
try {
|
||||
$fax_sq = $this->request->getPost('fax_sq');
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
$atcl_no = $this->request->getPost('atcl_no');
|
||||
$work_type = $this->request->getPost('work_type');
|
||||
$file_type = $this->request->getPost('file_type');
|
||||
|
||||
$resyn = $this->request->getPost('resYn');
|
||||
$dbusageagryn = $this->request->getPost('dbUsageAgrYn');
|
||||
$send_yn = 'Y';
|
||||
|
||||
$article = $this->model->getArticleInfo2($atcl_no, $vr_sq);
|
||||
$v2_vrfc_req = $this->model->get_v2_vrfc_req($vr_sq);
|
||||
|
||||
if (intval($article['stat_cd']) >= 40) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => '이미 저장된 데이터입니다.',
|
||||
]);
|
||||
} else {
|
||||
|
||||
// 거주여부 & DB활용동의여부 수정 UPDATE
|
||||
if (!empty($resyn)) {
|
||||
$this->model->updateResDb($resyn, $dbusageagryn, $vr_sq);
|
||||
}
|
||||
|
||||
// DB에 결과 저장
|
||||
// $this->model->saveHongBoFAX($fax_sq, $vr_sq, $atcl_no, $work_type, $send_yn, $result_d11, $comment_d11, $fax_conf_yn_1, $fax_conf_yn_2, $fax_conf_yn_3, $fax_conf_info_1, $fax_conf_info_2, $fax_conf_info_3, $file_type);
|
||||
|
||||
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 분양계약서 저장
|
||||
public function saveBunyangCnt()
|
||||
{
|
||||
try {
|
||||
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 다음 매물정보 조회
|
||||
public function getNextFaxImgs()
|
||||
{
|
||||
try {
|
||||
|
||||
$curr_fax_sq = $this->request->getPost('curr_fax_sq');
|
||||
|
||||
$data = $this->model->getNextFaxImgs($curr_fax_sq);
|
||||
|
||||
if (empty($data)) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => 'FAX 이미지가 존재하지 않습니다.'
|
||||
]);
|
||||
} else {
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
'data' => $data
|
||||
]);
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
398
app/Controllers/V2/M709.php
Normal file
398
app/Controllers/V2/M709.php
Normal file
@@ -0,0 +1,398 @@
|
||||
<?php
|
||||
namespace App\Controllers\V2;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Libraries\Common;
|
||||
use App\Models\common\CodeModel;
|
||||
use App\Models\v2\M709Model;
|
||||
|
||||
class M709 extends BaseController
|
||||
{
|
||||
private $model, $codeModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->model = new M709Model();
|
||||
$this->codeModel = new CodeModel();
|
||||
}
|
||||
|
||||
public function lists(): string
|
||||
{
|
||||
$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);
|
||||
}
|
||||
|
||||
|
||||
public function getResultList()
|
||||
{
|
||||
$start = (int) $this->request->getGet('start') ?: 0;
|
||||
$end = (int) $this->request->getGet('length') ?: 10;
|
||||
|
||||
$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'), // 검증방식
|
||||
];
|
||||
|
||||
$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 = (int) $id;
|
||||
|
||||
if ($id <= 0) {
|
||||
throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
$codes = $this->codeModel->getCodeLists(['CONFIRM_RESULT_D11', 'CONSULTANT_COMMENT']); // 코드조회
|
||||
|
||||
$data = $this->model->getDetail($id);
|
||||
$memo = $this->model->getMemo($id);
|
||||
|
||||
|
||||
|
||||
$article = null;
|
||||
$confirm = null;
|
||||
if (!empty($data)) {
|
||||
switch ($data['work_type']) {
|
||||
case "1": // 현장확인 매물
|
||||
$article = $this->model->getArticleInfo1($data['atcl_no']);
|
||||
break;
|
||||
case "2": // 일반확인 매물
|
||||
$article = $this->model->getArticleInfo2($data['atcl_no']);
|
||||
break;
|
||||
}
|
||||
|
||||
$this->data['article'] = $article;
|
||||
$this->data['confirm'] = $confirm;
|
||||
}
|
||||
|
||||
// dd($data);
|
||||
// exit;
|
||||
|
||||
$history = $this->model->getHistory($id);
|
||||
|
||||
$this->data['codes'] = $codes;
|
||||
$this->data['data'] = $data;
|
||||
$this->data['memo'] = $memo;
|
||||
$this->data['history'] = $history;
|
||||
|
||||
return view("pages/v2/m709/detail", $this->data);
|
||||
}
|
||||
|
||||
|
||||
// 이미지회전
|
||||
public function rotateImage()
|
||||
{
|
||||
$common = new Common();
|
||||
|
||||
try {
|
||||
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
$degress = $this->request->getPost('degress');
|
||||
|
||||
if (empty($degrees) || !is_numeric($degrees)) {
|
||||
$degrees = 90;
|
||||
}
|
||||
|
||||
$regist = $this->model->getRecordInfo($vr_sq, '2');
|
||||
$fullPath = $regist['file_path'] . $regist['file_name'];
|
||||
$fullPath = $_SERVER['DOCUMENT_ROOT'] . $common->realpath_to_webpath($fullPath);
|
||||
|
||||
$degrees = (float) $degrees;
|
||||
|
||||
$im = new \Imagick($fullPath);
|
||||
|
||||
// 배경색(회전 시 빈 공간 채우는 색). 투명 원하면 'transparent'
|
||||
$im->setImageBackgroundColor(new \ImagickPixel('white'));
|
||||
|
||||
// 회전
|
||||
$im->rotateImage($im->getImageBackgroundColor(), $degrees);
|
||||
|
||||
// 포맷/압축 유지(옵션)
|
||||
$im->setImageCompressionQuality(90);
|
||||
|
||||
// 덮어쓰기
|
||||
$im->writeImage($fullPath);
|
||||
|
||||
$im->clear();
|
||||
$im->destroy();
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 매물검색
|
||||
public function getArticleInfo()
|
||||
{
|
||||
try {
|
||||
|
||||
$atcl_no = $this->request->getGet('atcl_no');
|
||||
|
||||
$row = $this->model->getArticleInfo($atcl_no);
|
||||
|
||||
|
||||
if (empty($row)) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => '매물이 존재하지 않습니다.',
|
||||
]);
|
||||
}
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
'atcl_no' => $row['vr_sq'],
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 홍보확인서 아님 저장
|
||||
public function saveNotArticle()
|
||||
{
|
||||
try {
|
||||
|
||||
$fax_sq = $this->request->getPost('fax_sq');
|
||||
|
||||
$this->model->saveNotArticle($fax_sq);
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 중복으로 저장
|
||||
public function saveDuplImgs()
|
||||
{
|
||||
try {
|
||||
|
||||
$fax_sq = $this->request->getPost('fax_sq');
|
||||
$atcl_no = $this->request->getPost('atcl_no');
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
|
||||
$this->model->saveDuplImgs($fax_sq, $atcl_no, $vr_sq);
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 정보저장
|
||||
public function saveAddress()
|
||||
{
|
||||
try {
|
||||
|
||||
$vr_sq = $this->request->getPost('vr_sq'); // 확인요청순번
|
||||
$atcl_no = $this->request->getPost('atcl_no'); // 매물번호
|
||||
$fax_sq = $this->request->getPost('fax_sq'); // fax 순번
|
||||
$address2 = $this->request->getPost('address2'); // 상세주소1
|
||||
$address3 = $this->request->getPost('address3'); // 상세주소2
|
||||
$trade_type = $this->request->getPost('trade_type'); // 거래구분
|
||||
$floor = $this->request->getPost('floor'); // 층
|
||||
$floor2 = $this->request->getPost('floor2'); // 총층
|
||||
|
||||
|
||||
$data = [
|
||||
'vr_sq' => $vr_sq,
|
||||
'atcl_no' => $atcl_no,
|
||||
'fax_sq' => $fax_sq,
|
||||
'address2' => $address2,
|
||||
'address3' => $address3,
|
||||
'trade_type' => $trade_type,
|
||||
'floor' => $floor,
|
||||
'floor2' => $floor2,
|
||||
];
|
||||
|
||||
$this->model->saveAddress($data);
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 확인결과저장
|
||||
public function saveImageArticle()
|
||||
{
|
||||
try {
|
||||
|
||||
$fax_sq = $this->request->getPost('fax_sq');
|
||||
$work_type = $this->request->getPost('work_type');
|
||||
$atcl_no = $this->request->getPost('atcl_no');
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
$file_type = $this->request->getPost('file_type');
|
||||
|
||||
$data = [
|
||||
'fax_sq' => $fax_sq,
|
||||
'work_type' => $work_type,
|
||||
'atcl_no' => $atcl_no,
|
||||
'vr_sq' => $vr_sq,
|
||||
'file_type' => $file_type,
|
||||
];
|
||||
|
||||
$this->model->saveImageArticle($data);
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 다음 매물정보 조회
|
||||
public function getNextFaxImgs()
|
||||
{
|
||||
try {
|
||||
|
||||
$curr_fax_sq = $this->request->getPost('curr_fax_sq');
|
||||
|
||||
$data = $this->model->getNextFaxImgs($curr_fax_sq);
|
||||
|
||||
if (empty($data)) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => 'FAX 이미지가 존재하지 않습니다.'
|
||||
]);
|
||||
} else {
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
'data' => $data
|
||||
]);
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
135
app/Controllers/V2/M710.php
Normal file
135
app/Controllers/V2/M710.php
Normal file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
namespace App\Controllers\V2;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Models\common\CodeModel;
|
||||
use App\Models\v2\M710Model;
|
||||
|
||||
class M710 extends BaseController
|
||||
{
|
||||
private $model, $codeModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->model = new M710Model();
|
||||
$this->codeModel = new CodeModel();
|
||||
}
|
||||
|
||||
public function lists(): string
|
||||
{
|
||||
$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/m710/lists", $this->data);
|
||||
}
|
||||
|
||||
public function getResultList()
|
||||
{
|
||||
$start = (int) $this->request->getGet('start') ?: 0;
|
||||
$end = (int) $this->request->getGet('length') ?: 10;
|
||||
|
||||
$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'), // 매물종류
|
||||
'status' => $this->request->getGet('status'), // 전송여부
|
||||
];
|
||||
|
||||
$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 getExcelList()
|
||||
{
|
||||
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'), // 매물종류
|
||||
'status' => $this->request->getGet('status'), // 전송여부
|
||||
];
|
||||
|
||||
$datas = $this->model->getExcelList($data);
|
||||
|
||||
return $this->response->setJSON(body: [
|
||||
'data' => $datas,
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
$e->getPrevious()->getTraceAsString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 전송 api
|
||||
public function sendApi()
|
||||
{
|
||||
try {
|
||||
|
||||
$type = $this->request->getPost('type');
|
||||
|
||||
$this->model->updateSendApi($type);
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
18
app/Controllers/V2/M711.php
Normal file
18
app/Controllers/V2/M711.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace App\Controllers\V2;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
|
||||
class M711 extends BaseController
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function lists(): string
|
||||
{
|
||||
return view("pages/v2/m711/lists", $this->data);
|
||||
}
|
||||
}
|
||||
343
app/Controllers/V2/M712.php
Normal file
343
app/Controllers/V2/M712.php
Normal file
@@ -0,0 +1,343 @@
|
||||
<?php
|
||||
namespace App\Controllers\V2;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Libraries\Common;
|
||||
use App\Libraries\MyUpload;
|
||||
use App\Models\common\CodeModel;
|
||||
use App\Models\v2\M712Model;
|
||||
|
||||
class M712 extends BaseController
|
||||
{
|
||||
private $model, $codeModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->model = new M712Model();
|
||||
$this->codeModel = new CodeModel();
|
||||
}
|
||||
|
||||
public function lists(): string
|
||||
{
|
||||
$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);
|
||||
}
|
||||
|
||||
|
||||
public function getResultList()
|
||||
{
|
||||
$start = (int) $this->request->getGet('start') ?: 0;
|
||||
$end = (int) $this->request->getGet('length') ?: 10;
|
||||
|
||||
$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'), // 서류미수취
|
||||
];
|
||||
|
||||
$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
|
||||
{
|
||||
|
||||
$id = (int) $id;
|
||||
|
||||
if ($id <= 0) {
|
||||
throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
$codes = $this->codeModel->getCodeLists(['VRFCREQ_WAY', 'CONFIRM_RESULT_D11', 'CONFIRM_RESULT_T11', 'TRADE_TYPE', 'CERT_UNCNFRM_STATUS']); // 코드조회
|
||||
|
||||
$data = $this->model->getDetail($id);
|
||||
$memo = $this->model->getMemo($id);
|
||||
|
||||
$record = $this->model->getRecordInfo($id, '1'); //홍보확인서
|
||||
$regist = $this->model->getRecordInfo($id, '2'); //등기부등본
|
||||
$display = $this->model->getDisplay('M705_detail');
|
||||
|
||||
$this->data['codes'] = $codes;
|
||||
$this->data['data'] = $data;
|
||||
$this->data['memo'] = $memo;
|
||||
$this->data['record'] = $record;
|
||||
$this->data['regist'] = $regist;
|
||||
$this->data['display'] = $display;
|
||||
|
||||
return view("pages/v2/m712/detail", $this->data);
|
||||
}
|
||||
|
||||
// 이미지회전
|
||||
public function rotateImage()
|
||||
{
|
||||
$common = new Common();
|
||||
|
||||
try {
|
||||
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
$degress = $this->request->getPost('degress');
|
||||
|
||||
if (empty($degrees) || !is_numeric($degrees)) {
|
||||
$degrees = 90;
|
||||
}
|
||||
|
||||
$regist = $this->model->getRecordInfo($vr_sq, '2');
|
||||
$fullPath = $regist['file_path'] . $regist['file_name'];
|
||||
$fullPath = $_SERVER['DOCUMENT_ROOT'] . $common->realpath_to_webpath($fullPath);
|
||||
|
||||
$degrees = (float) $degrees;
|
||||
|
||||
$im = new \Imagick($fullPath);
|
||||
|
||||
// 배경색(회전 시 빈 공간 채우는 색). 투명 원하면 'transparent'
|
||||
$im->setImageBackgroundColor(new \ImagickPixel('white'));
|
||||
|
||||
// 회전
|
||||
$im->rotateImage($im->getImageBackgroundColor(), $degrees);
|
||||
|
||||
// 포맷/압축 유지(옵션)
|
||||
$im->setImageCompressionQuality(90);
|
||||
|
||||
// 덮어쓰기
|
||||
$im->writeImage($fullPath);
|
||||
|
||||
$im->clear();
|
||||
$im->destroy();
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 파일업로드
|
||||
public function uploadFile()
|
||||
{
|
||||
$lib = new MyUpload();
|
||||
|
||||
try {
|
||||
$usr_id = session('usr_id');
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
|
||||
$file = $this->request->getFile('file');
|
||||
|
||||
if ($file && $file->isValid() && !$file->hasMoved()) {
|
||||
|
||||
$uploadPath = "/upload/v2_file/" . $vr_sq . "/";
|
||||
|
||||
$arrUploadfile = [];
|
||||
if ($file->isValid() && !$file->hasMoved()) {
|
||||
$uploadData = $lib->do_upload2($file, $uploadPath);
|
||||
|
||||
if ($uploadData !== false) {
|
||||
$arrUploadfile[] = $uploadData;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($arrUploadfile)) {
|
||||
foreach ($arrUploadfile as $key => $uploadFile) {
|
||||
$data = [
|
||||
'vr_sq' => $vr_sq,
|
||||
// 'file_sq' => $this->request->getPost('file_sq'),
|
||||
'orig_name' => $uploadFile['origin_name'],
|
||||
'new_name' => $uploadFile['file_name'],
|
||||
'file_path' => $uploadPath, // 필요에 따라 상대경로로만 저장
|
||||
'ext' => '.' . $uploadFile['ext'],
|
||||
'size' => $file->getSize(),
|
||||
'img_yn' => null,
|
||||
'img_height' => null,
|
||||
'img_width' => null,
|
||||
'usr_id' => $usr_id,
|
||||
];
|
||||
}
|
||||
|
||||
if (!empty($data)) {
|
||||
|
||||
// 파일업로드 정보 저장
|
||||
$this->model->saveFileInfo($data);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success'
|
||||
]);
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 서류미수취 저장
|
||||
public function saveNotReceived()
|
||||
{
|
||||
try {
|
||||
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
$atcl_no = $this->request->getPost('rcpt_no');
|
||||
|
||||
$this->model->saveNotReceived($vr_sq);
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 정보저장
|
||||
public function saveRegi()
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 다음매물확인
|
||||
public function nextRegi()
|
||||
{
|
||||
try {
|
||||
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
|
||||
$data = $this->model->getNextInfo($vr_sq);
|
||||
|
||||
if (empty($data)) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => '등기부등본 이미지가 존재하지 않습니다.'
|
||||
]);
|
||||
} else {
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
'resw' => $data['vr_sq']
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
326
app/Controllers/V2/M713.php
Normal file
326
app/Controllers/V2/M713.php
Normal file
@@ -0,0 +1,326 @@
|
||||
<?php
|
||||
namespace App\Controllers\V2;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Libraries\MyUpload;
|
||||
use App\Models\common\CodeModel;
|
||||
use App\Models\v2\M713Model;
|
||||
|
||||
class M713 extends BaseController
|
||||
{
|
||||
private $model, $codeModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->model = new M713Model();
|
||||
$this->codeModel = new CodeModel();
|
||||
}
|
||||
|
||||
|
||||
public function lists(): string
|
||||
{
|
||||
$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);
|
||||
}
|
||||
|
||||
public function getResultList()
|
||||
{
|
||||
$start = (int) $this->request->getGet('start') ?: 0;
|
||||
$end = (int) $this->request->getGet('length') ?: 10;
|
||||
|
||||
$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'), // 법인소유
|
||||
];
|
||||
|
||||
$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
|
||||
{
|
||||
$id = (int) $id;
|
||||
|
||||
if ($id <= 0) {
|
||||
throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
$codes = $this->codeModel->getCodeLists(['VRFCREQ_WAY', 'CONFIRM_RESULT_D11', 'CONFIRM_RESULT_T11', 'TRADE_TYPE', 'CERT_UNCNFRM_STATUS']); // 코드조회
|
||||
|
||||
$data = $this->model->getDetail($id);
|
||||
$memo = $this->model->getMemo($id);
|
||||
|
||||
$record = $this->model->getRecordInfo($id, '1'); //홍보확인서
|
||||
$regist = $this->model->getRecordInfo($id, '2'); //등기부등본
|
||||
$display = $this->model->getDisplay('M713_detail');
|
||||
|
||||
$sido = $this->model->getAreaList(); // 지역조회
|
||||
|
||||
$this->data['codes'] = $codes;
|
||||
$this->data['data'] = $data;
|
||||
$this->data['memo'] = $memo;
|
||||
$this->data['record'] = $record;
|
||||
$this->data['regist'] = $regist;
|
||||
$this->data['display'] = $display;
|
||||
$this->data['sido'] = $sido;
|
||||
|
||||
return view("pages/v2/m713/detail", $this->data);
|
||||
}
|
||||
|
||||
// 이미지회전
|
||||
public function rotateImage()
|
||||
{
|
||||
$common = new Common();
|
||||
|
||||
try {
|
||||
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
$degress = $this->request->getPost('degress');
|
||||
|
||||
if (empty($degrees) || !is_numeric($degrees)) {
|
||||
$degrees = 90;
|
||||
}
|
||||
|
||||
$regist = $this->model->getRecordInfo($vr_sq, '2');
|
||||
$fullPath = $regist['file_path'] . $regist['file_name'];
|
||||
$fullPath = $_SERVER['DOCUMENT_ROOT'] . $common->realpath_to_webpath($fullPath);
|
||||
|
||||
$degrees = (float) $degrees;
|
||||
|
||||
$im = new \Imagick($fullPath);
|
||||
|
||||
// 배경색(회전 시 빈 공간 채우는 색). 투명 원하면 'transparent'
|
||||
$im->setImageBackgroundColor(new \ImagickPixel('white'));
|
||||
|
||||
// 회전
|
||||
$im->rotateImage($im->getImageBackgroundColor(), $degrees);
|
||||
|
||||
// 포맷/압축 유지(옵션)
|
||||
$im->setImageCompressionQuality(90);
|
||||
|
||||
// 덮어쓰기
|
||||
$im->writeImage($fullPath);
|
||||
|
||||
$im->clear();
|
||||
$im->destroy();
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// 법인매물저장
|
||||
public function saveCorpOwn()
|
||||
{
|
||||
try {
|
||||
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
$atcl_no = $this->request->getPost('atcl_no');
|
||||
|
||||
// UPDATE v2_article_info_etc
|
||||
$this->model->saveCorpOwn($vr_sq, $atcl_no);
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 파일업로드
|
||||
public function uploadFile()
|
||||
{
|
||||
$lib = new MyUpload();
|
||||
|
||||
try {
|
||||
$usr_id = session('usr_id');
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
|
||||
$file = $this->request->getFile('file');
|
||||
|
||||
if ($file && $file->isValid() && !$file->hasMoved()) {
|
||||
|
||||
$uploadPath = "/upload/v2_file/" . $vr_sq . "/";
|
||||
|
||||
$arrUploadfile = [];
|
||||
if ($file->isValid() && !$file->hasMoved()) {
|
||||
$uploadData = $lib->do_upload2($file, $uploadPath);
|
||||
|
||||
if ($uploadData !== false) {
|
||||
$arrUploadfile[] = $uploadData;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($arrUploadfile)) {
|
||||
foreach ($arrUploadfile as $key => $uploadFile) {
|
||||
$data = [
|
||||
'vr_sq' => $vr_sq,
|
||||
// 'file_sq' => $this->request->getPost('file_sq'),
|
||||
'orig_name' => $uploadFile['origin_name'],
|
||||
'new_name' => $uploadFile['file_name'],
|
||||
'file_path' => $uploadPath, // 필요에 따라 상대경로로만 저장
|
||||
'ext' => '.' . $uploadFile['ext'],
|
||||
'size' => $file->getSize(),
|
||||
'img_yn' => null,
|
||||
'img_height' => null,
|
||||
'img_width' => null,
|
||||
'usr_id' => $usr_id,
|
||||
];
|
||||
}
|
||||
|
||||
if (!empty($data)) {
|
||||
|
||||
// 파일업로드 정보 저장
|
||||
$this->model->saveFileInfo($data);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success'
|
||||
]);
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 다음매물확인
|
||||
public function nextRegi()
|
||||
{
|
||||
try {
|
||||
|
||||
$vr_sq = $this->request->getPost('vr_sq');
|
||||
|
||||
$data = $this->model->getNextInfo($vr_sq);
|
||||
|
||||
if (empty($data)) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => '등기부등본 이미지가 존재하지 않습니다.'
|
||||
]);
|
||||
} else {
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success',
|
||||
'resw' => $data['vr_sq']
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,4 +33,27 @@ class Common
|
||||
return $pagination;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 서버상의 위치를 웹상의 위치로 변경한다...
|
||||
*/
|
||||
public function realpath_to_webpath($realpath)
|
||||
{
|
||||
$arrImagePath = array(
|
||||
'/home/confirms/test-admin.confirms.co.kr/upload/',
|
||||
'/home/confirms/upload/',
|
||||
'/home/www/admin.confirms.co.kr/upload/',
|
||||
'/home/www/upload/',
|
||||
'/image/confirms_upload/',
|
||||
'/misc/image/confirms_upload/',
|
||||
'/storage/web/admin.confirms.co.kr/src/upload/',
|
||||
'/storage/web/admin.confirms.co.kr/upload/',
|
||||
$_SERVER['DOCUMENT_ROOT'] . '/upload/',
|
||||
);
|
||||
|
||||
$return_path = str_replace($arrImagePath, '/upload/', $realpath);
|
||||
$return_path = str_replace(' ', '', $return_path);
|
||||
return $return_path;
|
||||
}
|
||||
|
||||
}
|
||||
1223
app/Models/article/ReceiptModel.php
Normal file
1223
app/Models/article/ReceiptModel.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -6,5 +6,48 @@ use CodeIgniter\Model;
|
||||
class ListFaxModel extends Model
|
||||
{
|
||||
|
||||
public function getTotalCount($data)
|
||||
{
|
||||
$sql = "SELECT
|
||||
COUNT(*) AS cnt
|
||||
FROM
|
||||
fax_imgs a
|
||||
WHERE
|
||||
a.RECV_TIME >= CONCAT(DATE_FORMAT(DATE_ADD(NOW(), INTERVAL - 7 DAY), 'Y-m-d'), ' 00:00:00')
|
||||
AND a.RECV_TIME <= CONCAT(DATE_FORMAT(NOW(), 'Y-m-d'), ' 23:59:59')
|
||||
AND a.caller_no LIKE CONCAT('%', REPLACE(?, '-', ''), '%')
|
||||
|
||||
GROUP BY a.`MID`
|
||||
";
|
||||
|
||||
|
||||
$query = $this->db->query($sql . [$data['caller_no']]);
|
||||
|
||||
$row = $query->getRow();
|
||||
return $row ? $row->cnt : 0;
|
||||
}
|
||||
|
||||
public function getResultList($start, $end, $data)
|
||||
{
|
||||
$sql = "
|
||||
SELECT
|
||||
a.fax_sq, a.mid, GROUP_CONCAT(a.file_name) AS file_name, a.file_path, a.CALLER_NO, a.CALLEE_NO, a.RECV_TIME, a.SAVE_TIME, COUNT(a.file_name) AS cnt
|
||||
FROM
|
||||
fax_imgs a
|
||||
WHERE
|
||||
a.RECV_TIME >= CONCAT(DATE_FORMAT(DATE_ADD(NOW(), INTERVAL - 7 DAY), 'Y-m-d'), ' 00:00:00')
|
||||
AND a.RECV_TIME <= CONCAT(DATE_FORMAT(NOW(), 'Y-m-d'), ' 23:59:59')
|
||||
AND a.caller_no LIKE CONCAT('%', REPLACE(?, '-', ''), '%')
|
||||
|
||||
GROUP BY a.`MID`
|
||||
ORDER BY a.fax_sq DESC, a.RECV_TIME DESC
|
||||
|
||||
LIMIT {$start}, {$end}
|
||||
";
|
||||
|
||||
$query = $this->db->query($sql, [$data['caller_no']]);
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
|
||||
}
|
||||
149
app/Models/receipt/ReceiptModel.php
Normal file
149
app/Models/receipt/ReceiptModel.php
Normal file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
namespace App\Models\receipt;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class ReceiptModel extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* 홍보확인서 fax 목록에서 선택할 경우.
|
||||
*/
|
||||
public function saveFaxImage($faxSq, $rcpt_sq, $rsrv_sq, $img_type, $img_path, $img_filenm, $img_nm, $img_size, $img_width, $img_height, $receipt)
|
||||
{
|
||||
$this->db->transStart();
|
||||
|
||||
$usr_sq = session('usr_sq');
|
||||
$usr_id = session('usr_id');
|
||||
|
||||
$sql = "";
|
||||
$data = [];
|
||||
$res = "";
|
||||
$remark = "";
|
||||
|
||||
$result_img = [];
|
||||
|
||||
if ($img_type == 'I8') {
|
||||
$yn_sql = "update receipt " .
|
||||
" set parcel_out_yn = 'Y' " .
|
||||
" where rcpt_sq = ? ";
|
||||
$yn_data = [$rcpt_sq];
|
||||
$this->db->query($yn_sql, $yn_data);
|
||||
|
||||
$sql = "update fax_imgs " .
|
||||
" set bunyang_yn = 'Y' " .
|
||||
" where fax_sq = ? ";
|
||||
$data = [$faxSq];
|
||||
$this->db->query($sql, $data);
|
||||
}
|
||||
|
||||
//홍보확인서, 현장확인 내역서 저장
|
||||
if ($img_type == 'I1' || $img_type == 'I2' || $img_type == 'I10') {
|
||||
//기존에 있던 이미지는 사용유무 N으로 변경
|
||||
$sql = "select img_sq from result_imgs" .
|
||||
" WHERE rsrv_sq = ?" .
|
||||
" AND img_type = ?" .
|
||||
" AND use_yn = 'Y'";
|
||||
$data = [$rsrv_sq, $img_type];
|
||||
$res = $this->db->query($sql, $data);
|
||||
$row = $res->getRowArray();
|
||||
if (!empty($row)) {
|
||||
$this->updateImgSqNullOnFaxImgs($row['img_sq']); // 홍보확인서 재지정일
|
||||
}
|
||||
|
||||
$sql = "UPDATE result_imgs" .
|
||||
" SET use_yn = 'N'" .
|
||||
" WHERE rsrv_sq = ?" .
|
||||
" AND img_type = ?" .
|
||||
" AND use_yn = 'Y'";
|
||||
$data = [$rsrv_sq, $img_type];
|
||||
$res = $this->db->query($sql, $data);
|
||||
|
||||
//새로운 이미지 생성
|
||||
$sql = "INSERT INTO result_imgs(rsrv_sq, use_yn, img_type, view_odr, img_path, img_filenm, img_nm, img_size, img_width, img_height, insert_usr, insert_tm)" .
|
||||
"VALUES (?, 'Y', ?, 1, ?, ?, ?, ?, ?, ?, ?, NOW())";
|
||||
$data = [$rsrv_sq, $img_type, $img_path, $img_filenm, $img_nm, $img_size, $img_width, $img_height, $usr_sq];
|
||||
$res = $this->db->query($sql, $data);
|
||||
|
||||
if ($img_type == 'I1')
|
||||
$remark = "홍보확인서 사진 업로드";
|
||||
else if ($img_type == 'I2')
|
||||
$remark = "현장확인 내역서 사진 업로드";
|
||||
else if ($img_type == 'I10')
|
||||
$remark = "촬영동의서 사진 업로드";
|
||||
else if ($img_type == 'I11')
|
||||
$remark = "체크리스트 사진 업로드";
|
||||
} else {
|
||||
//이미지 순번 검색
|
||||
$odr_sql = "SELECT COALESCE(MAX(view_odr), 0) + 1 as seq FROM result_imgs WHERE rsrv_sq = ? AND img_type = ? AND use_yn = 'Y'";
|
||||
$odr_data = [$rsrv_sq, $img_type];
|
||||
$query = $this->db->query($odr_sql, $odr_data);
|
||||
$row = $query->getRowArray();
|
||||
$view_odr = $row['seq'];
|
||||
|
||||
$sql = "INSERT INTO result_imgs(rsrv_sq, use_yn, img_type, view_odr, img_path, img_filenm, img_nm, img_size, img_width, img_height, insert_usr, insert_tm)" .
|
||||
"VALUES (?, 'Y', ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW())";
|
||||
$data = array(
|
||||
$rsrv_sq,
|
||||
$img_type,
|
||||
$view_odr,
|
||||
$img_path,
|
||||
$img_filenm,
|
||||
$img_nm,
|
||||
$img_size,
|
||||
$img_width,
|
||||
$img_height,
|
||||
$usr_sq
|
||||
);
|
||||
|
||||
$res = $this->db->query($sql, $data);
|
||||
|
||||
if ($img_type == 'I3')
|
||||
$remark = "건물외관 사진 업르도";
|
||||
else if ($img_type == 'I4')
|
||||
$remark = "내부 사진 업로드";
|
||||
else if ($img_type == 'I8')
|
||||
$remark = "분양권 사진 업로드";
|
||||
|
||||
}
|
||||
|
||||
|
||||
$imgSq = $this->db->insertID();
|
||||
$this->updateImgSqOnFaxImgs($faxSq, $imgSq);
|
||||
|
||||
if (!$res) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->db->transComplete();
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 홍보확인서를 재지정했을 경우 기존의 홍보확인서는 선택되지 않음으로 ...
|
||||
*/
|
||||
public function updateImgSqNullOnFaxImgs($imgSq)
|
||||
{
|
||||
$sql = "UPDATE fax_imgs" .
|
||||
" SET img_sq = null" .
|
||||
" WHERE img_sq = ?";
|
||||
$data = [$imgSq];
|
||||
$this->db->query($sql, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* FAX이미지를 홍보확인서에서 선택할 경우...
|
||||
*/
|
||||
public function updateImgSqOnFaxImgs($faxSq, $imgSq)
|
||||
{
|
||||
$sql = "UPDATE fax_imgs" .
|
||||
" SET img_sq = ?" .
|
||||
" WHERE fax_sq = ?";
|
||||
|
||||
$data = [$imgSq, $faxSq];
|
||||
$this->db->query($sql, $data);
|
||||
}
|
||||
}
|
||||
@@ -155,4 +155,187 @@ class M415Model extends Model
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
|
||||
|
||||
// 팩스 인입시간
|
||||
public function getFaxSaveTime($vr_sq)
|
||||
{
|
||||
$sql = "SELECT recv_time from fax_imgs" .
|
||||
" WHERE vr_sq = ?" .
|
||||
" ORDER BY fax_sq DESC" .
|
||||
" LIMIT 1";
|
||||
$data = [
|
||||
$vr_sq
|
||||
];
|
||||
$query = $this->db->query($sql, $data);
|
||||
|
||||
$res = $query->getRowArray();
|
||||
return $res;
|
||||
}
|
||||
|
||||
// 서류/전화 불일치 시간
|
||||
public function getFaxFailTimeForHistory($vr_sq)
|
||||
{
|
||||
$sql = "select insert_tm from v2_chg_history" .
|
||||
" where vr_sq = ?" .
|
||||
" and stat_cd = '39'" .
|
||||
" and chg_type= 'C9'" .
|
||||
" order by seq desc" .
|
||||
" limit 1";
|
||||
$data = [
|
||||
$vr_sq
|
||||
];
|
||||
$query = $this->db->query($sql, $data);
|
||||
// echo $this->db->last_query().'<br>';
|
||||
$res = $query->row_array();
|
||||
return $res;
|
||||
}
|
||||
|
||||
// 등기부등본 확인중 시간, 서류에서 등기로 넘어갈때 간혹 서류전화 확인 완료가 안찍히는 건들이 있다
|
||||
public function get_cert_ing_TimeForHistory($vr_sq)
|
||||
{
|
||||
$sql = "select insert_tm from v2_chg_history" .
|
||||
" where vr_sq = ?" .
|
||||
" and stat_cd = '40'" .
|
||||
" and chg_type= 'C9'" .
|
||||
" order by seq desc" .
|
||||
" limit 1";
|
||||
$data = array(
|
||||
$vr_sq
|
||||
);
|
||||
$query = $this->db->query($sql, $data);
|
||||
// echo $this->db->last_query().'<br>';
|
||||
$res = $query->row_array();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
//서류전화 (검증실패/검증완료)
|
||||
public function insert_v2_time_required_Conf_Done($atcl_no, $cpid, $vrfc_type, $insert_tm, $tel_doc_conf_dt, $finishTime)
|
||||
{
|
||||
if (substr($insert_tm, 0, 10) == substr($tel_doc_conf_dt, 0, 10)) {
|
||||
switch ($vrfc_type) {
|
||||
case 'D':
|
||||
if (('12:00:00' < substr($insert_tm, -8)) && (substr($insert_tm, -8) < '13:00:00')) {//접수시간이 12~13시 사이면 13시로 해준다
|
||||
if (substr($tel_doc_conf_dt, -8) > '13:00:00') { //검증완료가 13시 '이후'에 끝나면 접수시간을 13시로 변경해준다
|
||||
$insert_tm = date("Y-m-d", time()) . " 13:00:00";
|
||||
}
|
||||
} else if (
|
||||
(substr($insert_tm, -8) > '17:30:00' || substr($insert_tm, -8) < '08:59:59') && //접수와 확인완료시간이 모두 17:30:00 ~ 09:00:00 사이가 아니면
|
||||
(substr($tel_doc_conf_dt, -8) < '17:30:00' || substr($tel_doc_conf_dt, -8) < '08:59:59')
|
||||
) {
|
||||
$insert_tm = date("Y-m-d", time()) . " 09:00:00";
|
||||
}
|
||||
;
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
if (('13:00:00' < substr($insert_tm, -8)) && (substr($insert_tm, -8) < '14:00:00')) {//접수시간이 13~14시 사이면 14시로 해준다
|
||||
if (substr($tel_doc_conf_dt, -8) > '14:00:00') { //검증완료가 14시 '이후'에 끝나면 접수시간을 14시로 변경해준다
|
||||
$insert_tm = date("Y-m-d", time()) . " 14:00:00";
|
||||
}
|
||||
} else if (
|
||||
(substr($insert_tm, -8) > '17:30:00' || substr($insert_tm, -8) < '08:59:59') &&
|
||||
(substr($tel_doc_conf_dt, -8) < '17:30:00' || substr($tel_doc_conf_dt, -8) < '08:59:59')
|
||||
) { //접수와 확인완료시간이 모두 17:30:00 ~ 09:00:00 사이면
|
||||
$insert_tm = date("Y-m-d", time()) . " 09:30:00";
|
||||
}
|
||||
;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if ($vrfc_type == 'D') { //홍보
|
||||
if (substr($insert_tm, -8) > '17:30:00' || substr($insert_tm, -8) < '08:59:59') {
|
||||
$insert_tm = date("Y-m-d", time()) . " 09:00:00";
|
||||
}
|
||||
} else { //전화
|
||||
if (substr($insert_tm, -8) > '17:30:00' || substr($insert_tm, -8) < '08:59:59') {
|
||||
$insert_tm = date("Y-m-d", time()) . " 09:30:00";
|
||||
}
|
||||
}
|
||||
}
|
||||
$stan_date = substr($insert_tm, 0, 10);
|
||||
|
||||
$sql = "INSERT INTO v2_time_required(stan_date, atcl_no, cpid, vrfc_type, insert_tm, tel_doc_conf_dt,conf_required_tm,tot_required_tm)" .
|
||||
" VALUES(?, ?, ?, ?, ?, ?, TIMEDIFF(?,?), TIMEDIFF(?,?)) " .
|
||||
" ON DUPLICATE KEY UPDATE insert_tm = VALUES(insert_tm), tel_doc_conf_dt=VALUES(tel_doc_conf_dt),conf_required_tm = VALUES(conf_required_tm),tot_required_tm = VALUES(tot_required_tm) ";
|
||||
$data = [
|
||||
$stan_date,
|
||||
$atcl_no,
|
||||
$cpid,
|
||||
$vrfc_type,
|
||||
$insert_tm,
|
||||
$tel_doc_conf_dt,
|
||||
$tel_doc_conf_dt,
|
||||
$insert_tm,
|
||||
$tel_doc_conf_dt,
|
||||
$insert_tm
|
||||
];
|
||||
$this->db->query($sql, $data);
|
||||
}
|
||||
|
||||
//서류전화 확인완료(일치/불일치)
|
||||
//서류전화 (검증실패/검증완료)
|
||||
public function insert_v2_time_required_Conf($atcl_no, $cpid, $vrfc_type, $insert_tm, $tel_doc_conf_dt, $finishTime)
|
||||
{
|
||||
if (substr($insert_tm, 0, 10) == substr($tel_doc_conf_dt, 0, 10)) {
|
||||
switch ($vrfc_type) {
|
||||
case 'D':
|
||||
if (('12:00:00' < substr($insert_tm, -8)) && (substr($insert_tm, -8) < '13:00:00')) {//접수시간이 12~13시 사이면 13시로 해준다
|
||||
if (substr($tel_doc_conf_dt, -8) > '13:00:00') { //검증완료가 13시 '이후'에 끝나면 접수시간을 13시로 변경해준다
|
||||
$insert_tm = date("Y-m-d", time()) . " 13:00:00";
|
||||
}
|
||||
} else if (
|
||||
(substr($insert_tm, -8) > '17:30:00' || substr($insert_tm, -8) < '08:59:59') && //접수와 확인완료시간이 모두 17:30:00 ~ 09:00:00 사이가 아니면
|
||||
(substr($tel_doc_conf_dt, -8) < '17:30:00' || substr($tel_doc_conf_dt, -8) < '08:59:59')
|
||||
) {
|
||||
$insert_tm = date("Y-m-d", time()) . " 09:00:00";
|
||||
}
|
||||
;
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
if (('13:00:00' < substr($insert_tm, -8)) && (substr($insert_tm, -8) < '14:00:00')) {//접수시간이 13~14시 사이면 14시로 해준다
|
||||
if (substr($tel_doc_conf_dt, -8) > '14:00:00') { //검증완료가 14시 '이후'에 끝나면 접수시간을 14시로 변경해준다
|
||||
$insert_tm = date("Y-m-d", time()) . " 14:00:00";
|
||||
}
|
||||
} else if (
|
||||
(substr($insert_tm, -8) > '17:30:00' || substr($insert_tm, -8) < '08:59:59') &&
|
||||
(substr($tel_doc_conf_dt, -8) < '17:30:00' || substr($tel_doc_conf_dt, -8) < '08:59:59')
|
||||
) { //접수와 확인완료시간이 모두 17:30:00 ~ 09:00:00 사이면
|
||||
$insert_tm = date("Y-m-d", time()) . " 09:30:00";
|
||||
}
|
||||
;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if ($vrfc_type == 'D') { //홍보
|
||||
if (substr($insert_tm, -8) > '17:30:00' || substr($insert_tm, -8) < '08:59:59') {
|
||||
$insert_tm = date("Y-m-d", time()) . " 09:00:00";
|
||||
}
|
||||
} else { //전화
|
||||
if (substr($insert_tm, -8) > '17:30:00' || substr($insert_tm, -8) < '08:59:59') {
|
||||
$insert_tm = date("Y-m-d", time()) . " 09:30:00";
|
||||
}
|
||||
}
|
||||
}
|
||||
$stan_date = substr($insert_tm, 0, 10);
|
||||
|
||||
$sql = "INSERT INTO v2_time_required(stan_date, atcl_no, cpid, vrfc_type, insert_tm, tel_doc_conf_dt,conf_required_tm,tot_required_tm)" .
|
||||
" VALUES(?, ?, ?, ?, ?, ?, TIMEDIFF(?,?), TIMEDIFF(?,?)) " .
|
||||
" ON DUPLICATE KEY UPDATE insert_tm = VALUES(insert_tm), tel_doc_conf_dt=VALUES(tel_doc_conf_dt),conf_required_tm = VALUES(conf_required_tm),tot_required_tm = VALUES(tot_required_tm) ";
|
||||
$data = array(
|
||||
$stan_date,
|
||||
$atcl_no,
|
||||
$cpid,
|
||||
$vrfc_type,
|
||||
$insert_tm,
|
||||
$tel_doc_conf_dt,
|
||||
$tel_doc_conf_dt,
|
||||
$insert_tm,
|
||||
$tel_doc_conf_dt,
|
||||
$insert_tm
|
||||
);
|
||||
$this->db->query($sql, $data);
|
||||
}
|
||||
}
|
||||
@@ -263,6 +263,11 @@ class M701Model extends Model
|
||||
}
|
||||
}
|
||||
|
||||
// 매물종류
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
// 참고파일
|
||||
if (!empty($data['reference_file_url_yn'])) {
|
||||
$sql .= "AND a.reference_file_url_yn = '{$data['a.reference_file_url_yn']}' ";
|
||||
@@ -270,7 +275,7 @@ class M701Model extends Model
|
||||
|
||||
// 법인
|
||||
if (!empty($data['corp_own'])) {
|
||||
$sql .= "AND m.corp_own = '{$data['a.corp_own']}' ";
|
||||
$sql .= "AND m.corp_own = '{$data['corp_own']}' ";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -478,6 +483,11 @@ class M701Model extends Model
|
||||
}
|
||||
}
|
||||
|
||||
// 매물종류
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
// 참고파일
|
||||
if (!empty($data['reference_file_url_yn'])) {
|
||||
$sql .= "AND a.reference_file_url_yn = '{$data['a.reference_file_url_yn']}' ";
|
||||
@@ -682,6 +692,29 @@ class M701Model extends Model
|
||||
return $query->getResultArray();
|
||||
}
|
||||
|
||||
// 홍보확인서 정보
|
||||
public function getRecordInfo($vr_sq, $file_type)
|
||||
{
|
||||
$sql = "SELECT seq, vr_sq, use_yn, file_type, view_odr, IFNULL(file_path , '') AS file_path, IFNULL(file_name, '') AS file_name, file_ext, file_size, img_width, img_height, meta_data, insert_user, insert_tm, cloud_upload_yn
|
||||
FROM v2_files
|
||||
WHERE vr_sq = ? AND use_yn = 'Y' AND file_type = ?
|
||||
ORDER BY seq DESC ";
|
||||
|
||||
$query = $this->db->query($sql, [$vr_sq, $file_type]);
|
||||
|
||||
return $query->getRowArray();
|
||||
}
|
||||
|
||||
// 메모확인
|
||||
public function getMemo($vr_sq)
|
||||
{
|
||||
$sql = "SELECT memo FROM v2_vrfc_req where vr_sq = ?";
|
||||
|
||||
$query = $this->db->query($sql, [$vr_sq]);
|
||||
|
||||
return $query->getRowArray();
|
||||
}
|
||||
|
||||
|
||||
// 상세화면
|
||||
public function getDetail($id)
|
||||
@@ -692,7 +725,7 @@ class M701Model extends Model
|
||||
a.hscplqry_lv,
|
||||
b.tel_fail_cause,
|
||||
a.reg_charger,
|
||||
i2.usr_nm as reg_charger_nm,
|
||||
i2.usr_nm AS reg_charger_nm,
|
||||
a.atcl_no,
|
||||
b.try_cnt,
|
||||
a.cpid,
|
||||
@@ -852,4 +885,103 @@ class M701Model extends Model
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
|
||||
|
||||
// 상태변경
|
||||
public function chgArticleStatus($data)
|
||||
{
|
||||
|
||||
$usr_id = session('usr_id');
|
||||
|
||||
$this->db->transStart();
|
||||
|
||||
$sql = "INSERT INTO v2_chg_stat
|
||||
(vr_sq, stat_cd, insert_user, insert_tm)
|
||||
VALUES
|
||||
({$data['vr_sq']}, '{$data['stat_cd']}', '{$usr_id}', NOW())
|
||||
";
|
||||
|
||||
if ($this->db->query($sql) === false) {
|
||||
return [
|
||||
'success' => false,
|
||||
'msg' => '저장 실패',
|
||||
];
|
||||
}
|
||||
|
||||
$detail = $this->getDetail($data['vr_sq']);
|
||||
|
||||
$memo = "상태변경 : " . $detail['stat_cd'] . " => " . $data['stat_cd'];
|
||||
$this->saveHistory($data['vr_sq'], $data['stat_cd'], 'C9', $usr_id, $memo);
|
||||
|
||||
$sql = "UPDATE v2_modify_info SET
|
||||
modify_yn = 'Y'
|
||||
WHERE vr_sq = {$data['vr_sq']}
|
||||
";
|
||||
|
||||
$this->db->query($sql);
|
||||
|
||||
$sql = "UPDATE v2_vrfc_req SET
|
||||
stat_cd = '{$data['stat_cd']}'
|
||||
WHERE vr_sq = {$data['vr_sq']}
|
||||
";
|
||||
|
||||
$this->db->query($sql);
|
||||
|
||||
|
||||
$this->db->transComplete();
|
||||
|
||||
return [
|
||||
'success' => true,
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
public function saveMemo($data)
|
||||
{
|
||||
$usr_id = session('usr_id');
|
||||
|
||||
$sql = "UPDATE v2_vrfc_req SET
|
||||
memo = ?
|
||||
WHERE vr_sq = ?
|
||||
";
|
||||
|
||||
if ($this->db->query($sql, [$data['memo'], $data['vr_sq']]) === false) {
|
||||
return [
|
||||
'success' => false,
|
||||
'msg' => '저장 실패',
|
||||
];
|
||||
}
|
||||
|
||||
$detail = $this->getDetail($data['vr_sq']);
|
||||
|
||||
$memo = "메모변경 : " . $detail['memo'] . " => " . $data['memo'];
|
||||
$this->saveHistory($data['vr_sq'], $data['pre_stat_cd'], 'C19', $usr_id, $memo);
|
||||
return [
|
||||
'success' => true,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
// 변경이력 저장
|
||||
public function saveHistory($vr_sq, $stat_cd, $chg_type, $usr_id, $memo)
|
||||
{
|
||||
$sql = "INSERT INTO v2_chg_history
|
||||
(vr_sq, stat_cd, chg_type, insert_id, insert_tm, memo)
|
||||
VALUES
|
||||
(?, ?, ?, ?, NOW(), ?)
|
||||
";
|
||||
|
||||
$data = [
|
||||
$vr_sq,
|
||||
$stat_cd,
|
||||
$chg_type,
|
||||
$usr_id,
|
||||
$memo
|
||||
];
|
||||
|
||||
$this->db->query($sql, $data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
953
app/Models/v2/M702Model.php
Normal file
953
app/Models/v2/M702Model.php
Normal file
@@ -0,0 +1,953 @@
|
||||
<?php
|
||||
namespace App\Models\v2;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class M702Model extends Model
|
||||
{
|
||||
// 지역 목록 조회
|
||||
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
|
||||
COUNT(*) AS cnt
|
||||
FROM
|
||||
v2_article_info a
|
||||
JOIN v2_vrfc_req b ON a.vr_sq = b.vr_sq
|
||||
JOIN v2_modify_info c ON a.vr_sq = c.vr_sq
|
||||
JOIN v2_article_info_etc k ON k.vr_sq = a.vr_sq
|
||||
LEFT JOIN region_codes f ON a.address_code = f.region_cd
|
||||
LEFT JOIN v2_chg_stat d ON a.vr_sq = d.vr_sq AND d.stat_cd = '35'
|
||||
LEFT JOIN v2_chg_stat e ON a.vr_sq = e.vr_sq AND e.stat_cd = '60'
|
||||
LEFT JOIN codes g ON b.stat_cd = g.cd AND g.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes h ON b.vrfc_type = h.cd AND h.category = 'VRFCREQ_WAY'
|
||||
LEFT JOIN users i ON a.charger = i.usr_id
|
||||
LEFT JOIN users j ON a.charger = j.usr_id
|
||||
LEFT JOIN v2_chg_stat d2 ON d2.vr_sq = a.vr_sq AND d2.stat_cd = '39' ";
|
||||
|
||||
$sql .= "WHERE 1=1 ";
|
||||
|
||||
// 매물번호
|
||||
if (!empty($data['atcl_no'])) {
|
||||
$sql .= "AND a.atcl = '{$data['atcl_no']}' ";
|
||||
} else {
|
||||
// 현재상태
|
||||
if (!empty($data['stat_cd'])) {
|
||||
$sql .= "AND b.stat_cd = '{$data['stat_cd']}' ";
|
||||
}
|
||||
|
||||
// 중개소
|
||||
if (!empty($data['realtor_nm'])) {
|
||||
$sql .= "AND a.realtor_nm = '{$data['realtor_nm']}' ";
|
||||
}
|
||||
|
||||
// 매물구분
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
|
||||
// 접수기간
|
||||
if (!empty($data['receipt_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['receipt_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['receipt_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['receipt_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 완료기간
|
||||
if (!empty($data['complete_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['complete_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['complete_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['complete_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 검증방식
|
||||
if (!empty($data['vrfc_type_sub'])) {
|
||||
$sql .= "AND a.vrfc_type_sub = '{$data['vrfc_type_sub']}' ";
|
||||
} else {
|
||||
if (!empty($data['vrfcreq_way'])) {
|
||||
$sql .= "AND b.vrfc_type = '{$data['vrfcreq_way']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 매체사
|
||||
if (!empty($data['rcpt_cpid'])) {
|
||||
$sql .= "AND a.cpid = '{$data['rcpt_cpid']}' ";
|
||||
}
|
||||
|
||||
// 지역구분
|
||||
if (!empty($data['srcDong'])) {
|
||||
$sql .= "AND a.address_code = '{$data['srcDong']}' ";
|
||||
} else {
|
||||
if (!empty($data['srcGugun'])) {
|
||||
$str_gugun = substr($data['srcGugun'], '0', '2');
|
||||
if ($str_gugun == '36') { //세종시는 군구가 없고 바로 동이라서 예외
|
||||
$sql .= "AND a.address_code = '{$data['srcGugun']}' ";
|
||||
} else {
|
||||
$gugunPrefix = substr($data['srcGugun'], '0', '5');
|
||||
$sql .= "AND a.address_code LIKE '{$gugunPrefix}%' ";
|
||||
}
|
||||
} else {
|
||||
if (!empty($data['srcSido'])) {
|
||||
$sidoPrefix = substr($data['srcSido'], '0', '2');
|
||||
$sql .= "AND a.address_code LIKE '{$sidoPrefix}%' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 담당자
|
||||
if (!empty($data['damdang'])) {
|
||||
|
||||
switch ($data['charger_gbn']) {
|
||||
case "1":
|
||||
$sql .= "a.charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
case "2":
|
||||
$sql .= "a.reg_charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 배정여부
|
||||
if ($data['assign_yn'] !== "A") {
|
||||
switch ($data['charger_gbn'] . $data['assign_yn']) {
|
||||
case "1Y": // 전화/서류 담당자
|
||||
$sql .= "a.charger != '' ";
|
||||
break;
|
||||
case "1N": // 전화/서류 담당자
|
||||
$sql .= "a.charger = '' ";
|
||||
break;
|
||||
case "2Y": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger != '' ";
|
||||
break;
|
||||
case "2N": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger IS NULL ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 본부
|
||||
if (!empty($data['bonbu'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept1_sq = '{$data['bonbu']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept1_sq = '{$data['bonbu']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 팀
|
||||
if (!empty($data['team'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept2_sq = '{$data['team']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept2_sq = '{$data['team']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 참고파일
|
||||
if (!empty($data['reference_file_url_yn'])) {
|
||||
$sql .= "AND a.reference_file_url_yn = '{$data['a.reference_file_url_yn']}' ";
|
||||
}
|
||||
|
||||
// 법인
|
||||
if (!empty($data['corp_own'])) {
|
||||
$sql .= "AND m.corp_own = '{$data['a.corp_own']}' ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->getRow()->cnt;
|
||||
}
|
||||
|
||||
public function getResultList($start, $end, $data)
|
||||
{
|
||||
$sql = "SELECT
|
||||
a.vr_sq,
|
||||
a.atcl_no,
|
||||
a.cpid,
|
||||
a.cp_atcl_id,
|
||||
a.rlet_type_cd,
|
||||
a.address1,
|
||||
a.sise,
|
||||
a.rdate,
|
||||
a.seller_tel_no,
|
||||
a.seller_nm,
|
||||
a.realtor_nm,
|
||||
a.realtor_tel_no,
|
||||
a.charger,
|
||||
b.insert_tm,
|
||||
b.stat_cd,
|
||||
c.bild_nm,
|
||||
b.vrfc_type as vrfc_type_cd,
|
||||
c.rm_no,
|
||||
c.floor,
|
||||
c.address_code,
|
||||
c.address2,
|
||||
k.address2a,
|
||||
k.address2b,
|
||||
c.address3,
|
||||
c.trade_type,
|
||||
c.deal_amt,
|
||||
c.wrrnt_amt,
|
||||
c.lease_amt,
|
||||
c.isale_amt,
|
||||
c.prem_amt,
|
||||
c.sply_spc,
|
||||
c.excls_spc,
|
||||
c.tot_spc,
|
||||
c.grnd_spc,
|
||||
c.bldg_spc,
|
||||
c.hscp_nm,
|
||||
c.ptp_no,
|
||||
d.insert_tm as update_res_tm,
|
||||
e.insert_tm as result_tm,
|
||||
f.region_nm,
|
||||
g.cd_nm as pre_stat,
|
||||
h.cd_nm as vrfc_type,
|
||||
i.usr_nm,
|
||||
j.usr_nm as reg_charger,
|
||||
d2.insert_tm as stat_39_tm
|
||||
FROM
|
||||
v2_article_info a
|
||||
JOIN v2_vrfc_req b ON a.vr_sq = b.vr_sq
|
||||
JOIN v2_modify_info c ON a.vr_sq = c.vr_sq
|
||||
JOIN v2_article_info_etc k ON k.vr_sq = a.vr_sq
|
||||
LEFT JOIN region_codes f ON a.address_code = f.region_cd
|
||||
LEFT JOIN v2_chg_stat d ON a.vr_sq = d.vr_sq AND d.stat_cd = '35'
|
||||
LEFT JOIN v2_chg_stat e ON a.vr_sq = e.vr_sq AND e.stat_cd = '60'
|
||||
LEFT JOIN codes g ON b.stat_cd = g.cd AND g.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes h ON b.vrfc_type = h.cd AND h.category = 'VRFCREQ_WAY'
|
||||
LEFT JOIN users i ON a.charger = i.usr_id
|
||||
LEFT JOIN users j ON a.charger = j.usr_id
|
||||
LEFT JOIN v2_chg_stat d2 ON d2.vr_sq = a.vr_sq AND d2.stat_cd = '39' ";
|
||||
|
||||
$sql .= "WHERE 1=1 ";
|
||||
|
||||
// 매물번호
|
||||
if (!empty($data['atcl_no'])) {
|
||||
$sql .= "AND a.atcl = '{$data['atcl_no']}' ";
|
||||
} else {
|
||||
// 현재상태
|
||||
if (!empty($data['stat_cd'])) {
|
||||
$sql .= "AND b.stat_cd = '{$data['stat_cd']}' ";
|
||||
}
|
||||
|
||||
// 중개소
|
||||
if (!empty($data['realtor_nm'])) {
|
||||
$sql .= "AND a.realtor_nm = '{$data['realtor_nm']}' ";
|
||||
}
|
||||
|
||||
// 매물구분
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
|
||||
// 접수기간
|
||||
if (!empty($data['receipt_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['receipt_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['receipt_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['receipt_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 완료기간
|
||||
if (!empty($data['complete_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['complete_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['complete_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['complete_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 검증방식
|
||||
if (!empty($data['vrfc_type_sub'])) {
|
||||
$sql .= "AND a.vrfc_type_sub = '{$data['vrfc_type_sub']}' ";
|
||||
} else {
|
||||
if (!empty($data['vrfcreq_way'])) {
|
||||
$sql .= "AND b.vrfc_type = '{$data['vrfcreq_way']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 매체사
|
||||
if (!empty($data['rcpt_cpid'])) {
|
||||
$sql .= "AND a.cpid = '{$data['rcpt_cpid']}' ";
|
||||
}
|
||||
|
||||
// 지역구분
|
||||
if (!empty($data['srcDong'])) {
|
||||
$sql .= "AND a.address_code = '{$data['srcDong']}' ";
|
||||
} else {
|
||||
if (!empty($data['srcGugun'])) {
|
||||
$str_gugun = substr($data['srcGugun'], '0', '2');
|
||||
if ($str_gugun == '36') { //세종시는 군구가 없고 바로 동이라서 예외
|
||||
$sql .= "AND a.address_code = '{$data['srcGugun']}' ";
|
||||
} else {
|
||||
$gugunPrefix = substr($data['srcGugun'], '0', '5');
|
||||
$sql .= "AND a.address_code LIKE '{$gugunPrefix}%' ";
|
||||
}
|
||||
} else {
|
||||
if (!empty($data['srcSido'])) {
|
||||
$sidoPrefix = substr($data['srcSido'], '0', '2');
|
||||
$sql .= "AND a.address_code LIKE '{$sidoPrefix}%' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 담당자
|
||||
if (!empty($data['damdang'])) {
|
||||
|
||||
switch ($data['charger_gbn']) {
|
||||
case "1":
|
||||
$sql .= "a.charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
case "2":
|
||||
$sql .= "a.reg_charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 배정여부
|
||||
if ($data['assign_yn'] !== "A") {
|
||||
switch ($data['charger_gbn'] . $data['assign_yn']) {
|
||||
case "1Y": // 전화/서류 담당자
|
||||
$sql .= "a.charger != '' ";
|
||||
break;
|
||||
case "1N": // 전화/서류 담당자
|
||||
$sql .= "a.charger = '' ";
|
||||
break;
|
||||
case "2Y": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger != '' ";
|
||||
break;
|
||||
case "2N": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger IS NULL ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 본부
|
||||
if (!empty($data['bonbu'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept1_sq = '{$data['bonbu']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept1_sq = '{$data['bonbu']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 팀
|
||||
if (!empty($data['team'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept2_sq = '{$data['team']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept2_sq = '{$data['team']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 참고파일
|
||||
if (!empty($data['reference_file_url_yn'])) {
|
||||
$sql .= "AND a.reference_file_url_yn = '{$data['a.reference_file_url_yn']}' ";
|
||||
}
|
||||
|
||||
// 법인
|
||||
if (!empty($data['corp_own'])) {
|
||||
$sql .= "AND m.corp_own = '{$data['a.corp_own']}' ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$sql .= "ORDER BY b.vr_sq DESC ";
|
||||
|
||||
$sql .= "LIMIT {$start}, {$end}";
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
|
||||
// 엑셀 다운로드
|
||||
public function getExcelList($data)
|
||||
{
|
||||
$sql = "SELECT
|
||||
a.atcl_no AS '매물번호',
|
||||
g.cd_nm AS '진행상태',
|
||||
b.insert_tm AS '접수시간',
|
||||
h.cd_nm AS '검증방식',
|
||||
CONCAT(f.region_nm, ' ', c.rm_no) AS '주소',
|
||||
CONCAT(c.address2, ' ', c.address3) AS '상세주소',
|
||||
a.cpid AS '매체사',
|
||||
a.realtor_nm AS '중개소',
|
||||
i.usr_nm AS '서류/전화 담당자',
|
||||
IFNULL(d.insert_tm, d2.insert_tm) AS '서류/전화 확인완료시간',
|
||||
a.reg_charger AS '등기부등본 담당자',
|
||||
e.insert_tm AS '검증완료 일시',
|
||||
FROM
|
||||
v2_article_info a
|
||||
JOIN v2_vrfc_req b ON a.vr_sq = b.vr_sq
|
||||
JOIN v2_modify_info c ON a.vr_sq = c.vr_sq
|
||||
JOIN v2_article_info_etc k ON k.vr_sq = a.vr_sq
|
||||
LEFT JOIN region_codes f ON a.address_code = f.region_cd
|
||||
LEFT JOIN v2_chg_stat d ON a.vr_sq = d.vr_sq AND d.stat_cd = '35'
|
||||
LEFT JOIN v2_chg_stat e ON a.vr_sq = e.vr_sq AND e.stat_cd = '60'
|
||||
LEFT JOIN codes g ON b.stat_cd = g.cd AND g.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes h ON b.vrfc_type = h.cd AND h.category = 'VRFCREQ_WAY'
|
||||
LEFT JOIN users i ON a.charger = i.usr_id
|
||||
LEFT JOIN users j ON a.charger = j.usr_id
|
||||
LEFT JOIN v2_chg_stat d2 ON d2.vr_sq = a.vr_sq AND d2.stat_cd = '39' ";
|
||||
|
||||
$sql .= "WHERE 1=1 ";
|
||||
|
||||
// 매물번호
|
||||
if (!empty($data['atcl_no'])) {
|
||||
$sql .= "AND a.atcl = '{$data['atcl_no']}' ";
|
||||
} else {
|
||||
// 현재상태
|
||||
if (!empty($data['stat_cd'])) {
|
||||
$sql .= "AND b.stat_cd = '{$data['stat_cd']}' ";
|
||||
}
|
||||
|
||||
// 중개소
|
||||
if (!empty($data['realtor_nm'])) {
|
||||
$sql .= "AND a.realtor_nm = '{$data['realtor_nm']}' ";
|
||||
}
|
||||
|
||||
// 매물구분
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
|
||||
// 접수기간
|
||||
if (!empty($data['receipt_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['receipt_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['receipt_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['receipt_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 완료기간
|
||||
if (!empty($data['complete_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['complete_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['complete_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['complete_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 검증방식
|
||||
if (!empty($data['vrfc_type_sub'])) {
|
||||
$sql .= "AND a.vrfc_type_sub = '{$data['vrfc_type_sub']}' ";
|
||||
} else {
|
||||
if (!empty($data['vrfcreq_way'])) {
|
||||
$sql .= "AND b.vrfc_type = '{$data['vrfcreq_way']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 매체사
|
||||
if (!empty($data['rcpt_cpid'])) {
|
||||
$sql .= "AND a.cpid = '{$data['rcpt_cpid']}' ";
|
||||
}
|
||||
|
||||
// 지역구분
|
||||
if (!empty($data['srcDong'])) {
|
||||
$sql .= "AND a.address_code = '{$data['srcDong']}' ";
|
||||
} else {
|
||||
if (!empty($data['srcGugun'])) {
|
||||
$str_gugun = substr($data['srcGugun'], '0', '2');
|
||||
if ($str_gugun == '36') { //세종시는 군구가 없고 바로 동이라서 예외
|
||||
$sql .= "AND a.address_code = '{$data['srcGugun']}' ";
|
||||
} else {
|
||||
$gugunPrefix = substr($data['srcGugun'], '0', '5');
|
||||
$sql .= "AND a.address_code LIKE '{$gugunPrefix}%' ";
|
||||
}
|
||||
} else {
|
||||
if (!empty($data['srcSido'])) {
|
||||
$sidoPrefix = substr($data['srcSido'], '0', '2');
|
||||
$sql .= "AND a.address_code LIKE '{$sidoPrefix}%' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 담당자
|
||||
if (!empty($data['damdang'])) {
|
||||
|
||||
switch ($data['charger_gbn']) {
|
||||
case "1":
|
||||
$sql .= "a.charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
case "2":
|
||||
$sql .= "a.reg_charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 배정여부
|
||||
if ($data['assign_yn'] !== "A") {
|
||||
switch ($data['charger_gbn'] . $data['assign_yn']) {
|
||||
case "1Y": // 전화/서류 담당자
|
||||
$sql .= "a.charger != '' ";
|
||||
break;
|
||||
case "1N": // 전화/서류 담당자
|
||||
$sql .= "a.charger = '' ";
|
||||
break;
|
||||
case "2Y": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger != '' ";
|
||||
break;
|
||||
case "2N": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger IS NULL ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 본부
|
||||
if (!empty($data['bonbu'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept1_sq = '{$data['bonbu']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept1_sq = '{$data['bonbu']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 팀
|
||||
if (!empty($data['team'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept2_sq = '{$data['team']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept2_sq = '{$data['team']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 참고파일
|
||||
if (!empty($data['reference_file_url_yn'])) {
|
||||
$sql .= "AND a.reference_file_url_yn = '{$data['a.reference_file_url_yn']}' ";
|
||||
}
|
||||
|
||||
// 법인
|
||||
if (!empty($data['corp_own'])) {
|
||||
$sql .= "AND m.corp_own = '{$data['a.corp_own']}' ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$sql .= "ORDER BY b.vr_sq DESC ";
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
|
||||
|
||||
// 배정변경
|
||||
public function updateAssign($params)
|
||||
{
|
||||
|
||||
$this->db->transStart();
|
||||
|
||||
$usr_id = session('usr_id');
|
||||
$usr_sq = session('usr_sq');
|
||||
|
||||
// 현재상태 조회
|
||||
$sql = "SELECT a.vr_sq, a.charger, b.stat_cd
|
||||
FROM v2_article_info a
|
||||
LEFT JOIN v2_vrfc_req b on b.vr_sq = a.vr_sq
|
||||
WHERE a.vr_sq = ? ";
|
||||
|
||||
$query = $this->db->query($sql, [$params['vr_sq']]);
|
||||
$oldRow = $query->getRowArray();
|
||||
|
||||
// 담당자 부서 조회.
|
||||
$sql = "SELECT a.usr_sq, a.usr_id
|
||||
, IFNULL(CASE b.depth WHEN '1' THEN b.dept_sq END, CASE c.depth WHEN '1' THEN c.dept_sq END) dept1_sq
|
||||
, IFNULL(CASE b.depth WHEN '2' THEN b.dept_sq END, CASE c.depth WHEN '2' THEN c.dept_sq END) dept2_sq
|
||||
FROM users a
|
||||
LEFT JOIN departments b ON b.dept_sq = a.dept_sq
|
||||
LEFT JOIN departments c ON c.dept_sq = b.pdept_sq
|
||||
WHERE a.usr_id = ?";
|
||||
|
||||
|
||||
$query = $this->db->query($sql, [$params['damdang']]);
|
||||
$row = $query->getRowArray();
|
||||
|
||||
$data = [];
|
||||
if ($params['type'] == "1") {
|
||||
$data = [
|
||||
'damdang' => $params['damdang'],
|
||||
'dept1_sq' => $row['dept1_sq'],
|
||||
'dept2_sq' => $row['dept2_sq'],
|
||||
];
|
||||
} else if ($params['type'] == "2") {
|
||||
$data = [
|
||||
'damdang' => $params['damdang'],
|
||||
'reg_dept1_sq' => $row['dept1_sq'],
|
||||
'reg_dept2_sq' => $row['dept2_sq'],
|
||||
];
|
||||
}
|
||||
|
||||
// UPDATE v2_article_info
|
||||
$builder = $this->db->table('v2_article_info');
|
||||
$builder->where('vr_sq', $params['vr_sq']);
|
||||
if (!$builder->update()) {
|
||||
return [
|
||||
'success' => false,
|
||||
'msg' => '저장 실패',
|
||||
];
|
||||
}
|
||||
|
||||
// UPDATE v2_vrfc_req
|
||||
$builder = $this->db->table('v2_vrfc_req');
|
||||
$builder->where('vr_sq', $params['vr_sq']);
|
||||
$builder->where('CAST(stat_cd AS UNSIGNED) <', 20);
|
||||
|
||||
$builder->update();
|
||||
|
||||
$builder = $this->db->table('v2_vrfc_req');
|
||||
$builder->where('vr_sq', $params['vr_sq']);
|
||||
$builder->where('CAST(stat_cd AS UNSIGNED) <', 30);
|
||||
|
||||
$builder->update();
|
||||
|
||||
if (!empty($oldRow)) {
|
||||
if (intval($oldRow['stat_cd']) < 20) {
|
||||
$this->saveV2ChgStat($oldRow['vr_sq'], '20', $usr_sq);
|
||||
}
|
||||
|
||||
$memo = $oldRow['charger'] . ' => ' . $params['damdang'];
|
||||
$this->saveHistory($oldRow['vr_sq'], $oldRow['stat_cd'], 'C13', $usr_id, $memo);
|
||||
}
|
||||
|
||||
$this->db->transComplete();
|
||||
|
||||
return [
|
||||
'success' => true,
|
||||
];
|
||||
}
|
||||
|
||||
// 상태변경 시각 기록
|
||||
public function saveV2ChgStat($vr_sq, $stat_cd, $insert_user)
|
||||
{
|
||||
$sql = "INSERT INTO v2_chg_stat" .
|
||||
" (vr_sq, stat_cd, insert_user, insert_tm)" .
|
||||
" VALUES" .
|
||||
" (?, ?, ?, now())" .
|
||||
" ON DUPLICATE KEY UPDATE insert_user=VALUES(insert_user), insert_tm=VALUES(insert_tm)";
|
||||
|
||||
$this->db->query($sql, [$vr_sq, $stat_cd, $insert_user]);
|
||||
}
|
||||
|
||||
|
||||
// 변경이력 저장
|
||||
public function saveHistory($vr_sq, $stat_cd, $chg_type, $usr_id, $memo)
|
||||
{
|
||||
$sql = "INSERT INTO v2_chg_history
|
||||
(vr_sq, stat_cd, chg_type, insert_id, insert_tm, memo)
|
||||
VALUES
|
||||
(?, ?, ?, ?, NOW(), ?)
|
||||
";
|
||||
|
||||
$data = [
|
||||
$vr_sq,
|
||||
$stat_cd,
|
||||
$chg_type,
|
||||
$usr_id,
|
||||
$memo
|
||||
];
|
||||
|
||||
$this->db->query($sql, $data);
|
||||
}
|
||||
|
||||
|
||||
// 홍보확인서 정보
|
||||
public function getRecordInfo($vr_sq, $file_type)
|
||||
{
|
||||
$sql = "SELECT seq, vr_sq, use_yn, file_type, view_odr, IFNULL(file_path , '') AS file_path, IFNULL(file_name, '') AS file_name, file_ext, file_size, img_width, img_height, meta_data, insert_user, insert_tm, cloud_upload_yn
|
||||
FROM v2_files
|
||||
WHERE vr_sq = ? AND use_yn = 'Y' AND file_type = ?
|
||||
ORDER BY seq DESC ";
|
||||
|
||||
$query = $this->db->query($sql, [$vr_sq, $file_type]);
|
||||
|
||||
return $query->getRowArray();
|
||||
}
|
||||
|
||||
// 메모확인
|
||||
public function getMemo($vr_sq)
|
||||
{
|
||||
$sql = "SELECT memo FROM v2_vrfc_req where vr_sq = ?";
|
||||
|
||||
$query = $this->db->query($sql, [$vr_sq]);
|
||||
|
||||
return $query->getRowArray();
|
||||
}
|
||||
|
||||
// 상세목록 조회
|
||||
public function getDetail($vr_sq)
|
||||
{
|
||||
$sql = "SELECT
|
||||
a.vr_sq,
|
||||
a.dong_ho_chk,
|
||||
a.hscplqry_lv,
|
||||
b.tel_fail_cause,
|
||||
a.atcl_no,
|
||||
a.cpid,
|
||||
a.cp_atcl_id,
|
||||
a.rlet_type_cd,
|
||||
a.address1,
|
||||
a.sise,
|
||||
a.rdate,
|
||||
b.try_cnt,
|
||||
a.seller_tel_no,
|
||||
a.seller_nm,
|
||||
a.realtor_nm,
|
||||
a.realtor_tel_no,
|
||||
a.charger,
|
||||
b.insert_tm,
|
||||
a.reg_charger,
|
||||
b.stat_cd,
|
||||
i2.usr_nm as reg_charger_nm,
|
||||
c.bild_nm,
|
||||
b.vrfc_type as vrfc_type_cd,
|
||||
c.rm_no,
|
||||
c.floor,
|
||||
c.floor2,
|
||||
c.address_code,
|
||||
c.address2,
|
||||
c1.address2a,
|
||||
c1.address2b,
|
||||
c.address3,
|
||||
c.address4,
|
||||
c.trade_type as trade_type_cd,
|
||||
c.deal_amt,
|
||||
c.wrrnt_amt,
|
||||
c.lease_amt,
|
||||
c.isale_amt,
|
||||
c.prem_amt,
|
||||
c.sply_spc,
|
||||
c.excls_spc,
|
||||
c.tot_spc,
|
||||
c.grnd_spc,
|
||||
c.bldg_spc,
|
||||
c.hscp_no,
|
||||
c.ptp_no,
|
||||
d.insert_tm as update_res_tm,
|
||||
e.insert_tm as result_tm,
|
||||
f.region_nm,
|
||||
g.cd_nm as pre_stat,
|
||||
g.cd as pre_stat_cd,
|
||||
h.cd_nm as vrfc_type,
|
||||
i.usr_nm,
|
||||
j.cd_nm as trade_type,
|
||||
c.hscp_nm,
|
||||
c.ptp_nm,
|
||||
l.success,
|
||||
k.cd_nm as atcl_nm,
|
||||
m.code as result_d11,
|
||||
m.comment,
|
||||
n.code as fax_conf_yn_2,
|
||||
o.code as fax_conf_yn_3,
|
||||
p.code as fax_conf_yn_4,
|
||||
n.comment as fax_conf_yn_info_2,
|
||||
o.comment as fax_conf_yn_info_3,
|
||||
p.comment as fax_conf_yn_info_4,
|
||||
v.success AS tel_suc,
|
||||
r.code AS tel_agree,
|
||||
s.code AS tel_conf_yn_2,
|
||||
t.code AS tel_conf_yn_3,
|
||||
u.code AS tel_conf_yn_4,
|
||||
s.comment AS tel_conf_yn_info_2,
|
||||
t.comment AS tel_conf_yn_info_3,
|
||||
u.comment AS tel_conf_yn_info_4,
|
||||
w.success AS reg_conf_yn_1,
|
||||
x.code AS reg_conf_yn_2,
|
||||
y.code AS reg_conf_yn_3,
|
||||
x.comment AS reg_conf_yn_info_2,
|
||||
y.comment AS reg_conf_yn_info_3,
|
||||
b.rgbk_confirm,
|
||||
a.confirm_doc_img_url,
|
||||
a.cert_register,
|
||||
a.cert_register_save_yn,
|
||||
a.confirm_doc_img_url_save_yn,
|
||||
a.reference_file_url,
|
||||
a.reference_file_url_save_yn,
|
||||
a.reference_file_url_yn,
|
||||
c1.vir_addr_yn
|
||||
FROM
|
||||
v2_article_info AS a
|
||||
JOIN v2_vrfc_req b ON a.vr_sq = b.vr_sq
|
||||
JOIN v2_modify_info c ON a.vr_sq = c.vr_sq
|
||||
JOIN v2_article_info_etc c1 ON c1.vr_sq = a.vr_sq
|
||||
LEFT JOIN region_codes f ON a.address_code = f.region_cd
|
||||
LEFT JOIN v2_chg_stat d ON a.vr_sq = d.vr_sq AND d.stat_cd = '35'
|
||||
LEFT JOIN v2_chg_stat e ON a.vr_sq = e.vr_sq AND e.stat_cd = '60'
|
||||
LEFT JOIN codes g ON b.stat_cd = g.cd AND g.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes h ON b.vrfc_type = h.cd AND h.category = 'VRFCREQ_WAY'
|
||||
LEFT JOIN codes j ON c.trade_type = j.cd AND j.category = 'TRADE_TYPE'
|
||||
LEFT JOIN codes k ON a.rlet_type_cd = k.cd AND k.category = 'ARTICLE_TYPE'
|
||||
LEFT JOIN v2_confirm l ON a.vr_sq = l.vr_sq AND l.vrfc_type = 'D'
|
||||
LEFT JOIN v2_check_list m ON a.vr_sq = m.vr_sq AND m.type = 'D11'
|
||||
LEFT JOIN v2_check_list n ON a.vr_sq = n.vr_sq AND n.type = 'D12'
|
||||
LEFT JOIN v2_check_list o ON a.vr_sq = o.vr_sq AND o.type = 'D13'
|
||||
LEFT JOIN v2_check_list p ON a.vr_sq = p.vr_sq AND p.type = 'D14'
|
||||
LEFT JOIN v2_confirm v ON a.vr_sq = v.vr_sq AND v.vrfc_type = 'T'
|
||||
LEFT JOIN v2_check_list r ON a.vr_sq = r.vr_sq AND r.type = 'T11'
|
||||
LEFT JOIN v2_check_list s ON a.vr_sq = s.vr_sq AND s.type = 'T12'
|
||||
LEFT JOIN v2_check_list t ON a.vr_sq = t.vr_sq AND t.type = 'T13'
|
||||
LEFT JOIN v2_check_list u ON a.vr_sq = u.vr_sq AND u.type = 'T14'
|
||||
LEFT JOIN v2_confirm w ON a.vr_sq = w.vr_sq AND w.vrfc_type = 'R'
|
||||
LEFT JOIN v2_check_list x ON a.vr_sq = x.vr_sq AND x.type = '21'
|
||||
LEFT JOIN v2_check_list y ON a.vr_sq = y.vr_sq AND y.type = '22'
|
||||
LEFT JOIN users i ON a.charger = i.usr_id
|
||||
LEFT JOIN users i2 ON a.reg_charger = i2.usr_id
|
||||
|
||||
WHERE a.vr_sq = ?";
|
||||
|
||||
|
||||
$query = $this->db->query($sql, [$vr_sq]);
|
||||
|
||||
return $query->getRowArray();
|
||||
}
|
||||
|
||||
|
||||
// 변경이력 조회
|
||||
public function getHistory($vr_sq)
|
||||
{
|
||||
$sql = "SELECT
|
||||
a.seq,
|
||||
a.vr_sq,
|
||||
a.stat_cd,
|
||||
a.chg_type,
|
||||
a.insert_id,
|
||||
a.insert_tm,
|
||||
a.memo,
|
||||
b.cd_nm as stat_cd_nm,
|
||||
c.cd_nm as chg_type
|
||||
FROM
|
||||
v2_chg_history a
|
||||
LEFT JOIN codes b ON a.stat_cd = b.cd AND b.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes c ON a.chg_type = c.cd AND b.category = 'CHANGED_TYPE'
|
||||
WHERE
|
||||
a.vr_sq = ?
|
||||
ORDER BY a.seq DESC ";
|
||||
|
||||
$query = $this->db->query($sql, [$vr_sq]);
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
}
|
||||
2237
app/Models/v2/M703Model.php
Normal file
2237
app/Models/v2/M703Model.php
Normal file
File diff suppressed because it is too large
Load Diff
1006
app/Models/v2/M704Model.php
Normal file
1006
app/Models/v2/M704Model.php
Normal file
File diff suppressed because it is too large
Load Diff
1097
app/Models/v2/M705Model.php
Normal file
1097
app/Models/v2/M705Model.php
Normal file
File diff suppressed because it is too large
Load Diff
786
app/Models/v2/M706Model.php
Normal file
786
app/Models/v2/M706Model.php
Normal file
@@ -0,0 +1,786 @@
|
||||
<?php
|
||||
namespace App\Models\v2;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class M706Model extends Model
|
||||
{
|
||||
// 지역 목록 조회
|
||||
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
|
||||
COUNT(*) AS cnt
|
||||
FROM v2_article_info a
|
||||
JOIN v2_vrfc_req b ON a.vr_sq = b.vr_sq AND b.try_cnt >= 1
|
||||
JOIN v2_modify_info c ON a.vr_sq = c.vr_sq
|
||||
JOIN v2_article_info_etc c1 ON c1.vr_sq = a.vr_sq
|
||||
LEFT JOIN region_codes f ON a.address_code = f.region_cd
|
||||
LEFT JOIN v2_chg_stat d ON a.vr_sq = d.vr_sq AND d.stat_cd = '35'
|
||||
LEFT JOIN v2_chg_stat e ON a.vr_sq = e.vr_sq AND e.stat_cd = '60'
|
||||
LEFT JOIN codes g ON b.stat_cd = g.cd AND g.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes h ON b.vrfc_type = h.cd AND h.category = 'VRFCREQ_WAY'
|
||||
LEFT JOIN users i ON a.charger = i.usr_id
|
||||
LEFT JOIN users j ON a.reg_charger = j.usr_id
|
||||
LEFT JOIN v2_chg_stat d2 ON d2.vr_sq = a.vr_sq AND d2.stat_cd = 39
|
||||
|
||||
WHERE
|
||||
1=1
|
||||
AND b.insert_tm >= DATE_ADD(CURDATE(), INTERVAL -2 MONTH) ";
|
||||
|
||||
|
||||
// 매물번호
|
||||
if (!empty($data['atcl_no'])) {
|
||||
$sql .= "AND a.atcl_no = '{$data['atcl_no']}' ";
|
||||
} else {
|
||||
// 현재상태
|
||||
if (!empty($data['stat_cd'])) {
|
||||
$sql .= "AND b.stat_cd = '{$data['stat_cd']}' ";
|
||||
}
|
||||
|
||||
// 중개소
|
||||
if (!empty($data['realtor_nm'])) {
|
||||
$sql .= "AND a.realtor_nm = '{$data['realtor_nm']}' ";
|
||||
}
|
||||
|
||||
// 접수기간
|
||||
if (!empty($data['receipt_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['receipt_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['receipt_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['receipt_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 완료기간
|
||||
if (!empty($data['complete_sdate'])) {
|
||||
$sql .= "AND e.insert_tm >= '{$data['complete_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['complete_edate'])) {
|
||||
$sql .= "AND e.insert_tm <= '{$data['complete_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 검증방식
|
||||
if (!empty($data['vrfcreq_way'])) {
|
||||
$sql .= "AND b.vrfc_type = '{$data['vrfcreq_way']}' ";
|
||||
}
|
||||
|
||||
|
||||
// 매체사
|
||||
if (!empty($data['rcpt_cpid'])) {
|
||||
$sql .= "AND a.cpid = '{$data['rcpt_cpid']}' ";
|
||||
}
|
||||
|
||||
// 지역구분
|
||||
if (!empty($data['srcDong'])) {
|
||||
$sql .= "AND a.address_code = '{$data['srcDong']}' ";
|
||||
} else {
|
||||
if (!empty($data['srcGugun'])) {
|
||||
$str_gugun = substr($data['srcGugun'], '0', '2');
|
||||
if ($str_gugun == '36') { //세종시는 군구가 없고 바로 동이라서 예외
|
||||
$sql .= "AND a.address_code = '{$data['srcGugun']}' ";
|
||||
} else {
|
||||
$gugunPrefix = substr($data['srcGugun'], '0', '5');
|
||||
$sql .= "AND a.address_code LIKE '{$gugunPrefix}%' ";
|
||||
}
|
||||
} else {
|
||||
if (!empty($data['srcSido'])) {
|
||||
$sidoPrefix = substr($data['srcSido'], '0', '2');
|
||||
$sql .= "AND a.address_code LIKE '{$sidoPrefix}%' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 담당자
|
||||
if (!empty($data['damdang'])) {
|
||||
|
||||
switch ($data['charger_gbn']) {
|
||||
case "1":
|
||||
$sql .= "a.charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
case "2":
|
||||
$sql .= "a.reg_charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 배정여부
|
||||
if ($data['assign_yn'] !== "A") {
|
||||
switch ($data['charger_gbn'] . $data['assign_yn']) {
|
||||
case "1Y": // 전화/서류 담당자
|
||||
$sql .= "a.charger != '' ";
|
||||
break;
|
||||
case "1N": // 전화/서류 담당자
|
||||
$sql .= "a.charger = '' ";
|
||||
break;
|
||||
case "2Y": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger != '' ";
|
||||
break;
|
||||
case "2N": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger IS NULL ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 본부
|
||||
if (!empty($data['bonbu'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept1_sq = '{$data['bonbu']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept1_sq = '{$data['bonbu']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 팀
|
||||
if (!empty($data['team'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept2_sq = '{$data['team']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept2_sq = '{$data['team']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->getRow()->cnt;
|
||||
}
|
||||
|
||||
public function getResultList($start, $end, $data)
|
||||
{
|
||||
$sql = "SELECT
|
||||
a.vr_sq,
|
||||
a.atcl_no,
|
||||
a.cpid,
|
||||
a.cp_atcl_id,
|
||||
a.rlet_type_cd,
|
||||
a.address1,
|
||||
a.sise,
|
||||
a.rdate,
|
||||
a.seller_tel_no,
|
||||
a.seller_nm,
|
||||
a.realtor_nm,
|
||||
a.realtor_tel_no,
|
||||
a.charger,
|
||||
b.insert_tm,
|
||||
b.stat_cd,
|
||||
c.bild_nm,
|
||||
b.vrfc_type,
|
||||
c.rm_no,
|
||||
c.floor,
|
||||
c.address_code,
|
||||
c.address2,
|
||||
c1.address2a,
|
||||
c1.address2b,
|
||||
c.address3,
|
||||
c.trade_type,
|
||||
c.deal_amt,
|
||||
c.wrrnt_amt,
|
||||
c.lease_amt,
|
||||
c.isale_amt,
|
||||
c.prem_amt,
|
||||
c.sply_spc,
|
||||
c.excls_spc,
|
||||
c.tot_spc,
|
||||
c.grnd_spc,
|
||||
c.bldg_spc,
|
||||
c.hscp_no,
|
||||
c.ptp_no,
|
||||
d.insert_tm as update_res_tm,
|
||||
e.insert_tm as result_tm,
|
||||
f.region_nm,
|
||||
g.cd_nm as pre_stat,
|
||||
h.cd_nm as vrfc_type,
|
||||
i.usr_nm,
|
||||
j.usr_nm as reg_charger,
|
||||
d2.insert_tm as stat_39_tm
|
||||
FROM v2_article_info a
|
||||
JOIN v2_vrfc_req b ON a.vr_sq = b.vr_sq AND b.try_cnt >= 1
|
||||
JOIN v2_modify_info c ON a.vr_sq = c.vr_sq
|
||||
JOIN v2_article_info_etc c1 ON c1.vr_sq = a.vr_sq
|
||||
LEFT JOIN region_codes f ON a.address_code = f.region_cd
|
||||
LEFT JOIN v2_chg_stat d ON a.vr_sq = d.vr_sq AND d.stat_cd = '35'
|
||||
LEFT JOIN v2_chg_stat e ON a.vr_sq = e.vr_sq AND e.stat_cd = '60'
|
||||
LEFT JOIN codes g ON b.stat_cd = g.cd AND g.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes h ON b.vrfc_type = h.cd AND h.category = 'VRFCREQ_WAY'
|
||||
LEFT JOIN users i ON a.charger = i.usr_id
|
||||
LEFT JOIN users j ON a.reg_charger = j.usr_id
|
||||
LEFT JOIN v2_chg_stat d2 ON d2.vr_sq = a.vr_sq AND d2.stat_cd = 39
|
||||
|
||||
WHERE
|
||||
1=1
|
||||
AND b.insert_tm >= DATE_ADD(CURDATE(), INTERVAL -2 MONTH) ";
|
||||
|
||||
|
||||
// 매물번호
|
||||
if (!empty($data['atcl_no'])) {
|
||||
$sql .= "AND a.atcl_no = '{$data['atcl_no']}' ";
|
||||
} else {
|
||||
// 현재상태
|
||||
if (!empty($data['stat_cd'])) {
|
||||
$sql .= "AND b.stat_cd = '{$data['stat_cd']}' ";
|
||||
}
|
||||
|
||||
// 중개소
|
||||
if (!empty($data['realtor_nm'])) {
|
||||
$sql .= "AND a.realtor_nm = '{$data['realtor_nm']}' ";
|
||||
}
|
||||
|
||||
// 접수기간
|
||||
if (!empty($data['receipt_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['receipt_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['receipt_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['receipt_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 완료기간
|
||||
if (!empty($data['complete_sdate'])) {
|
||||
$sql .= "AND e.insert_tm >= '{$data['complete_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['complete_edate'])) {
|
||||
$sql .= "AND e.insert_tm <= '{$data['complete_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 검증방식
|
||||
if (!empty($data['vrfcreq_way'])) {
|
||||
$sql .= "AND b.vrfc_type = '{$data['vrfcreq_way']}' ";
|
||||
}
|
||||
|
||||
|
||||
// 매체사
|
||||
if (!empty($data['rcpt_cpid'])) {
|
||||
$sql .= "AND a.cpid = '{$data['rcpt_cpid']}' ";
|
||||
}
|
||||
|
||||
// 지역구분
|
||||
if (!empty($data['srcDong'])) {
|
||||
$sql .= "AND a.address_code = '{$data['srcDong']}' ";
|
||||
} else {
|
||||
if (!empty($data['srcGugun'])) {
|
||||
$str_gugun = substr($data['srcGugun'], '0', '2');
|
||||
if ($str_gugun == '36') { //세종시는 군구가 없고 바로 동이라서 예외
|
||||
$sql .= "AND a.address_code = '{$data['srcGugun']}' ";
|
||||
} else {
|
||||
$gugunPrefix = substr($data['srcGugun'], '0', '5');
|
||||
$sql .= "AND a.address_code LIKE '{$gugunPrefix}%' ";
|
||||
}
|
||||
} else {
|
||||
if (!empty($data['srcSido'])) {
|
||||
$sidoPrefix = substr($data['srcSido'], '0', '2');
|
||||
$sql .= "AND a.address_code LIKE '{$sidoPrefix}%' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 담당자
|
||||
if (!empty($data['damdang'])) {
|
||||
|
||||
switch ($data['charger_gbn']) {
|
||||
case "1":
|
||||
$sql .= "a.charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
case "2":
|
||||
$sql .= "a.reg_charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 배정여부
|
||||
if ($data['assign_yn'] !== "A") {
|
||||
switch ($data['charger_gbn'] . $data['assign_yn']) {
|
||||
case "1Y": // 전화/서류 담당자
|
||||
$sql .= "a.charger != '' ";
|
||||
break;
|
||||
case "1N": // 전화/서류 담당자
|
||||
$sql .= "a.charger = '' ";
|
||||
break;
|
||||
case "2Y": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger != '' ";
|
||||
break;
|
||||
case "2N": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger IS NULL ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 본부
|
||||
if (!empty($data['bonbu'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept1_sq = '{$data['bonbu']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept1_sq = '{$data['bonbu']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 팀
|
||||
if (!empty($data['team'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept2_sq = '{$data['team']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept2_sq = '{$data['team']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
$sql .= "ORDER BY b.vr_sq DESC , b.insert_tm DESC ";
|
||||
|
||||
$sql .= "LIMIT {$start}, {$end}";
|
||||
|
||||
// print ($sql);
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
|
||||
|
||||
// 엑셀다운로드
|
||||
public function getExcelList($data)
|
||||
{
|
||||
$sql = "SELECT
|
||||
a.atcl_no AS '매물번호',
|
||||
g.cd_nm AS '진행상태',
|
||||
b.insert_tm AS '접수시간',
|
||||
h.cd_nm AS '검증방식',
|
||||
CONCAT(f.region_nm, ' ', c.rm_no) AS '주소',
|
||||
CONCAT(c.address2, ' ', c.address3) AS '상세주소',
|
||||
a.cpid AS '매체사',
|
||||
a.realtor_nm AS '중개소',
|
||||
IFNULL(d.insert_tm, d2.insert_tm) AS '서류/전화 확인완료시간',
|
||||
i.usr_nm AS '담당자',
|
||||
a.reg_charger AS '등기부등본 담당자',
|
||||
e.insert_tm AS '검증완료 일시'
|
||||
FROM v2_article_info a
|
||||
JOIN v2_vrfc_req b ON a.vr_sq = b.vr_sq AND b.try_cnt >= 1
|
||||
JOIN v2_modify_info c ON a.vr_sq = c.vr_sq
|
||||
JOIN v2_article_info_etc c1 ON c1.vr_sq = a.vr_sq
|
||||
LEFT JOIN region_codes f ON a.address_code = f.region_cd
|
||||
LEFT JOIN v2_chg_stat d ON a.vr_sq = d.vr_sq AND d.stat_cd = '35'
|
||||
LEFT JOIN v2_chg_stat e ON a.vr_sq = e.vr_sq AND e.stat_cd = '60'
|
||||
LEFT JOIN codes g ON b.stat_cd = g.cd AND g.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes h ON b.vrfc_type = h.cd AND h.category = 'VRFCREQ_WAY'
|
||||
LEFT JOIN users i ON a.charger = i.usr_id
|
||||
LEFT JOIN users j ON a.reg_charger = j.usr_id
|
||||
LEFT JOIN v2_chg_stat d2 ON d2.vr_sq = a.vr_sq AND d2.stat_cd = 39
|
||||
|
||||
WHERE
|
||||
1=1
|
||||
AND b.insert_tm >= DATE_ADD(CURDATE(), INTERVAL -2 MONTH) ";
|
||||
|
||||
|
||||
// 매물번호
|
||||
if (!empty($data['atcl_no'])) {
|
||||
$sql .= "AND a.atcl_no = '{$data['atcl_no']}' ";
|
||||
} else {
|
||||
// 현재상태
|
||||
if (!empty($data['stat_cd'])) {
|
||||
$sql .= "AND b.stat_cd = '{$data['stat_cd']}' ";
|
||||
}
|
||||
|
||||
// 중개소
|
||||
if (!empty($data['realtor_nm'])) {
|
||||
$sql .= "AND a.realtor_nm = '{$data['realtor_nm']}' ";
|
||||
}
|
||||
|
||||
// 접수기간
|
||||
if (!empty($data['receipt_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['receipt_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['receipt_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['receipt_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 완료기간
|
||||
if (!empty($data['complete_sdate'])) {
|
||||
$sql .= "AND e.insert_tm >= '{$data['complete_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['complete_edate'])) {
|
||||
$sql .= "AND e.insert_tm <= '{$data['complete_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 검증방식
|
||||
if (!empty($data['vrfcreq_way'])) {
|
||||
$sql .= "AND b.vrfc_type = '{$data['vrfcreq_way']}' ";
|
||||
}
|
||||
|
||||
|
||||
// 매체사
|
||||
if (!empty($data['rcpt_cpid'])) {
|
||||
$sql .= "AND a.cpid = '{$data['rcpt_cpid']}' ";
|
||||
}
|
||||
|
||||
// 지역구분
|
||||
if (!empty($data['srcDong'])) {
|
||||
$sql .= "AND a.address_code = '{$data['srcDong']}' ";
|
||||
} else {
|
||||
if (!empty($data['srcGugun'])) {
|
||||
$str_gugun = substr($data['srcGugun'], '0', '2');
|
||||
if ($str_gugun == '36') { //세종시는 군구가 없고 바로 동이라서 예외
|
||||
$sql .= "AND a.address_code = '{$data['srcGugun']}' ";
|
||||
} else {
|
||||
$gugunPrefix = substr($data['srcGugun'], '0', '5');
|
||||
$sql .= "AND a.address_code LIKE '{$gugunPrefix}%' ";
|
||||
}
|
||||
} else {
|
||||
if (!empty($data['srcSido'])) {
|
||||
$sidoPrefix = substr($data['srcSido'], '0', '2');
|
||||
$sql .= "AND a.address_code LIKE '{$sidoPrefix}%' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 담당자
|
||||
if (!empty($data['damdang'])) {
|
||||
|
||||
switch ($data['charger_gbn']) {
|
||||
case "1":
|
||||
$sql .= "a.charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
case "2":
|
||||
$sql .= "a.reg_charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 배정여부
|
||||
if ($data['assign_yn'] !== "A") {
|
||||
switch ($data['charger_gbn'] . $data['assign_yn']) {
|
||||
case "1Y": // 전화/서류 담당자
|
||||
$sql .= "a.charger != '' ";
|
||||
break;
|
||||
case "1N": // 전화/서류 담당자
|
||||
$sql .= "a.charger = '' ";
|
||||
break;
|
||||
case "2Y": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger != '' ";
|
||||
break;
|
||||
case "2N": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger IS NULL ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 본부
|
||||
if (!empty($data['bonbu'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept1_sq = '{$data['bonbu']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept1_sq = '{$data['bonbu']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 팀
|
||||
if (!empty($data['team'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept2_sq = '{$data['team']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept2_sq = '{$data['team']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
$sql .= "ORDER BY b.vr_sq DESC , b.insert_tm DESC ";
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
|
||||
public function getRecordInfo($vr_sq, $file_type)
|
||||
{
|
||||
$sql = "SELECT seq, vr_sq, use_yn, file_type, view_odr, file_path, file_name, file_ext, file_size, img_width, img_height, meta_data, insert_user, insert_tm , cloud_upload_yn " .
|
||||
" FROM v2_files" .
|
||||
" WHERE vr_sq = ?" .
|
||||
" AND use_yn = 'Y'" .
|
||||
" AND file_type = ?" .
|
||||
" ORDER BY seq DESC";
|
||||
|
||||
$query = $this->db->query($sql, [$vr_sq, $file_type]);
|
||||
|
||||
return $query->getRowArray();
|
||||
}
|
||||
|
||||
// 상세정보
|
||||
public function getDetail($vr_sq)
|
||||
{
|
||||
$sql = "SELECT
|
||||
a.vr_sq,
|
||||
a.dong_ho_chk,
|
||||
a.hscplqry_lv,
|
||||
b.tel_fail_cause,
|
||||
a.atcl_no,
|
||||
a.cpid,
|
||||
b.stat_cd,
|
||||
a.cp_atcl_id,
|
||||
a.rlet_type_cd,
|
||||
a.address1,
|
||||
a.sise,
|
||||
a.rdate,
|
||||
a.seller_tel_no,
|
||||
b.try_cnt,
|
||||
a.seller_nm,
|
||||
a.realtor_nm,
|
||||
a.realtor_tel_no,
|
||||
a.charger,
|
||||
b.insert_tm,
|
||||
a.reg_charger,
|
||||
i2.usr_nm as reg_charger_nm,
|
||||
c.bild_nm,
|
||||
b.vrfc_type as vrfc_type_cd,
|
||||
c.rm_no,
|
||||
c.floor,
|
||||
c.floor2,
|
||||
c.address_code,
|
||||
c.address2,
|
||||
c1.address2a,
|
||||
c1.address2b,
|
||||
c.address3,
|
||||
c.address4,
|
||||
c.trade_type as trade_type_cd,
|
||||
c.deal_amt,
|
||||
c.wrrnt_amt,
|
||||
c.lease_amt,
|
||||
c.isale_amt,
|
||||
c.prem_amt,
|
||||
c.sply_spc,
|
||||
c.excls_spc,
|
||||
c.tot_spc,
|
||||
c.grnd_spc,
|
||||
c.bldg_spc,
|
||||
c.hscp_no,
|
||||
c.ptp_no,
|
||||
d.insert_tm as update_res_tm,
|
||||
e.insert_tm as result_tm,
|
||||
f.region_nm,
|
||||
g.cd_nm as pre_stat,
|
||||
g.cd as pre_stat_cd,
|
||||
h.cd_nm as vrfc_type,
|
||||
i.usr_nm,
|
||||
j.cd_nm as trade_type,
|
||||
c.hscp_nm,
|
||||
c.ptp_nm,
|
||||
l.success,
|
||||
k.cd_nm as atcl_nm,
|
||||
m.code as result_d11,
|
||||
m.comment,
|
||||
n.code as fax_conf_yn_2,
|
||||
o.code as fax_conf_yn_3,
|
||||
p.code as fax_conf_yn_4,
|
||||
n.comment as fax_conf_yn_info_2,
|
||||
o.comment as fax_conf_yn_info_3,
|
||||
p.comment as fax_conf_yn_info_4,
|
||||
v.success AS tel_suc,
|
||||
r.code AS tel_agree,
|
||||
s.code AS tel_conf_yn_2,
|
||||
t.code AS tel_conf_yn_3,
|
||||
u.code AS tel_conf_yn_4,
|
||||
s.comment AS tel_conf_yn_info_2,
|
||||
t.comment AS tel_conf_yn_info_3,
|
||||
u.comment AS tel_conf_yn_info_4,
|
||||
w.success AS reg_conf_yn_1,
|
||||
x.code AS reg_conf_yn_2,
|
||||
y.code AS reg_conf_yn_3,
|
||||
x.comment AS reg_conf_yn_info_2,
|
||||
y.comment AS reg_conf_yn_info_3,
|
||||
b.rgbk_confirm,
|
||||
|
||||
a.confirm_doc_img_url,
|
||||
a.cert_register,
|
||||
|
||||
a.cert_register_save_yn,
|
||||
a.confirm_doc_img_url_save_yn
|
||||
FROM v2_article_info a
|
||||
JOIN v2_vrfc_req b ON a.vr_sq = b.vr_sq
|
||||
JOIN v2_modify_info c ON a.vr_sq = c.vr_sq
|
||||
JOIN v2_article_info_etc c1 ON c1.vr_sq = a.vr_sq
|
||||
LEFT JOIN region_codes f ON a.address_code = f.region_cd
|
||||
LEFT JOIN v2_chg_stat d ON a.vr_sq = d.vr_sq AND d.stat_cd = 35
|
||||
LEFT JOIN v2_chg_stat e ON a.vr_sq = e.vr_sq AND e.stat_cd = 60
|
||||
LEFT JOIN codes g ON b.stat_cd = g.cd AND g.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes h ON b.vrfc_type = h.cd AND h.category = 'VRFCREQ_WAY'
|
||||
LEFT JOIN codes j ON c.trade_type = j.cd AND j.category = 'TRADE_TYPE'
|
||||
LEFT JOIN codes k ON a.rlet_type_cd = k.cd AND k.category = 'ARTICLE_TYPE'
|
||||
LEFT JOIN v2_confirm l ON a.vr_sq = l.vr_sq AND l.vrfc_type = 'D'
|
||||
LEFT JOIN v2_check_list m ON a.vr_sq = m.vr_sq AND m.type = 'D11'
|
||||
LEFT JOIN v2_check_list n ON a.vr_sq = n.vr_sq AND n.type = 'D12'
|
||||
LEFT JOIN v2_check_list o ON a.vr_sq = o.vr_sq AND o.type = 'D13'
|
||||
LEFT JOIN v2_check_list p ON a.vr_sq = p.vr_sq AND p.type = 'D14'
|
||||
LEFT JOIN v2_confirm v ON a.vr_sq = v.vr_sq AND v.vrfc_type = 'T'
|
||||
LEFT JOIN v2_check_list r ON a.vr_sq = r.vr_sq AND r.type = 'T11'
|
||||
LEFT JOIN v2_check_list s ON a.vr_sq = s.vr_sq AND s.type = 'T12'
|
||||
LEFT JOIN v2_check_list t ON a.vr_sq = t.vr_sq AND t.type = 'T13'
|
||||
LEFT JOIN v2_check_list u ON a.vr_sq = u.vr_sq AND u.type = 'T14'
|
||||
LEFT JOIN v2_confirm w ON a.vr_sq = w.vr_sq AND w.vrfc_type = 'R'
|
||||
LEFT JOIN v2_check_list x ON a.vr_sq = x.vr_sq AND x.type = '21'
|
||||
LEFT JOIN v2_check_list y ON a.vr_sq = y.vr_sq AND y.type = '22'
|
||||
LEFT JOIN users i ON a.charger = i.usr_id
|
||||
LEFT JOIN users i2 ON a.reg_charger = i2.usr_id
|
||||
WHERE a.vr_sq = " . $vr_sq;
|
||||
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->getRowArray();
|
||||
}
|
||||
|
||||
// 메모확인
|
||||
public function getMemo($vr_sq)
|
||||
{
|
||||
$sql = "SELECT memo FROM v2_vrfc_req where vr_sq = ?";
|
||||
|
||||
$query = $this->db->query($sql, [$vr_sq]);
|
||||
|
||||
return $query->getRowArray();
|
||||
}
|
||||
|
||||
// 변경이력 조회
|
||||
public function getHistory($id)
|
||||
{
|
||||
$sql = "SELECT
|
||||
a.seq,
|
||||
a.vr_sq,
|
||||
a.stat_cd,
|
||||
a.chg_type,
|
||||
a.insert_id,
|
||||
a.insert_tm,
|
||||
a.memo,
|
||||
b.cd_nm as stat_cd_nm,
|
||||
c.cd_nm as chg_type
|
||||
FROM
|
||||
v2_chg_history a
|
||||
LEFT JOIN codes b ON a.stat_cd = b.cd AND b.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes c ON a.chg_type = c.cd AND b.category = 'CHANGED_TYPE'
|
||||
WHERE
|
||||
a.vr_sq = ?
|
||||
ORDER BY a.seq DESC ";
|
||||
|
||||
$query = $this->db->query($sql, [$id]);
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
|
||||
}
|
||||
1236
app/Models/v2/M708Model.php
Normal file
1236
app/Models/v2/M708Model.php
Normal file
File diff suppressed because it is too large
Load Diff
1122
app/Models/v2/M709Model.php
Normal file
1122
app/Models/v2/M709Model.php
Normal file
File diff suppressed because it is too large
Load Diff
707
app/Models/v2/M710Model.php
Normal file
707
app/Models/v2/M710Model.php
Normal file
@@ -0,0 +1,707 @@
|
||||
<?php
|
||||
namespace App\Models\v2;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class M710Model extends Model
|
||||
{
|
||||
|
||||
// 지역 목록 조회
|
||||
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
|
||||
COUNT(*) AS cnt
|
||||
FROM v2_vrfc_req b
|
||||
JOIN v2_article_info a ON a.vr_sq = b.vr_sq
|
||||
JOIN v2_modify_info c ON c.vr_sq = a.vr_sq
|
||||
LEFT JOIN v2_article_info_etc c1 ON c1.vr_sq = a.vr_sq
|
||||
JOIN v2_stop_api_save_info k ON k.atcl_no = a.atcl_no AND k.status IN ('stop','wait','err')
|
||||
LEFT JOIN region_codes f ON f.region_cd = a.address_code
|
||||
LEFT JOIN v2_chg_stat d ON d.vr_sq = a.vr_sq AND d.stat_cd = '35'
|
||||
LEFT JOIN v2_chg_stat d45 ON d45.vr_sq = a.vr_sq AND d45.stat_cd = '45'
|
||||
LEFT JOIN v2_chg_stat d49 ON d49.vr_sq = a.vr_sq AND d49.stat_cd = '49'
|
||||
LEFT JOIN v2_chg_stat e ON e.vr_sq = a.vr_sq AND e.stat_cd = '60'
|
||||
LEFT JOIN codes g ON g.cd = b.stat_cd AND g.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes h ON h.cd = b.vrfc_type AND h.category = 'VRFCREQ_WAY'
|
||||
LEFT JOIN users i ON i.usr_id = a.charger
|
||||
LEFT JOIN users j ON j.usr_id = a.reg_charger
|
||||
LEFT JOIN v2_chg_stat d2 ON d2.vr_sq = a.vr_sq AND d2.stat_cd = '39'
|
||||
WHERE b.insert_tm >= DATE_ADD(CURDATE(), INTERVAL -2 MONTH) ";
|
||||
|
||||
|
||||
// 매물번호
|
||||
if (!empty($data['atcl_no'])) {
|
||||
$sql .= "AND a.atcl = '{$data['atcl_no']}' ";
|
||||
} else {
|
||||
// 현재상태
|
||||
if (!empty($data['stat_cd'])) {
|
||||
$sql .= "AND b.stat_cd = '{$data['stat_cd']}' ";
|
||||
}
|
||||
|
||||
// 중개소
|
||||
if (!empty($data['realtor_nm'])) {
|
||||
$sql .= "AND a.realtor_nm = '{$data['realtor_nm']}' ";
|
||||
}
|
||||
|
||||
// 매물구분
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
|
||||
// 접수기간
|
||||
if (!empty($data['receipt_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['receipt_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['receipt_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['receipt_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 완료기간
|
||||
if (!empty($data['complete_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['complete_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['complete_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['complete_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 검증방식
|
||||
if (!empty($data['vrfc_type_sub'])) {
|
||||
$sql .= "AND a.vrfc_type_sub = '{$data['vrfc_type_sub']}' ";
|
||||
} else {
|
||||
if (!empty($data['vrfcreq_way'])) {
|
||||
$sql .= "AND b.vrfc_type = '{$data['vrfcreq_way']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 매체사
|
||||
if (!empty($data['rcpt_cpid'])) {
|
||||
$sql .= "AND a.cpid = '{$data['rcpt_cpid']}' ";
|
||||
}
|
||||
|
||||
// 지역구분
|
||||
if (!empty($data['srcDong'])) {
|
||||
$sql .= "AND a.address_code = '{$data['srcDong']}' ";
|
||||
} else {
|
||||
if (!empty($data['srcGugun'])) {
|
||||
$str_gugun = substr($data['srcGugun'], '0', '2');
|
||||
if ($str_gugun == '36') { //세종시는 군구가 없고 바로 동이라서 예외
|
||||
$sql .= "AND a.address_code = '{$data['srcGugun']}' ";
|
||||
} else {
|
||||
$gugunPrefix = substr($data['srcGugun'], '0', '5');
|
||||
$sql .= "AND a.address_code LIKE '{$gugunPrefix}%' ";
|
||||
}
|
||||
} else {
|
||||
if (!empty($data['srcSido'])) {
|
||||
$sidoPrefix = substr($data['srcSido'], '0', '2');
|
||||
$sql .= "AND a.address_code LIKE '{$sidoPrefix}%' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 담당자
|
||||
if (!empty($data['damdang'])) {
|
||||
|
||||
switch ($data['charger_gbn']) {
|
||||
case "1":
|
||||
$sql .= "a.charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
case "2":
|
||||
$sql .= "a.reg_charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 배정여부
|
||||
if ($data['assign_yn'] !== "A") {
|
||||
switch ($data['charger_gbn'] . $data['assign_yn']) {
|
||||
case "1Y": // 전화/서류 담당자
|
||||
$sql .= "a.charger != '' ";
|
||||
break;
|
||||
case "1N": // 전화/서류 담당자
|
||||
$sql .= "a.charger = '' ";
|
||||
break;
|
||||
case "2Y": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger != '' ";
|
||||
break;
|
||||
case "2N": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger IS NULL ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 본부
|
||||
if (!empty($data['bonbu'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept1_sq = '{$data['bonbu']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept1_sq = '{$data['bonbu']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 팀
|
||||
if (!empty($data['team'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept2_sq = '{$data['team']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept2_sq = '{$data['team']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 매물종류
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
// 참고파일
|
||||
if (!empty($data['status'])) {
|
||||
$sql .= "AND k.status = '{$data['status']}' ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->getRow()->cnt;
|
||||
}
|
||||
|
||||
public function getResultList($start, $end, $data)
|
||||
{
|
||||
$sql = "SELECT
|
||||
a.vr_sq,
|
||||
j.usr_nm as reg_charger,
|
||||
a.atcl_no,
|
||||
a.cpid,
|
||||
a.cp_atcl_id,
|
||||
a.rlet_type_cd,
|
||||
a.address1,
|
||||
a.sise,
|
||||
a.rdate,
|
||||
a.seller_tel_no,
|
||||
a.seller_nm,
|
||||
a.realtor_nm,
|
||||
a.realtor_tel_no,
|
||||
a.rlet_type_cd,
|
||||
a.charger,
|
||||
b.insert_tm,
|
||||
b.stat_cd,
|
||||
c.bild_nm,
|
||||
b.vrfc_type,
|
||||
c.rm_no,
|
||||
c.floor,
|
||||
c.address_code,
|
||||
c.address2,
|
||||
c1.address2a,
|
||||
c1.address2b,
|
||||
c.address3,
|
||||
c.trade_type,
|
||||
c.deal_amt,
|
||||
c.wrrnt_amt,
|
||||
c.lease_amt,
|
||||
c.isale_amt,
|
||||
c.prem_amt,
|
||||
c.sply_spc,
|
||||
c.excls_spc,
|
||||
c.tot_spc,
|
||||
c.grnd_spc,
|
||||
c.bldg_spc,
|
||||
c.hscp_no,
|
||||
c.ptp_no,
|
||||
d.insert_tm as update_res_tm,
|
||||
greatest(ifnull(d45.insert_tm, ''), ifnull(d49.insert_tm, '')) as rgbk_check_tm,
|
||||
e.insert_tm as result_tm,
|
||||
f.region_nm,
|
||||
g.cd_nm as pre_stat,
|
||||
h.cd_nm as vrfc_type,
|
||||
i.usr_nm,
|
||||
d2.insert_tm as stat_39_tm,
|
||||
a.vrfc_type_sub,
|
||||
k.status
|
||||
FROM v2_vrfc_req b
|
||||
JOIN v2_article_info a ON a.vr_sq = b.vr_sq
|
||||
JOIN v2_modify_info c ON c.vr_sq = a.vr_sq
|
||||
LEFT JOIN v2_article_info_etc c1 ON c1.vr_sq = a.vr_sq
|
||||
JOIN v2_stop_api_save_info k ON k.atcl_no = a.atcl_no AND k.status IN ('stop','wait','err')
|
||||
LEFT JOIN region_codes f ON f.region_cd = a.address_code
|
||||
LEFT JOIN v2_chg_stat d ON d.vr_sq = a.vr_sq AND d.stat_cd = '35'
|
||||
LEFT JOIN v2_chg_stat d45 ON d45.vr_sq = a.vr_sq AND d45.stat_cd = '45'
|
||||
LEFT JOIN v2_chg_stat d49 ON d49.vr_sq = a.vr_sq AND d49.stat_cd = '49'
|
||||
LEFT JOIN v2_chg_stat e ON e.vr_sq = a.vr_sq AND e.stat_cd = '60'
|
||||
LEFT JOIN codes g ON g.cd = b.stat_cd AND g.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes h ON h.cd = b.vrfc_type AND h.category = 'VRFCREQ_WAY'
|
||||
LEFT JOIN users i ON i.usr_id = a.charger
|
||||
LEFT JOIN users j ON j.usr_id = a.reg_charger
|
||||
LEFT JOIN v2_chg_stat d2 ON d2.vr_sq = a.vr_sq AND d2.stat_cd = '39'
|
||||
WHERE b.insert_tm >= DATE_ADD(CURDATE(), INTERVAL -2 MONTH) ";
|
||||
|
||||
|
||||
// 매물번호
|
||||
if (!empty($data['atcl_no'])) {
|
||||
$sql .= "AND a.atcl = '{$data['atcl_no']}' ";
|
||||
} else {
|
||||
// 현재상태
|
||||
if (!empty($data['stat_cd'])) {
|
||||
$sql .= "AND b.stat_cd = '{$data['stat_cd']}' ";
|
||||
}
|
||||
|
||||
// 중개소
|
||||
if (!empty($data['realtor_nm'])) {
|
||||
$sql .= "AND a.realtor_nm = '{$data['realtor_nm']}' ";
|
||||
}
|
||||
|
||||
// 매물구분
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
|
||||
// 접수기간
|
||||
if (!empty($data['receipt_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['receipt_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['receipt_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['receipt_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 완료기간
|
||||
if (!empty($data['complete_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['complete_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['complete_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['complete_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 검증방식
|
||||
if (!empty($data['vrfc_type_sub'])) {
|
||||
$sql .= "AND a.vrfc_type_sub = '{$data['vrfc_type_sub']}' ";
|
||||
} else {
|
||||
if (!empty($data['vrfcreq_way'])) {
|
||||
$sql .= "AND b.vrfc_type = '{$data['vrfcreq_way']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 매체사
|
||||
if (!empty($data['rcpt_cpid'])) {
|
||||
$sql .= "AND a.cpid = '{$data['rcpt_cpid']}' ";
|
||||
}
|
||||
|
||||
// 지역구분
|
||||
if (!empty($data['srcDong'])) {
|
||||
$sql .= "AND a.address_code = '{$data['srcDong']}' ";
|
||||
} else {
|
||||
if (!empty($data['srcGugun'])) {
|
||||
$str_gugun = substr($data['srcGugun'], '0', '2');
|
||||
if ($str_gugun == '36') { //세종시는 군구가 없고 바로 동이라서 예외
|
||||
$sql .= "AND a.address_code = '{$data['srcGugun']}' ";
|
||||
} else {
|
||||
$gugunPrefix = substr($data['srcGugun'], '0', '5');
|
||||
$sql .= "AND a.address_code LIKE '{$gugunPrefix}%' ";
|
||||
}
|
||||
} else {
|
||||
if (!empty($data['srcSido'])) {
|
||||
$sidoPrefix = substr($data['srcSido'], '0', '2');
|
||||
$sql .= "AND a.address_code LIKE '{$sidoPrefix}%' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 담당자
|
||||
if (!empty($data['damdang'])) {
|
||||
|
||||
switch ($data['charger_gbn']) {
|
||||
case "1":
|
||||
$sql .= "a.charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
case "2":
|
||||
$sql .= "a.reg_charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 배정여부
|
||||
if ($data['assign_yn'] !== "A") {
|
||||
switch ($data['charger_gbn'] . $data['assign_yn']) {
|
||||
case "1Y": // 전화/서류 담당자
|
||||
$sql .= "a.charger != '' ";
|
||||
break;
|
||||
case "1N": // 전화/서류 담당자
|
||||
$sql .= "a.charger = '' ";
|
||||
break;
|
||||
case "2Y": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger != '' ";
|
||||
break;
|
||||
case "2N": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger IS NULL ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 본부
|
||||
if (!empty($data['bonbu'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept1_sq = '{$data['bonbu']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept1_sq = '{$data['bonbu']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 팀
|
||||
if (!empty($data['team'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept2_sq = '{$data['team']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept2_sq = '{$data['team']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 매물종류
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
// 참고파일
|
||||
if (!empty($data['status'])) {
|
||||
$sql .= "AND k.status = '{$data['status']}' ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$sql .= "ORDER BY b.vr_sq DESC , b.insert_tm DESC ";
|
||||
$sql .= "LIMIT {$start}, {$end}";
|
||||
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
|
||||
// 엑셀다운로드
|
||||
public function getExcelList($data)
|
||||
{
|
||||
$sql = "SELECT
|
||||
CASE
|
||||
WHEN k.`status` = 'stop' THEN '전송전'
|
||||
WHEN k.`status` = 'wait' THEN '전송중'
|
||||
WHEN k.`status` = 'err' THEN '오류'
|
||||
END AS '전송여부',
|
||||
a.atcl_no AS '매물번호',
|
||||
g.cd_nm AS '진행상태',
|
||||
b.insert_tm AS '접수시간',
|
||||
h.cd_nm AS '검증방식',
|
||||
CONCAT(f.region_nm, ' ', c.rm_no) AS '주소',
|
||||
CONCAT(c.address2, ' ', c.address3) AS '상세주소',
|
||||
a.cpid AS '매체사',
|
||||
a.realtor_nm AS '중개소',
|
||||
i.usr_nm AS '서류/전화 담당자',
|
||||
IFNULL(d.insert_tm, d2.insert_tm) AS '서류/전화 확인완료시간',
|
||||
a.reg_charger AS '등기부등본 담당자',
|
||||
greatest(ifnull(d45.insert_tm, ''), ifnull(d49.insert_tm, '')) AS '등기부등본 확인시간',
|
||||
e.insert_tm AS '검증완료 일시'
|
||||
FROM v2_vrfc_req b
|
||||
JOIN v2_article_info a ON a.vr_sq = b.vr_sq
|
||||
JOIN v2_modify_info c ON c.vr_sq = a.vr_sq
|
||||
LEFT JOIN v2_article_info_etc c1 ON c1.vr_sq = a.vr_sq
|
||||
JOIN v2_stop_api_save_info k ON k.atcl_no = a.atcl_no AND k.status IN ('stop','wait','err')
|
||||
LEFT JOIN region_codes f ON f.region_cd = a.address_code
|
||||
LEFT JOIN v2_chg_stat d ON d.vr_sq = a.vr_sq AND d.stat_cd = '35'
|
||||
LEFT JOIN v2_chg_stat d45 ON d45.vr_sq = a.vr_sq AND d45.stat_cd = '45'
|
||||
LEFT JOIN v2_chg_stat d49 ON d49.vr_sq = a.vr_sq AND d49.stat_cd = '49'
|
||||
LEFT JOIN v2_chg_stat e ON e.vr_sq = a.vr_sq AND e.stat_cd = '60'
|
||||
LEFT JOIN codes g ON g.cd = b.stat_cd AND g.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes h ON h.cd = b.vrfc_type AND h.category = 'VRFCREQ_WAY'
|
||||
LEFT JOIN users i ON i.usr_id = a.charger
|
||||
LEFT JOIN users j ON j.usr_id = a.reg_charger
|
||||
LEFT JOIN v2_chg_stat d2 ON d2.vr_sq = a.vr_sq AND d2.stat_cd = '39'
|
||||
WHERE b.insert_tm >= DATE_ADD(CURDATE(), INTERVAL -2 MONTH) ";
|
||||
|
||||
|
||||
// 매물번호
|
||||
if (!empty($data['atcl_no'])) {
|
||||
$sql .= "AND a.atcl = '{$data['atcl_no']}' ";
|
||||
} else {
|
||||
// 현재상태
|
||||
if (!empty($data['stat_cd'])) {
|
||||
$sql .= "AND b.stat_cd = '{$data['stat_cd']}' ";
|
||||
}
|
||||
|
||||
// 중개소
|
||||
if (!empty($data['realtor_nm'])) {
|
||||
$sql .= "AND a.realtor_nm = '{$data['realtor_nm']}' ";
|
||||
}
|
||||
|
||||
// 매물구분
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
|
||||
// 접수기간
|
||||
if (!empty($data['receipt_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['receipt_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['receipt_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['receipt_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 완료기간
|
||||
if (!empty($data['complete_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['complete_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['complete_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['complete_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 검증방식
|
||||
if (!empty($data['vrfc_type_sub'])) {
|
||||
$sql .= "AND a.vrfc_type_sub = '{$data['vrfc_type_sub']}' ";
|
||||
} else {
|
||||
if (!empty($data['vrfcreq_way'])) {
|
||||
$sql .= "AND b.vrfc_type = '{$data['vrfcreq_way']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 매체사
|
||||
if (!empty($data['rcpt_cpid'])) {
|
||||
$sql .= "AND a.cpid = '{$data['rcpt_cpid']}' ";
|
||||
}
|
||||
|
||||
// 지역구분
|
||||
if (!empty($data['srcDong'])) {
|
||||
$sql .= "AND a.address_code = '{$data['srcDong']}' ";
|
||||
} else {
|
||||
if (!empty($data['srcGugun'])) {
|
||||
$str_gugun = substr($data['srcGugun'], '0', '2');
|
||||
if ($str_gugun == '36') { //세종시는 군구가 없고 바로 동이라서 예외
|
||||
$sql .= "AND a.address_code = '{$data['srcGugun']}' ";
|
||||
} else {
|
||||
$gugunPrefix = substr($data['srcGugun'], '0', '5');
|
||||
$sql .= "AND a.address_code LIKE '{$gugunPrefix}%' ";
|
||||
}
|
||||
} else {
|
||||
if (!empty($data['srcSido'])) {
|
||||
$sidoPrefix = substr($data['srcSido'], '0', '2');
|
||||
$sql .= "AND a.address_code LIKE '{$sidoPrefix}%' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 담당자
|
||||
if (!empty($data['damdang'])) {
|
||||
|
||||
switch ($data['charger_gbn']) {
|
||||
case "1":
|
||||
$sql .= "a.charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
case "2":
|
||||
$sql .= "a.reg_charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 배정여부
|
||||
if ($data['assign_yn'] !== "A") {
|
||||
switch ($data['charger_gbn'] . $data['assign_yn']) {
|
||||
case "1Y": // 전화/서류 담당자
|
||||
$sql .= "a.charger != '' ";
|
||||
break;
|
||||
case "1N": // 전화/서류 담당자
|
||||
$sql .= "a.charger = '' ";
|
||||
break;
|
||||
case "2Y": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger != '' ";
|
||||
break;
|
||||
case "2N": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger IS NULL ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 본부
|
||||
if (!empty($data['bonbu'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept1_sq = '{$data['bonbu']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept1_sq = '{$data['bonbu']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 팀
|
||||
if (!empty($data['team'])) {
|
||||
if ($data['charger_gbn'] === "1") {
|
||||
$sql .= "AND a.dept2_sq = '{$data['team']}' ";
|
||||
} else {
|
||||
$sql .= "AND a.reg_dept2_sq = '{$data['team']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 매물종류
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
// 참고파일
|
||||
if (!empty($data['status'])) {
|
||||
$sql .= "AND k.status = '{$data['status']}' ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$sql .= "ORDER BY b.vr_sq DESC , b.insert_tm DESC ";
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
|
||||
// 전송요청 api 수정
|
||||
public function updateSendApi($type)
|
||||
{
|
||||
$sql = "UPDATE v2_stop_api_save_info SET status = 'wait'
|
||||
WHERE type like CONCAT(?, '%') AND status = 'stop'
|
||||
";
|
||||
|
||||
if ($this->db->query($sql, [$type]) === false) {
|
||||
return [
|
||||
'success' => false,
|
||||
'msg' => '저장 실패',
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'success' => true,
|
||||
];
|
||||
}
|
||||
|
||||
public function insert_v2_stop_api_save_info($atcl_no, $vr_sq, $type, $fax_sq)
|
||||
{
|
||||
$sql = "INSERT INTO v2_stop_api_save_info(atcl_no,vr_sq,type,status,stop_dt,fax_sq)" .
|
||||
" VALUE(?,?,?,'stop',now(),?)";
|
||||
$date = [
|
||||
$atcl_no,
|
||||
$vr_sq,
|
||||
$type,
|
||||
$fax_sq
|
||||
];
|
||||
$this->db->query($sql, $date);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
9
app/Models/v2/M711Model.php
Normal file
9
app/Models/v2/M711Model.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace App\Models\v2;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class M711Model extends Model
|
||||
{
|
||||
|
||||
}
|
||||
928
app/Models/v2/M712Model.php
Normal file
928
app/Models/v2/M712Model.php
Normal file
@@ -0,0 +1,928 @@
|
||||
<?php
|
||||
namespace App\Models\v2;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class M712Model extends Model
|
||||
{
|
||||
// 지역 목록 조회
|
||||
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
|
||||
COUNT(*) AS cnt
|
||||
FROM v2_article_info a
|
||||
LEFT JOIN v2_article_info_etc b ON a.vr_sq = b.vr_sq
|
||||
LEFT JOIN v2_vrfc_req c ON a.vr_sq = c.vr_sq
|
||||
LEFT JOIN v2_modify_info m ON a.vr_sq = m.vr_sq
|
||||
LEFT JOIN v2_chg_stat s45 ON a.vr_sq = s45.vr_sq AND s45.stat_cd = '45'
|
||||
LEFT JOIN v2_chg_stat s49 ON a.vr_sq = s49.vr_sq AND s49.stat_cd = '49'
|
||||
LEFT JOIN v2_chg_stat s60 ON a.vr_sq = s60.vr_sq AND s60.stat_cd = '60'
|
||||
LEFT JOIN v2_chg_stat s39 ON a.vr_sq = s39.vr_sq AND s39.stat_cd = '39'
|
||||
LEFT JOIN v2_check_list c21 ON a.vr_sq = c21.vr_sq AND c21.type = '21'
|
||||
LEFT JOIN v2_check_list c22 ON a.vr_sq = c22.vr_sq AND c22.type = '22'
|
||||
|
||||
WHERE
|
||||
c.vrfc_type = 'N' ";
|
||||
|
||||
// 매물번호
|
||||
if (!empty($data['atcl_no'])) {
|
||||
$sql .= "AND a.atcl = '{$data['atcl_no']}' ";
|
||||
} else {
|
||||
|
||||
// 접수기간
|
||||
if (!empty($data['receipt_sdate'])) {
|
||||
$sql .= "AND c.insert_tm >= '{$data['receipt_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['receipt_edate'])) {
|
||||
$sql .= "AND c.insert_tm <= '{$data['receipt_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 완료기간
|
||||
if (!empty($data['complete_sdate'])) {
|
||||
$sql .= "AND s60.insert_tm >= '{$data['complete_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['complete_edate'])) {
|
||||
$sql .= "AND s60.insert_tm <= '{$data['complete_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 지역구분
|
||||
if (!empty($data['srcDong'])) {
|
||||
$sql .= "AND a.address_code = '{$data['srcDong']}' ";
|
||||
} else {
|
||||
if (!empty($data['srcGugun'])) {
|
||||
$str_gugun = substr($data['srcGugun'], '0', '2');
|
||||
if ($str_gugun == '36') { //세종시는 군구가 없고 바로 동이라서 예외
|
||||
$sql .= "AND a.address_code = '{$data['srcGugun']}' ";
|
||||
} else {
|
||||
$gugunPrefix = substr($data['srcGugun'], '0', '5');
|
||||
$sql .= "AND a.address_code LIKE '{$gugunPrefix}%' ";
|
||||
}
|
||||
} else {
|
||||
if (!empty($data['srcSido'])) {
|
||||
$sidoPrefix = substr($data['srcSido'], '0', '2');
|
||||
$sql .= "AND a.address_code LIKE '{$sidoPrefix}%' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 매체사
|
||||
if (!empty($data['rcpt_cpid'])) {
|
||||
$sql .= "AND a.cpid = '{$data['rcpt_cpid']}' ";
|
||||
}
|
||||
|
||||
// 참고파일
|
||||
if (!empty($data['reference_file_url_yn'])) {
|
||||
$sql .= "AND a.reference_file_url_yn = '{$data['a.reference_file_url_yn']}' ";
|
||||
}
|
||||
|
||||
// 현재상태
|
||||
if (!empty($data['stat_cd'])) {
|
||||
$sql .= "AND c.stat_cd = '{$data['stat_cd']}' ";
|
||||
}
|
||||
|
||||
// 중개소
|
||||
if (!empty($data['realtor_nm'])) {
|
||||
$sql .= "AND a.realtor_nm = '{$data['realtor_nm']}' ";
|
||||
}
|
||||
|
||||
// 담당자
|
||||
if (!empty($data['damdang'])) {
|
||||
|
||||
switch ($data['charger_gbn']) {
|
||||
case "1":
|
||||
$sql .= "a.charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
case "2":
|
||||
$sql .= "a.reg_charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 배정여부
|
||||
if ($data['assign_yn'] !== "A") {
|
||||
switch ($data['charger_gbn'] . $data['assign_yn']) {
|
||||
case "1Y": // 전화/서류 담당자
|
||||
$sql .= "a.charger != '' ";
|
||||
break;
|
||||
case "1N": // 전화/서류 담당자
|
||||
$sql .= "a.charger = '' ";
|
||||
break;
|
||||
case "2Y": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger != '' ";
|
||||
break;
|
||||
case "2N": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger IS NULL ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 매물종류
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
// 소유자구분
|
||||
if (!empty($data['ownerTypeCode'])) {
|
||||
$sql .= "AND b.ownerTypeCode = '{$data['ownerTypeCode']}' ";
|
||||
}
|
||||
|
||||
// 서류미수취
|
||||
if (!empty($data['document_not_received_yn'])) {
|
||||
$sql .= "AND b.document_not_received_yn = '{$data['document_not_received_yn']}' ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->getRow()->cnt;
|
||||
}
|
||||
|
||||
public function getResultList($start, $end, $data)
|
||||
{
|
||||
$sql = "SELECT
|
||||
a.vr_sq,
|
||||
a.atcl_no,
|
||||
(SELECT cd_nm FROM codes d WHERE d.cd = c.stat_cd AND d.category = 'STEP_VERIFICATION' ) AS pre_stat ,
|
||||
c.insert_tm,
|
||||
(
|
||||
case b.ownerTypeCode
|
||||
when '0' then '개인'
|
||||
when '1' then '법인'
|
||||
when '2' then '외국인'
|
||||
when '3' then '위임장'
|
||||
ELSE ''
|
||||
END
|
||||
) AS ownerTypeCodeNm,
|
||||
b.ownerTypeCode ,
|
||||
a.address_code,
|
||||
(SELECT cd_nm FROM codes d WHERE d.cd = c.vrfc_type AND d.category = 'VRFCREQ_WAY' ) AS vrfc_type ,
|
||||
CONCAT ( (SELECT region_nm FROM region_codes r WHERE a.address_code = r.region_cd ) , ' ' , ifnull(m.rm_no,'') ) AS address ,
|
||||
(
|
||||
case IFNULL(b.address2b , '')
|
||||
when '' then CONCAT(ifnull(a.address2,'') , ' ' , ifnull(a.address3,''))
|
||||
ELSE CONCAT(ifnull(b.address2b,'') , ' ' , ifnull(a.address3,''))
|
||||
END
|
||||
|
||||
) AS address_ext,
|
||||
a.cpid,
|
||||
a.realtor_nm,
|
||||
(SELECT usr_nm FROM users u WHERE a.charger = u.usr_id) AS usr_nm ,
|
||||
(SELECT usr_nm FROM users u WHERE a.reg_charger = u.usr_id) AS reg_charger ,
|
||||
greatest(ifnull(s45.insert_tm,''),ifnull(s49.insert_tm,'') ) AS rgbk_check_tm,
|
||||
s60.insert_tm AS result_tm,
|
||||
s39.insert_tm as stat_39_tm,
|
||||
c21.comment AS reg_conf_yn_info_2,
|
||||
c22.comment AS reg_conf_yn_info_3,
|
||||
a.reg_charger as rc
|
||||
FROM v2_article_info a
|
||||
LEFT JOIN v2_article_info_etc b ON a.vr_sq = b.vr_sq
|
||||
LEFT JOIN v2_vrfc_req c ON a.vr_sq = c.vr_sq
|
||||
LEFT JOIN v2_modify_info m ON a.vr_sq = m.vr_sq
|
||||
LEFT JOIN v2_chg_stat s45 ON a.vr_sq = s45.vr_sq AND s45.stat_cd = '45'
|
||||
LEFT JOIN v2_chg_stat s49 ON a.vr_sq = s49.vr_sq AND s49.stat_cd = '49'
|
||||
LEFT JOIN v2_chg_stat s60 ON a.vr_sq = s60.vr_sq AND s60.stat_cd = '60'
|
||||
LEFT JOIN v2_chg_stat s39 ON a.vr_sq = s39.vr_sq AND s39.stat_cd = '39'
|
||||
LEFT JOIN v2_check_list c21 ON a.vr_sq = c21.vr_sq AND c21.type = '21'
|
||||
LEFT JOIN v2_check_list c22 ON a.vr_sq = c22.vr_sq AND c22.type = '22'
|
||||
|
||||
WHERE
|
||||
c.vrfc_type = 'N' ";
|
||||
|
||||
// 매물번호
|
||||
if (!empty($data['atcl_no'])) {
|
||||
$sql .= "AND a.atcl = '{$data['atcl_no']}' ";
|
||||
} else {
|
||||
|
||||
// 접수기간
|
||||
if (!empty($data['receipt_sdate'])) {
|
||||
$sql .= "AND c.insert_tm >= '{$data['receipt_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['receipt_edate'])) {
|
||||
$sql .= "AND c.insert_tm <= '{$data['receipt_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 완료기간
|
||||
if (!empty($data['complete_sdate'])) {
|
||||
$sql .= "AND s60.insert_tm >= '{$data['complete_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['complete_edate'])) {
|
||||
$sql .= "AND s60.insert_tm <= '{$data['complete_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 지역구분
|
||||
if (!empty($data['srcDong'])) {
|
||||
$sql .= "AND a.address_code = '{$data['srcDong']}' ";
|
||||
} else {
|
||||
if (!empty($data['srcGugun'])) {
|
||||
$str_gugun = substr($data['srcGugun'], '0', '2');
|
||||
if ($str_gugun == '36') { //세종시는 군구가 없고 바로 동이라서 예외
|
||||
$sql .= "AND a.address_code = '{$data['srcGugun']}' ";
|
||||
} else {
|
||||
$gugunPrefix = substr($data['srcGugun'], '0', '5');
|
||||
$sql .= "AND a.address_code LIKE '{$gugunPrefix}%' ";
|
||||
}
|
||||
} else {
|
||||
if (!empty($data['srcSido'])) {
|
||||
$sidoPrefix = substr($data['srcSido'], '0', '2');
|
||||
$sql .= "AND a.address_code LIKE '{$sidoPrefix}%' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 매체사
|
||||
if (!empty($data['rcpt_cpid'])) {
|
||||
$sql .= "AND a.cpid = '{$data['rcpt_cpid']}' ";
|
||||
}
|
||||
|
||||
// 참고파일
|
||||
if (!empty($data['reference_file_url_yn'])) {
|
||||
$sql .= "AND a.reference_file_url_yn = '{$data['a.reference_file_url_yn']}' ";
|
||||
}
|
||||
|
||||
// 현재상태
|
||||
if (!empty($data['stat_cd'])) {
|
||||
$sql .= "AND c.stat_cd = '{$data['stat_cd']}' ";
|
||||
}
|
||||
|
||||
// 중개소
|
||||
if (!empty($data['realtor_nm'])) {
|
||||
$sql .= "AND a.realtor_nm = '{$data['realtor_nm']}' ";
|
||||
}
|
||||
|
||||
// 담당자
|
||||
if (!empty($data['damdang'])) {
|
||||
|
||||
switch ($data['charger_gbn']) {
|
||||
case "1":
|
||||
$sql .= "a.charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
case "2":
|
||||
$sql .= "a.reg_charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 배정여부
|
||||
if ($data['assign_yn'] !== "A") {
|
||||
switch ($data['charger_gbn'] . $data['assign_yn']) {
|
||||
case "1Y": // 전화/서류 담당자
|
||||
$sql .= "a.charger != '' ";
|
||||
break;
|
||||
case "1N": // 전화/서류 담당자
|
||||
$sql .= "a.charger = '' ";
|
||||
break;
|
||||
case "2Y": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger != '' ";
|
||||
break;
|
||||
case "2N": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger IS NULL ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 매물종류
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
// 소유자구분
|
||||
if (!empty($data['ownerTypeCode'])) {
|
||||
$sql .= "AND b.ownerTypeCode = '{$data['ownerTypeCode']}' ";
|
||||
}
|
||||
|
||||
// 서류미수취
|
||||
if (!empty($data['document_not_received_yn'])) {
|
||||
$sql .= "AND b.document_not_received_yn = '{$data['document_not_received_yn']}' ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$sql .= "ORDER BY a.vr_sq DESC ";
|
||||
|
||||
$sql .= "LIMIT {$start}, {$end}";
|
||||
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
|
||||
|
||||
// 엑셀다운로드
|
||||
public function getExcelList($data)
|
||||
{
|
||||
$sql = "SELECT
|
||||
a.atcl_no AS '매물번호',
|
||||
(SELECT cd_nm FROM codes d WHERE d.cd = c.stat_cd AND d.category = 'STEP_VERIFICATION' ) AS '진행상태',
|
||||
c.insert_tm AS '접수시간',
|
||||
(SELECT cd_nm FROM codes d WHERE d.cd = c.vrfc_type AND d.category = 'VRFCREQ_WAY' ) AS '검증방식',
|
||||
CONCAT ( (SELECT region_nm FROM region_codes r WHERE a.address_code = r.region_cd ) , ' ' , ifnull(m.rm_no,'') ) AS '주소',
|
||||
CONCAT ( (SELECT region_nm FROM region_codes r WHERE a.address_code = r.region_cd ) , ' ' , ifnull(m.rm_no,'') ) AS address ,
|
||||
(
|
||||
case IFNULL(b.address2b , '')
|
||||
when '' then CONCAT(ifnull(a.address2,'') , ' ' , ifnull(a.address3,''))
|
||||
ELSE CONCAT(ifnull(b.address2b,'') , ' ' , ifnull(a.address3,''))
|
||||
END
|
||||
|
||||
) AS '상세주소',
|
||||
a.cpid AS '매체사',
|
||||
a.realtor_nm AS '중개소',
|
||||
(SELECT usr_nm FROM users u WHERE a.charger = u.usr_id) AS '서류/전화 담당자',
|
||||
s39.insert_tm AS '서류/전화 확인완료시간',
|
||||
a.reg_charger AS '등기부등본 담당자',
|
||||
greatest(ifnull(s45.insert_tm,''),ifnull(s49.insert_tm,'') ) AS '등기부등본 확인시간',
|
||||
s60.insert_tm AS '검증완료 일시',
|
||||
c21.comment AS '주소 불일치 사유',
|
||||
c22.comment '의뢰인 불일치 사유'
|
||||
FROM v2_article_info a
|
||||
LEFT JOIN v2_article_info_etc b ON a.vr_sq = b.vr_sq
|
||||
LEFT JOIN v2_vrfc_req c ON a.vr_sq = c.vr_sq
|
||||
LEFT JOIN v2_modify_info m ON a.vr_sq = m.vr_sq
|
||||
LEFT JOIN v2_chg_stat s45 ON a.vr_sq = s45.vr_sq AND s45.stat_cd = '45'
|
||||
LEFT JOIN v2_chg_stat s49 ON a.vr_sq = s49.vr_sq AND s49.stat_cd = '49'
|
||||
LEFT JOIN v2_chg_stat s60 ON a.vr_sq = s60.vr_sq AND s60.stat_cd = '60'
|
||||
LEFT JOIN v2_chg_stat s39 ON a.vr_sq = s39.vr_sq AND s39.stat_cd = '39'
|
||||
LEFT JOIN v2_check_list c21 ON a.vr_sq = c21.vr_sq AND c21.type = '21'
|
||||
LEFT JOIN v2_check_list c22 ON a.vr_sq = c22.vr_sq AND c22.type = '22'
|
||||
|
||||
|
||||
WHERE
|
||||
c.vrfc_type = 'N'";
|
||||
|
||||
// 매물번호
|
||||
if (!empty($data['atcl_no'])) {
|
||||
$sql .= "AND a.atcl = '{$data['atcl_no']}' ";
|
||||
} else {
|
||||
|
||||
// 접수기간
|
||||
if (!empty($data['receipt_sdate'])) {
|
||||
$sql .= "AND c.insert_tm >= '{$data['receipt_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['receipt_edate'])) {
|
||||
$sql .= "AND c.insert_tm <= '{$data['receipt_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 완료기간
|
||||
if (!empty($data['complete_sdate'])) {
|
||||
$sql .= "AND s60.insert_tm >= '{$data['complete_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['complete_edate'])) {
|
||||
$sql .= "AND s60.insert_tm <= '{$data['complete_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 지역구분
|
||||
if (!empty($data['srcDong'])) {
|
||||
$sql .= "AND a.address_code = '{$data['srcDong']}' ";
|
||||
} else {
|
||||
if (!empty($data['srcGugun'])) {
|
||||
$str_gugun = substr($data['srcGugun'], '0', '2');
|
||||
if ($str_gugun == '36') { //세종시는 군구가 없고 바로 동이라서 예외
|
||||
$sql .= "AND a.address_code = '{$data['srcGugun']}' ";
|
||||
} else {
|
||||
$gugunPrefix = substr($data['srcGugun'], '0', '5');
|
||||
$sql .= "AND a.address_code LIKE '{$gugunPrefix}%' ";
|
||||
}
|
||||
} else {
|
||||
if (!empty($data['srcSido'])) {
|
||||
$sidoPrefix = substr($data['srcSido'], '0', '2');
|
||||
$sql .= "AND a.address_code LIKE '{$sidoPrefix}%' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 매체사
|
||||
if (!empty($data['rcpt_cpid'])) {
|
||||
$sql .= "AND a.cpid = '{$data['rcpt_cpid']}' ";
|
||||
}
|
||||
|
||||
// 참고파일
|
||||
if (!empty($data['reference_file_url_yn'])) {
|
||||
$sql .= "AND a.reference_file_url_yn = '{$data['a.reference_file_url_yn']}' ";
|
||||
}
|
||||
|
||||
// 현재상태
|
||||
if (!empty($data['stat_cd'])) {
|
||||
$sql .= "AND c.stat_cd = '{$data['stat_cd']}' ";
|
||||
}
|
||||
|
||||
// 중개소
|
||||
if (!empty($data['realtor_nm'])) {
|
||||
$sql .= "AND a.realtor_nm = '{$data['realtor_nm']}' ";
|
||||
}
|
||||
|
||||
// 담당자
|
||||
if (!empty($data['damdang'])) {
|
||||
|
||||
switch ($data['charger_gbn']) {
|
||||
case "1":
|
||||
$sql .= "a.charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
case "2":
|
||||
$sql .= "a.reg_charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 배정여부
|
||||
if ($data['assign_yn'] !== "A") {
|
||||
switch ($data['charger_gbn'] . $data['assign_yn']) {
|
||||
case "1Y": // 전화/서류 담당자
|
||||
$sql .= "a.charger != '' ";
|
||||
break;
|
||||
case "1N": // 전화/서류 담당자
|
||||
$sql .= "a.charger = '' ";
|
||||
break;
|
||||
case "2Y": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger != '' ";
|
||||
break;
|
||||
case "2N": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger IS NULL ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 매물종류
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
// 소유자구분
|
||||
if (!empty($data['ownerTypeCode'])) {
|
||||
$sql .= "AND b.ownerTypeCode = '{$data['ownerTypeCode']}' ";
|
||||
}
|
||||
|
||||
// 서류미수취
|
||||
if (!empty($data['document_not_received_yn'])) {
|
||||
$sql .= "AND b.document_not_received_yn = '{$data['document_not_received_yn']}' ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$sql .= "ORDER BY a.vr_sq DESC ";
|
||||
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
|
||||
// 상세
|
||||
public function getDetail($vr_sq)
|
||||
{
|
||||
$sql = "SELECT
|
||||
a.vr_sq,
|
||||
a.dong_ho_chk,
|
||||
a.reg_status,
|
||||
a.hscplqry_lv,
|
||||
a.atcl_no,
|
||||
b.stat_cd,
|
||||
a.cpid,
|
||||
a.cp_atcl_id,
|
||||
a.rlet_type_cd,
|
||||
a.address1,
|
||||
a.sise,
|
||||
a.rdate,
|
||||
a.hscp_no as chk_hscp_no,
|
||||
b.try_cnt,
|
||||
a.seller_tel_no,
|
||||
a.seller_nm,
|
||||
a.realtor_nm,
|
||||
a.realtor_tel_no,
|
||||
a.charger,
|
||||
a.ownerNm,
|
||||
a.ownerTelNo,
|
||||
b.reg_try_cnt,
|
||||
b.insert_tm,
|
||||
a.reg_charger,
|
||||
i2.usr_nm as reg_charger_nm,
|
||||
c.bild_nm,
|
||||
b.vrfc_type as vrfc_type_cd,
|
||||
c.rm_no,
|
||||
c.floor,
|
||||
c.floor2,
|
||||
c.address_code,
|
||||
c.address2,
|
||||
c1.address2a,
|
||||
c1.address2b,
|
||||
c1.registerBookUniqueNo,
|
||||
c1.ownerTypeCode,
|
||||
c1.orgRepCphNo,
|
||||
c1.orgRepTelNo,
|
||||
c1.orgRltrNm,
|
||||
c1.orgRepNm,
|
||||
c1.smsSendTime,
|
||||
c1.document_cert_method,
|
||||
c.address3,
|
||||
c.address4,
|
||||
c.trade_type as trade_type_cd,
|
||||
c.deal_amt,
|
||||
c.wrrnt_amt,
|
||||
c.lease_amt,
|
||||
c.isale_amt,
|
||||
c.prem_amt,
|
||||
c.sply_spc,
|
||||
c.excls_spc,
|
||||
c.tot_spc,
|
||||
c.grnd_spc,
|
||||
c.bldg_spc,
|
||||
c.hscp_no,
|
||||
c.ptp_no,
|
||||
d.insert_tm as update_res_tm,
|
||||
e.insert_tm as result_tm,
|
||||
f.region_nm,
|
||||
g.cd_nm as pre_stat,
|
||||
g.cd as pre_stat_cd,
|
||||
h.cd_nm as vrfc_type,
|
||||
i.usr_nm,
|
||||
j.cd_nm as trade_type,
|
||||
j.cd as trade_type_cd,
|
||||
c.hscp_nm,
|
||||
c.ptp_nm,
|
||||
l.success,
|
||||
k.cd_nm as atcl_nm,
|
||||
m.code as result_d11,
|
||||
m.comment,
|
||||
n.code as fax_conf_yn_2,
|
||||
o.code as fax_conf_yn_3,
|
||||
p.code as fax_conf_yn_4,
|
||||
n.comment as fax_conf_yn_info_2,
|
||||
o.comment as fax_conf_yn_info_3,
|
||||
p.comment as fax_conf_yn_info_4,
|
||||
v.success AS tel_suc,
|
||||
r.code AS tel_agree,
|
||||
s.code AS tel_conf_yn_2,
|
||||
t.code AS tel_conf_yn_3,
|
||||
u.code AS tel_conf_yn_4,
|
||||
s.comment AS tel_conf_yn_info_2,
|
||||
t.comment AS tel_conf_yn_info_3,
|
||||
u.comment AS tel_conf_yn_info_4,
|
||||
w.success AS reg_conf_yn_1,
|
||||
x.code AS reg_conf_yn_2,
|
||||
y.code AS reg_conf_yn_3,
|
||||
x.comment AS reg_conf_yn_info_2,
|
||||
y.comment AS reg_conf_yn_info_3,
|
||||
b.rgbk_confirm,
|
||||
a.redvlp_area_nm,
|
||||
a.biz_stp_desc,
|
||||
a.cert_register,
|
||||
a.confirm_doc_img_url,
|
||||
a.cert_register_save_yn,
|
||||
a.confirm_doc_img_url_save_yn,
|
||||
b.confirm_doc_owner_check_yn,
|
||||
a.owner_birth,
|
||||
a.vrfc_type_sub,
|
||||
b.owner_verifiable,
|
||||
a.reference_file_url,
|
||||
a.reference_file_url_save_yn,
|
||||
a.reference_file_url_yn,
|
||||
z.corp_own,
|
||||
c1.vir_addr_yn,
|
||||
c1.cert_uncnfrm_status,
|
||||
b.referenceFileUrl,
|
||||
b.certRegister,
|
||||
c1.noRgbkVrfcReqYn,
|
||||
c1.areaByBdbkVrfcReqYn,
|
||||
c1.document_not_received,
|
||||
sm.sm_apporval_date ,
|
||||
sm.sm_end_date,
|
||||
sm.sm_seq,
|
||||
a.registerBookUniqueNumber
|
||||
FROM v2_article_info a
|
||||
JOIN v2_vrfc_req b ON a.vr_sq = b.vr_sq
|
||||
JOIN v2_modify_info c ON a.vr_sq = c.vr_sq
|
||||
LEFT OUTER JOIN v2_article_info_etc c1 ON c1.vr_sq = a.vr_sq
|
||||
LEFT JOIN region_codes f ON a.address_code = f.region_cd
|
||||
LEFT JOIN v2_chg_stat d ON a.vr_sq = d.vr_sq AND d.stat_cd = '35'
|
||||
LEFT JOIN v2_chg_stat e ON a.vr_sq = e.vr_sq AND e.stat_cd = '60'
|
||||
LEFT JOIN codes g ON b.stat_cd = g.cd AND g.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes h ON b.vrfc_type = h.cd AND h.category = 'VRFCREQ_WAY'
|
||||
LEFT JOIN codes j ON c.trade_type = j.cd AND j.category = 'TRADE_TYPE'
|
||||
LEFT JOIN codes k ON a.rlet_type_cd = k.cd AND k.category = 'ARTICLE_TYPE'
|
||||
LEFT JOIN v2_confirm l ON a.vr_sq = l.vr_sq AND l.vrfc_type = 'D'
|
||||
LEFT JOIN v2_check_list m ON a.vr_sq = m.vr_sq AND m.type = 'D11'
|
||||
LEFT JOIN v2_check_list n ON a.vr_sq = n.vr_sq AND n.type = 'D12'
|
||||
LEFT JOIN v2_check_list o ON a.vr_sq = o.vr_sq AND o.type = 'D13'
|
||||
LEFT JOIN v2_check_list p ON a.vr_sq = p.vr_sq AND p.type = 'D14'
|
||||
LEFT JOIN v2_confirm v ON a.vr_sq = v.vr_sq AND v.vrfc_type = 'T'
|
||||
LEFT JOIN v2_check_list r ON a.vr_sq = r.vr_sq AND r.type = 'T11'
|
||||
LEFT JOIN v2_check_list s ON a.vr_sq = s.vr_sq AND s.type = 'T12'
|
||||
LEFT JOIN v2_check_list t ON a.vr_sq = t.vr_sq AND t.type = 'T13'
|
||||
LEFT JOIN v2_check_list u ON a.vr_sq = u.vr_sq AND u.type = 'T14'
|
||||
LEFT JOIN v2_confirm w ON a.vr_sq = w.vr_sq AND w.vrfc_type = 'R'
|
||||
LEFT JOIN v2_check_list x ON a.vr_sq = x.vr_sq AND x.type = '21'
|
||||
LEFT JOIN v2_check_list y ON a.vr_sq = y.vr_sq AND y.type = '22'
|
||||
LEFT JOIN users i ON a.charger = i.usr_id
|
||||
LEFT JOIN users i2 ON a.reg_charger = i2.usr_id
|
||||
LEFT JOIN v2_article_info_etc z ON a.vr_sq = z.vr_sq
|
||||
LEFT JOIN scomplex_manage sm ON a.hscp_no = sm.sm_code
|
||||
WHERE
|
||||
a.vr_sq = ?";
|
||||
|
||||
|
||||
$query = $this->db->query($sql, [$vr_sq]);
|
||||
|
||||
return $query->getRowArray();
|
||||
}
|
||||
|
||||
// 메모
|
||||
public function getMemo($vr_sq)
|
||||
{
|
||||
$sql = "SELECT memo FROM v2_vrfc_req where vr_sq = ?";
|
||||
|
||||
$query = $this->db->query($sql, [$vr_sq]);
|
||||
|
||||
return $query->getRowArray();
|
||||
}
|
||||
|
||||
public function getRecordInfo($vr_sq, $file_type)
|
||||
{
|
||||
$sql = "SELECT seq, vr_sq, use_yn, file_type, view_odr, file_path, file_name, file_ext, file_size, img_width, img_height, meta_data, insert_user, insert_tm , cloud_upload_yn " .
|
||||
" FROM v2_files" .
|
||||
" WHERE vr_sq = ?" .
|
||||
" AND use_yn = 'Y'" .
|
||||
" AND file_type = ?" .
|
||||
" ORDER BY seq DESC";
|
||||
$data = [
|
||||
$vr_sq,
|
||||
$file_type
|
||||
];
|
||||
|
||||
$query = $this->db->query($sql, [$vr_sq, $file_type]);
|
||||
|
||||
return $query->getRowArray();
|
||||
}
|
||||
|
||||
public function getDisplay($menu_position)
|
||||
{
|
||||
|
||||
$sql = "SELECT display_yn " .
|
||||
"FROM page_display " .
|
||||
"WHERE menu_position = ? ";
|
||||
$data = [$menu_position];
|
||||
$query = $this->db->query($sql, $data);
|
||||
$row = $query->getRowArray();
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
// 파일업로드
|
||||
public function saveFileInfo($data)
|
||||
{
|
||||
$this->db->transStart();
|
||||
|
||||
$usr_id = session('usr_id');
|
||||
|
||||
// 기존파일 확인후 업데이트
|
||||
$sql = "SELECT seq FROM v2_files WHERE vr_sq = {$data['vr_sq']} AND use_yn = 'Y' AND file_type = '2'";
|
||||
$query = $this->db->query($sql);
|
||||
$row = $query->getNumRows();
|
||||
|
||||
if ($row > 0) {
|
||||
|
||||
$sql = "UPDATE v2_files SET use_yn = 'N' WHERE vr_sq = {$data['vr_sq']} AND use_yn = 'Y' AND file_type '2'";
|
||||
|
||||
$this->db->query($sql);
|
||||
|
||||
$sql = "INSERT INTO v2_files
|
||||
(vr_sq, file_type, view_odr, file_path, file_name, file_ext, file_size, insert_user, insert_tm, cloud_upload_yn)
|
||||
VALUES
|
||||
(?, '2', 0, ?, ?, ?, ?, ?, NOW(), 'Y')
|
||||
";
|
||||
|
||||
$param = [
|
||||
$data['vr_sq'],
|
||||
$data['file_path'],
|
||||
$data['new_name'],
|
||||
$data['ext'],
|
||||
$data['size'],
|
||||
$data['usr_id'],
|
||||
];
|
||||
|
||||
|
||||
if ($this->db->query($sql, $param)) {
|
||||
return [
|
||||
'success' => false,
|
||||
'msg' => '파일정보 저장 실패',
|
||||
];
|
||||
}
|
||||
|
||||
$row = $this->getDetail($data['vr_sq']);
|
||||
$this->saveChangedHistory($data['vr_sq'], $row['stat_cd'], 'C28', $usr_id, '이미지파일 업로드');
|
||||
|
||||
}
|
||||
|
||||
$this->db->transComplete();
|
||||
|
||||
return [
|
||||
'success' => true
|
||||
];
|
||||
}
|
||||
|
||||
// 서류미수취 저장
|
||||
public function saveNotReceived($vr_sq)
|
||||
{
|
||||
$sql = "SELECT document_not_received from v2_article_info_etc where vr_sq = ?";
|
||||
$query = $this->db->query($sql, [$vr_sq]);
|
||||
$row = $query->getRowArray();
|
||||
$document_not_received = $row['document_not_received'];
|
||||
|
||||
if ($document_not_received == "Y") {
|
||||
$sql = "UPDATE v2_article_info_etc SET document_not_received = 'N' WHERE vr_sq = ?";
|
||||
} else {
|
||||
$sql = "UPDATE v2_article_info_etc SET document_not_received = 'Y' WHERE vr_sq = ?";
|
||||
}
|
||||
|
||||
if ($this->db->query($sql, [$vr_sq]) === false) {
|
||||
return [
|
||||
'success' => false,
|
||||
'msg' => '저장 실패',
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'success' => true,
|
||||
];
|
||||
}
|
||||
|
||||
// 다음매물
|
||||
public function getNextInfo($vr_sq)
|
||||
{
|
||||
$usr_id = session('usr_id');
|
||||
|
||||
$sql = "SELECT b.vr_sq
|
||||
FROM v2_article_info b
|
||||
INNER JOIN v2_vrfc_req a ON a.vr_sq = b.vr_sq AND a.vr_sq != ? AND a.stat_cd BETWEEN '35' AND '49' AND a.stat_cd NOT IN ('39','45')
|
||||
LEFT JOIN v2_chg_stat c ON c.vr_sq = b.vr_sq AND c.stat_cd = '40'
|
||||
WHERE a.insert_tm < DATE_FORMAT(curdate(), '%Y%m%d172959')
|
||||
AND (b.reg_charger IS NULL OR b.reg_charger = '')
|
||||
AND a.vrfc_type = 'N'
|
||||
ORDER BY CASE a.vrfc_type WHEN 'N' THEN 1 ELSE 2 END, a.vr_sq
|
||||
LIMIT 1
|
||||
for update skip locked ";
|
||||
|
||||
$query = $this->db->query($sql, [$vr_sq]);
|
||||
$row = $query->getRowArray();
|
||||
|
||||
if (!empty($row)) {
|
||||
|
||||
$this->db->transStart();
|
||||
|
||||
$sql = "UPDATE v2_article_info SET reg_charger = ? WHERE vr_sq = ?";
|
||||
|
||||
if ($this->db->query($sql, [$usr_id, $vr_sq]) === false) {
|
||||
return [
|
||||
'success' => false,
|
||||
'msg' => '저장 실패',
|
||||
];
|
||||
}
|
||||
|
||||
$this->db->transComplete();
|
||||
|
||||
return $row;
|
||||
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 정보변경 이력 저장
|
||||
public function saveChangedHistory($vr_sq, $stat_cd, $chg_type, $usr_id, $memo)
|
||||
{
|
||||
$sql = "INSERT INTO v2_chg_history" .
|
||||
" (vr_sq, stat_cd, chg_type, insert_id, insert_tm, memo)" .
|
||||
" VALUES" .
|
||||
" (?, ?, ?, ?, now(), ?)";
|
||||
|
||||
$data = [
|
||||
$vr_sq,
|
||||
$stat_cd,
|
||||
$chg_type,
|
||||
$usr_id,
|
||||
$memo
|
||||
];
|
||||
|
||||
$res = $this->db->query($sql, $data);
|
||||
}
|
||||
}
|
||||
952
app/Models/v2/M713Model.php
Normal file
952
app/Models/v2/M713Model.php
Normal file
@@ -0,0 +1,952 @@
|
||||
<?php
|
||||
namespace App\Models\v2;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class M713Model extends Model
|
||||
{
|
||||
// 지역 목록 조회
|
||||
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
|
||||
COUNT(*) AS cnt
|
||||
FROM v2_article_info a
|
||||
JOIN v2_vrfc_req b ON a.vr_sq = b.vr_sq AND b.rgbk_confirm = true
|
||||
JOIN v2_modify_info c ON a.vr_sq = c.vr_sq
|
||||
JOIN v2_article_info_etc c1 ON c1.vr_sq = a.vr_sq
|
||||
LEFT JOIN region_codes f ON a.address_code = f.region_cd
|
||||
LEFT JOIN v2_chg_stat d ON a.vr_sq = d.vr_sq AND d.stat_cd = '35'
|
||||
LEFT JOIN v2_chg_stat e ON a.vr_sq = e.vr_sq AND e.stat_cd = '60'
|
||||
LEFT JOIN codes g ON b.stat_cd = g.cd AND g.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes h ON b.vrfc_type = h.cd AND h.category = 'VRFCREQ_WAY'
|
||||
LEFT JOIN users i ON a.charger = i.usr_id
|
||||
LEFT JOIN users j ON a.reg_charger = j.usr_id
|
||||
LEFT JOIN v2_article_info_etc k ON a.vr_sq = k.vr_sq
|
||||
LEFT JOIN v2_chg_stat d2 ON d2.vr_sq = a.vr_sq AND d2.stat_cd = '39'
|
||||
WHERE
|
||||
b.insert_tm >= DATE_ADD(CURDATE(), INTERVAL -2 MONTH)
|
||||
AND b.vrfc_type = 'O' ";
|
||||
|
||||
// 매물번호
|
||||
if (!empty($data['atcl_no'])) {
|
||||
$sql .= "AND a.atcl = '{$data['atcl_no']}' ";
|
||||
} else {
|
||||
// 현재상태
|
||||
if (!empty($data['stat_cd'])) {
|
||||
$sql .= "AND b.stat_cd = '{$data['stat_cd']}' ";
|
||||
}
|
||||
|
||||
// 매물종류
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
// 접수기간
|
||||
if (!empty($data['receipt_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['receipt_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['receipt_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['receipt_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 완료기간
|
||||
if (!empty($data['complete_sdate'])) {
|
||||
$sql .= "AND e.insert_tm >= '{$data['complete_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['complete_edate'])) {
|
||||
$sql .= "AND e.insert_tm <= '{$data['complete_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 검증방식
|
||||
if (!empty($data['vrfc_type_sub'])) {
|
||||
$sql .= "AND a.vrfc_type_sub = '{$data['vrfc_type_sub']}' ";
|
||||
} else {
|
||||
if (!empty($data['vrfcreq_way'])) {
|
||||
$sql .= "AND b.vrfc_type = '{$data['vrfcreq_way']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 매체사
|
||||
if (!empty($data['rcpt_cpid'])) {
|
||||
$sql .= "AND a.cpid = '{$data['rcpt_cpid']}' ";
|
||||
}
|
||||
|
||||
// 면적여부
|
||||
if ($data['chk_spc_yn'] == "Y") {
|
||||
$sql .= "AND a.dong_ho_chk = 'N' AND a.hscplqry_lv = '3' ";
|
||||
} else if ($data['chk_spc_yn'] == "N") {
|
||||
$sql .= "AND a.rlet_type_cd IN ('A01', 'A02','A03') ";
|
||||
$sql .= "AND a.dong_ho_chk = 'Y' AND a.hscplqry_lv != '3' AND a.dong_ho_Chk IS NOT NULL ";
|
||||
}
|
||||
|
||||
// 지역구분
|
||||
if (!empty($data['srcDong'])) {
|
||||
$sql .= "AND a.address_code = '{$data['srcDong']}' ";
|
||||
} else {
|
||||
if (!empty($data['srcGugun'])) {
|
||||
$str_gugun = substr($data['srcGugun'], '0', '2');
|
||||
if ($str_gugun == '36') { //세종시는 군구가 없고 바로 동이라서 예외
|
||||
$sql .= "AND a.address_code = '{$data['srcGugun']}' ";
|
||||
} else {
|
||||
$gugunPrefix = substr($data['srcGugun'], '0', '5');
|
||||
$sql .= "AND a.address_code LIKE '{$gugunPrefix}%' ";
|
||||
}
|
||||
} else {
|
||||
if (!empty($data['srcSido'])) {
|
||||
$sidoPrefix = substr($data['srcSido'], '0', '2');
|
||||
$sql .= "AND a.address_code LIKE '{$sidoPrefix}%' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 담당자
|
||||
if (!empty($data['damdang'])) {
|
||||
|
||||
switch ($data['charger_gbn']) {
|
||||
case "1":
|
||||
$sql .= "a.charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
case "2":
|
||||
$sql .= "a.reg_charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 배정여부
|
||||
if ($data['assign_yn'] !== "A") {
|
||||
switch ($data['charger_gbn'] . $data['assign_yn']) {
|
||||
case "1Y": // 전화/서류 담당자
|
||||
$sql .= "a.charger != '' ";
|
||||
break;
|
||||
case "1N": // 전화/서류 담당자
|
||||
$sql .= "a.charger = '' ";
|
||||
break;
|
||||
case "2Y": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger != '' ";
|
||||
break;
|
||||
case "2N": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger IS NULL ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 법인
|
||||
if (!empty($data['corp_own'])) {
|
||||
$sql .= "AND k.corp_own = '{$data['a.corp_own']}' ";
|
||||
}
|
||||
|
||||
// 참고파일
|
||||
if (!empty($data['reference_file_url_yn'])) {
|
||||
$sql .= "AND a.reference_file_url_yn = '{$data['a.reference_file_url_yn']}' ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// print ($sql);
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->getRow()->cnt;
|
||||
}
|
||||
|
||||
public function getResultList($start, $end, $data)
|
||||
{
|
||||
$sql = "SELECT
|
||||
a.vr_sq,
|
||||
a.dong_ho_chk,
|
||||
a.hscplqry_lv,
|
||||
a.atcl_no,
|
||||
a.cpid,
|
||||
a.cp_atcl_id,
|
||||
a.rlet_type_cd,
|
||||
a.address1,
|
||||
a.sise,
|
||||
a.rdate,
|
||||
a.seller_tel_no,
|
||||
a.seller_nm,
|
||||
a.realtor_nm,
|
||||
a.realtor_tel_no,
|
||||
a.charger,
|
||||
b.insert_tm,
|
||||
b.stat_cd,
|
||||
c.bild_nm,
|
||||
b.vrfc_type,
|
||||
c.rm_no,
|
||||
c.floor,
|
||||
c.address_code,
|
||||
c.address2,
|
||||
IFNULL(c1.address2a, '') AS address2a,
|
||||
IFNULL(c1.address2b, '') AS address2b,
|
||||
IFNULL(c.address3, '') AS address3,
|
||||
c.trade_type,
|
||||
c.deal_amt,
|
||||
c.wrrnt_amt,
|
||||
c.lease_amt,
|
||||
c.isale_amt,
|
||||
c.prem_amt,
|
||||
c.sply_spc,
|
||||
c.excls_spc,
|
||||
c.tot_spc,
|
||||
c.grnd_spc,
|
||||
c.bldg_spc,
|
||||
c.hscp_no,
|
||||
c.ptp_no,
|
||||
d.insert_tm as update_res_tm,
|
||||
e.insert_tm as result_tm,
|
||||
f.region_nm,
|
||||
g.cd_nm as pre_stat,
|
||||
h.cd_nm as vrfc_type,
|
||||
i.usr_nm,
|
||||
j.usr_nm as reg_charger,
|
||||
d2.insert_tm as stat_39_tm,
|
||||
a.vrfc_type_sub,
|
||||
k.corp_own,
|
||||
a.reference_file_url_yn
|
||||
FROM v2_article_info a
|
||||
JOIN v2_vrfc_req b ON a.vr_sq = b.vr_sq AND b.rgbk_confirm = true
|
||||
JOIN v2_modify_info c ON a.vr_sq = c.vr_sq
|
||||
JOIN v2_article_info_etc c1 ON c1.vr_sq = a.vr_sq
|
||||
LEFT JOIN region_codes f ON a.address_code = f.region_cd
|
||||
LEFT JOIN v2_chg_stat d ON a.vr_sq = d.vr_sq AND d.stat_cd = '35'
|
||||
LEFT JOIN v2_chg_stat e ON a.vr_sq = e.vr_sq AND e.stat_cd = '60'
|
||||
LEFT JOIN codes g ON b.stat_cd = g.cd AND g.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes h ON b.vrfc_type = h.cd AND h.category = 'VRFCREQ_WAY'
|
||||
LEFT JOIN users i ON a.charger = i.usr_id
|
||||
LEFT JOIN users j ON a.reg_charger = j.usr_id
|
||||
LEFT JOIN v2_article_info_etc k ON a.vr_sq = k.vr_sq
|
||||
LEFT JOIN v2_chg_stat d2 ON d2.vr_sq = a.vr_sq AND d2.stat_cd = '39'
|
||||
WHERE
|
||||
b.insert_tm >= DATE_ADD(CURDATE(), INTERVAL -2 MONTH)
|
||||
AND b.vrfc_type = 'O' ";
|
||||
|
||||
// 매물번호
|
||||
if (!empty($data['atcl_no'])) {
|
||||
$sql .= "AND a.atcl = '{$data['atcl_no']}' ";
|
||||
} else {
|
||||
// 현재상태
|
||||
if (!empty($data['stat_cd'])) {
|
||||
$sql .= "AND b.stat_cd = '{$data['stat_cd']}' ";
|
||||
}
|
||||
|
||||
// 매물종류
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
// 접수기간
|
||||
if (!empty($data['receipt_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['receipt_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['receipt_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['receipt_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 완료기간
|
||||
if (!empty($data['complete_sdate'])) {
|
||||
$sql .= "AND e.insert_tm >= '{$data['complete_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['complete_edate'])) {
|
||||
$sql .= "AND e.insert_tm <= '{$data['complete_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 검증방식
|
||||
if (!empty($data['vrfc_type_sub'])) {
|
||||
$sql .= "AND a.vrfc_type_sub = '{$data['vrfc_type_sub']}' ";
|
||||
} else {
|
||||
if (!empty($data['vrfcreq_way'])) {
|
||||
$sql .= "AND b.vrfc_type = '{$data['vrfcreq_way']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 매체사
|
||||
if (!empty($data['rcpt_cpid'])) {
|
||||
$sql .= "AND a.cpid = '{$data['rcpt_cpid']}' ";
|
||||
}
|
||||
|
||||
// 면적여부
|
||||
if ($data['chk_spc_yn'] == "Y") {
|
||||
$sql .= "AND a.dong_ho_chk = 'N' AND a.hscplqry_lv = '3' ";
|
||||
} else if ($data['chk_spc_yn'] == "N") {
|
||||
$sql .= "AND a.rlet_type_cd IN ('A01', 'A02','A03') ";
|
||||
$sql .= "AND a.dong_ho_chk = 'Y' AND a.hscplqry_lv != '3' AND a.dong_ho_Chk IS NOT NULL ";
|
||||
}
|
||||
|
||||
// 지역구분
|
||||
if (!empty($data['srcDong'])) {
|
||||
$sql .= "AND a.address_code = '{$data['srcDong']}' ";
|
||||
} else {
|
||||
if (!empty($data['srcGugun'])) {
|
||||
$str_gugun = substr($data['srcGugun'], '0', '2');
|
||||
if ($str_gugun == '36') { //세종시는 군구가 없고 바로 동이라서 예외
|
||||
$sql .= "AND a.address_code = '{$data['srcGugun']}' ";
|
||||
} else {
|
||||
$gugunPrefix = substr($data['srcGugun'], '0', '5');
|
||||
$sql .= "AND a.address_code LIKE '{$gugunPrefix}%' ";
|
||||
}
|
||||
} else {
|
||||
if (!empty($data['srcSido'])) {
|
||||
$sidoPrefix = substr($data['srcSido'], '0', '2');
|
||||
$sql .= "AND a.address_code LIKE '{$sidoPrefix}%' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 담당자
|
||||
if (!empty($data['damdang'])) {
|
||||
|
||||
switch ($data['charger_gbn']) {
|
||||
case "1":
|
||||
$sql .= "a.charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
case "2":
|
||||
$sql .= "a.reg_charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 배정여부
|
||||
if ($data['assign_yn'] !== "A") {
|
||||
switch ($data['charger_gbn'] . $data['assign_yn']) {
|
||||
case "1Y": // 전화/서류 담당자
|
||||
$sql .= "a.charger != '' ";
|
||||
break;
|
||||
case "1N": // 전화/서류 담당자
|
||||
$sql .= "a.charger = '' ";
|
||||
break;
|
||||
case "2Y": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger != '' ";
|
||||
break;
|
||||
case "2N": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger IS NULL ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 법인
|
||||
if (!empty($data['corp_own'])) {
|
||||
$sql .= "AND k.corp_own = '{$data['a.corp_own']}' ";
|
||||
}
|
||||
|
||||
// 참고파일
|
||||
if (!empty($data['reference_file_url_yn'])) {
|
||||
$sql .= "AND a.reference_file_url_yn = '{$data['a.reference_file_url_yn']}' ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$sql .= "ORDER BY b.vr_sq DESC , b.insert_tm DESC ";
|
||||
$sql .= "LIMIT {$start}, {$end}";
|
||||
|
||||
// print ($sql);
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
|
||||
public function getExcelList($data)
|
||||
{
|
||||
$sql = "SELECT
|
||||
a.atcl_no AS '매물번호',
|
||||
g.cd_nm AS '진행상태',
|
||||
b.insert_tm AS '접수시간',
|
||||
(SELECT cd_nm FROM codes d WHERE d.cd = b.vrfc_type AND d.category = 'VRFCREQ_WAY' ) AS '검증방식',
|
||||
CONCAT(f.region_nm, ' ', c.rm_no) AS '주소',
|
||||
CONCAT ( (SELECT region_nm FROM region_codes r WHERE a.address_code = r.region_cd ) , ' ' , ifnull(c.rm_no,'') ) AS address ,
|
||||
(
|
||||
case IFNULL(c1.address2b , '')
|
||||
when '' then CONCAT(ifnull(a.address2,'') , ' ' , ifnull(a.address3,''))
|
||||
ELSE CONCAT(IFNULL(c1.address2b,'') , ' ' , ifnull(a.address3,''))
|
||||
END
|
||||
|
||||
) AS '상세주소',
|
||||
a.cpid AS '매체사',
|
||||
a.realtor_nm AS '중개소',
|
||||
IFNULL(d.insert_tm, d2.insert_tm) AS '서류/전화 확인시간',
|
||||
i.usr_nm AS '담당자',
|
||||
e.insert_tm AS '검증완료 일시'
|
||||
FROM v2_article_info a
|
||||
JOIN v2_vrfc_req b ON a.vr_sq = b.vr_sq AND b.rgbk_confirm = true
|
||||
JOIN v2_modify_info c ON a.vr_sq = c.vr_sq
|
||||
JOIN v2_article_info_etc c1 ON c1.vr_sq = a.vr_sq
|
||||
LEFT JOIN region_codes f ON a.address_code = f.region_cd
|
||||
LEFT JOIN v2_chg_stat d ON a.vr_sq = d.vr_sq AND d.stat_cd = '35'
|
||||
LEFT JOIN v2_chg_stat e ON a.vr_sq = e.vr_sq AND e.stat_cd = '60'
|
||||
LEFT JOIN codes g ON b.stat_cd = g.cd AND g.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes h ON b.vrfc_type = h.cd AND h.category = 'VRFCREQ_WAY'
|
||||
LEFT JOIN users i ON a.charger = i.usr_id
|
||||
LEFT JOIN users j ON a.reg_charger = j.usr_id
|
||||
LEFT JOIN v2_article_info_etc k ON a.vr_sq = k.vr_sq
|
||||
LEFT JOIN v2_chg_stat d2 ON d2.vr_sq = a.vr_sq AND d2.stat_cd = '39'
|
||||
WHERE
|
||||
b.insert_tm >= DATE_ADD(CURDATE(), INTERVAL -2 MONTH)
|
||||
AND b.vrfc_type = 'O' ";
|
||||
|
||||
// 매물번호
|
||||
if (!empty($data['atcl_no'])) {
|
||||
$sql .= "AND a.atcl = '{$data['atcl_no']}' ";
|
||||
} else {
|
||||
// 현재상태
|
||||
if (!empty($data['stat_cd'])) {
|
||||
$sql .= "AND b.stat_cd = '{$data['stat_cd']}' ";
|
||||
}
|
||||
|
||||
// 매물종류
|
||||
if (!empty($data['rlet_type_cd'])) {
|
||||
$sql .= "AND a.rlet_type_cd = '{$data['rlet_type_cd']}' ";
|
||||
}
|
||||
|
||||
// 접수기간
|
||||
if (!empty($data['receipt_sdate'])) {
|
||||
$sql .= "AND b.insert_tm >= '{$data['receipt_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['receipt_edate'])) {
|
||||
$sql .= "AND b.insert_tm <= '{$data['receipt_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 완료기간
|
||||
if (!empty($data['complete_sdate'])) {
|
||||
$sql .= "AND e.insert_tm >= '{$data['complete_sdate']} 00:00:00' ";
|
||||
}
|
||||
|
||||
if (!empty($data['complete_edate'])) {
|
||||
$sql .= "AND e.insert_tm <= '{$data['complete_edate']} 23:59:59' ";
|
||||
}
|
||||
|
||||
// 검증방식
|
||||
if (!empty($data['vrfc_type_sub'])) {
|
||||
$sql .= "AND a.vrfc_type_sub = '{$data['vrfc_type_sub']}' ";
|
||||
} else {
|
||||
if (!empty($data['vrfcreq_way'])) {
|
||||
$sql .= "AND b.vrfc_type = '{$data['vrfcreq_way']}' ";
|
||||
}
|
||||
}
|
||||
|
||||
// 매체사
|
||||
if (!empty($data['rcpt_cpid'])) {
|
||||
$sql .= "AND a.cpid = '{$data['rcpt_cpid']}' ";
|
||||
}
|
||||
|
||||
// 면적여부
|
||||
if ($data['chk_spc_yn'] == "Y") {
|
||||
$sql .= "AND a.dong_ho_chk = 'N' AND a.hscplqry_lv = '3' ";
|
||||
} else if ($data['chk_spc_yn'] == "N") {
|
||||
$sql .= "AND a.rlet_type_cd IN ('A01', 'A02','A03') ";
|
||||
$sql .= "AND a.dong_ho_chk = 'Y' AND a.hscplqry_lv != '3' AND a.dong_ho_Chk IS NOT NULL ";
|
||||
}
|
||||
|
||||
// 지역구분
|
||||
if (!empty($data['srcDong'])) {
|
||||
$sql .= "AND a.address_code = '{$data['srcDong']}' ";
|
||||
} else {
|
||||
if (!empty($data['srcGugun'])) {
|
||||
$str_gugun = substr($data['srcGugun'], '0', '2');
|
||||
if ($str_gugun == '36') { //세종시는 군구가 없고 바로 동이라서 예외
|
||||
$sql .= "AND a.address_code = '{$data['srcGugun']}' ";
|
||||
} else {
|
||||
$gugunPrefix = substr($data['srcGugun'], '0', '5');
|
||||
$sql .= "AND a.address_code LIKE '{$gugunPrefix}%' ";
|
||||
}
|
||||
} else {
|
||||
if (!empty($data['srcSido'])) {
|
||||
$sidoPrefix = substr($data['srcSido'], '0', '2');
|
||||
$sql .= "AND a.address_code LIKE '{$sidoPrefix}%' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 담당자
|
||||
if (!empty($data['damdang'])) {
|
||||
|
||||
switch ($data['charger_gbn']) {
|
||||
case "1":
|
||||
$sql .= "a.charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
case "2":
|
||||
$sql .= "a.reg_charger = '{$data['damdang']}' ";
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 배정여부
|
||||
if ($data['assign_yn'] !== "A") {
|
||||
switch ($data['charger_gbn'] . $data['assign_yn']) {
|
||||
case "1Y": // 전화/서류 담당자
|
||||
$sql .= "a.charger != '' ";
|
||||
break;
|
||||
case "1N": // 전화/서류 담당자
|
||||
$sql .= "a.charger = '' ";
|
||||
break;
|
||||
case "2Y": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger != '' ";
|
||||
break;
|
||||
case "2N": // 등기부등본 담당자
|
||||
$sql .= "a.reg_charger IS NULL ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 법인
|
||||
if (!empty($data['corp_own'])) {
|
||||
$sql .= "AND k.corp_own = '{$data['a.corp_own']}' ";
|
||||
}
|
||||
|
||||
// 참고파일
|
||||
if (!empty($data['reference_file_url_yn'])) {
|
||||
$sql .= "AND a.reference_file_url_yn = '{$data['a.reference_file_url_yn']}' ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$sql .= "ORDER BY b.vr_sq DESC , b.insert_tm DESC ";
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
|
||||
|
||||
// 상세화면
|
||||
public function getDetail($vr_sq)
|
||||
{
|
||||
$sql = "SELECT
|
||||
a.vr_sq,
|
||||
a.dong_ho_chk,
|
||||
a.reg_status,
|
||||
a.hscplqry_lv,
|
||||
a.atcl_no,
|
||||
b.stat_cd,
|
||||
a.cpid,
|
||||
a.cp_atcl_id,
|
||||
a.rlet_type_cd,
|
||||
a.address1,
|
||||
a.sise,
|
||||
a.rdate,
|
||||
a.hscp_no as chk_hscp_no,
|
||||
b.try_cnt,
|
||||
a.seller_tel_no,
|
||||
a.seller_nm,
|
||||
a.realtor_nm,
|
||||
a.realtor_tel_no,
|
||||
a.charger,
|
||||
a.ownerNm,
|
||||
a.ownerTelNo,
|
||||
b.reg_try_cnt,
|
||||
b.insert_tm,
|
||||
a.reg_charger,
|
||||
i2.usr_nm as reg_charger_nm,
|
||||
c.bild_nm,
|
||||
b.vrfc_type as vrfc_type_cd,
|
||||
c.rm_no,
|
||||
c.floor,
|
||||
c.floor2,
|
||||
c.address_code,
|
||||
c.address2,
|
||||
c1.address2a,
|
||||
c1.address2b,
|
||||
c.address3,
|
||||
c.address4,
|
||||
c.trade_type as trade_type_cd,
|
||||
c.deal_amt,
|
||||
c.wrrnt_amt,
|
||||
c.lease_amt,
|
||||
c.isale_amt,
|
||||
c.prem_amt,
|
||||
c.sply_spc,
|
||||
c.excls_spc,
|
||||
c.tot_spc,
|
||||
c.grnd_spc,
|
||||
c.bldg_spc,
|
||||
c.hscp_no,
|
||||
c.ptp_no,
|
||||
d.insert_tm as update_res_tm,
|
||||
e.insert_tm as result_tm,
|
||||
f.region_nm,
|
||||
g.cd_nm as pre_stat,
|
||||
g.cd as pre_stat_cd,
|
||||
h.cd_nm as vrfc_type,
|
||||
i.usr_nm,
|
||||
j.cd_nm as trade_type,
|
||||
j.cd as trade_type_cd,
|
||||
c.hscp_nm,
|
||||
c.ptp_nm,
|
||||
l.success,
|
||||
k.cd_nm as atcl_nm,
|
||||
m.code as result_d11,
|
||||
m.comment,
|
||||
n.code as fax_conf_yn_2,
|
||||
o.code as fax_conf_yn_3,
|
||||
p.code as fax_conf_yn_4,
|
||||
n.comment as fax_conf_yn_info_2,
|
||||
o.comment as fax_conf_yn_info_3,
|
||||
p.comment as fax_conf_yn_info_4,
|
||||
v.success AS tel_suc,
|
||||
r.code AS tel_agree,
|
||||
s.code AS tel_conf_yn_2,
|
||||
t.code AS tel_conf_yn_3,
|
||||
u.code AS tel_conf_yn_4,
|
||||
s.comment AS tel_conf_yn_info_2,
|
||||
t.comment AS tel_conf_yn_info_3,
|
||||
u.comment AS tel_conf_yn_info_4,
|
||||
w.success AS reg_conf_yn_1,
|
||||
x.code AS reg_conf_yn_2,
|
||||
y.code AS reg_conf_yn_3,
|
||||
x.comment AS reg_conf_yn_info_2,
|
||||
y.comment AS reg_conf_yn_info_3,
|
||||
b.rgbk_confirm,
|
||||
a.redvlp_area_nm,
|
||||
a.biz_stp_desc,
|
||||
a.cert_register,
|
||||
a.confirm_doc_img_url,
|
||||
a.cert_register_save_yn,
|
||||
a.confirm_doc_img_url_save_yn,
|
||||
b.confirm_doc_owner_check_yn,
|
||||
a.owner_birth,
|
||||
a.vrfc_type_sub,
|
||||
b.owner_verifiable,
|
||||
a.reference_file_url,
|
||||
a.reference_file_url_save_yn,
|
||||
a.reference_file_url_yn,
|
||||
z.corp_own,
|
||||
c1.vir_addr_yn,
|
||||
c1.cert_uncnfrm_status,
|
||||
c1.noRgbkVrfcReqYn,
|
||||
c1.areaByBdbkVrfcReqYn,
|
||||
sm.sm_apporval_date ,
|
||||
sm.sm_end_date,
|
||||
sm.sm_seq,
|
||||
a.registerBookUniqueNumber
|
||||
FROM v2_article_info a
|
||||
JOIN v2_vrfc_req b ON a.vr_sq = b.vr_sq
|
||||
JOIN v2_modify_info c ON a.vr_sq = c.vr_sq
|
||||
JOIN v2_article_info_etc c1 ON c1.vr_sq = a.vr_sq
|
||||
LEFT JOIN region_codes f ON a.address_code = f.region_cd
|
||||
LEFT JOIN v2_chg_stat d ON a.vr_sq = d.vr_sq AND d.stat_cd = '35'
|
||||
LEFT JOIN v2_chg_stat e ON a.vr_sq = e.vr_sq AND e.stat_cd = '60'
|
||||
LEFT JOIN codes g ON b.stat_cd = g.cd AND g.category = 'STEP_VERIFICATION'
|
||||
LEFT JOIN codes h ON b.vrfc_type = h.cd AND h.category = 'VRFCREQ_WAY'
|
||||
LEFT JOIN codes j ON c.trade_type = j.cd AND j.category = 'TRADE_TYPE'
|
||||
LEFT JOIN codes k ON a.rlet_type_cd = k.cd AND k.category = 'ARTICLE_TYPE'
|
||||
LEFT JOIN v2_confirm l ON a.vr_sq = l.vr_sq AND l.vrfc_type = 'D'
|
||||
LEFT JOIN v2_check_list m ON a.vr_sq = m.vr_sq AND m.type = 'D11'
|
||||
LEFT JOIN v2_check_list n ON a.vr_sq = n.vr_sq AND n.type = 'D12'
|
||||
LEFT JOIN v2_check_list o ON a.vr_sq = o.vr_sq AND o.type = 'D13'
|
||||
LEFT JOIN v2_check_list p ON a.vr_sq = p.vr_sq AND p.type = 'D14'
|
||||
LEFT JOIN v2_confirm v ON a.vr_sq = v.vr_sq AND v.vrfc_type = 'T'
|
||||
LEFT JOIN v2_check_list r ON a.vr_sq = r.vr_sq AND r.type = 'T11'
|
||||
LEFT JOIN v2_check_list s ON a.vr_sq = s.vr_sq AND s.type = 'T12'
|
||||
LEFT JOIN v2_check_list t ON a.vr_sq = t.vr_sq AND t.type = 'T13'
|
||||
LEFT JOIN v2_check_list u ON a.vr_sq = u.vr_sq AND u.type = 'T14'
|
||||
LEFT JOIN v2_confirm w ON a.vr_sq = w.vr_sq AND w.vrfc_type = 'R'
|
||||
LEFT JOIN v2_check_list x ON a.vr_sq = x.vr_sq AND x.type = '21'
|
||||
LEFT JOIN v2_check_list y ON a.vr_sq = y.vr_sq AND y.type = '22'
|
||||
LEFT JOIN users i ON a.charger = i.usr_id
|
||||
LEFT JOIN users i2 ON a.reg_charger = i2.usr_id
|
||||
LEFT JOIN v2_article_info_etc z ON a.vr_sq = z.vr_sq
|
||||
LEFT JOIN scomplex_manage sm ON a.hscp_no = sm.sm_code
|
||||
|
||||
WHERE
|
||||
a.vr_sq = ?";
|
||||
|
||||
|
||||
$query = $this->db->query($sql, [$vr_sq]);
|
||||
|
||||
return $query->getRowArray();
|
||||
}
|
||||
|
||||
// 메모
|
||||
public function getMemo($vr_sq)
|
||||
{
|
||||
$sql = "SELECT memo FROM v2_vrfc_req where vr_sq = ?";
|
||||
|
||||
$query = $this->db->query($sql, [$vr_sq]);
|
||||
|
||||
return $query->getRowArray();
|
||||
}
|
||||
|
||||
public function getRecordInfo($vr_sq, $file_type)
|
||||
{
|
||||
$sql = "SELECT seq, vr_sq, use_yn, file_type, view_odr, file_path, file_name, file_ext, file_size, img_width, img_height, meta_data, insert_user, insert_tm , cloud_upload_yn " .
|
||||
" FROM v2_files" .
|
||||
" WHERE vr_sq = ?" .
|
||||
" AND use_yn = 'Y'" .
|
||||
" AND file_type = ?" .
|
||||
" ORDER BY seq DESC";
|
||||
$data = [
|
||||
$vr_sq,
|
||||
$file_type
|
||||
];
|
||||
|
||||
$query = $this->db->query($sql, [$vr_sq, $file_type]);
|
||||
|
||||
return $query->getRowArray();
|
||||
}
|
||||
|
||||
public function getDisplay($menu_position)
|
||||
{
|
||||
|
||||
$sql = "SELECT display_yn " .
|
||||
"FROM page_display " .
|
||||
"WHERE menu_position = ? ";
|
||||
$data = [$menu_position];
|
||||
$query = $this->db->query($sql, $data);
|
||||
$row = $query->getRowArray();
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
// 법인매물저장
|
||||
public function saveCorpOwn($vr_sq, $atcl_no)
|
||||
{
|
||||
$sql = "INSERT INTO v2_article_info_etc
|
||||
(vr_sq, atcl_no, corp_own)
|
||||
VALUES
|
||||
(?, ?, 'Y')
|
||||
ON DUPLICATE KEY UPDATE corp_own = 'Y'
|
||||
";
|
||||
|
||||
if ($this->db->query($sql, [$vr_sq, $atcl_no]) === false) {
|
||||
return [
|
||||
'success' => false,
|
||||
'msg' => '저장 실패',
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'success' => true,
|
||||
];
|
||||
}
|
||||
|
||||
// 파일업로드
|
||||
public function saveFileInfo($data)
|
||||
{
|
||||
$this->db->transStart();
|
||||
|
||||
$usr_id = session('usr_id');
|
||||
|
||||
// 기존파일 확인후 업데이트
|
||||
$sql = "SELECT seq FROM v2_files WHERE vr_sq = {$data['vr_sq']} AND use_yn = 'Y' AND file_type = '2'";
|
||||
$query = $this->db->query($sql);
|
||||
$row = $query->getNumRows();
|
||||
|
||||
if ($row > 0) {
|
||||
|
||||
$sql = "UPDATE v2_files SET use_yn = 'N' WHERE vr_sq = {$data['vr_sq']} AND use_yn = 'Y' AND file_type '2'";
|
||||
|
||||
$this->db->query($sql);
|
||||
|
||||
$sql = "INSERT INTO v2_files
|
||||
(vr_sq, file_type, view_odr, file_path, file_name, file_ext, file_size, insert_user, insert_tm, cloud_upload_yn)
|
||||
VALUES
|
||||
(?, '2', 0, ?, ?, ?, ?, ?, NOW(), 'Y')
|
||||
";
|
||||
|
||||
$param = [
|
||||
$data['vr_sq'],
|
||||
$data['file_path'],
|
||||
$data['new_name'],
|
||||
$data['ext'],
|
||||
$data['size'],
|
||||
$data['usr_id'],
|
||||
];
|
||||
|
||||
|
||||
if ($this->db->query($sql, $param)) {
|
||||
return [
|
||||
'success' => false,
|
||||
'msg' => '파일정보 저장 실패',
|
||||
];
|
||||
}
|
||||
|
||||
$row = $this->getDetail($data['vr_sq']);
|
||||
$this->saveChangedHistory($data['vr_sq'], $row['stat_cd'], 'C28', $usr_id, '이미지파일 업로드');
|
||||
|
||||
}
|
||||
|
||||
$this->db->transComplete();
|
||||
|
||||
return [
|
||||
'success' => true
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
// 다음매물
|
||||
public function getNextInfo($vr_sq)
|
||||
{
|
||||
$usr_id = session('usr_id');
|
||||
|
||||
$sql = "SELECT b.vr_sq
|
||||
FROM v2_article_info b
|
||||
INNER JOIN v2_vrfc_req a ON a.vr_sq = b.vr_sq AND a.vr_sq != ? AND a.stat_cd BETWEEN '35' AND '49' AND a.stat_cd NOT IN ('39','45')
|
||||
LEFT JOIN v2_chg_stat c ON c.vr_sq = b.vr_sq AND c.stat_cd = '40'
|
||||
WHERE a.insert_tm < DATE_FORMAT(curdate(), '%Y%m%d172959')
|
||||
AND (b.reg_charger IS NULL OR b.reg_charger = '')
|
||||
AND a.vrfc_type = 'N'
|
||||
ORDER BY CASE a.vrfc_type WHEN 'N' THEN 1 ELSE 2 END, a.vr_sq
|
||||
LIMIT 1
|
||||
for update skip locked ";
|
||||
|
||||
$query = $this->db->query($sql, [$vr_sq]);
|
||||
$row = $query->getRowArray();
|
||||
|
||||
if (!empty($row)) {
|
||||
|
||||
$this->db->transStart();
|
||||
|
||||
$sql = "UPDATE v2_article_info SET reg_charger = ? WHERE vr_sq = ?";
|
||||
|
||||
if ($this->db->query($sql, [$usr_id, $vr_sq]) === false) {
|
||||
return [
|
||||
'success' => false,
|
||||
'msg' => '저장 실패',
|
||||
];
|
||||
}
|
||||
|
||||
$this->db->transComplete();
|
||||
|
||||
return $row;
|
||||
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 정보변경 이력 저장
|
||||
public function saveChangedHistory($vr_sq, $stat_cd, $chg_type, $usr_id, $memo)
|
||||
{
|
||||
$sql = "INSERT INTO v2_chg_history" .
|
||||
" (vr_sq, stat_cd, chg_type, insert_id, insert_tm, memo)" .
|
||||
" VALUES" .
|
||||
" (?, ?, ?, ?, now(), ?)";
|
||||
|
||||
$data = [
|
||||
$vr_sq,
|
||||
$stat_cd,
|
||||
$chg_type,
|
||||
$usr_id,
|
||||
$memo
|
||||
];
|
||||
|
||||
$res = $this->db->query($sql, $data);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?= $this->include('layouts/header') ?>
|
||||
|
||||
@@ -106,12 +106,51 @@
|
||||
case "/board/notice/detail":
|
||||
$path = "/board/notice/lists";
|
||||
break;
|
||||
|
||||
case "/m701/m701a/detail":
|
||||
$path = "/m701/m701a/lists";
|
||||
break;
|
||||
case "/m702/m702a/detail":
|
||||
$path = "/m702/m702a/lists";
|
||||
break;
|
||||
case "/m703/m703a/detail":
|
||||
$path = "/m703/m703a/lists";
|
||||
break;
|
||||
case "/m704/m704a/detail":
|
||||
$path = "/m704/m704a/lists";
|
||||
break;
|
||||
case "/m705/m705a/detail":
|
||||
$path = "/m705/m705a/lists";
|
||||
break;
|
||||
case "/m706/m706a/detail":
|
||||
$path = "/m706/m706a/lists";
|
||||
break;
|
||||
case "/m708/m708a/detail":
|
||||
$path = "/m708/m708a/lists";
|
||||
break;
|
||||
case "/m709/m709a/detail":
|
||||
$path = "/m709/m709a/lists";
|
||||
break;
|
||||
case "/m710/m710a/detail":
|
||||
$path = "/m710/m710a/lists";
|
||||
break;
|
||||
case "/m711/m711a/detail":
|
||||
$path = "/m711/m711a/lists";
|
||||
break;
|
||||
case "/m712/m712a/detail":
|
||||
$path = "/m712/m712a/lists";
|
||||
break;
|
||||
case "/m713/m713a/detail":
|
||||
$path = "/m713/m713a/lists";
|
||||
break;
|
||||
case "/article/apt/detail":
|
||||
$path = "/article/apt/lists";
|
||||
break;
|
||||
case "/article/apt/ground/detail":
|
||||
$path = "/article/apt/lists2";
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
foreach ($sMenu as $subMenu) {
|
||||
if ($menu["mnu_id"] == $subMenu["mnu_pid"] && $path === $subMenu["mnu_url"]) {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</li>
|
||||
|
||||
<li class="mb-2">
|
||||
<div class="fw-semibold">- 추측하기 어려운 비밀번호</div>
|
||||
<div class="fw-semibold">추측하기 어려운 비밀번호</div>
|
||||
<div class="text-muted small">
|
||||
일련번호, 전화번호 등 쉬운 문자열이 포함되지 않도록 함<br>
|
||||
잘 알려진 단어, 키보드 상에서 나란히 있는 문자열이 포함되지 않도록 함
|
||||
@@ -41,12 +41,12 @@
|
||||
</li>
|
||||
|
||||
<li class="mb-2">
|
||||
<div class="fw-semibold">- 주기적 변경</div>
|
||||
<div class="fw-semibold">주기적 변경</div>
|
||||
<div class="text-muted small">비밀번호에 유효기간 설정하고 최소 6개월마다 변경</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<div class="fw-semibold">- 동일 비밀번호 사용 제한</div>
|
||||
<div class="fw-semibold">동일 비밀번호 사용 제한</div>
|
||||
<div class="text-muted small">2개의 비밀번호를 교대로 사용하지 않음</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -1344,10 +1344,6 @@
|
||||
|
||||
// 단지정보저장
|
||||
function fn_save_info(row, idx) {
|
||||
console.log('+++')
|
||||
console.log(row)
|
||||
console.log('idx ?? ' + idx)
|
||||
console.log('+++')
|
||||
|
||||
const target = $("#video_target_" + idx).val();
|
||||
console.log(target)
|
||||
|
||||
1331
app/Views/pages/article/receipt/detail.php
Normal file
1331
app/Views/pages/article/receipt/detail.php
Normal file
File diff suppressed because it is too large
Load Diff
797
app/Views/pages/article/receipt/lists.php
Normal file
797
app/Views/pages/article/receipt/lists.php
Normal file
@@ -0,0 +1,797 @@
|
||||
<?php
|
||||
$usr_level = session('usr_level');
|
||||
$usr_sq = session('usr_sq');
|
||||
$usr_nm = session('usr_nm');
|
||||
|
||||
?>
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#resultList tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-header-tab {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
.table-scroll {
|
||||
max-height: 300px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.swal2-cancel {
|
||||
background-color: #ff0000 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
#resultList.dataTable {
|
||||
width: max-content !important;
|
||||
}
|
||||
|
||||
table.dataTable td,
|
||||
table.dataTable th {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* 테이블이 내용만큼 커지고, wrapper가 스크롤 담당 */
|
||||
.table-responsive {
|
||||
overflow-x: auto !important;
|
||||
}
|
||||
|
||||
/* 테이블 폭: 내용 기준으로 커지되, 최소는 100% */
|
||||
.table-responsive #resultList {
|
||||
width: max-content !important;
|
||||
min-width: 100% !important;
|
||||
table-layout: auto !important;
|
||||
}
|
||||
|
||||
/* 줄바꿈 금지 */
|
||||
#resultList th,
|
||||
#resultList td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* PC에서 가로 스크롤이 잘리는 대표 구간들 강제 해제 */
|
||||
.main-card,
|
||||
.card,
|
||||
.card-body {
|
||||
overflow-x: visible !important;
|
||||
}
|
||||
|
||||
/* 만약 레이아웃 wrapper가 숨기고 있으면 이것도 */
|
||||
.app-main__outer,
|
||||
.app-main__inner,
|
||||
.app-main {
|
||||
overflow-x: visible !important;
|
||||
}
|
||||
|
||||
/* flex 환경에서 필수 */
|
||||
.app-main,
|
||||
.app-main__outer,
|
||||
.app-main__inner,
|
||||
.card,
|
||||
.card-body {
|
||||
min-width: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>확인매물 현황</h1>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form id="frm_srch_info" method="get" onsubmit="return false;">
|
||||
|
||||
<!-- 검색 폼 -->
|
||||
<div class="row g-3">
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물ID</label>
|
||||
<input type="text" class="form-control" name="rcpt_atclno" id="rcpt_atclno"
|
||||
onkeypress="atcl_no_enter(event)">
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label class="form-label mb-1">일자별조회</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<select class="form-select" name="schDateGb">
|
||||
<option value="1" selected>예약일자</option>
|
||||
<option value="2">등록일자</option>
|
||||
</select>
|
||||
<input type="date" class="form-control" name="sdate" id="sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="date" class="form-control" name="edate" id="edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">관할조직</label>
|
||||
<div class="d-flex gap-1">
|
||||
<select name="bonbu" id="bonbu" class="form-select form-select-sm">
|
||||
<option value="">-본부-</option>
|
||||
<?php foreach ($bonbu as $d): ?>
|
||||
<option value="<?= $d['dept_sq'] ?>">
|
||||
<?= $d['dept_nm'] ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="team" id="team" class="form-select form-select-sm">
|
||||
<option value="">-팀-</option>
|
||||
</select>
|
||||
<select name="damdang" id="damdang" class="form-select form-select-sm">
|
||||
<option value="">-담당자-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">지역별조회</label>
|
||||
<div class="d-flex gap-1">
|
||||
<select name="srcSido" id="srcSido" class="form-select form-select-sm">
|
||||
<option value="">-시/도-</option>
|
||||
<?php foreach ($sido as $s): ?>
|
||||
<option value="<?= $s['region_cd'] ?>">
|
||||
<?= $s['region_nm'] ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="srcGugun" id="srcGugun" class="form-select form-select-sm">
|
||||
<option value="">-시/군/구-</option>
|
||||
</select>
|
||||
<select name="srcDong" id="srcDong" class="form-select form-select-sm">
|
||||
<option value="">-읍/면/동-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">현재상태</label>
|
||||
<div class="d-flex gap-1">
|
||||
<select name="rcpt_stat1" class="form-select form-select-sm">
|
||||
<option value="">예약확인지연</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "STEP_VERIFICATION"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="rcpt_stat2" id="srcGugun" class="form-select form-select-sm">
|
||||
<option value="">-상태2-</option>
|
||||
</select>
|
||||
<select name="rcpt_stat3" id="srcDong" class="form-select form-select-sm">
|
||||
<option value="">-상태3-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">거래구분</label>
|
||||
<select class="form-select" name="rcpt_product_info1">
|
||||
<option value="">전체</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "NHN_DEAL_TYPE"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">동영상촬영여부</label>
|
||||
<select class="form-select" name="exp_movie_yn">
|
||||
<option value="">전체</option>
|
||||
<option value="Y">촬영</option>
|
||||
<option value="N">미촬영</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">홍보확인서여부</label>
|
||||
<select class="form-select" name="conf_img_yn">
|
||||
<option value="">전체</option>
|
||||
<option value="Y">Y</option>
|
||||
<option value="N">N</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">분양권</label>
|
||||
<select class="form-select" name="parcel_out_yn">
|
||||
<option value="">전체</option>
|
||||
<option value="Y"> Y</option>
|
||||
<option value="N"> N</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">CP ID</label>
|
||||
<select class="form-select" name="rcpt_cpid">
|
||||
<option value="">전체</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "CP_ID"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물종류</label>
|
||||
<select class="form-select" name="rcpt_product">
|
||||
<option value="">전체</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "ARTICLE_TYPE"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">면적확인</label>
|
||||
<select class="form-select" name="exp_spc_yn">
|
||||
<option value="">전체</option>
|
||||
<option value="Y"> Y</option>
|
||||
<option value="N"> N</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">체크리스트</label>
|
||||
<select class="form-select" name="check_list_img_yn">
|
||||
<option value="">전체</option>
|
||||
<option value="Y"> Y
|
||||
</option>
|
||||
<option value="N"> N
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">평면도유무</label>
|
||||
<select class="form-select" name="ground_plan_yn">
|
||||
<option value="">전체</option>
|
||||
<option value="Y">Y</option>
|
||||
<option value="N">N</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">평면도요청</label>
|
||||
<select class="form-select" name="ground_plan">
|
||||
<option value="">전체</option>
|
||||
<option value="Y">Y</option>
|
||||
<option value="N">N</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">직거래</label>
|
||||
<select class="form-select" name="direct_trad_yn">
|
||||
<option value="">전체</option>
|
||||
<option value="Y">Y</option>
|
||||
<option value="N">N</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">360촬영여부</label>
|
||||
<select class="form-select" name="image_360_yn">
|
||||
<option value="">전체</option>
|
||||
<option value="Y">Y</option>
|
||||
<option value="N">N</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 검색유형 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">검색유형</label>
|
||||
<select class="form-select" name="srchType">
|
||||
<option value="">선택</option>
|
||||
<option value="1">중개사명</option>
|
||||
<option value="2">주소</option>
|
||||
<option value="3">사업자번호</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 검색어 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">검색어</label>
|
||||
<input type="text" class="form-control" name="srchTxt" placeholder="검색어 입력">
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 d-grid">
|
||||
<label class="form-label mb-1 invisible">검색</label>
|
||||
<button type="button" class="btn btn-primary" id="btnSearch">
|
||||
<i class="pe-7s-search me-1"></i>검색
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header d-flex align-items-center">
|
||||
<div class="d-flex align-items-center flex-wrap" style="gap: 8px; flex: 1">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ml-auto">
|
||||
<button class="btn btn-sm btn-outline-success" id="excel-download">
|
||||
<i class="fa fa-fw" aria-hidden="true" title="file-excel-o"></i>
|
||||
엑셀다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table id="resultList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>현재상태</th>
|
||||
<th>매물ID</th>
|
||||
<th>접수(등록)일자</th>
|
||||
<th>예약일자</th>
|
||||
<th>방문희망시간</th>
|
||||
<th>촬영완료일자</th>
|
||||
<th>CP ID</th>
|
||||
<th>중개사명</th>
|
||||
<th>주소</th>
|
||||
<th>매물종류</th>
|
||||
<th>거래구분</th>
|
||||
<?php
|
||||
if ($usr_level != '45') {
|
||||
?>
|
||||
<th>관할조직(팀)</th>
|
||||
<th>방문담당</th>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<th>분양권</th>
|
||||
<th>홍보확인서</th>
|
||||
<th>동영상촬영</th>
|
||||
<th>평면도유무</th>
|
||||
<th>평면도요청</th>
|
||||
<th>면적확인</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 여기는 비워둠: AJAX로 채움 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css" />
|
||||
<link href="https://unpkg.com/dropzone@6.0.0-beta.1/dist/dropzone.css" rel="stylesheet" type="text/css" />
|
||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="/architectui/assets/js/datatable.kor.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
const date = new Date();
|
||||
var table;
|
||||
|
||||
$(function () {
|
||||
|
||||
initReceiptDate();
|
||||
|
||||
$("#srcSido, #srcGugun, #srcSido2, #srcGugun2").on("change", function (e) {
|
||||
|
||||
const targetId = this.id;
|
||||
|
||||
const isSecond = this.id.endsWith("2");
|
||||
|
||||
const params = {
|
||||
srcSido: isSecond
|
||||
? $("#srcSido2").val()
|
||||
: $("#frm_srch_info [name=srcSido]").val(),
|
||||
|
||||
srcGugun: isSecond
|
||||
? $("#srcGugun2").val()
|
||||
: $("#frm_srch_info [name=srcGugun]").val(),
|
||||
};
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/manage/areas/getAreaList",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
data: params,
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
switch (targetId) {
|
||||
case "srcSido":
|
||||
$("#srcGugun").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>시/군/구</option>";
|
||||
|
||||
if ($("#srcSido").val() !== "") {
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcGugun").append(str);
|
||||
|
||||
break;
|
||||
|
||||
case "srcGugun":
|
||||
$("#srcDong").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>읍/면/동</option>";
|
||||
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcDong").append(str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#bonbu, #team, #bonbu2, #team2").on("change", function (e) {
|
||||
const targetId = this.id;
|
||||
|
||||
|
||||
var str = "";
|
||||
if (targetId === "bonbu" || targetId === "bonbu2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-팀-</option>`;
|
||||
if (teamArr.length > 0) {
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(teamArr[i].pdept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${teamArr[i].dept_sq}">${teamArr[i].dept_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "bonbu") {
|
||||
$("#team").html(str);
|
||||
} else if (targetId === "bonbu2") {
|
||||
$("#team2").html(str);
|
||||
}
|
||||
|
||||
} else if (targetId === "team" || targetId === "team2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-담당자-</option>`;
|
||||
if (userArr.length > 0) {
|
||||
for (var i = 0; i < userArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(userArr[i].dept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${userArr[i].usr_id}">${userArr[i].usr_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "team") {
|
||||
$("#damdang").html(str);
|
||||
} else if (targetId === "team2") {
|
||||
$("#damdang2").html(str);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 검증방식 onchange
|
||||
$("#vrfcreq_way").on("change", function (e) {
|
||||
const val = e.target.value;
|
||||
|
||||
var str = "";
|
||||
str += `<option value="">-선택-</option>`;
|
||||
if (e.val !== "") {
|
||||
$.getJSON("/common/common/getVrfcCode?type=" + val, function (result) {
|
||||
var total = result.length;
|
||||
for (var i = 0; i < total; i++) {
|
||||
var cateNm = result[i].cd_nm;
|
||||
|
||||
if (total == 1) {
|
||||
str += "<option value=\"" + result[i].cd + "\" selected>" + cateNm + "</option>";
|
||||
} else {
|
||||
str += "<option value=\"" + result[i].cd + "\">" + cateNm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#vrfc_type_sub").html(str);
|
||||
});
|
||||
} else {
|
||||
$("#vrfc_type_sub").html(str);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
$("#btnSearch").on("click", function () {
|
||||
table.ajax.reload();
|
||||
});
|
||||
|
||||
|
||||
table = $('#resultList').DataTable({
|
||||
language: lang_kor,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
ajax: {
|
||||
url: '/article/receipt/getResultList',
|
||||
type: 'GET',
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
data: function (d) {
|
||||
|
||||
d.rcpt_atclno = $("#frm_srch_info [name=rcpt_atclno]").val(); // 매물ID
|
||||
d.schDateGb = $("#frm_srch_info [name=schDateGb]").val(); // 일자유형
|
||||
d.sdate = $("#frm_srch_info [name=sdate]").val(); // 시작일
|
||||
d.edate = $("#frm_srch_info [name=edate]").val(); // 종료일
|
||||
|
||||
d.bonbu = $("#frm_srch_info [name=bonbu]").val(); // 본부
|
||||
d.team = $("#frm_srch_info [name=team]").val(); // 팀
|
||||
d.user = $("#frm_srch_info [name=user]").val(); // 담당자
|
||||
|
||||
d.sido = $("#frm_srch_info [name=srcSido]").val(); // 시도
|
||||
d.gugun = $("#frm_srch_info [name=srcGugun]").val(); // 시군구
|
||||
d.dong = $("#frm_srch_info [name=srcDong]").val(); // 읍면동
|
||||
|
||||
d.rcpt_stat1 = $("#frm_srch_info [name=rcpt_stat1]").val(); // 상태1
|
||||
d.rcpt_stat2 = $("#frm_srch_info [name=rcpt_stat2]").val(); // 상태2
|
||||
d.rcpt_stat3 = $("#frm_srch_info [name=rcpt_stat3]").val(); // 상태3
|
||||
|
||||
d.rcpt_product_info1 = $("#frm_srch_info [name=rcpt_product_info1]").val(); // 거래구분
|
||||
d.exp_movie_yn = $("#frm_srch_info [name=exp_movie_yn]").val(); // 동영상촬영여부
|
||||
d.conf_img_yn = $("#frm_srch_info [name=conf_img_yn]").val(); // 홍보확인서여부
|
||||
d.parcel_out_yn = $("#frm_srch_info [name=parcel_out_yn]").val(); // 분양권
|
||||
d.rcpt_cpid = $("#frm_srch_info [name=rcpt_cpid]").val(); // CPID
|
||||
d.rcpt_product = $("#frm_srch_info [name=rcpt_product]").val(); // 매물종류
|
||||
d.exp_spc_yn = $("#frm_srch_info [name=exp_spc_yn]").val(); // 면적확인
|
||||
d.check_list_img_yn = $("#frm_srch_info [name=check_list_img_yn]").val(); // 체크리스트
|
||||
d.ground_plan_yn = $("#frm_srch_info [name=ground_plan_yn]").val(); // 평면도유무
|
||||
d.ground_plan = $("#frm_srch_info [name=ground_plan]").val(); // 평면도요청
|
||||
|
||||
d.direct_trad_yn = $("#frm_srch_info [name=direct_trad_yn]").val(); // 직거래
|
||||
d.image_360_yn = $("#frm_srch_info [name=image_360_yn]").val(); // 360촬영여부
|
||||
d.srchType = $("#frm_srch_info [name=srchType]").val(); // 검색유형
|
||||
d.srchTxt = $("#frm_srch_info [name=srchTxt]").val(); // 검색어
|
||||
|
||||
|
||||
d.start = d.start || 0
|
||||
d.length = d.length || 10
|
||||
},
|
||||
},
|
||||
"columnDefs": [
|
||||
{ className: 'text-center', targets: '_all' },
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
],
|
||||
columns: [
|
||||
{ data: 'rcpt_stat_nm' },
|
||||
{ data: 'rcpt_atclno' },
|
||||
{ data: 'insert_tm' },
|
||||
{ data: null, render: fn_rsrv_render },
|
||||
{ data: 'rsrv_tm_hour' },
|
||||
{ data: 'photo_save_dt' },
|
||||
{ data: 'rcpt_cpid' },
|
||||
{ data: null, render: fn_agent_render },
|
||||
{ data: null, render: fn_addr_render },
|
||||
{ data: null, render: fn_prd_render },
|
||||
{ data: 'rcpt_product_info1' },
|
||||
<?php if ($usr_level != "45"): ?>
|
||||
{ data: 'dept_nm' },
|
||||
{ data: 'usr_nm' },
|
||||
<?php endif; ?>
|
||||
{ data: 'parcel_out_yn' },
|
||||
{ data: 'conf_img_yn' },
|
||||
{ data: 'exp_movie_yn' },
|
||||
{ data: 'ground_plan_yn' },
|
||||
{ data: 'ground_plan' },
|
||||
{ data: 'exp_spc_yn' },
|
||||
|
||||
],
|
||||
// 옵션들 예시
|
||||
destroy: true,
|
||||
deferRender: true,
|
||||
scrollX: false,
|
||||
autoWidth: false,
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
});
|
||||
|
||||
// 테이블 row click
|
||||
$('#resultList tbody').on('click', 'tr', function (e) {
|
||||
if ($(e.target).closest('td.dt-no-rowclick').length) return;
|
||||
|
||||
const rowData = table.row(this).data();
|
||||
if (!rowData) return;
|
||||
|
||||
const rcpt_atclno = rowData.rcpt_atclno;
|
||||
location.href = "<?= site_url('article/receipt/detail') ?>/" + rcpt_atclno;
|
||||
});
|
||||
|
||||
|
||||
// 엑셀 다운로드 click
|
||||
$("#excel-download").on("click", function () {
|
||||
$.ajax({
|
||||
url: "/article/receipt/excel",
|
||||
method: "GET",
|
||||
dataType: "json",
|
||||
data: $("#frm_srch_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
downloadExcel(result.data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 접수기간 초기화
|
||||
function initReceiptDate() {
|
||||
|
||||
const before3 = new Date();
|
||||
before3.setDate(date.getDate() - 2);
|
||||
|
||||
const fmt = d => d.toISOString().slice(0, 10);
|
||||
|
||||
$('#sdate').val(fmt(before3));
|
||||
$('#edate').val(fmt(date));
|
||||
|
||||
}
|
||||
|
||||
function atcl_no_enter(event) {
|
||||
if (event.keyCode == 13) {
|
||||
table.ajax.reload()
|
||||
}
|
||||
}
|
||||
|
||||
/** datatable render */
|
||||
function fn_rsrv_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
str = row.rsrv_date + " " + row.rsrv_tm_ap;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_agent_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.direct_trad_yn == 'Y') {
|
||||
str = row.sellr_nm;
|
||||
} else {
|
||||
str = row.agent_nm;
|
||||
if (row.agent_id != null) {
|
||||
str += "(" + row.agent_id + ")";
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_addr_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.rcpt_jibun_addr == null || row.rcpt_jibun_addr == "") {
|
||||
str = row.addr + "<br/>" + row.rcpt_hscp_nm + " " + row.rcpt_dtl_addr + " " + row.rcpt_ho;
|
||||
} else {
|
||||
str = row.addr + "<br/>" + row.rcpt_hscp_nm + " " + row.rcpt_li_addr + " " + row.rcpt_jibun_addr + " " + row.rcpt_etc_addr;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_prd_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.rcpt_product_nm != null && row.rcpt_product_nm != "") {
|
||||
str = row.rcpt_product_nm;
|
||||
} else {
|
||||
str = row.rcpt_product;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
/** datatable render */
|
||||
|
||||
// 엑셀 다운로드
|
||||
function downloadExcel(data) {
|
||||
const ws = XLSX.utils.json_to_sheet(data);
|
||||
// ws['!cols'] = [
|
||||
// { wpx: 100 },
|
||||
// { wpx: 100 },
|
||||
// { wpx: 100 },
|
||||
// { wpx: 100 },
|
||||
// { wpx: 150 },
|
||||
// { wpx: 120 },
|
||||
// { wpx: 100 },
|
||||
// { wpx: 100 },
|
||||
// { wpx: 100 },
|
||||
// { wpx: 100 },
|
||||
// { wpx: 100 },
|
||||
// { wpx: 100 },
|
||||
// ];
|
||||
|
||||
const wb = XLSX.utils.book_new();
|
||||
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
|
||||
|
||||
const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
|
||||
|
||||
const blob = new Blob([wbout], { type: 'application/octet-stream' });
|
||||
|
||||
const link = document.createElement("a");
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = "현장확인매물_접수_현황" + getDateTimeString() + ".xlsx";
|
||||
link.click();
|
||||
URL.revokeObjectURL(link.href);
|
||||
}
|
||||
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
@@ -41,6 +41,7 @@
|
||||
<script defer src="/architectui/assets/scripts/chart_js.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/apex_charts.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/sparklines.98288b227c064e6a107f.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
<link href="/architectui/assets/styles/vendors.98288b227c064e6a107f.css" rel="stylesheet">
|
||||
@@ -105,8 +106,7 @@
|
||||
<label for="exampleCheck"
|
||||
class="form-check-label text-muted fw-medium">아이디저장</label>
|
||||
</div>
|
||||
<a href="javascript:void(0);"
|
||||
class="text-primary text-decoration-none fw-semibold">
|
||||
<a onclick="faxOpen();" class="text-primary text-decoration-none fw-semibold">
|
||||
팩스 수신 확인
|
||||
</a>
|
||||
</div>
|
||||
@@ -132,12 +132,80 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 모달영역-->
|
||||
<div class="modal fade" id="faxModal" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
|
||||
<!-- Header -->
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">팩스 수신 확인</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
|
||||
<!-- Body -->
|
||||
<div class="modal-body">
|
||||
|
||||
<form id="frm_srch_info" onsubmit="return false;">
|
||||
<!-- 검색 영역 -->
|
||||
<div class="row g-2 align-items-end mb-3">
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">발신 팩스 번호</label>
|
||||
<input type="text" class="form-control form-control-sm" name="caller_no"
|
||||
placeholder="번호 입력" />
|
||||
</div>
|
||||
<div class="col-md-4 text-start">
|
||||
<button type="button" class="btn btn-sm btn-primary" id="btnSearch">
|
||||
검색
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="my-2">
|
||||
<!-- 테이블 영역 -->
|
||||
<div class="table-responsive">
|
||||
<table id="tblFax" class="table table-sm table-bordered table-hover align-middle mb-0">
|
||||
<caption class="caption-top small text-muted">FAX 수신 현황</caption>
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="text-center">수신기간</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 데이터 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- Footer -->
|
||||
<div class="modal-footer py-2">
|
||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">
|
||||
닫기
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 모달영역-->
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css" />
|
||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="/architectui/assets/js/datatable.kor.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
const tpl = document.querySelector('.my-loader-template');
|
||||
var table;
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#btnSearch").on("click", function () {
|
||||
table.ajax.reload();
|
||||
});
|
||||
|
||||
|
||||
$("#frm_login_info").on("submit", function (e) {
|
||||
e.preventDefault(); // 기본 submit 막기
|
||||
|
||||
@@ -191,10 +259,51 @@
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
function faxOpen() {
|
||||
table = $('#tblFax').DataTable({
|
||||
language: lang_kor,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
ajax: {
|
||||
url: '/listfax/listfax/getLists',
|
||||
type: 'GET',
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
data: function (d) {
|
||||
|
||||
d.caller_no = $("#frm_srch_info [name=caller_no]").val();
|
||||
|
||||
d.start = d.start || 0
|
||||
d.length = d.length || 10
|
||||
},
|
||||
},
|
||||
"columnDefs": [
|
||||
{ className: 'text-center', targets: '_all' },
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
],
|
||||
columns: [
|
||||
{ data: 'atcl_no' },
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
});
|
||||
|
||||
$("#faxModal").modal("show");
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -256,8 +256,6 @@
|
||||
</div>
|
||||
|
||||
<div class="ml-auto">
|
||||
|
||||
|
||||
<button class="btn btn-sm btn-outline-success" id="excel-download">
|
||||
<i class="fa fa-fw" aria-hidden="true" title="file-excel-o"></i>
|
||||
엑셀다운로드
|
||||
@@ -479,7 +477,7 @@
|
||||
|
||||
});
|
||||
|
||||
|
||||
initReceiptDate();
|
||||
table = $('#resultList').DataTable({
|
||||
language: lang_kor,
|
||||
serverSide: true,
|
||||
@@ -496,7 +494,6 @@
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
data: function (d) {
|
||||
initReceiptDate();
|
||||
|
||||
d.atcl_no = $("#frm_srch_info [name=atcl_no]").val(); // 매물번호
|
||||
d.stat_cd = $("#frm_srch_info [name=stat_cd]").val(); // 현재상태
|
||||
|
||||
1258
app/Views/pages/v2/m702/detail.php
Normal file
1258
app/Views/pages/v2/m702/detail.php
Normal file
File diff suppressed because it is too large
Load Diff
901
app/Views/pages/v2/m702/lists.php
Normal file
901
app/Views/pages/v2/m702/lists.php
Normal file
@@ -0,0 +1,901 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#resultList tbody tr {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-header-tab {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
.table-scroll {
|
||||
max-height: 300px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.swal2-cancel {
|
||||
background-color: #ff0000 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>확인매물 현황</h1>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form id="frm_srch_info" method="get" onsubmit="return false;">
|
||||
<input type="hidden" name="m" id="m" value="M801" />
|
||||
<input type="hidden" name="todo" id="todo" value="inq" />
|
||||
<input type="hidden" name="usr_id" value="" />
|
||||
|
||||
<!-- 안내 -->
|
||||
<div class="alert alert-warning py-2 mb-3">
|
||||
<small class="mb-0">
|
||||
매물번호를 입력하면 <b>다른 조건은 무시</b>됩니다.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- 검색 폼 -->
|
||||
<div class="row g-3">
|
||||
|
||||
<!-- 매물번호 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물번호</label>
|
||||
<input type="text" name="atcl_no" class="form-control form-control-sm" placeholder="매물번호" maxlength="10"
|
||||
onkeypress="atcl_no_enter(event)">
|
||||
</div>
|
||||
|
||||
<!-- 현재상태 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">현재상태</label>
|
||||
<select name="stat_cd" class="form-select form-select-sm">
|
||||
<option value="">-선택-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "STEP_VERIFICATION"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 중개소 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">중개소</label>
|
||||
<input type="text" name="realtor_nm" class="form-control form-control-sm" placeholder="중개소">
|
||||
</div>
|
||||
|
||||
<!-- 배정여부 (2개 셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">배정여부</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="charger_gbn" id="code_charger_gbn" class="form-select form-select-sm">
|
||||
<option value="1">전화/서류담당자</option>
|
||||
<option value="2">등기부등본담당자</option>
|
||||
</select>
|
||||
<select name="assign_yn" id="assign_yn" class="form-select form-select-sm">
|
||||
<option value="A">-전체-</option>
|
||||
<option value="Y">배정</option>
|
||||
<option value="N">미배정</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 접수기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">접수기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="date" class="form-control" name="receipt_sdate" id="receipt_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="date" class="form-control" name="receipt_edate" id="receipt_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 완료기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">완료기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control" name="complete_sdate" id="complete_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="text" class="form-control" name="complete_edate" id="complete_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 지역구분 -->
|
||||
<div class="col-md-4">
|
||||
<label class="form-label mb-1">지역구분</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="srcSido" id="srcSido" class="form-select form-select-sm">
|
||||
<option value="">-시/도-</option>
|
||||
<?php foreach ($sido as $s): ?>
|
||||
<option value="<?= $s['region_cd'] ?>"><?= $s['region_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="srcGugun" id="srcGugun" class="form-select form-select-sm">
|
||||
<option value="">-시/군/구-</option>
|
||||
</select>
|
||||
<select name="srcDong" id="srcDong" class="form-select form-select-sm">
|
||||
<option value="">-읍/면/동-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 담당자 (본부/팀/담당 3셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">담당자</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="bonbu" id="bonbu" class="form-select form-select-sm">
|
||||
<option value="">-본부-</option>
|
||||
<?php foreach ($bonbu as $d): ?>
|
||||
<option value="<?= $d['dept_sq'] ?>"><?= $d['dept_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="team" id="team" class="form-select form-select-sm">
|
||||
<option value="">-팀-</option>
|
||||
</select>
|
||||
<select name="damdang" id="damdang" class="form-select form-select-sm">
|
||||
<option value="">-담당자-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 검증방식 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">검증방식</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="vrfcreq_way" id="vrfcreq_way" class="form-select form-select-sm">
|
||||
<option value="">-검증방식-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "VRFCREQ_WAY"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="vrfc_type_sub" id="vrfc_type_sub" class="form-select form-select-sm">
|
||||
<option value="">-선택-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 매체사 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매체사</label>
|
||||
<select name="rcpt_cpid" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "CP_ID"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 매물종류 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물종류</label>
|
||||
<select name="rlet_type_cd" class="form-select form-select-sm">
|
||||
<option value="">-매물종류-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "ARTICLE_TYPE"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 법인소유 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">법인소유</label>
|
||||
<select name="corp_own" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<option value="Y">Y</option>
|
||||
<option value="N">N</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1 d-grid">
|
||||
<label class="form-label mb-1 invisible">검색</label>
|
||||
<button type="button" class="btn btn-primary" id="btnSearch">
|
||||
<i class="pe-7s-search me-1"></i>검색
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header d-flex align-items-center">
|
||||
<div class="d-flex align-items-center flex-wrap" style="gap:8px; flex:1;">
|
||||
|
||||
<select class="form-control form-control-sm" id="damdangT" style="width:150px;">
|
||||
<option value="1">전화/서류 담당자</option>
|
||||
<option value="2">등기부등본 담당자</option>
|
||||
</select>
|
||||
|
||||
<select class="form-control form-control-sm" id="bonbu2" style="width:140px;">
|
||||
<option value="">-본부-</option>
|
||||
<?php foreach ($bonbu as $d): ?>
|
||||
<option value="<?= $d['dept_sq'] ?>"><?= $d['dept_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
|
||||
<select class="form-control form-control-sm" id="team2" style="width:160px;">
|
||||
<option value="">-팀-</option>
|
||||
</select>
|
||||
|
||||
<select class="form-control form-control-sm" id="damdang2" style="width:160px;">
|
||||
<option value="">-담당자-</option>
|
||||
</select>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-outline-light" id="btn_part_change">
|
||||
배정변경
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-outline-light" id="btn_part_omit">
|
||||
서류누락
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="ml-auto">
|
||||
<button class="btn btn-sm btn-outline-light" id="excel-download">
|
||||
등기부등본 전송
|
||||
</button>
|
||||
|
||||
<button class="btn btn-sm btn-outline-success" id="excel-download">
|
||||
<i class="fa fa-fw" aria-hidden="true" title="file-excel-o"></i>
|
||||
엑셀다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table id="resultList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">
|
||||
<input type="checkbox" class="form-check-input" name="chkAll" id="chkAll" />
|
||||
</th>
|
||||
<th>매물번호</th>
|
||||
<th>진행상태</th>
|
||||
<th>접수시간</th>
|
||||
<th>검증방식</th>
|
||||
<th>주소</th>
|
||||
<th>상세주소</th>
|
||||
<th>매체사</th>
|
||||
<th>중개소</th>
|
||||
<th>서류/전화<br />담당자</th>
|
||||
<th>서류/전화<br />확인완료시간</th>
|
||||
<th>등기부등본<br />담당자</th>
|
||||
<th>검증완료<br />일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 여기는 비워둠: AJAX로 채움 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css" />
|
||||
<link href="https://unpkg.com/dropzone@6.0.0-beta.1/dist/dropzone.css" rel="stylesheet" type="text/css" />
|
||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="/architectui/assets/js/datatable.kor.js"></script>
|
||||
<script type="text/javascript" src="https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=dtounkwjc5"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
const date = new Date();
|
||||
const bonbuArr = <?= json_encode($bonbu, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const teamArr = <?= json_encode($team, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const userArr = <?= json_encode($user, JSON_UNESCAPED_UNICODE); ?>;
|
||||
|
||||
var table;
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#bonbu").on("change", function (e) {
|
||||
|
||||
const value = e.target.value
|
||||
|
||||
$("#dept_sq").empty()
|
||||
|
||||
var str = "<option value=''>선택</option>"
|
||||
if (teamArr != null) {
|
||||
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
if (value === teamArr[i].pdept_sq) {
|
||||
str += "<option value='" + teamArr[i].dept_sq + "'>" + teamArr[i].dept_nm + "</option>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#dept_sq").append(str)
|
||||
|
||||
});
|
||||
|
||||
$("#srcSido, #srcGugun, #srcSido2, #srcGugun2").on("change", function (e) {
|
||||
|
||||
const targetId = this.id;
|
||||
|
||||
const isSecond = this.id.endsWith("2");
|
||||
|
||||
const params = {
|
||||
srcSido: isSecond
|
||||
? $("#srcSido2").val()
|
||||
: $("#frm_srch_info [name=srcSido]").val(),
|
||||
|
||||
srcGugun: isSecond
|
||||
? $("#srcGugun2").val()
|
||||
: $("#frm_srch_info [name=srcGugun]").val(),
|
||||
};
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/manage/areas/getAreaList",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
data: params,
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
switch (targetId) {
|
||||
case "srcSido":
|
||||
$("#srcGugun").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>시/군/구</option>";
|
||||
|
||||
if ($("#srcSido").val() !== "") {
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcGugun").append(str);
|
||||
|
||||
break;
|
||||
|
||||
case "srcGugun":
|
||||
$("#srcDong").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>읍/면/동</option>";
|
||||
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcDong").append(str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#bonbu, #team, #bonbu2, #team2").on("change", function (e) {
|
||||
const targetId = this.id;
|
||||
|
||||
|
||||
var str = "";
|
||||
var str2 = `<option value="">-담당자-</option>`;
|
||||
if (targetId === "bonbu" || targetId === "bonbu2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-팀-</option>`;
|
||||
if (teamArr.length > 0) {
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(teamArr[i].pdept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${teamArr[i].dept_sq}">${teamArr[i].dept_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "bonbu") {
|
||||
$("#team").html(str);
|
||||
$("#damdang").html(str2);
|
||||
} else if (targetId === "bonbu2") {
|
||||
$("#team2").html(str);
|
||||
$("#damdang2").html(str2);
|
||||
}
|
||||
|
||||
} else if (targetId === "team" || targetId === "team2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-담당자-</option>`;
|
||||
if (userArr.length > 0) {
|
||||
for (var i = 0; i < userArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(userArr[i].dept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${userArr[i].usr_id}">${userArr[i].usr_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "team") {
|
||||
$("#damdang").html(str);
|
||||
} else if (targetId === "team2") {
|
||||
$("#damdang2").html(str);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 검증방식 onchange
|
||||
$("#vrfcreq_way").on("change", function (e) {
|
||||
const val = e.target.value;
|
||||
|
||||
var str = "";
|
||||
str += `<option value="">-선택-</option>`;
|
||||
if (e.val !== "") {
|
||||
$.getJSON("/common/common/getVrfcCode?type=" + val, function (result) {
|
||||
var total = result.length;
|
||||
for (var i = 0; i < total; i++) {
|
||||
var cateNm = result[i].cd_nm;
|
||||
|
||||
if (total == 1) {
|
||||
str += "<option value=\"" + result[i].cd + "\" selected>" + cateNm + "</option>";
|
||||
} else {
|
||||
str += "<option value=\"" + result[i].cd + "\">" + cateNm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#vrfc_type_sub").html(str);
|
||||
});
|
||||
} else {
|
||||
$("#vrfc_type_sub").html(str);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
initReceiptDate();
|
||||
table = $('#resultList').DataTable({
|
||||
language: lang_kor,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
ajax: {
|
||||
url: '/m702/m702a/getResultList',
|
||||
type: 'GET',
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
data: function (d) {
|
||||
d.atcl_no = $("#frm_srch_info [name=atcl_no]").val(); // 매물번호
|
||||
d.stat_cd = $("#frm_srch_info [name=stat_cd]").val(); // 현재상태
|
||||
d.realtor_nm = $("#frm_srch_info [name=realtor_nm]").val(); // 중개소
|
||||
d.charger_gbn = $("#frm_srch_info [name=charger_gbn]").val(); // 배정여부
|
||||
d.assign_yn = $("#frm_srch_info [name=assign_yn]").val(); // 배정여부2
|
||||
d.receipt_sdate = $("#frm_srch_info [name=receipt_sdate]").val(); // 접수기간1
|
||||
d.receipt_edate = $("#frm_srch_info [name=receipt_edate]").val(); // 접수기간2
|
||||
d.complete_sdate = $("#frm_srch_info [name=complete_sdate]").val(); // 완료기간1
|
||||
d.complete_edate = $("#frm_srch_info [name=complete_edate]").val(); // 완료기간2
|
||||
d.srcSido = $("#frm_srch_info [name=srcSido]").val(); // 시도
|
||||
d.srcGugun = $("#frm_srch_info [name=srcGugun]").val(); // 시군구
|
||||
d.srcDong = $("#frm_srch_info [name=srcDong]").val(); // 읍면동
|
||||
d.bonbu = $("#frm_srch_info [name=bonbu]").val(); // 본부
|
||||
d.team = $("#frm_srch_info [name=team]").val(); // 팀
|
||||
d.damdang = $("#frm_srch_info [name=damdang]").val(); // 담당
|
||||
d.vrfcreq_way = $("#frm_srch_info [name=vrfcreq_way]").val(); // 검증방식1
|
||||
d.vrfc_type_sub = $("#frm_srch_info [name=vrfc_type_sub]").val(); // 검증방식2
|
||||
d.rcpt_cpid = $("#frm_srch_info [name=rcpt_cpid]").val(); // 매체사
|
||||
d.rlet_type_cd = $("#frm_srch_info [name=rlet_type_cd]").val(); // 매물종류
|
||||
d.corp_own = $("#frm_srch_info [name=corp_own]").val(); // 법인
|
||||
|
||||
d.start = d.start || 0
|
||||
d.length = d.length || 10
|
||||
},
|
||||
},
|
||||
"columnDefs": [
|
||||
{ className: 'text-center', targets: '_all' },
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
],
|
||||
columns: [
|
||||
{ data: null, render: fn_chk_render, width: "50px", className: "dt-no-rowclick" },
|
||||
{ data: 'atcl_no' },
|
||||
{ data: 'pre_stat' },
|
||||
{ data: 'insert_tm' },
|
||||
{ data: 'vrfc_type' },
|
||||
{ data: null, render: fn_region_render },
|
||||
{ data: null, render: fn_addr_render },
|
||||
{ data: 'cpid' },
|
||||
{ data: 'realtor_nm' },
|
||||
{ data: 'usr_nm', width: "80px" },
|
||||
{ data: null, render: fn_tm_render },
|
||||
{ data: 'reg_charger' },
|
||||
{ data: 'result_tm' },
|
||||
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
});
|
||||
|
||||
$('#resultList tbody').on('click', 'tr', function (e) {
|
||||
if ($(e.target).closest('td.dt-no-rowclick').length) return;
|
||||
|
||||
const rowData = table.row(this).data();
|
||||
if (!rowData) return;
|
||||
|
||||
const vr_sq = rowData.vr_sq;
|
||||
location.href = "<?= site_url('m702/m702a/detail') ?>/" + vr_sq;
|
||||
});
|
||||
|
||||
$('#btnSearch').on('click', function () {
|
||||
table.ajax.reload()
|
||||
});
|
||||
|
||||
// 엑셀 다운로드 click
|
||||
$("#excel-download").on("click", function () {
|
||||
$.ajax({
|
||||
url: "/m702/m702a/excel",
|
||||
method: "GET",
|
||||
dataType: "json",
|
||||
data: $("#frm_srch_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
downloadExcel(result.data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).on('change', '#chkAll', function () {
|
||||
const checked = this.checked;
|
||||
|
||||
$(table.rows({ page: 'current' }).nodes())
|
||||
.find('input.row-chk')
|
||||
.prop('checked', checked);
|
||||
});
|
||||
|
||||
$(document).on('change', '#resultList tbody input.row-chk', function () {
|
||||
const $rows = $(table.rows({ page: 'current' }).nodes());
|
||||
const total = $rows.find('input.row-chk').length;
|
||||
const checkedCnt = $rows.find('input.row-chk:checked').length;
|
||||
|
||||
$('#chkAll').prop('checked', total > 0 && total === checkedCnt);
|
||||
});
|
||||
|
||||
|
||||
// 전체 선택
|
||||
$(document).on('change', '#depChkAll', function () {
|
||||
$('.depChk').prop('checked', this.checked);
|
||||
});
|
||||
|
||||
// 개별 체크 시 전체 체크 동기화
|
||||
$(document).on('change', '.depChk', function () {
|
||||
const total = $('.depChk').length;
|
||||
const checked = $('.depChk:checked').length;
|
||||
$('#depChkAll').prop('checked', total === checked);
|
||||
});
|
||||
|
||||
table.on('draw', function () {
|
||||
$('#chkAll').prop('checked', false);
|
||||
});
|
||||
|
||||
|
||||
// 배정변경 click
|
||||
$("#btn_part_change").on("click", function () {
|
||||
|
||||
const damdangT = $("#damdangT").val();
|
||||
if (damdangT == "") {
|
||||
Swal.fire({
|
||||
title: "담당자 유형을 선택해 주세요.",
|
||||
icon: "warning"
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const damdang = $("#damdang2").val();
|
||||
if (damdang == "") {
|
||||
Swal.fire({
|
||||
title: "담당자를 선택해 주세요.",
|
||||
icon: "warning"
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var arr = new Array();
|
||||
$('#resultList tbody .row-chk:checked').each(function () {
|
||||
const rowData = table.row($(this).closest('tr')).data();
|
||||
arr.push(rowData);
|
||||
});
|
||||
|
||||
if (arr.length === 0) {
|
||||
Swal.fire({
|
||||
title: "선택된 데이터가 없습니다.",
|
||||
icon: "warning"
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
swal.fire({
|
||||
text: "선택한 매물의 담당자를 배정 변경 하시겠습니까?",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "예",
|
||||
cancelButtonText: "아니오",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
const param = {
|
||||
'type': damdangT,
|
||||
'damdang': damdang,
|
||||
'rows': JSON.stringify(arr),
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: '/m702/m702a/updateAssign',
|
||||
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
method: 'POST',
|
||||
data: param,
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
error: function (xhr, error, thrown) {
|
||||
blockUI.unblockPage()
|
||||
var msg = "";
|
||||
if (xhr.responseText != null) {
|
||||
msg = xhr.responseText
|
||||
} else {
|
||||
msg = "잠시후 다시 시도해 주세요."
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
title: msg,
|
||||
icon: "error"
|
||||
})
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
if (result.code == '0') {
|
||||
$("#btnSearch").trigger('click')
|
||||
Swal.fire({
|
||||
title: '정상 처리되었습니다.',
|
||||
icon: "success"
|
||||
|
||||
})
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: result.msg,
|
||||
icon: "error"
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 서류누락 click
|
||||
$("#btn_part_omit").on("click", function () {
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
// 접수기간 초기화
|
||||
function initReceiptDate() {
|
||||
|
||||
const before3 = new Date();
|
||||
before3.setDate(date.getDate() - 2);
|
||||
|
||||
const fmt = d => d.toISOString().slice(0, 10);
|
||||
|
||||
$('#receipt_sdate').val(fmt(before3));
|
||||
$('#receipt_edate').val(fmt(date));
|
||||
|
||||
}
|
||||
|
||||
function atcl_no_enter(event) {
|
||||
if (event.keyCode == 13) {
|
||||
table.ajax.reload()
|
||||
}
|
||||
}
|
||||
|
||||
function fn_chk_render(data, type, row, meta) {
|
||||
const rowIndex = meta.row;
|
||||
var str = "";
|
||||
|
||||
str = `<input class="form-check-input row-chk" type="checkbox" id="row_${rowIndex}" value="Y">`;
|
||||
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_region_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
str = row.region_nm + " " + row.rm_no;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 주소 render
|
||||
function fn_addr_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.address2b == null) {
|
||||
str = row.address2 + " " + row.address3;
|
||||
} else {
|
||||
str = row.address2b + " " + row.address3;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_tm_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.update_res_tm == null) {
|
||||
str = row.stat_39_tm;
|
||||
} else {
|
||||
str = row.update_res_tm;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 엑셀 다운로드
|
||||
function downloadExcel(data) {
|
||||
const ws = XLSX.utils.json_to_sheet(data);
|
||||
ws['!cols'] = [
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
];
|
||||
|
||||
const wb = XLSX.utils.book_new();
|
||||
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
|
||||
|
||||
const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
|
||||
|
||||
const blob = new Blob([wbout], { type: 'application/octet-stream' });
|
||||
|
||||
const link = document.createElement("a");
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = "배정매물_현황" + getDateTimeString() + ".xlsx";
|
||||
link.click();
|
||||
URL.revokeObjectURL(link.href);
|
||||
}
|
||||
|
||||
|
||||
function getDateTimeString() {
|
||||
const d = new Date();
|
||||
const yyyy = d.getFullYear();
|
||||
const mm = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const dd = String(d.getDate()).padStart(2, '0');
|
||||
const hh = String(d.getHours()).padStart(2, '0');
|
||||
const mi = String(d.getMinutes()).padStart(2, '0');
|
||||
const ss = String(d.getSeconds()).padStart(2, '0');
|
||||
return `${yyyy}${mm}${dd}${hh}${mi}${ss}`;
|
||||
}
|
||||
|
||||
function extractCode(code) {
|
||||
|
||||
var codeArr = new Array();
|
||||
|
||||
if (codes.length) {
|
||||
|
||||
for (var i = 0; i < codes.length; i++) {
|
||||
|
||||
if (code === codes[i].category) {
|
||||
codeArr.push(codes[i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return codeArr;
|
||||
}
|
||||
|
||||
|
||||
// 이미지 프리뷰
|
||||
function fn_preview(src) {
|
||||
const $img = $('#imgPreview');
|
||||
|
||||
// 이미지 표시
|
||||
$img.attr('src', src).show();
|
||||
|
||||
$('#previewTitle').text('이미지 미리보기');
|
||||
|
||||
|
||||
const modal = new bootstrap.Modal(document.getElementById('previewModal'));
|
||||
modal.show();
|
||||
}
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
1774
app/Views/pages/v2/m703/detail.php
Normal file
1774
app/Views/pages/v2/m703/detail.php
Normal file
File diff suppressed because it is too large
Load Diff
775
app/Views/pages/v2/m703/lists.php
Normal file
775
app/Views/pages/v2/m703/lists.php
Normal file
@@ -0,0 +1,775 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#resultList tbody tr {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-header-tab {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
.table-scroll {
|
||||
max-height: 300px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.swal2-cancel {
|
||||
background-color: #ff0000 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>확인매물 현황</h1>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form id="frm_srch_info" method="get" onsubmit="return false;">
|
||||
<input type="hidden" name="m" id="m" value="M801" />
|
||||
<input type="hidden" name="todo" id="todo" value="inq" />
|
||||
<input type="hidden" name="usr_id" value="" />
|
||||
|
||||
<!-- 안내 -->
|
||||
<div class="alert alert-warning py-2 mb-3">
|
||||
<small class="mb-0">
|
||||
매물번호또는 발신팩스번호를 입력하면 <b>다른 조건은 무시</b>됩니다.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- 검색 폼 -->
|
||||
<div class="row g-3">
|
||||
|
||||
<!-- 매물번호 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물번호</label>
|
||||
<input type="text" name="atcl_no" class="form-control form-control-sm" placeholder="매물번호" maxlength="10"
|
||||
onkeypress="atcl_no_enter(event)">
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물번호입력</label>
|
||||
<select name="chk_atcl_no" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<option value="Y">입력</option>
|
||||
<option value="N">미입력</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">발신팩스번호</label>
|
||||
<input type="text" name="caller_no" class="form-control form-control-sm" placeholder="매물번호" maxlength="10"
|
||||
onkeypress="atcl_no_enter(event)">
|
||||
</div>
|
||||
|
||||
<!-- 현재상태 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">현재상태</label>
|
||||
<select name="stat_cd" class="form-select form-select-sm">
|
||||
<option value="">-선택-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "STEP_VERIFICATION"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 중개소 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">중개소</label>
|
||||
<input type="text" name="realtor_nm" class="form-control form-control-sm" placeholder="중개소">
|
||||
</div>
|
||||
|
||||
<!-- 배정여부 (2개 셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">배정여부</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="charger_gbn" id="code_charger_gbn" class="form-select form-select-sm">
|
||||
<option value="1">전화/서류담당자</option>
|
||||
<option value="2">등기부등본담당자</option>
|
||||
</select>
|
||||
<select name="assign_yn" id="assign_yn" class="form-select form-select-sm">
|
||||
<option value="A">-전체-</option>
|
||||
<option value="Y">배정</option>
|
||||
<option value="N">미배정</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 접수기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">수신기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="date" class="form-control" name="receipt_sdate" id="receipt_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="date" class="form-control" name="receipt_edate" id="receipt_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 완료기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">완료기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control" name="complete_sdate" id="complete_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="text" class="form-control" name="complete_edate" id="complete_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 지역구분 -->
|
||||
<div class="col-md-4">
|
||||
<label class="form-label mb-1">지역구분</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="srcSido" id="srcSido" class="form-select form-select-sm">
|
||||
<option value="">-시/도-</option>
|
||||
<?php foreach ($sido as $s): ?>
|
||||
<option value="<?= $s['region_cd'] ?>"><?= $s['region_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="srcGugun" id="srcGugun" class="form-select form-select-sm">
|
||||
<option value="">-시/군/구-</option>
|
||||
</select>
|
||||
<select name="srcDong" id="srcDong" class="form-select form-select-sm">
|
||||
<option value="">-읍/면/동-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 담당자 (본부/팀/담당 3셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">담당자</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="bonbu" id="bonbu" class="form-select form-select-sm">
|
||||
<option value="">-본부-</option>
|
||||
<?php foreach ($bonbu as $d): ?>
|
||||
<option value="<?= $d['dept_sq'] ?>"><?= $d['dept_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="team" id="team" class="form-select form-select-sm">
|
||||
<option value="">-팀-</option>
|
||||
</select>
|
||||
<select name="damdang" id="damdang" class="form-select form-select-sm">
|
||||
<option value="">-담당자-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">홍보확인서여부</label>
|
||||
<select class="form-select" name="target_yn" id="target_yn">
|
||||
<option value="" selected="selected">-전체-</option>
|
||||
<option value="Y">Y</option>
|
||||
<option value="N">N</option>
|
||||
<option value="3">분양권</option>
|
||||
<option value="B">부분수신</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 매체사 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매체사</label>
|
||||
<select name="rcpt_cpid" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "CP_ID"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 참고용 파일 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">동의서</label>
|
||||
<div class="d-flex flex-wrap gap-2 align-items-center rounded p-2">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="chk_rec" id="chk_rec" value="Y">
|
||||
<label class="form-check-label" for="chk_rec">동의서존재</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 법인소유 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">팩스업체</label>
|
||||
<select name="fax_corp" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "FAX_CORP"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1 d-grid">
|
||||
<label class="form-label mb-1 invisible">검색</label>
|
||||
<button type="button" class="btn btn-primary" id="btnSearch">
|
||||
<i class="pe-7s-search me-1"></i>검색
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header d-flex align-items-center">
|
||||
<div class="d-flex align-items-center flex-wrap" style="gap: 8px; flex: 1">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ml-auto">
|
||||
|
||||
|
||||
<button class="btn btn-sm btn-outline-success" id="excel-download">
|
||||
<i class="fa fa-fw" aria-hidden="true" title="file-excel-o"></i>
|
||||
엑셀다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table id="resultList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>팩스업체</th>
|
||||
<th>매물번호</th>
|
||||
<th>현재상태</th>
|
||||
<th>홍보확인서<br />여부</th>
|
||||
<th>수신기간</th>
|
||||
<th>발신번호</th>
|
||||
<th>주소</th>
|
||||
<th>상세주소</th>
|
||||
<th>매체사</th>
|
||||
<th>중개소</th>
|
||||
<th>서류/전화<br />담당자</th>
|
||||
<th>서류/전화<br />확인시간</th>
|
||||
<th>등기부등본<br />담당자</th>
|
||||
<th>검증완료<br />일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 여기는 비워둠: AJAX로 채움 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css" />
|
||||
<link href="https://unpkg.com/dropzone@6.0.0-beta.1/dist/dropzone.css" rel="stylesheet" type="text/css" />
|
||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="/architectui/assets/js/datatable.kor.js"></script>
|
||||
<script type="text/javascript" src="https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=dtounkwjc5"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
const date = new Date();
|
||||
const bonbuArr = <?= json_encode($bonbu, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const teamArr = <?= json_encode($team, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const userArr = <?= json_encode($user, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const codes = <?= json_encode($codes, JSON_UNESCAPED_UNICODE); ?>;
|
||||
|
||||
var table;
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#bonbu").on("change", function (e) {
|
||||
|
||||
const value = e.target.value
|
||||
|
||||
$("#dept_sq").empty()
|
||||
|
||||
var str = "<option value=''>선택</option>"
|
||||
if (teamArr != null) {
|
||||
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
if (value === teamArr[i].pdept_sq) {
|
||||
str += "<option value='" + teamArr[i].dept_sq + "'>" + teamArr[i].dept_nm + "</option>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#dept_sq").append(str)
|
||||
|
||||
});
|
||||
|
||||
$("#srcSido, #srcGugun, #srcSido2, #srcGugun2").on("change", function (e) {
|
||||
|
||||
const targetId = this.id;
|
||||
|
||||
const isSecond = this.id.endsWith("2");
|
||||
|
||||
const params = {
|
||||
srcSido: isSecond
|
||||
? $("#srcSido2").val()
|
||||
: $("#frm_srch_info [name=srcSido]").val(),
|
||||
|
||||
srcGugun: isSecond
|
||||
? $("#srcGugun2").val()
|
||||
: $("#frm_srch_info [name=srcGugun]").val(),
|
||||
};
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/manage/areas/getAreaList",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
data: params,
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
switch (targetId) {
|
||||
case "srcSido":
|
||||
$("#srcGugun").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>시/군/구</option>";
|
||||
|
||||
if ($("#srcSido").val() !== "") {
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcGugun").append(str);
|
||||
|
||||
break;
|
||||
|
||||
case "srcGugun":
|
||||
$("#srcDong").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>읍/면/동</option>";
|
||||
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcDong").append(str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#bonbu, #team, #bonbu2, #team2").on("change", function (e) {
|
||||
const targetId = this.id;
|
||||
|
||||
|
||||
var str = "";
|
||||
if (targetId === "bonbu" || targetId === "bonbu2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-팀-</option>`;
|
||||
if (teamArr.length > 0) {
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(teamArr[i].pdept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${teamArr[i].dept_sq}">${teamArr[i].dept_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "bonbu") {
|
||||
$("#team").html(str);
|
||||
} else if (targetId === "bonbu2") {
|
||||
$("#team2").html(str);
|
||||
}
|
||||
|
||||
} else if (targetId === "team" || targetId === "team2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-담당자-</option>`;
|
||||
if (userArr.length > 0) {
|
||||
for (var i = 0; i < userArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(userArr[i].dept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${userArr[i].usr_id}">${userArr[i].usr_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "team") {
|
||||
$("#damdang").html(str);
|
||||
} else if (targetId === "team2") {
|
||||
$("#damdang2").html(str);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
initReceiptDate();
|
||||
table = $('#resultList').DataTable({
|
||||
language: lang_kor,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
ajax: {
|
||||
url: '/m703/m703a/getResultList',
|
||||
type: 'GET',
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
data: function (d) {
|
||||
|
||||
|
||||
d.atcl_no = $("#frm_srch_info [name=atcl_no]").val(); // 매물번호
|
||||
d.chk_atcl_no = $("#frm_srch_info [name=chk_atcl_no]").val(); // 매물번호입력
|
||||
d.caller_no = $("#frm_srch_info [name=caller_no]").val(); // 발신팩스번호
|
||||
d.stat_cd = $("#frm_srch_info [name=stat_cd]").val(); // 현재상태
|
||||
d.realtor_nm = $("#frm_srch_info [name=realtor_nm]").val(); // 중개소
|
||||
d.charger_gbn = $("#frm_srch_info [name=charger_gbn]").val(); // 배정여부
|
||||
d.assign_yn = $("#frm_srch_info [name=assign_yn]").val(); // 배정여부2
|
||||
d.receipt_sdate = $("#frm_srch_info [name=receipt_sdate]").val(); // 접수기간1
|
||||
d.receipt_edate = $("#frm_srch_info [name=receipt_edate]").val(); // 접수기간2
|
||||
d.complete_sdate = $("#frm_srch_info [name=complete_sdate]").val(); // 완료기간1
|
||||
d.complete_edate = $("#frm_srch_info [name=complete_edate]").val(); // 완료기간2
|
||||
d.srcSido = $("#frm_srch_info [name=srcSido]").val(); // 시도
|
||||
d.srcGugun = $("#frm_srch_info [name=srcGugun]").val(); // 시군구
|
||||
d.srcDong = $("#frm_srch_info [name=srcDong]").val(); // 읍면동
|
||||
d.bonbu = $("#frm_srch_info [name=bonbu]").val(); // 본부
|
||||
d.team = $("#frm_srch_info [name=team]").val(); // 팀
|
||||
d.damdang = $("#frm_srch_info [name=damdang]").val(); // 담당
|
||||
d.vrfcreq_way = $("#frm_srch_info [name=vrfcreq_way]").val(); // 검증방식1
|
||||
d.vrfc_type_sub = $("#frm_srch_info [name=vrfc_type_sub]").val(); // 검증방식2
|
||||
d.target_yn = $("#frm_srch_info [name=target_yn]").val(); // 홍보확인서여부
|
||||
d.rcpt_cpid = $("#frm_srch_info [name=rcpt_cpid]").val(); // 매체사
|
||||
d.chk_rec = $("#frm_srch_info [name=chk_rec]").is(":checked") === true ? "Y" : "N"; // 동의서유무
|
||||
d.fax_corp = $("#frm_srch_info [name=fax_corp]").val(); // 팩스업체
|
||||
|
||||
d.start = d.start || 0
|
||||
d.length = d.length || 10
|
||||
},
|
||||
},
|
||||
"columnDefs": [
|
||||
{ className: 'text-center', targets: '_all' },
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
],
|
||||
columns: [
|
||||
{ data: 'receiver', render: fn_fax_render },
|
||||
{ data: 'atcl_no' },
|
||||
{ data: 'stat_cd', render: fn_stat_render },
|
||||
{ data: 'work_type', render: fn_pr_render },
|
||||
{ data: 'RECV_TIME' },
|
||||
{ data: 'CALLER_NO' },
|
||||
{ data: 'region_nm' },
|
||||
{ data: null, render: fn_addr_render },
|
||||
{ data: 'cpid' },
|
||||
{ data: 'realtor_nm' },
|
||||
{ data: 'usr_nm' },
|
||||
{ data: 'stat_39_tm' },
|
||||
{ data: 'reg_charger_nm' },
|
||||
{ data: 'send_tm' },
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
});
|
||||
|
||||
$('#resultList tbody').on('click', 'tr', function (e) {
|
||||
if ($(e.target).closest('td.dt-no-rowclick').length) return;
|
||||
|
||||
const rowData = table.row(this).data();
|
||||
if (!rowData) return;
|
||||
|
||||
const fax_sq = rowData.fax_sq;
|
||||
location.href = "<?= site_url('m703/m703a/detail') ?>/" + fax_sq;
|
||||
});
|
||||
|
||||
$('#btnSearch').on('click', function () {
|
||||
table.ajax.reload()
|
||||
});
|
||||
|
||||
// 엑셀 다운로드 click
|
||||
$("#excel-download").on("click", function () {
|
||||
$.ajax({
|
||||
url: "/m703/m703a/excel",
|
||||
method: "GET",
|
||||
dataType: "json",
|
||||
data: $("#frm_srch_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
downloadExcel(result.data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
// 접수기간 초기화
|
||||
function initReceiptDate() {
|
||||
|
||||
const before3 = new Date();
|
||||
before3.setDate(date.getDate() - 2);
|
||||
|
||||
const fmt = d => d.toISOString().slice(0, 10);
|
||||
|
||||
$('#receipt_sdate').val(fmt(before3));
|
||||
$('#receipt_edate').val(fmt(date));
|
||||
|
||||
}
|
||||
|
||||
|
||||
function atcl_no_enter(event) {
|
||||
if (event.keyCode == 13) {
|
||||
table.ajax.reload()
|
||||
}
|
||||
}
|
||||
|
||||
// 팩스업체
|
||||
function fn_fax_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
|
||||
// if (codes.length > 0) {
|
||||
// for (var i = 0; i < codes.length; i++) {
|
||||
// if (codes[i].category === "FAX_CORP") {
|
||||
// if (codes[i].cd === row.receiver) {
|
||||
// str = codes[i].cd_nm + " " + row.receiver;
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
str = getCodeString("FAX_CORP", row.receiver);
|
||||
str = str + " " + row.receiver;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 현재상태
|
||||
function fn_stat_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.stat_cd2 == null) {
|
||||
if (row.rcpt_stat == null) {
|
||||
str = getCodeString("STEP_VERIFICATION", row.stat_cd);
|
||||
} else {
|
||||
str = getCodeString("RECEIPT_STATUS3", row.rcpt_stat);
|
||||
}
|
||||
} else {
|
||||
str = getCodeString("STEP_VERIFICATION", row.stat_cd2);
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
// 홍보확인서여부
|
||||
function fn_pr_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
switch (row.work_type) {
|
||||
case '1':
|
||||
case '2':
|
||||
str = 'Y';
|
||||
break;
|
||||
|
||||
case '3':
|
||||
str = '분양권';
|
||||
break;
|
||||
|
||||
case 'E':
|
||||
str = 'N';
|
||||
break;
|
||||
|
||||
case 'B':
|
||||
str = '부분수신';
|
||||
break;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 주소
|
||||
function fn_addr_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.address2b == null) {
|
||||
str = row.address2 + " " + row.address3;
|
||||
} else {
|
||||
str = row.address2b + " " + row.address3;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_tm_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.update_res_tm == null) {
|
||||
str = row.stat_39_tm;
|
||||
} else {
|
||||
str = row.update_res_tm;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 엑셀 다운로드
|
||||
function downloadExcel(data) {
|
||||
const ws = XLSX.utils.json_to_sheet(data);
|
||||
ws['!cols'] = [
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
];
|
||||
|
||||
const wb = XLSX.utils.book_new();
|
||||
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
|
||||
|
||||
const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
|
||||
|
||||
const blob = new Blob([wbout], { type: 'application/octet-stream' });
|
||||
|
||||
const link = document.createElement("a");
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = "홍보확인서_현황" + getDateTimeString() + ".xlsx";
|
||||
link.click();
|
||||
URL.revokeObjectURL(link.href);
|
||||
}
|
||||
|
||||
|
||||
function getDateTimeString() {
|
||||
const d = new Date();
|
||||
const yyyy = d.getFullYear();
|
||||
const mm = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const dd = String(d.getDate()).padStart(2, '0');
|
||||
const hh = String(d.getHours()).padStart(2, '0');
|
||||
const mi = String(d.getMinutes()).padStart(2, '0');
|
||||
const ss = String(d.getSeconds()).padStart(2, '0');
|
||||
return `${yyyy}${mm}${dd}${hh}${mi}${ss}`;
|
||||
}
|
||||
|
||||
function extractCode(code) {
|
||||
|
||||
var codeArr = new Array();
|
||||
|
||||
if (codes.length) {
|
||||
|
||||
for (var i = 0; i < codes.length; i++) {
|
||||
|
||||
if (code === codes[i].category) {
|
||||
codeArr.push(codes[i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return codeArr;
|
||||
}
|
||||
|
||||
|
||||
// 이미지 프리뷰
|
||||
function fn_preview(src) {
|
||||
const $img = $('#imgPreview');
|
||||
|
||||
// 이미지 표시
|
||||
$img.attr('src', src).show();
|
||||
|
||||
$('#previewTitle').text('이미지 미리보기');
|
||||
|
||||
|
||||
const modal = new bootstrap.Modal(document.getElementById('previewModal'));
|
||||
modal.show();
|
||||
}
|
||||
|
||||
|
||||
function getCodeString(code, data) {
|
||||
var str = "";
|
||||
if (codes.length > 0) {
|
||||
for (var i = 0; i < codes.length; i++) {
|
||||
if (codes[i].category === code) {
|
||||
if (codes[i].cd === data) {
|
||||
str = codes[i].cd_nm;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
1089
app/Views/pages/v2/m704/detail.php
Normal file
1089
app/Views/pages/v2/m704/detail.php
Normal file
File diff suppressed because it is too large
Load Diff
716
app/Views/pages/v2/m704/lists.php
Normal file
716
app/Views/pages/v2/m704/lists.php
Normal file
@@ -0,0 +1,716 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#resultList tbody tr {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-header-tab {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
.table-scroll {
|
||||
max-height: 300px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.swal2-cancel {
|
||||
background-color: #ff0000 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>전화확인매물 현황</h1>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form id="frm_srch_info" method="get" onsubmit="return false;">
|
||||
<input type="hidden" name="m" id="m" value="M801" />
|
||||
<input type="hidden" name="todo" id="todo" value="inq" />
|
||||
<input type="hidden" name="usr_id" value="" />
|
||||
|
||||
<!-- 안내 -->
|
||||
<div class="alert alert-warning py-2 mb-3">
|
||||
<small class="mb-0">
|
||||
매물번호를 입력하면 <b>다른 조건은 무시</b>됩니다.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- 검색 폼 -->
|
||||
<div class="row g-3">
|
||||
|
||||
<!-- 매물번호 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물번호</label>
|
||||
<input type="text" name="atcl_no" class="form-control form-control-sm" placeholder="매물번호" maxlength="10"
|
||||
onkeypress="atcl_no_enter(event)">
|
||||
</div>
|
||||
|
||||
<!-- 현재상태 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">현재상태</label>
|
||||
<select name="stat_cd" class="form-select form-select-sm">
|
||||
<option value="">-선택-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "STEP_VERIFICATION"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 중개소 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">중개소</label>
|
||||
<input type="text" name="realtor_nm" class="form-control form-control-sm" placeholder="중개소">
|
||||
</div>
|
||||
|
||||
<!-- 배정여부 (2개 셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">배정여부</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="charger_gbn" id="code_charger_gbn" class="form-select form-select-sm">
|
||||
<option value="1" selected>전화/서류담당자</option>
|
||||
<option value="2">등기부등본담당자</option>
|
||||
</select>
|
||||
<select name="assign_yn" id="assign_yn" class="form-select form-select-sm">
|
||||
<option value="A">-전체-</option>
|
||||
<option value="Y">배정</option>
|
||||
<option value="N">미배정</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 접수기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">접수기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="date" class="form-control" name="receipt_sdate" id="receipt_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="date" class="form-control" name="receipt_edate" id="receipt_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 완료기간 -->
|
||||
<div class="col-md-4">
|
||||
<label class="form-label mb-1">진행상태별시간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<select name="stat_complete_date" class="form-select form-select-sm">
|
||||
<option value="">-선택-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "STEP_VERIFICATION"): ?>
|
||||
<option value="<?= $c['cd'] ?>">
|
||||
<?= $c['cd_nm'] ?>
|
||||
</option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<input type="date" class="form-control" name="complete_sdate" id="complete_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="date" class="form-control" name="complete_edate" id="complete_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 지역구분 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">지역구분</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="srcSido" id="srcSido" class="form-select form-select-sm">
|
||||
<option value="">-시/도-</option>
|
||||
<?php foreach ($sido as $s): ?>
|
||||
<option value="<?= $s['region_cd'] ?>"><?= $s['region_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="srcGugun" id="srcGugun" class="form-select form-select-sm">
|
||||
<option value="">-시/군/구-</option>
|
||||
</select>
|
||||
<select name="srcDong" id="srcDong" class="form-select form-select-sm">
|
||||
<option value="">-읍/면/동-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 담당자 (본부/팀/담당 3셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">담당자</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="bonbu" id="bonbu" class="form-select form-select-sm">
|
||||
<option value="">-본부-</option>
|
||||
<?php foreach ($bonbu as $d): ?>
|
||||
<option value="<?= $d['dept_sq'] ?>"><?= $d['dept_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="team" id="team" class="form-select form-select-sm">
|
||||
<option value="">-팀-</option>
|
||||
</select>
|
||||
<select name="damdang" id="damdang" class="form-select form-select-sm">
|
||||
<option value="">-담당자-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- 매체사 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매체사</label>
|
||||
<select name="rcpt_cpid" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "CP_ID"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 매물종류 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물종류</label>
|
||||
<select name="rlet_type_cd" class="form-select form-select-sm">
|
||||
<option value="">-매물종류-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "ARTICLE_TYPE"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 d-grid">
|
||||
<label class="form-label mb-1 invisible">검색</label>
|
||||
<button type="button" class="btn btn-primary" id="btnSearch">
|
||||
<i class="pe-7s-search me-1"></i>검색
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header d-flex align-items-center">
|
||||
<div class="d-flex align-items-center flex-wrap" style="gap: 8px; flex: 1">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ml-auto">
|
||||
|
||||
|
||||
<button class="btn btn-sm btn-outline-success" id="excel-download">
|
||||
<i class="fa fa-fw" aria-hidden="true" title="file-excel-o"></i>
|
||||
엑셀다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table id="resultList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>매물번호</th>
|
||||
<th>진행상태</th>
|
||||
<th>통화실패<br />횟수</th>
|
||||
<th>접수시간</th>
|
||||
<th>검증방식</th>
|
||||
<th>주소</th>
|
||||
<th>상세주소</th>
|
||||
<th>매체사</th>
|
||||
<th>중개소</th>
|
||||
<th>서류/전화<br />담당자</th>
|
||||
<th>서류/전화<br />확인시간</th>
|
||||
<th>등기부등본<br />담당자</th>
|
||||
<th>검증완료<br />일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 여기는 비워둠: AJAX로 채움 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css" />
|
||||
<link href="https://unpkg.com/dropzone@6.0.0-beta.1/dist/dropzone.css" rel="stylesheet" type="text/css" />
|
||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="/architectui/assets/js/datatable.kor.js"></script>
|
||||
<script type="text/javascript" src="https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=dtounkwjc5"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
const date = new Date();
|
||||
const bonbuArr = <?= json_encode($bonbu, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const teamArr = <?= json_encode($team, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const userArr = <?= json_encode($user, JSON_UNESCAPED_UNICODE); ?>;
|
||||
|
||||
var table;
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#bonbu").on("change", function (e) {
|
||||
|
||||
const value = e.target.value
|
||||
|
||||
$("#dept_sq").empty()
|
||||
|
||||
var str = "<option value=''>선택</option>"
|
||||
if (teamArr != null) {
|
||||
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
if (value === teamArr[i].pdept_sq) {
|
||||
str += "<option value='" + teamArr[i].dept_sq + "'>" + teamArr[i].dept_nm + "</option>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#dept_sq").append(str)
|
||||
|
||||
});
|
||||
|
||||
$("#srcSido, #srcGugun, #srcSido2, #srcGugun2").on("change", function (e) {
|
||||
|
||||
const targetId = this.id;
|
||||
|
||||
const isSecond = this.id.endsWith("2");
|
||||
|
||||
const params = {
|
||||
srcSido: isSecond
|
||||
? $("#srcSido2").val()
|
||||
: $("#frm_srch_info [name=srcSido]").val(),
|
||||
|
||||
srcGugun: isSecond
|
||||
? $("#srcGugun2").val()
|
||||
: $("#frm_srch_info [name=srcGugun]").val(),
|
||||
};
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/manage/areas/getAreaList",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
data: params,
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
switch (targetId) {
|
||||
case "srcSido":
|
||||
$("#srcGugun").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>시/군/구</option>";
|
||||
|
||||
if ($("#srcSido").val() !== "") {
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcGugun").append(str);
|
||||
|
||||
break;
|
||||
|
||||
case "srcGugun":
|
||||
$("#srcDong").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>읍/면/동</option>";
|
||||
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcDong").append(str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#bonbu, #team, #bonbu2, #team2").on("change", function (e) {
|
||||
const targetId = this.id;
|
||||
|
||||
|
||||
var str = "";
|
||||
if (targetId === "bonbu" || targetId === "bonbu2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-팀-</option>`;
|
||||
if (teamArr.length > 0) {
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(teamArr[i].pdept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${teamArr[i].dept_sq}">${teamArr[i].dept_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "bonbu") {
|
||||
$("#team").html(str);
|
||||
} else if (targetId === "bonbu2") {
|
||||
$("#team2").html(str);
|
||||
}
|
||||
|
||||
} else if (targetId === "team" || targetId === "team2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-담당자-</option>`;
|
||||
if (userArr.length > 0) {
|
||||
for (var i = 0; i < userArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(userArr[i].dept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${userArr[i].usr_id}">${userArr[i].usr_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "team") {
|
||||
$("#damdang").html(str);
|
||||
} else if (targetId === "team2") {
|
||||
$("#damdang2").html(str);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 검증방식 onchange
|
||||
$("#vrfcreq_way").on("change", function (e) {
|
||||
const val = e.target.value;
|
||||
|
||||
var str = "";
|
||||
str += `<option value="">-선택-</option>`;
|
||||
if (e.val !== "") {
|
||||
$.getJSON("/common/common/getVrfcCode?type=" + val, function (result) {
|
||||
var total = result.length;
|
||||
for (var i = 0; i < total; i++) {
|
||||
var cateNm = result[i].cd_nm;
|
||||
|
||||
if (total == 1) {
|
||||
str += "<option value=\"" + result[i].cd + "\" selected>" + cateNm + "</option>";
|
||||
} else {
|
||||
str += "<option value=\"" + result[i].cd + "\">" + cateNm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#vrfc_type_sub").html(str);
|
||||
});
|
||||
} else {
|
||||
$("#vrfc_type_sub").html(str);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
initReceiptDate();
|
||||
table = $('#resultList').DataTable({
|
||||
language: lang_kor,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
ajax: {
|
||||
url: '/m704/m704a/getResultList',
|
||||
type: 'GET',
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
data: function (d) {
|
||||
|
||||
d.atcl_no = $("#frm_srch_info [name=atcl_no]").val(); // 매물번호
|
||||
d.stat_cd = $("#frm_srch_info [name=stat_cd]").val(); // 현재상태
|
||||
d.realtor_nm = $("#frm_srch_info [name=realtor_nm]").val(); // 중개소
|
||||
d.charger_gbn = $("#frm_srch_info [name=charger_gbn]").val(); // 배정여부
|
||||
d.assign_yn = $("#frm_srch_info [name=assign_yn]").val(); // 배정여부2
|
||||
d.receipt_sdate = $("#frm_srch_info [name=receipt_sdate]").val(); // 접수기간1
|
||||
d.receipt_edate = $("#frm_srch_info [name=receipt_edate]").val(); // 접수기간2
|
||||
d.stat_complete_date = $("#frm_srch_info [name=stat_complete_date]").val() // 진행상태별시간유형
|
||||
d.complete_sdate = $("#frm_srch_info [name=complete_sdate]").val(); // 진행상태별시간1
|
||||
d.complete_edate = $("#frm_srch_info [name=complete_edate]").val(); // 진행상태별시간2
|
||||
d.srcSido = $("#frm_srch_info [name=srcSido]").val(); // 시도
|
||||
d.srcGugun = $("#frm_srch_info [name=srcGugun]").val(); // 시군구
|
||||
d.srcDong = $("#frm_srch_info [name=srcDong]").val(); // 읍면동
|
||||
d.bonbu = $("#frm_srch_info [name=bonbu]").val(); // 본부
|
||||
d.team = $("#frm_srch_info [name=team]").val(); // 팀
|
||||
d.damdang = $("#frm_srch_info [name=damdang]").val(); // 담당
|
||||
d.vrfcreq_way = 'T'; // 검증방식1
|
||||
|
||||
d.rcpt_cpid = $("#frm_srch_info [name=rcpt_cpid]").val(); // 매체사
|
||||
d.rlet_type_cd = $("#frm_srch_info [name=rlet_type_cd]").val(); // 매물종류
|
||||
d.reference_file_url_yn = $("#frm_srch_info [name=reference_file_url_yn]").val(); // 참고용
|
||||
d.corp_own = $("#frm_srch_info [name=corp_own]").val(); // 법인
|
||||
|
||||
d.start = d.start || 0
|
||||
d.length = d.length || 10
|
||||
},
|
||||
},
|
||||
"columnDefs": [
|
||||
{ className: 'text-center', targets: '_all' },
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
],
|
||||
columns: [
|
||||
{ data: 'atcl_no' },
|
||||
{ data: 'pre_stat' },
|
||||
{ data: 'contact_fail_cnt' },
|
||||
{ data: 'insert_tm' },
|
||||
{ data: 'vrfc_type' },
|
||||
{ data: null, render: fn_region_render },
|
||||
{ data: null, render: fn_addr_render },
|
||||
{ data: 'cpid' },
|
||||
{ data: 'realtor_nm' },
|
||||
{ data: null, width: "80px", fn_render_nm },
|
||||
{ data: null, render: fn_tm_render },
|
||||
{ data: 'reg_charger' },
|
||||
{ data: 'result_tm' },
|
||||
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
});
|
||||
|
||||
$('#resultList tbody').on('click', 'tr', function (e) {
|
||||
if ($(e.target).closest('td.dt-no-rowclick').length) return;
|
||||
|
||||
const rowData = table.row(this).data();
|
||||
if (!rowData) return;
|
||||
|
||||
const vr_sq = rowData.vr_sq;
|
||||
location.href = "<?= site_url('m704/m704a/detail') ?>/" + vr_sq;
|
||||
});
|
||||
|
||||
$('#btnSearch').on('click', function () {
|
||||
table.ajax.reload()
|
||||
});
|
||||
|
||||
// 엑셀 다운로드 click
|
||||
$("#excel-download").on("click", function () {
|
||||
$.ajax({
|
||||
url: "/m704/m704a/excel",
|
||||
method: "GET",
|
||||
dataType: "json",
|
||||
data: $("#frm_srch_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
downloadExcel(result.data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
// 접수기간 초기화
|
||||
function initReceiptDate() {
|
||||
|
||||
const before3 = new Date();
|
||||
before3.setDate(date.getDate() - 2);
|
||||
|
||||
const fmt = d => d.toISOString().slice(0, 10);
|
||||
|
||||
$('#receipt_sdate').val(fmt(before3));
|
||||
$('#receipt_edate').val(fmt(date));
|
||||
|
||||
}
|
||||
|
||||
|
||||
function atcl_no_enter(event) {
|
||||
if (event.keyCode == 13) {
|
||||
table.ajax.reload()
|
||||
}
|
||||
}
|
||||
|
||||
function fn_region_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
str = row.region_nm + " " + row.rm_no;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_region_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
str = row.region_nm + " " + row.rm_no;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 주소 render
|
||||
function fn_addr_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.address2b == null) {
|
||||
str = row.address2 + " " + row.address3;
|
||||
} else {
|
||||
str = row.address2b + " " + row.address3;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_render_nm(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.usr_nm != "관리자") {
|
||||
str = row.usr_nm;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_tm_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.update_res_tm == null) {
|
||||
str = row.stat_39_tm;
|
||||
} else {
|
||||
str = row.update_res_tm;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 엑셀 다운로드
|
||||
function downloadExcel(data) {
|
||||
const ws = XLSX.utils.json_to_sheet(data);
|
||||
ws['!cols'] = [
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
];
|
||||
|
||||
const wb = XLSX.utils.book_new();
|
||||
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
|
||||
|
||||
const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
|
||||
|
||||
const blob = new Blob([wbout], { type: 'application/octet-stream' });
|
||||
|
||||
const link = document.createElement("a");
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = "전화확인매물_현황" + getDateTimeString() + ".xlsx";
|
||||
link.click();
|
||||
URL.revokeObjectURL(link.href);
|
||||
}
|
||||
|
||||
|
||||
function getDateTimeString() {
|
||||
const d = new Date();
|
||||
const yyyy = d.getFullYear();
|
||||
const mm = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const dd = String(d.getDate()).padStart(2, '0');
|
||||
const hh = String(d.getHours()).padStart(2, '0');
|
||||
const mi = String(d.getMinutes()).padStart(2, '0');
|
||||
const ss = String(d.getSeconds()).padStart(2, '0');
|
||||
return `${yyyy}${mm}${dd}${hh}${mi}${ss}`;
|
||||
}
|
||||
|
||||
function extractCode(code) {
|
||||
|
||||
var codeArr = new Array();
|
||||
|
||||
if (codes.length) {
|
||||
|
||||
for (var i = 0; i < codes.length; i++) {
|
||||
|
||||
if (code === codes[i].category) {
|
||||
codeArr.push(codes[i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return codeArr;
|
||||
}
|
||||
|
||||
|
||||
// 이미지 프리뷰
|
||||
function fn_preview(src) {
|
||||
const $img = $('#imgPreview');
|
||||
|
||||
// 이미지 표시
|
||||
$img.attr('src', src).show();
|
||||
|
||||
$('#previewTitle').text('이미지 미리보기');
|
||||
|
||||
|
||||
const modal = new bootstrap.Modal(document.getElementById('previewModal'));
|
||||
modal.show();
|
||||
}
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
1717
app/Views/pages/v2/m705/detail.php
Normal file
1717
app/Views/pages/v2/m705/detail.php
Normal file
File diff suppressed because it is too large
Load Diff
786
app/Views/pages/v2/m705/lists.php
Normal file
786
app/Views/pages/v2/m705/lists.php
Normal file
@@ -0,0 +1,786 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#resultList tbody tr {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-header-tab {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
.table-scroll {
|
||||
max-height: 300px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.swal2-cancel {
|
||||
background-color: #ff0000 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>등기부등본 확인매물현황</h1>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form id="frm_srch_info" method="get" onsubmit="return false;">
|
||||
<input type="hidden" name="m" id="m" value="M801" />
|
||||
<input type="hidden" name="todo" id="todo" value="inq" />
|
||||
<input type="hidden" name="usr_id" value="" />
|
||||
|
||||
<!-- 안내 -->
|
||||
<div class="alert alert-warning py-2 mb-3">
|
||||
<small class="mb-0">
|
||||
매물번호를 입력하면 <b>다른 조건은 무시</b>됩니다.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- 검색 폼 -->
|
||||
<div class="row g-3">
|
||||
|
||||
<!-- 매물번호 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물번호</label>
|
||||
<input type="text" name="atcl_no" class="form-control form-control-sm" placeholder="매물번호" maxlength="10"
|
||||
onkeypress="atcl_no_enter(event)">
|
||||
</div>
|
||||
|
||||
<!-- 현재상태 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">현재상태</label>
|
||||
<select name="stat_cd" class="form-select form-select-sm">
|
||||
<option value="">-선택-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "STEP_VERIFICATION"): ?>
|
||||
<option value="<?= $c['cd'] ?>" <?php if ($c['cd'] == "40") {
|
||||
echo "selected";
|
||||
} ?>><?= $c['cd_nm'] ?>
|
||||
</option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 중개소 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">중개소</label>
|
||||
<input type="text" name="realtor_nm" class="form-control form-control-sm" placeholder="중개소">
|
||||
</div>
|
||||
|
||||
<!-- 배정여부 (2개 셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">배정여부</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="charger_gbn" id="code_charger_gbn" class="form-select form-select-sm">
|
||||
<option value="1">전화/서류담당자</option>
|
||||
<option value="2" selected>등기부등본담당자</option>
|
||||
</select>
|
||||
<select name="assign_yn" id="assign_yn" class="form-select form-select-sm">
|
||||
<option value="A">-전체-</option>
|
||||
<option value="Y">배정</option>
|
||||
<option value="N">미배정</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 접수기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">접수기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="date" class="form-control" name="receipt_sdate" id="receipt_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="date" class="form-control" name="receipt_edate" id="receipt_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 완료기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">완료기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control" name="complete_sdate" id="complete_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="text" class="form-control" name="complete_edate" id="complete_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 지역구분 -->
|
||||
<div class="col-md-4">
|
||||
<label class="form-label mb-1">지역구분</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="srcSido" id="srcSido" class="form-select form-select-sm">
|
||||
<option value="">-시/도-</option>
|
||||
<?php foreach ($sido as $s): ?>
|
||||
<option value="<?= $s['region_cd'] ?>"><?= $s['region_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="srcGugun" id="srcGugun" class="form-select form-select-sm">
|
||||
<option value="">-시/군/구-</option>
|
||||
</select>
|
||||
<select name="srcDong" id="srcDong" class="form-select form-select-sm">
|
||||
<option value="">-읍/면/동-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 담당자 (본부/팀/담당 3셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">담당자</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="bonbu" id="bonbu" class="form-select form-select-sm">
|
||||
<option value="">-본부-</option>
|
||||
<?php foreach ($bonbu as $d): ?>
|
||||
<option value="<?= $d['dept_sq'] ?>"><?= $d['dept_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="team" id="team" class="form-select form-select-sm">
|
||||
<option value="">-팀-</option>
|
||||
</select>
|
||||
<select name="damdang" id="damdang" class="form-select form-select-sm">
|
||||
<option value="">-담당자-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 검증방식 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">검증방식</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="vrfcreq_way" id="vrfcreq_way" class="form-select form-select-sm">
|
||||
<option value="">-검증방식-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "VRFCREQ_WAY"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="vrfc_type_sub" id="vrfc_type_sub" class="form-select form-select-sm">
|
||||
<option value="">-선택-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 매체사 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매체사</label>
|
||||
<select name="rcpt_cpid" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "CP_ID"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 매물종류 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물종류</label>
|
||||
<select name="rlet_type_cd" class="form-select form-select-sm">
|
||||
<option value="">-매물종류-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "ARTICLE_TYPE"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">면적확인</label>
|
||||
<select name="chk_spc_yn" class="form-select form-select-sm">
|
||||
<option value="">-면적여부-</option>
|
||||
<option value="Y">Y</option>
|
||||
<option value="N">N</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 참고용 파일 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">참고용 파일</label>
|
||||
<select name="reference_file_url_yn" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<option value="Y">Y</option>
|
||||
<option value="N">N</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 법인소유 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">법인소유</label>
|
||||
<select name="corp_own" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<option value="Y">Y</option>
|
||||
<option value="N">N</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1 d-grid">
|
||||
<label class="form-label mb-1 invisible">검색</label>
|
||||
<button type="button" class="btn btn-primary" id="btnSearch">
|
||||
<i class="pe-7s-search me-1"></i>검색
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header d-flex align-items-center">
|
||||
<div class="d-flex align-items-center flex-wrap" style="gap: 8px; flex: 1">
|
||||
<button class="btn btn-sm btn-outline-secondary" onclick="ajax_getNotAssign();">
|
||||
배정확인
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="ml-auto">
|
||||
<button class="btn btn-sm btn-outline-success" id="excel-download">
|
||||
<i class="fa fa-fw" aria-hidden="true" title="file-excel-o"></i>
|
||||
엑셀다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table id="resultList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>매물번호</th>
|
||||
<th>진행상태</th>
|
||||
<th>접수시간</th>
|
||||
<th>검증방식</th>
|
||||
<th>주소</th>
|
||||
<th>상세주소</th>
|
||||
<th>매체사</th>
|
||||
<th>중개소</th>
|
||||
<th>서류/전화<br />담당자</th>
|
||||
<th>서류/전화<br />확인완료시간</th>
|
||||
<th>등기부등본<br />담당자</th>
|
||||
<th>등기부등본<br />확인시간</th>
|
||||
<th>검증완료<br />일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 여기는 비워둠: AJAX로 채움 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css" />
|
||||
<link href="https://unpkg.com/dropzone@6.0.0-beta.1/dist/dropzone.css" rel="stylesheet" type="text/css" />
|
||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="/architectui/assets/js/datatable.kor.js"></script>
|
||||
<script type="text/javascript" src="https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=dtounkwjc5"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
const date = new Date();
|
||||
const bonbuArr = <?= json_encode($bonbu, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const teamArr = <?= json_encode($team, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const userArr = <?= json_encode($user, JSON_UNESCAPED_UNICODE); ?>;
|
||||
|
||||
var table;
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#bonbu").on("change", function (e) {
|
||||
|
||||
const value = e.target.value
|
||||
|
||||
$("#dept_sq").empty()
|
||||
|
||||
var str = "<option value=''>선택</option>"
|
||||
if (teamArr != null) {
|
||||
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
if (value === teamArr[i].pdept_sq) {
|
||||
str += "<option value='" + teamArr[i].dept_sq + "'>" + teamArr[i].dept_nm + "</option>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#dept_sq").append(str)
|
||||
|
||||
});
|
||||
|
||||
$("#srcSido, #srcGugun, #srcSido2, #srcGugun2").on("change", function (e) {
|
||||
|
||||
const targetId = this.id;
|
||||
|
||||
const isSecond = this.id.endsWith("2");
|
||||
|
||||
const params = {
|
||||
srcSido: isSecond
|
||||
? $("#srcSido2").val()
|
||||
: $("#frm_srch_info [name=srcSido]").val(),
|
||||
|
||||
srcGugun: isSecond
|
||||
? $("#srcGugun2").val()
|
||||
: $("#frm_srch_info [name=srcGugun]").val(),
|
||||
};
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/manage/areas/getAreaList",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
data: params,
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
switch (targetId) {
|
||||
case "srcSido":
|
||||
$("#srcGugun").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>시/군/구</option>";
|
||||
|
||||
if ($("#srcSido").val() !== "") {
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcGugun").append(str);
|
||||
|
||||
break;
|
||||
|
||||
case "srcGugun":
|
||||
$("#srcDong").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>읍/면/동</option>";
|
||||
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcDong").append(str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#bonbu, #team, #bonbu2, #team2").on("change", function (e) {
|
||||
const targetId = this.id;
|
||||
|
||||
|
||||
var str = "";
|
||||
if (targetId === "bonbu" || targetId === "bonbu2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-팀-</option>`;
|
||||
if (teamArr.length > 0) {
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(teamArr[i].pdept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${teamArr[i].dept_sq}">${teamArr[i].dept_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "bonbu") {
|
||||
$("#team").html(str);
|
||||
} else if (targetId === "bonbu2") {
|
||||
$("#team2").html(str);
|
||||
}
|
||||
|
||||
} else if (targetId === "team" || targetId === "team2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-담당자-</option>`;
|
||||
if (userArr.length > 0) {
|
||||
for (var i = 0; i < userArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(userArr[i].dept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${userArr[i].usr_id}">${userArr[i].usr_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "team") {
|
||||
$("#damdang").html(str);
|
||||
} else if (targetId === "team2") {
|
||||
$("#damdang2").html(str);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 검증방식 onchange
|
||||
$("#vrfcreq_way").on("change", function (e) {
|
||||
const val = e.target.value;
|
||||
|
||||
var str = "";
|
||||
str += `<option value="">-선택-</option>`;
|
||||
if (e.val !== "") {
|
||||
$.getJSON("/common/common/getVrfcCode?type=" + val, function (result) {
|
||||
var total = result.length;
|
||||
for (var i = 0; i < total; i++) {
|
||||
var cateNm = result[i].cd_nm;
|
||||
|
||||
if (total == 1) {
|
||||
str += "<option value=\"" + result[i].cd + "\" selected>" + cateNm + "</option>";
|
||||
} else {
|
||||
str += "<option value=\"" + result[i].cd + "\">" + cateNm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#vrfc_type_sub").html(str);
|
||||
});
|
||||
} else {
|
||||
$("#vrfc_type_sub").html(str);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
initReceiptDate();
|
||||
table = $('#resultList').DataTable({
|
||||
language: lang_kor,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
ajax: {
|
||||
url: '/m705/m705a/getResultList',
|
||||
type: 'GET',
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
data: function (d) {
|
||||
|
||||
d.atcl_no = $("#frm_srch_info [name=atcl_no]").val(); // 매물번호
|
||||
d.stat_cd = $("#frm_srch_info [name=stat_cd]").val(); // 현재상태
|
||||
d.realtor_nm = $("#frm_srch_info [name=realtor_nm]").val(); // 중개소
|
||||
d.charger_gbn = $("#frm_srch_info [name=charger_gbn]").val(); // 배정여부
|
||||
d.assign_yn = $("#frm_srch_info [name=assign_yn]").val(); // 배정여부2
|
||||
d.receipt_sdate = $("#frm_srch_info [name=receipt_sdate]").val(); // 접수기간1
|
||||
d.receipt_edate = $("#frm_srch_info [name=receipt_edate]").val(); // 접수기간2
|
||||
d.complete_sdate = $("#frm_srch_info [name=complete_sdate]").val(); // 완료기간1
|
||||
d.complete_edate = $("#frm_srch_info [name=complete_edate]").val(); // 완료기간2
|
||||
d.srcSido = $("#frm_srch_info [name=srcSido]").val(); // 시도
|
||||
d.srcGugun = $("#frm_srch_info [name=srcGugun]").val(); // 시군구
|
||||
d.srcDong = $("#frm_srch_info [name=srcDong]").val(); // 읍면동
|
||||
d.bonbu = $("#frm_srch_info [name=bonbu]").val(); // 본부
|
||||
d.team = $("#frm_srch_info [name=team]").val(); // 팀
|
||||
d.damdang = $("#frm_srch_info [name=damdang]").val(); // 담당
|
||||
d.vrfcreq_way = $("#frm_srch_info [name=vrfcreq_way]").val(); // 검증방식1
|
||||
d.vrfc_type_sub = $("#frm_srch_info [name=vrfc_type_sub]").val(); // 검증방식2
|
||||
d.rcpt_cpid = $("#frm_srch_info [name=rcpt_cpid]").val(); // 매체사
|
||||
d.rlet_type_cd = $("#frm_srch_info [name=rlet_type_cd]").val(); // 매물종류
|
||||
d.chk_spc_yn = $("#frm_srch_info [name=chk_spc_yn]").val(); // 면적여부
|
||||
d.reference_file_url_yn = $("#frm_srch_info [name=reference_file_url_yn]").val(); // 참고용
|
||||
d.corp_own = $("#frm_srch_info [name=corp_own]").val(); // 법인
|
||||
|
||||
d.start = d.start || 0
|
||||
d.length = d.length || 10
|
||||
},
|
||||
},
|
||||
"columnDefs": [
|
||||
{ className: 'text-center', targets: '_all' },
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
],
|
||||
columns: [
|
||||
{ data: 'atcl_no' },
|
||||
{ data: 'pre_stat' },
|
||||
{ data: 'insert_tm' },
|
||||
{ data: 'vrfc_type' },
|
||||
{ data: null, render: fn_region_render },
|
||||
{ data: null, render: fn_addr_render },
|
||||
{ data: 'cpid' },
|
||||
{ data: 'realtor_nm' },
|
||||
{ data: 'usr_nm', width: "80px" },
|
||||
{ data: null, render: fn_tm_render },
|
||||
{ data: 'reg_charger' },
|
||||
{ data: 'rgbk_check_tm' },
|
||||
{ data: 'result_tm' },
|
||||
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
});
|
||||
|
||||
$('#resultList tbody').on('click', 'tr', function (e) {
|
||||
if ($(e.target).closest('td.dt-no-rowclick').length) return;
|
||||
|
||||
const rowData = table.row(this).data();
|
||||
if (!rowData) return;
|
||||
|
||||
const vr_sq = rowData.vr_sq;
|
||||
location.href = "<?= site_url('m705/m705a/detail') ?>/" + vr_sq;
|
||||
});
|
||||
|
||||
$('#btnSearch').on('click', function () {
|
||||
table.ajax.reload()
|
||||
});
|
||||
|
||||
// 엑셀 다운로드 click
|
||||
$("#excel-download").on("click", function () {
|
||||
$.ajax({
|
||||
url: "/m705/m705a/excel",
|
||||
method: "GET",
|
||||
dataType: "json",
|
||||
data: $("#frm_srch_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
downloadExcel(result.data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
// 접수기간 초기화
|
||||
function initReceiptDate() {
|
||||
|
||||
const before3 = new Date();
|
||||
before3.setDate(date.getDate() - 2);
|
||||
|
||||
const fmt = d => d.toISOString().slice(0, 10);
|
||||
|
||||
$('#receipt_sdate').val(fmt(before3));
|
||||
$('#receipt_edate').val(fmt(date));
|
||||
|
||||
// 담당자
|
||||
$("#bonbu").val("3");
|
||||
$("#bonbu").trigger("change");
|
||||
}
|
||||
|
||||
|
||||
function atcl_no_enter(event) {
|
||||
if (event.keyCode == 13) {
|
||||
table.ajax.reload()
|
||||
}
|
||||
}
|
||||
|
||||
function fn_region_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
str = row.region_nm + " " + row.rm_no;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 주소 render
|
||||
function fn_addr_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.address2b == null) {
|
||||
str = row.address2 + " " + row.address3;
|
||||
} else {
|
||||
str = row.address2b + " " + row.address3;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_tm_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.update_res_tm == null) {
|
||||
str = row.stat_39_tm;
|
||||
} else {
|
||||
str = row.update_res_tm;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 엑셀 다운로드
|
||||
function downloadExcel(data) {
|
||||
const ws = XLSX.utils.json_to_sheet(data);
|
||||
ws['!cols'] = [
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
];
|
||||
|
||||
const wb = XLSX.utils.book_new();
|
||||
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
|
||||
|
||||
const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
|
||||
|
||||
const blob = new Blob([wbout], { type: 'application/octet-stream' });
|
||||
|
||||
const link = document.createElement("a");
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = "등기부등본_확인매물_현황" + getDateTimeString() + ".xlsx";
|
||||
link.click();
|
||||
URL.revokeObjectURL(link.href);
|
||||
}
|
||||
|
||||
|
||||
function getDateTimeString() {
|
||||
const d = new Date();
|
||||
const yyyy = d.getFullYear();
|
||||
const mm = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const dd = String(d.getDate()).padStart(2, '0');
|
||||
const hh = String(d.getHours()).padStart(2, '0');
|
||||
const mi = String(d.getMinutes()).padStart(2, '0');
|
||||
const ss = String(d.getSeconds()).padStart(2, '0');
|
||||
return `${yyyy}${mm}${dd}${hh}${mi}${ss}`;
|
||||
}
|
||||
|
||||
function extractCode(code) {
|
||||
|
||||
var codeArr = new Array();
|
||||
|
||||
if (codes.length) {
|
||||
|
||||
for (var i = 0; i < codes.length; i++) {
|
||||
|
||||
if (code === codes[i].category) {
|
||||
codeArr.push(codes[i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return codeArr;
|
||||
}
|
||||
|
||||
|
||||
// 배정확인
|
||||
function ajax_getNotAssign() {
|
||||
swal.fire({
|
||||
text: "미배정건 1건을 가져오시겠습니까?",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "예",
|
||||
cancelButtonText: "아니오",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: '/m705/m705a/getNotAssign',
|
||||
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
method: 'POST',
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
error: function (xhr, error, thrown) {
|
||||
blockUI.unblockPage()
|
||||
var msg = "";
|
||||
if (xhr.responseText != null) {
|
||||
msg = xhr.responseText
|
||||
} else {
|
||||
msg = "잠시후 다시 시도해 주세요."
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
title: msg,
|
||||
icon: "error"
|
||||
})
|
||||
},
|
||||
success: function (result) {
|
||||
if (result.code == '0') {
|
||||
|
||||
if (result.res != null) {
|
||||
location.href = "<?= site_url('m705/m705a/detail') ?>/" + result.res;
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: "미배정건이 존재하지 않습니다.",
|
||||
icon: "error"
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: result.msg,
|
||||
icon: "error"
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
1212
app/Views/pages/v2/m706/detail.php
Normal file
1212
app/Views/pages/v2/m706/detail.php
Normal file
File diff suppressed because it is too large
Load Diff
649
app/Views/pages/v2/m706/lists.php
Normal file
649
app/Views/pages/v2/m706/lists.php
Normal file
@@ -0,0 +1,649 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#resultList tbody tr {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-header-tab {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
.table-scroll {
|
||||
max-height: 300px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.swal2-cancel {
|
||||
background-color: #ff0000 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>1차 재검증 매물현황</h1>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form id="frm_srch_info" method="get" onsubmit="return false;">
|
||||
<input type="hidden" name="m" id="m" value="M801" />
|
||||
<input type="hidden" name="todo" id="todo" value="inq" />
|
||||
<input type="hidden" name="usr_id" value="" />
|
||||
|
||||
<!-- 안내 -->
|
||||
<div class="alert alert-warning py-2 mb-3">
|
||||
<small class="mb-0">
|
||||
매물번호를 입력하면 <b>다른 조건은 무시</b>됩니다.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- 검색 폼 -->
|
||||
<div class="row g-3">
|
||||
|
||||
<!-- 매물번호 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물번호</label>
|
||||
<input type="text" name="atcl_no" class="form-control form-control-sm" placeholder="매물번호" maxlength="10"
|
||||
onkeypress="atcl_no_enter(event)">
|
||||
</div>
|
||||
|
||||
<!-- 현재상태 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">현재상태</label>
|
||||
<select name="stat_cd" class="form-select form-select-sm">
|
||||
<option value="">-선택-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "STEP_VERIFICATION"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 중개소 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">중개소</label>
|
||||
<input type="text" name="realtor_nm" class="form-control form-control-sm" placeholder="중개소">
|
||||
</div>
|
||||
|
||||
<!-- 배정여부 (2개 셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">배정여부</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="charger_gbn" id="code_charger_gbn" class="form-select form-select-sm">
|
||||
<option value="1">전화/서류담당자</option>
|
||||
<option value="2">등기부등본담당자</option>
|
||||
</select>
|
||||
<select name="assign_yn" id="assign_yn" class="form-select form-select-sm">
|
||||
<option value="A">-전체-</option>
|
||||
<option value="Y">배정</option>
|
||||
<option value="N">미배정</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 접수기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">접수기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="date" class="form-control" name="receipt_sdate" id="receipt_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="date" class="form-control" name="receipt_edate" id="receipt_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 완료기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">완료기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control" name="complete_sdate" id="complete_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="text" class="form-control" name="complete_edate" id="complete_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 지역구분 -->
|
||||
<div class="col-md-4">
|
||||
<label class="form-label mb-1">지역구분</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="srcSido" id="srcSido" class="form-select form-select-sm">
|
||||
<option value="">-시/도-</option>
|
||||
<?php foreach ($sido as $s): ?>
|
||||
<option value="<?= $s['region_cd'] ?>"><?= $s['region_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="srcGugun" id="srcGugun" class="form-select form-select-sm">
|
||||
<option value="">-시/군/구-</option>
|
||||
</select>
|
||||
<select name="srcDong" id="srcDong" class="form-select form-select-sm">
|
||||
<option value="">-읍/면/동-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 담당자 (본부/팀/담당 3셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">담당자</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="bonbu" id="bonbu" class="form-select form-select-sm">
|
||||
<option value="">-본부-</option>
|
||||
<?php foreach ($bonbu as $d): ?>
|
||||
<option value="<?= $d['dept_sq'] ?>"><?= $d['dept_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="team" id="team" class="form-select form-select-sm">
|
||||
<option value="">-팀-</option>
|
||||
</select>
|
||||
<select name="damdang" id="damdang" class="form-select form-select-sm">
|
||||
<option value="">-담당자-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 검증방식 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">검증방식</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="vrfcreq_way" id="vrfcreq_way" class="form-select form-select-sm">
|
||||
<option value="">-검증방식-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "VRFCREQ_WAY"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 매체사 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매체사</label>
|
||||
<select name="rcpt_cpid" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "CP_ID"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 d-grid">
|
||||
<label class="form-label mb-1 invisible">검색</label>
|
||||
<button type="button" class="btn btn-primary" id="btnSearch">
|
||||
<i class="pe-7s-search me-1"></i>검색
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header d-flex align-items-center">
|
||||
<div class="d-flex align-items-center flex-wrap" style="gap: 8px; flex: 1">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ml-auto">
|
||||
<button class="btn btn-sm btn-outline-success" id="excel-download">
|
||||
<i class="fa fa-fw" aria-hidden="true" title="file-excel-o"></i>
|
||||
엑셀다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table id="resultList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>매물번호</th>
|
||||
<th>진행상태</th>
|
||||
<th>접수시간</th>
|
||||
<th>검증방식</th>
|
||||
<th>주소</th>
|
||||
<th>상세주소</th>
|
||||
<th>매체사</th>
|
||||
<th>중개소</th>
|
||||
<th>서류/전화<br />담당자</th>
|
||||
<th>서류/전화<br />확인완료시간</th>
|
||||
<th>등기부등본<br />담당자</th>
|
||||
<th>검증완료<br />일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 여기는 비워둠: AJAX로 채움 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css" />
|
||||
<link href="https://unpkg.com/dropzone@6.0.0-beta.1/dist/dropzone.css" rel="stylesheet" type="text/css" />
|
||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="/architectui/assets/js/datatable.kor.js"></script>
|
||||
<script type="text/javascript" src="https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=dtounkwjc5"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
const date = new Date();
|
||||
const bonbuArr = <?= json_encode($bonbu, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const teamArr = <?= json_encode($team, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const userArr = <?= json_encode($user, JSON_UNESCAPED_UNICODE); ?>;
|
||||
|
||||
var table;
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#bonbu").on("change", function (e) {
|
||||
|
||||
const value = e.target.value
|
||||
|
||||
$("#dept_sq").empty()
|
||||
|
||||
var str = "<option value=''>선택</option>"
|
||||
if (teamArr != null) {
|
||||
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
if (value === teamArr[i].pdept_sq) {
|
||||
str += "<option value='" + teamArr[i].dept_sq + "'>" + teamArr[i].dept_nm + "</option>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#dept_sq").append(str)
|
||||
|
||||
});
|
||||
|
||||
$("#srcSido, #srcGugun, #srcSido2, #srcGugun2").on("change", function (e) {
|
||||
|
||||
const targetId = this.id;
|
||||
|
||||
const isSecond = this.id.endsWith("2");
|
||||
|
||||
const params = {
|
||||
srcSido: isSecond
|
||||
? $("#srcSido2").val()
|
||||
: $("#frm_srch_info [name=srcSido]").val(),
|
||||
|
||||
srcGugun: isSecond
|
||||
? $("#srcGugun2").val()
|
||||
: $("#frm_srch_info [name=srcGugun]").val(),
|
||||
};
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/manage/areas/getAreaList",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
data: params,
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
switch (targetId) {
|
||||
case "srcSido":
|
||||
$("#srcGugun").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>시/군/구</option>";
|
||||
|
||||
if ($("#srcSido").val() !== "") {
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcGugun").append(str);
|
||||
|
||||
break;
|
||||
|
||||
case "srcGugun":
|
||||
$("#srcDong").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>읍/면/동</option>";
|
||||
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcDong").append(str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#bonbu, #team, #bonbu2, #team2").on("change", function (e) {
|
||||
const targetId = this.id;
|
||||
|
||||
|
||||
var str = "";
|
||||
if (targetId === "bonbu" || targetId === "bonbu2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-팀-</option>`;
|
||||
if (teamArr.length > 0) {
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(teamArr[i].pdept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${teamArr[i].dept_sq}">${teamArr[i].dept_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "bonbu") {
|
||||
$("#team").html(str);
|
||||
} else if (targetId === "bonbu2") {
|
||||
$("#team2").html(str);
|
||||
}
|
||||
|
||||
} else if (targetId === "team" || targetId === "team2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-담당자-</option>`;
|
||||
if (userArr.length > 0) {
|
||||
for (var i = 0; i < userArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(userArr[i].dept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${userArr[i].usr_id}">${userArr[i].usr_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "team") {
|
||||
$("#damdang").html(str);
|
||||
} else if (targetId === "team2") {
|
||||
$("#damdang2").html(str);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
initReceiptDate();
|
||||
table = $('#resultList').DataTable({
|
||||
language: lang_kor,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
ajax: {
|
||||
url: '/m706/m706a/getResultList',
|
||||
type: 'GET',
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
data: function (d) {
|
||||
|
||||
d.atcl_no = $("#frm_srch_info [name=atcl_no]").val(); // 매물번호
|
||||
d.stat_cd = $("#frm_srch_info [name=stat_cd]").val(); // 현재상태
|
||||
d.realtor_nm = $("#frm_srch_info [name=realtor_nm]").val(); // 중개소
|
||||
d.charger_gbn = $("#frm_srch_info [name=charger_gbn]").val(); // 배정여부
|
||||
d.assign_yn = $("#frm_srch_info [name=assign_yn]").val(); // 배정여부2
|
||||
d.receipt_sdate = $("#frm_srch_info [name=receipt_sdate]").val(); // 접수기간1
|
||||
d.receipt_edate = $("#frm_srch_info [name=receipt_edate]").val(); // 접수기간2
|
||||
d.complete_sdate = $("#frm_srch_info [name=complete_sdate]").val(); // 완료기간1
|
||||
d.complete_edate = $("#frm_srch_info [name=complete_edate]").val(); // 완료기간2
|
||||
d.srcSido = $("#frm_srch_info [name=srcSido]").val(); // 시도
|
||||
d.srcGugun = $("#frm_srch_info [name=srcGugun]").val(); // 시군구
|
||||
d.srcDong = $("#frm_srch_info [name=srcDong]").val(); // 읍면동
|
||||
// d.bonbu = $("#frm_srch_info [name=bonbu]").val(); // 본부
|
||||
d.team = $("#frm_srch_info [name=team]").val(); // 팀
|
||||
d.damdang = $("#frm_srch_info [name=damdang]").val(); // 담당
|
||||
d.vrfcreq_way = $("#frm_srch_info [name=vrfcreq_way]").val(); // 검증방식1
|
||||
d.rcpt_cpid = $("#frm_srch_info [name=rcpt_cpid]").val(); // 매체사
|
||||
|
||||
d.start = d.start || 0
|
||||
d.length = d.length || 10
|
||||
},
|
||||
},
|
||||
"columnDefs": [
|
||||
{ className: 'text-center', targets: '_all' },
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
],
|
||||
columns: [
|
||||
{ data: 'atcl_no' },
|
||||
{ data: 'pre_stat' },
|
||||
{ data: 'insert_tm' },
|
||||
{ data: 'vrfc_type' },
|
||||
{ data: null, render: fn_region_render },
|
||||
{ data: null, render: fn_addr_render },
|
||||
{ data: 'cpid' },
|
||||
{ data: 'realtor_nm' },
|
||||
{ data: 'usr_nm', width: "80px" },
|
||||
{ data: null, render: fn_tm_render },
|
||||
{ data: 'reg_charger' },
|
||||
{ data: 'result_tm' },
|
||||
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
});
|
||||
|
||||
$('#resultList tbody').on('click', 'tr', function (e) {
|
||||
if ($(e.target).closest('td.dt-no-rowclick').length) return;
|
||||
|
||||
const rowData = table.row(this).data();
|
||||
if (!rowData) return;
|
||||
|
||||
const vr_sq = rowData.vr_sq;
|
||||
location.href = "<?= site_url('m706/m706a/detail') ?>/" + vr_sq;
|
||||
});
|
||||
|
||||
$('#btnSearch').on('click', function () {
|
||||
table.ajax.reload()
|
||||
});
|
||||
|
||||
// 엑셀 다운로드 click
|
||||
$("#excel-download").on("click", function () {
|
||||
$.ajax({
|
||||
url: "/m706/m706a/excel",
|
||||
method: "GET",
|
||||
dataType: "json",
|
||||
data: $("#frm_srch_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
downloadExcel(result.data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
// 접수기간 초기화
|
||||
function initReceiptDate() {
|
||||
|
||||
const before3 = new Date();
|
||||
before3.setDate(date.getDate() - 2);
|
||||
|
||||
const fmt = d => d.toISOString().slice(0, 10);
|
||||
|
||||
$('#receipt_sdate').val(fmt(before3));
|
||||
$('#receipt_edate').val(fmt(date));
|
||||
|
||||
$("#bonbu").val("3");
|
||||
$("#bonbu").trigger("change");
|
||||
$("#bonbu").prop("disabled", true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function atcl_no_enter(event) {
|
||||
if (event.keyCode == 13) {
|
||||
table.ajax.reload()
|
||||
}
|
||||
}
|
||||
|
||||
function fn_region_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
str = row.region_nm + " " + row.rm_no;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 주소 render
|
||||
function fn_addr_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.address2b == null) {
|
||||
str = row.address2 + " " + row.address3;
|
||||
} else {
|
||||
str = row.address2b + " " + row.address3;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_tm_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.update_res_tm == null) {
|
||||
str = row.stat_39_tm;
|
||||
} else {
|
||||
str = row.update_res_tm;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 엑셀 다운로드
|
||||
function downloadExcel(data) {
|
||||
const ws = XLSX.utils.json_to_sheet(data);
|
||||
ws['!cols'] = [
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
];
|
||||
|
||||
const wb = XLSX.utils.book_new();
|
||||
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
|
||||
|
||||
const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
|
||||
|
||||
const blob = new Blob([wbout], { type: 'application/octet-stream' });
|
||||
|
||||
const link = document.createElement("a");
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = "1차_재검증_매물현황" + getDateTimeString() + ".xlsx";
|
||||
link.click();
|
||||
URL.revokeObjectURL(link.href);
|
||||
}
|
||||
|
||||
|
||||
function getDateTimeString() {
|
||||
const d = new Date();
|
||||
const yyyy = d.getFullYear();
|
||||
const mm = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const dd = String(d.getDate()).padStart(2, '0');
|
||||
const hh = String(d.getHours()).padStart(2, '0');
|
||||
const mi = String(d.getMinutes()).padStart(2, '0');
|
||||
const ss = String(d.getSeconds()).padStart(2, '0');
|
||||
return `${yyyy}${mm}${dd}${hh}${mi}${ss}`;
|
||||
}
|
||||
|
||||
function extractCode(code) {
|
||||
|
||||
var codeArr = new Array();
|
||||
|
||||
if (codes.length) {
|
||||
|
||||
for (var i = 0; i < codes.length; i++) {
|
||||
|
||||
if (code === codes[i].category) {
|
||||
codeArr.push(codes[i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return codeArr;
|
||||
}
|
||||
|
||||
|
||||
// 이미지 프리뷰
|
||||
function fn_preview(src) {
|
||||
const $img = $('#imgPreview');
|
||||
|
||||
// 이미지 표시
|
||||
$img.attr('src', src).show();
|
||||
|
||||
$('#previewTitle').text('이미지 미리보기');
|
||||
|
||||
|
||||
const modal = new bootstrap.Modal(document.getElementById('previewModal'));
|
||||
modal.show();
|
||||
}
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
1407
app/Views/pages/v2/m708/detail.php
Normal file
1407
app/Views/pages/v2/m708/detail.php
Normal file
File diff suppressed because it is too large
Load Diff
774
app/Views/pages/v2/m708/lists.php
Normal file
774
app/Views/pages/v2/m708/lists.php
Normal file
@@ -0,0 +1,774 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#resultList tbody tr {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-header-tab {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
.table-scroll {
|
||||
max-height: 300px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.swal2-cancel {
|
||||
background-color: #ff0000 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>홍보확인서 현황</h1>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form id="frm_srch_info" method="get" onsubmit="return false;">
|
||||
<input type="hidden" name="m" id="m" value="M801" />
|
||||
<input type="hidden" name="todo" id="todo" value="inq" />
|
||||
<input type="hidden" name="usr_id" value="" />
|
||||
|
||||
<!-- 안내 -->
|
||||
<div class="alert alert-warning py-2 mb-3">
|
||||
<small class="mb-0">
|
||||
매물번호 또는 발신팩스번호를 입력하면 <b>다른 조건은 무시</b>됩니다.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- 검색 폼 -->
|
||||
<div class="row g-3">
|
||||
|
||||
<!-- 매물번호 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물번호</label>
|
||||
<input type="text" name="atcl_no" class="form-control form-control-sm" placeholder="매물번호" maxlength="10"
|
||||
onkeypress="atcl_no_enter(event)">
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물번호입력</label>
|
||||
<select name="chk_atcl_no" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<option value="Y">입력</option>
|
||||
<option value="N">미입력</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">발신팩스번호</label>
|
||||
<input type="text" name="caller_no" class="form-control form-control-sm" placeholder="발신팩스번호" maxlength="10"
|
||||
onkeypress="atcl_no_enter(event)">
|
||||
</div>
|
||||
|
||||
<!-- 현재상태 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">현재상태</label>
|
||||
<select name="stat_cd" class="form-select form-select-sm">
|
||||
<option value="">-선택-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "STEP_VERIFICATION"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 중개소 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">중개소</label>
|
||||
<input type="text" name="realtor_nm" class="form-control form-control-sm" placeholder="중개소">
|
||||
</div>
|
||||
|
||||
<!-- 배정여부 (2개 셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">배정여부</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="charger_gbn" id="code_charger_gbn" class="form-select form-select-sm">
|
||||
<option value="1">전화/서류담당자</option>
|
||||
<option value="2">등기부등본담당자</option>
|
||||
</select>
|
||||
<select name="assign_yn" id="assign_yn" class="form-select form-select-sm">
|
||||
<option value="A">-전체-</option>
|
||||
<option value="Y">배정</option>
|
||||
<option value="N">미배정</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 접수기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">접수기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="date" class="form-control" name="receipt_sdate" id="receipt_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="date" class="form-control" name="receipt_edate" id="receipt_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 완료기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">처리기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control" name="complete_sdate" id="complete_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="text" class="form-control" name="complete_edate" id="complete_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 지역구분 -->
|
||||
<div class="col-md-4">
|
||||
<label class="form-label mb-1">지역구분</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="srcSido" id="srcSido" class="form-select form-select-sm">
|
||||
<option value="">-시/도-</option>
|
||||
<?php foreach ($sido as $s): ?>
|
||||
<option value="<?= $s['region_cd'] ?>"><?= $s['region_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="srcGugun" id="srcGugun" class="form-select form-select-sm">
|
||||
<option value="">-시/군/구-</option>
|
||||
</select>
|
||||
<select name="srcDong" id="srcDong" class="form-select form-select-sm">
|
||||
<option value="">-읍/면/동-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 담당자 (본부/팀/담당 3셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">담당자</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="bonbu" id="bonbu" class="form-select form-select-sm">
|
||||
<option value="">-본부-</option>
|
||||
<?php foreach ($bonbu as $d): ?>
|
||||
<option value="<?= $d['dept_sq'] ?>"><?= $d['dept_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="team" id="team" class="form-select form-select-sm">
|
||||
<option value="">-팀-</option>
|
||||
</select>
|
||||
<select name="damdang" id="damdang" class="form-select form-select-sm">
|
||||
<option value="">-담당자-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 검증방식 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">홍보확인서여부</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="target_yn" id="target_yn" class="form-select form-select-sm">
|
||||
<option value="">-검증방식-</option>
|
||||
<option value="A">미처리</option>
|
||||
<option value="1">홍보확인서</option>
|
||||
<option value="3">분양권</option>
|
||||
<option value="E">홍보확인서 아님</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 매체사 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매체사</label>
|
||||
<select name="rcpt_cpid" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "CP_ID"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 매물종류 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물종류</label>
|
||||
<select name="rlet_type_cd" class="form-select form-select-sm">
|
||||
<option value="">-매물종류-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "ARTICLE_TYPE"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 검증방식 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">검증방식</label>
|
||||
<select name="rcpt_v2" class="form-select form-select-sm">
|
||||
<option value="">-검증방식-</option>
|
||||
<option value="N">현장확인</option>
|
||||
<option value="Y">현장확인v2</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-1 d-grid">
|
||||
<label class="form-label mb-1 invisible">검색</label>
|
||||
<button type="button" class="btn btn-primary" id="btnSearch">
|
||||
<i class="pe-7s-search me-1"></i>검색
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header d-flex align-items-center">
|
||||
<div class="d-flex align-items-center flex-wrap" style="gap: 8px; flex: 1">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ml-auto">
|
||||
<button class="btn btn-sm btn-outline-success" id="excel-download">
|
||||
<i class="fa fa-fw" aria-hidden="true" title="file-excel-o"></i>
|
||||
엑셀다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table id="resultList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>매물번호</th>
|
||||
<th>현재상태</th>
|
||||
<th>홍보확인서<br />여부</th>
|
||||
<th>수신기간</th>
|
||||
<th>발신번호</th>
|
||||
<th>주소</th>
|
||||
<th>상세주소</th>
|
||||
<th>매체사</th>
|
||||
<th>중개소</th>
|
||||
<th>서류/전화<br />담당자</th>
|
||||
<th>서류/전화<br />확인시간</th>
|
||||
<th>등기부등본<br />담당자</th>
|
||||
<th>검증완료<br />일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 여기는 비워둠: AJAX로 채움 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css" />
|
||||
<link href="https://unpkg.com/dropzone@6.0.0-beta.1/dist/dropzone.css" rel="stylesheet" type="text/css" />
|
||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="/architectui/assets/js/datatable.kor.js"></script>
|
||||
<script type="text/javascript" src="https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=dtounkwjc5"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
const date = new Date();
|
||||
const bonbuArr = <?= json_encode($bonbu, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const teamArr = <?= json_encode($team, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const userArr = <?= json_encode($user, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const codeArr = <?= json_encode($codes, JSON_UNESCAPED_UNICODE); ?>;
|
||||
|
||||
var table;
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#bonbu").on("change", function (e) {
|
||||
|
||||
const value = e.target.value
|
||||
|
||||
$("#dept_sq").empty()
|
||||
|
||||
var str = "<option value=''>선택</option>"
|
||||
if (teamArr != null) {
|
||||
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
if (value === teamArr[i].pdept_sq) {
|
||||
str += "<option value='" + teamArr[i].dept_sq + "'>" + teamArr[i].dept_nm + "</option>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#dept_sq").append(str)
|
||||
|
||||
});
|
||||
|
||||
$("#srcSido, #srcGugun, #srcSido2, #srcGugun2").on("change", function (e) {
|
||||
|
||||
const targetId = this.id;
|
||||
|
||||
const isSecond = this.id.endsWith("2");
|
||||
|
||||
const params = {
|
||||
srcSido: isSecond
|
||||
? $("#srcSido2").val()
|
||||
: $("#frm_srch_info [name=srcSido]").val(),
|
||||
|
||||
srcGugun: isSecond
|
||||
? $("#srcGugun2").val()
|
||||
: $("#frm_srch_info [name=srcGugun]").val(),
|
||||
};
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/manage/areas/getAreaList",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
data: params,
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
switch (targetId) {
|
||||
case "srcSido":
|
||||
$("#srcGugun").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>시/군/구</option>";
|
||||
|
||||
if ($("#srcSido").val() !== "") {
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcGugun").append(str);
|
||||
|
||||
break;
|
||||
|
||||
case "srcGugun":
|
||||
$("#srcDong").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>읍/면/동</option>";
|
||||
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcDong").append(str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#bonbu, #team, #bonbu2, #team2").on("change", function (e) {
|
||||
const targetId = this.id;
|
||||
|
||||
|
||||
var str = "";
|
||||
if (targetId === "bonbu" || targetId === "bonbu2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-팀-</option>`;
|
||||
if (teamArr.length > 0) {
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(teamArr[i].pdept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${teamArr[i].dept_sq}">${teamArr[i].dept_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "bonbu") {
|
||||
$("#team").html(str);
|
||||
} else if (targetId === "bonbu2") {
|
||||
$("#team2").html(str);
|
||||
}
|
||||
|
||||
} else if (targetId === "team" || targetId === "team2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-담당자-</option>`;
|
||||
if (userArr.length > 0) {
|
||||
for (var i = 0; i < userArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(userArr[i].dept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${userArr[i].usr_id}">${userArr[i].usr_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "team") {
|
||||
$("#damdang").html(str);
|
||||
} else if (targetId === "team2") {
|
||||
$("#damdang2").html(str);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 검증방식 onchange
|
||||
$("#vrfcreq_way").on("change", function (e) {
|
||||
const val = e.target.value;
|
||||
|
||||
var str = "";
|
||||
str += `<option value="">-선택-</option>`;
|
||||
if (e.val !== "") {
|
||||
$.getJSON("/common/common/getVrfcCode?type=" + val, function (result) {
|
||||
var total = result.length;
|
||||
for (var i = 0; i < total; i++) {
|
||||
var cateNm = result[i].cd_nm;
|
||||
|
||||
if (total == 1) {
|
||||
str += "<option value=\"" + result[i].cd + "\" selected>" + cateNm + "</option>";
|
||||
} else {
|
||||
str += "<option value=\"" + result[i].cd + "\">" + cateNm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#vrfc_type_sub").html(str);
|
||||
});
|
||||
} else {
|
||||
$("#vrfc_type_sub").html(str);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
initReceiptDate();
|
||||
table = $('#resultList').DataTable({
|
||||
language: lang_kor,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
ajax: {
|
||||
url: '/m708/m708a/getResultList',
|
||||
type: 'GET',
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
data: function (d) {
|
||||
|
||||
d.atcl_no = $("#frm_srch_info [name=atcl_no]").val(); // 매물번호
|
||||
d.chk_atcl_no = $("#frm_srch_info [name=chk_atcl_no]").val(); // 매물번호입력
|
||||
d.caller_no = $("#frm_srch_info [name=caller_no]").val(); // 발신팩스번호
|
||||
d.stat_cd = $("#frm_srch_info [name=stat_cd]").val(); // 현재상태
|
||||
d.realtor_nm = $("#frm_srch_info [name=realtor_nm]").val(); // 중개소
|
||||
d.charger_gbn = $("#frm_srch_info [name=charger_gbn]").val(); // 배정여부
|
||||
d.assign_yn = $("#frm_srch_info [name=assign_yn]").val(); // 배정여부2
|
||||
d.receipt_sdate = $("#frm_srch_info [name=receipt_sdate]").val(); // 접수기간1
|
||||
d.receipt_edate = $("#frm_srch_info [name=receipt_edate]").val(); // 접수기간2
|
||||
d.complete_sdate = $("#frm_srch_info [name=complete_sdate]").val(); // 완료기간1
|
||||
d.complete_edate = $("#frm_srch_info [name=complete_edate]").val(); // 완료기간2
|
||||
d.srcSido = $("#frm_srch_info [name=srcSido]").val(); // 시도
|
||||
d.srcGugun = $("#frm_srch_info [name=srcGugun]").val(); // 시군구
|
||||
d.srcDong = $("#frm_srch_info [name=srcDong]").val(); // 읍면동
|
||||
// d.bonbu = $("#frm_srch_info [name=bonbu]").val(); // 본부
|
||||
d.team = $("#frm_srch_info [name=team]").val(); // 팀
|
||||
d.damdang = $("#frm_srch_info [name=damdang]").val(); // 담당
|
||||
d.target_yn = $("#frm_srch_info [name=target_yn]").val(); // 홍보확인서여부
|
||||
d.rcpt_cpid = $("#frm_srch_info [name=rcpt_cpid]").val(); // 매체사
|
||||
d.rlet_type_cd = $("#frm_srch_info [name=rlet_type_cd]").val(); // 매물종류
|
||||
d.rcpt_v2 = $("#frm_srch_info [name=rcpt_v2]").val(); // 검증방식
|
||||
|
||||
d.start = d.start || 0
|
||||
d.length = d.length || 10
|
||||
},
|
||||
},
|
||||
"columnDefs": [
|
||||
{ className: 'text-center', targets: '_all' },
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
],
|
||||
columns: [
|
||||
{ data: 'atcl_no' },
|
||||
{ data: null, render: fn_stat_render },
|
||||
{ data: null, render: fn_pr_render },
|
||||
{ data: 'RECV_TIME' },
|
||||
{ data: 'CALLER_NO' },
|
||||
{ data: null, render: fn_region_render },
|
||||
{ data: null, render: fn_addr_render },
|
||||
{ data: 'cpid' },
|
||||
{ data: 'realtor_nm' },
|
||||
{ data: 'usr_nm', width: '80px' },
|
||||
{ data: null, render: fn_tm_render },
|
||||
{ data: 'rgbk_check_tm' },
|
||||
{ data: 'send_tm' },
|
||||
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
});
|
||||
|
||||
$('#resultList tbody').on('click', 'tr', function (e) {
|
||||
if ($(e.target).closest('td.dt-no-rowclick').length) return;
|
||||
|
||||
const rowData = table.row(this).data();
|
||||
if (!rowData) return;
|
||||
|
||||
const fax_sq = rowData.fax_sq;
|
||||
location.href = "<?= site_url('m708/m708a/detail') ?>/" + fax_sq;
|
||||
});
|
||||
|
||||
$('#btnSearch').on('click', function () {
|
||||
table.ajax.reload()
|
||||
});
|
||||
|
||||
// 엑셀 다운로드 click
|
||||
$("#excel-download").on("click", function () {
|
||||
$.ajax({
|
||||
url: "/m708/m708a/excel",
|
||||
method: "GET",
|
||||
dataType: "json",
|
||||
data: $("#frm_srch_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
downloadExcel(result.data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
// 접수기간 초기화
|
||||
function initReceiptDate() {
|
||||
|
||||
const before3 = new Date();
|
||||
before3.setDate(date.getDate() - 2);
|
||||
|
||||
const fmt = d => d.toISOString().slice(0, 10);
|
||||
|
||||
$('#receipt_sdate').val(fmt(before3));
|
||||
$('#receipt_edate').val(fmt(date));
|
||||
|
||||
$("#bonbu").val("3");;
|
||||
$("#bonbu").trigger("change");
|
||||
$("#bonbu").prop("disabled", true);
|
||||
}
|
||||
|
||||
|
||||
function atcl_no_enter(event) {
|
||||
if (event.keyCode == 13) {
|
||||
table.ajax.reload()
|
||||
}
|
||||
}
|
||||
|
||||
function fn_stat_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.stat_cd != null) {
|
||||
str = getCodeName(row.stat_cd, 'STEP_VERIFICATION');
|
||||
} else {
|
||||
str = getCodeName(row.rcpt_stat, 'RECEIPT_STATUS3');
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_pr_render(datra, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.work_type == '1' & row.bunyang_yn == 'Y') {
|
||||
str = '분양권';
|
||||
} else if (row.work_type == '1' && row.send_yn == 'Y') {
|
||||
str = '홍보확인서';
|
||||
} else if (row.work_type == 'E') {
|
||||
str = '홍보확인서 아님';
|
||||
} else if (row.work_type == '1' && row.send_yn == 'N') {
|
||||
str = '미처리';
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_region_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
str = row.region_nm;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 주소 render
|
||||
function fn_addr_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.address2b == null) {
|
||||
str = row.address2 + " " + row.address3;
|
||||
} else {
|
||||
str = row.address2b + " " + row.address3;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_tm_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.proc_tm == null) {
|
||||
str = row.stat_39_tm;
|
||||
} else {
|
||||
str = row.proc_tm;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 엑셀 다운로드
|
||||
function downloadExcel(data) {
|
||||
const ws = XLSX.utils.json_to_sheet(data);
|
||||
ws['!cols'] = [
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
];
|
||||
|
||||
const wb = XLSX.utils.book_new();
|
||||
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
|
||||
|
||||
const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
|
||||
|
||||
const blob = new Blob([wbout], { type: 'application/octet-stream' });
|
||||
|
||||
const link = document.createElement("a");
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = "홍보확인서_현황" + getDateTimeString() + ".xlsx";
|
||||
link.click();
|
||||
URL.revokeObjectURL(link.href);
|
||||
}
|
||||
|
||||
|
||||
function getDateTimeString() {
|
||||
const d = new Date();
|
||||
const yyyy = d.getFullYear();
|
||||
const mm = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const dd = String(d.getDate()).padStart(2, '0');
|
||||
const hh = String(d.getHours()).padStart(2, '0');
|
||||
const mi = String(d.getMinutes()).padStart(2, '0');
|
||||
const ss = String(d.getSeconds()).padStart(2, '0');
|
||||
return `${yyyy}${mm}${dd}${hh}${mi}${ss}`;
|
||||
}
|
||||
|
||||
function extractCode(code) {
|
||||
|
||||
var codeArr = new Array();
|
||||
|
||||
if (codes.length) {
|
||||
|
||||
for (var i = 0; i < codes.length; i++) {
|
||||
|
||||
if (code === codes[i].category) {
|
||||
codeArr.push(codes[i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return codeArr;
|
||||
}
|
||||
|
||||
|
||||
// 이미지 프리뷰
|
||||
function fn_preview(src) {
|
||||
const $img = $('#imgPreview');
|
||||
|
||||
// 이미지 표시
|
||||
$img.attr('src', src).show();
|
||||
|
||||
$('#previewTitle').text('이미지 미리보기');
|
||||
|
||||
|
||||
const modal = new bootstrap.Modal(document.getElementById('previewModal'));
|
||||
modal.show();
|
||||
}
|
||||
|
||||
|
||||
// 코드명 조회
|
||||
function getCodeName(val, type) {
|
||||
var str = "";
|
||||
|
||||
if (codeArr.length > 0) {
|
||||
for (var i = 0; i < codeArr.length; i++) {
|
||||
if (type === codeArr[i].category) {
|
||||
if (val === codeArr[i].cd) {
|
||||
str = codeArr[i].cd_nm;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
|
||||
}
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
1349
app/Views/pages/v2/m709/detail.php
Normal file
1349
app/Views/pages/v2/m709/detail.php
Normal file
File diff suppressed because it is too large
Load Diff
774
app/Views/pages/v2/m709/lists.php
Normal file
774
app/Views/pages/v2/m709/lists.php
Normal file
@@ -0,0 +1,774 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#resultList tbody tr {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-header-tab {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
.table-scroll {
|
||||
max-height: 300px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.swal2-cancel {
|
||||
background-color: #ff0000 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>모바일 추가 서류</h1>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form id="frm_srch_info" method="get" onsubmit="return false;">
|
||||
<input type="hidden" name="m" id="m" value="M801" />
|
||||
<input type="hidden" name="todo" id="todo" value="inq" />
|
||||
<input type="hidden" name="usr_id" value="" />
|
||||
|
||||
<!-- 안내 -->
|
||||
<div class="alert alert-warning py-2 mb-3">
|
||||
<small class="mb-0">
|
||||
매물번호 또는 발신팩스번호를 입력하면 <b>다른 조건은 무시</b>됩니다.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- 검색 폼 -->
|
||||
<div class="row g-3">
|
||||
|
||||
<!-- 매물번호 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물번호</label>
|
||||
<input type="text" name="atcl_no" class="form-control form-control-sm" placeholder="매물번호" maxlength="10"
|
||||
onkeypress="atcl_no_enter(event)">
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물번호입력</label>
|
||||
<select name="chk_atcl_no" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<option value="Y">입력</option>
|
||||
<option value="N">미입력</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">발신팩스번호</label>
|
||||
<input type="text" name="caller_no" class="form-control form-control-sm" placeholder="발신팩스번호" maxlength="10"
|
||||
onkeypress="atcl_no_enter(event)">
|
||||
</div>
|
||||
|
||||
<!-- 현재상태 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">현재상태</label>
|
||||
<select name="stat_cd" class="form-select form-select-sm">
|
||||
<option value="">-선택-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "STEP_VERIFICATION"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 중개소 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">중개소</label>
|
||||
<input type="text" name="realtor_nm" class="form-control form-control-sm" placeholder="중개소">
|
||||
</div>
|
||||
|
||||
<!-- 배정여부 (2개 셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">배정여부</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="charger_gbn" id="code_charger_gbn" class="form-select form-select-sm">
|
||||
<option value="1">전화/서류담당자</option>
|
||||
<option value="2">등기부등본담당자</option>
|
||||
</select>
|
||||
<select name="assign_yn" id="assign_yn" class="form-select form-select-sm">
|
||||
<option value="A">-전체-</option>
|
||||
<option value="Y">배정</option>
|
||||
<option value="N">미배정</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 접수기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">수신기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="date" class="form-control" name="receipt_sdate" id="receipt_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="date" class="form-control" name="receipt_edate" id="receipt_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 완료기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">처리기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control" name="complete_sdate" id="complete_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="text" class="form-control" name="complete_edate" id="complete_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 지역구분 -->
|
||||
<div class="col-md-4">
|
||||
<label class="form-label mb-1">지역구분</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="srcSido" id="srcSido" class="form-select form-select-sm">
|
||||
<option value="">-시/도-</option>
|
||||
<?php foreach ($sido as $s): ?>
|
||||
<option value="<?= $s['region_cd'] ?>"><?= $s['region_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="srcGugun" id="srcGugun" class="form-select form-select-sm">
|
||||
<option value="">-시/군/구-</option>
|
||||
</select>
|
||||
<select name="srcDong" id="srcDong" class="form-select form-select-sm">
|
||||
<option value="">-읍/면/동-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 담당자 (본부/팀/담당 3셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">담당자</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="bonbu" id="bonbu" class="form-select form-select-sm">
|
||||
<option value="">-본부-</option>
|
||||
<?php foreach ($bonbu as $d): ?>
|
||||
<option value="<?= $d['dept_sq'] ?>"><?= $d['dept_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="team" id="team" class="form-select form-select-sm">
|
||||
<option value="">-팀-</option>
|
||||
</select>
|
||||
<select name="damdang" id="damdang" class="form-select form-select-sm">
|
||||
<option value="">-담당자-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 검증방식 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">홍보확인서여부</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="target_yn" id="target_yn" class="form-select form-select-sm">
|
||||
<option value="">-검증방식-</option>
|
||||
<option value="A">미처리</option>
|
||||
<option value="1">홍보확인서</option>
|
||||
<option value="3">분양권</option>
|
||||
<option value="E">홍보확인서 아님</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 매체사 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매체사</label>
|
||||
<select name="rcpt_cpid" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "CP_ID"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 매물종류 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물종류</label>
|
||||
<select name="rlet_type_cd" class="form-select form-select-sm">
|
||||
<option value="">-매물종류-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "ARTICLE_TYPE"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 검증방식 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">검증방식</label>
|
||||
<select name="rcpt_v2" class="form-select form-select-sm">
|
||||
<option value="">-검증방식-</option>
|
||||
<option value="N">현장확인</option>
|
||||
<option value="Y">현장확인v2</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-1 d-grid">
|
||||
<label class="form-label mb-1 invisible">검색</label>
|
||||
<button type="button" class="btn btn-primary" id="btnSearch">
|
||||
<i class="pe-7s-search me-1"></i>검색
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header d-flex align-items-center">
|
||||
<div class="d-flex align-items-center flex-wrap" style="gap: 8px; flex: 1">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ml-auto">
|
||||
<button class="btn btn-sm btn-outline-success" id="excel-download">
|
||||
<i class="fa fa-fw" aria-hidden="true" title="file-excel-o"></i>
|
||||
엑셀다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table id="resultList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>매물번호</th>
|
||||
<th>현재상태</th>
|
||||
<th>홍보확인서<br />여부</th>
|
||||
<th>수신기간</th>
|
||||
<th>발신번호</th>
|
||||
<th>주소</th>
|
||||
<th>상세주소</th>
|
||||
<th>매체사</th>
|
||||
<th>중개소</th>
|
||||
<th>서류/전화<br />담당자</th>
|
||||
<th>서류/전화<br />확인시간</th>
|
||||
<th>등기부등본<br />담당자</th>
|
||||
<th>검증완료<br />일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 여기는 비워둠: AJAX로 채움 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css" />
|
||||
<link href="https://unpkg.com/dropzone@6.0.0-beta.1/dist/dropzone.css" rel="stylesheet" type="text/css" />
|
||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="/architectui/assets/js/datatable.kor.js"></script>
|
||||
<script type="text/javascript" src="https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=dtounkwjc5"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
const date = new Date();
|
||||
const bonbuArr = <?= json_encode($bonbu, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const teamArr = <?= json_encode($team, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const userArr = <?= json_encode($user, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const codeArr = <?= json_encode($codes, JSON_UNESCAPED_UNICODE); ?>;
|
||||
|
||||
var table;
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#bonbu").on("change", function (e) {
|
||||
|
||||
const value = e.target.value
|
||||
|
||||
$("#dept_sq").empty()
|
||||
|
||||
var str = "<option value=''>선택</option>"
|
||||
if (teamArr != null) {
|
||||
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
if (value === teamArr[i].pdept_sq) {
|
||||
str += "<option value='" + teamArr[i].dept_sq + "'>" + teamArr[i].dept_nm + "</option>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#dept_sq").append(str)
|
||||
|
||||
});
|
||||
|
||||
$("#srcSido, #srcGugun, #srcSido2, #srcGugun2").on("change", function (e) {
|
||||
|
||||
const targetId = this.id;
|
||||
|
||||
const isSecond = this.id.endsWith("2");
|
||||
|
||||
const params = {
|
||||
srcSido: isSecond
|
||||
? $("#srcSido2").val()
|
||||
: $("#frm_srch_info [name=srcSido]").val(),
|
||||
|
||||
srcGugun: isSecond
|
||||
? $("#srcGugun2").val()
|
||||
: $("#frm_srch_info [name=srcGugun]").val(),
|
||||
};
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/manage/areas/getAreaList",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
data: params,
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
switch (targetId) {
|
||||
case "srcSido":
|
||||
$("#srcGugun").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>시/군/구</option>";
|
||||
|
||||
if ($("#srcSido").val() !== "") {
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcGugun").append(str);
|
||||
|
||||
break;
|
||||
|
||||
case "srcGugun":
|
||||
$("#srcDong").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>읍/면/동</option>";
|
||||
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcDong").append(str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#bonbu, #team, #bonbu2, #team2").on("change", function (e) {
|
||||
const targetId = this.id;
|
||||
|
||||
|
||||
var str = "";
|
||||
if (targetId === "bonbu" || targetId === "bonbu2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-팀-</option>`;
|
||||
if (teamArr.length > 0) {
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(teamArr[i].pdept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${teamArr[i].dept_sq}">${teamArr[i].dept_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "bonbu") {
|
||||
$("#team").html(str);
|
||||
} else if (targetId === "bonbu2") {
|
||||
$("#team2").html(str);
|
||||
}
|
||||
|
||||
} else if (targetId === "team" || targetId === "team2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-담당자-</option>`;
|
||||
if (userArr.length > 0) {
|
||||
for (var i = 0; i < userArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(userArr[i].dept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${userArr[i].usr_id}">${userArr[i].usr_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "team") {
|
||||
$("#damdang").html(str);
|
||||
} else if (targetId === "team2") {
|
||||
$("#damdang2").html(str);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 검증방식 onchange
|
||||
$("#vrfcreq_way").on("change", function (e) {
|
||||
const val = e.target.value;
|
||||
|
||||
var str = "";
|
||||
str += `<option value="">-선택-</option>`;
|
||||
if (e.val !== "") {
|
||||
$.getJSON("/common/common/getVrfcCode?type=" + val, function (result) {
|
||||
var total = result.length;
|
||||
for (var i = 0; i < total; i++) {
|
||||
var cateNm = result[i].cd_nm;
|
||||
|
||||
if (total == 1) {
|
||||
str += "<option value=\"" + result[i].cd + "\" selected>" + cateNm + "</option>";
|
||||
} else {
|
||||
str += "<option value=\"" + result[i].cd + "\">" + cateNm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#vrfc_type_sub").html(str);
|
||||
});
|
||||
} else {
|
||||
$("#vrfc_type_sub").html(str);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
initReceiptDate();
|
||||
table = $('#resultList').DataTable({
|
||||
language: lang_kor,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
ajax: {
|
||||
url: '/m709/m709a/getResultList',
|
||||
type: 'GET',
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
data: function (d) {
|
||||
|
||||
d.atcl_no = $("#frm_srch_info [name=atcl_no]").val(); // 매물번호
|
||||
d.chk_atcl_no = $("#frm_srch_info [name=chk_atcl_no]").val(); // 매물번호입력
|
||||
d.caller_no = $("#frm_srch_info [name=caller_no]").val(); // 발신팩스번호
|
||||
d.stat_cd = $("#frm_srch_info [name=stat_cd]").val(); // 현재상태
|
||||
d.realtor_nm = $("#frm_srch_info [name=realtor_nm]").val(); // 중개소
|
||||
d.charger_gbn = $("#frm_srch_info [name=charger_gbn]").val(); // 배정여부
|
||||
d.assign_yn = $("#frm_srch_info [name=assign_yn]").val(); // 배정여부2
|
||||
d.receipt_sdate = $("#frm_srch_info [name=receipt_sdate]").val(); // 접수기간1
|
||||
d.receipt_edate = $("#frm_srch_info [name=receipt_edate]").val(); // 접수기간2
|
||||
d.complete_sdate = $("#frm_srch_info [name=complete_sdate]").val(); // 완료기간1
|
||||
d.complete_edate = $("#frm_srch_info [name=complete_edate]").val(); // 완료기간2
|
||||
d.srcSido = $("#frm_srch_info [name=srcSido]").val(); // 시도
|
||||
d.srcGugun = $("#frm_srch_info [name=srcGugun]").val(); // 시군구
|
||||
d.srcDong = $("#frm_srch_info [name=srcDong]").val(); // 읍면동
|
||||
// d.bonbu = $("#frm_srch_info [name=bonbu]").val(); // 본부
|
||||
d.team = $("#frm_srch_info [name=team]").val(); // 팀
|
||||
d.damdang = $("#frm_srch_info [name=damdang]").val(); // 담당
|
||||
d.target_yn = $("#frm_srch_info [name=target_yn]").val(); // 홍보확인서여부
|
||||
d.rcpt_cpid = $("#frm_srch_info [name=rcpt_cpid]").val(); // 매체사
|
||||
d.rlet_type_cd = $("#frm_srch_info [name=rlet_type_cd]").val(); // 매물종류
|
||||
d.rcpt_v2 = $("#frm_srch_info [name=rcpt_v2]").val(); // 검증방식
|
||||
|
||||
d.start = d.start || 0
|
||||
d.length = d.length || 10
|
||||
},
|
||||
},
|
||||
"columnDefs": [
|
||||
{ className: 'text-center', targets: '_all' },
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
],
|
||||
columns: [
|
||||
{ data: 'atcl_no' },
|
||||
{ data: null, render: fn_stat_render },
|
||||
{ data: null, render: fn_pr_render },
|
||||
{ data: 'RECV_TIME' },
|
||||
{ data: 'CALLER_NO' },
|
||||
{ data: null, render: fn_region_render },
|
||||
{ data: null, render: fn_addr_render },
|
||||
{ data: 'cpid' },
|
||||
{ data: 'realtor_nm' },
|
||||
{ data: 'usr_nm', width: '80px' },
|
||||
{ data: null, render: fn_tm_render },
|
||||
{ data: 'rgbk_check_tm' },
|
||||
{ data: 'send_tm' },
|
||||
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
});
|
||||
|
||||
$('#resultList tbody').on('click', 'tr', function (e) {
|
||||
if ($(e.target).closest('td.dt-no-rowclick').length) return;
|
||||
|
||||
const rowData = table.row(this).data();
|
||||
if (!rowData) return;
|
||||
|
||||
const fax_sq = rowData.fax_sq;
|
||||
location.href = "<?= site_url('m709/m709a/detail') ?>/" + fax_sq;
|
||||
});
|
||||
|
||||
$('#btnSearch').on('click', function () {
|
||||
table.ajax.reload()
|
||||
});
|
||||
|
||||
// 엑셀 다운로드 click
|
||||
$("#excel-download").on("click", function () {
|
||||
$.ajax({
|
||||
url: "/m709/m709a/excel",
|
||||
method: "GET",
|
||||
dataType: "json",
|
||||
data: $("#frm_srch_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
downloadExcel(result.data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
// 접수기간 초기화
|
||||
function initReceiptDate() {
|
||||
|
||||
const before3 = new Date();
|
||||
before3.setDate(date.getDate() - 2);
|
||||
|
||||
const fmt = d => d.toISOString().slice(0, 10);
|
||||
|
||||
$('#receipt_sdate').val(fmt(before3));
|
||||
$('#receipt_edate').val(fmt(date));
|
||||
|
||||
$("#bonbu").val("3");;
|
||||
$("#bonbu").trigger("change");
|
||||
$("#bonbu").prop("disabled", true);
|
||||
}
|
||||
|
||||
|
||||
function atcl_no_enter(event) {
|
||||
if (event.keyCode == 13) {
|
||||
table.ajax.reload()
|
||||
}
|
||||
}
|
||||
|
||||
function fn_stat_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.stat_cd != null) {
|
||||
str = getCodeName(row.stat_cd, 'STEP_VERIFICATION');
|
||||
} else {
|
||||
str = getCodeName(row.rcpt_stat, 'RECEIPT_STATUS3');
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_pr_render(datra, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.work_type == '1' & row.bunyang_yn == 'Y') {
|
||||
str = '분양권';
|
||||
} else if (row.work_type == '1' && row.send_yn == 'Y') {
|
||||
str = '홍보확인서';
|
||||
} else if (row.work_type == 'E') {
|
||||
str = '홍보확인서 아님';
|
||||
} else if (row.work_type == '1' && row.send_yn == 'N') {
|
||||
str = '미처리';
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_region_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
str = row.region_nm;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 주소 render
|
||||
function fn_addr_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.address2b == null) {
|
||||
str = row.address2 + " " + row.address3;
|
||||
} else {
|
||||
str = row.address2b + " " + row.address3;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_tm_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.proc_tm == null) {
|
||||
str = row.stat_39_tm;
|
||||
} else {
|
||||
str = row.proc_tm;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 엑셀 다운로드
|
||||
function downloadExcel(data) {
|
||||
const ws = XLSX.utils.json_to_sheet(data);
|
||||
ws['!cols'] = [
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
];
|
||||
|
||||
const wb = XLSX.utils.book_new();
|
||||
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
|
||||
|
||||
const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
|
||||
|
||||
const blob = new Blob([wbout], { type: 'application/octet-stream' });
|
||||
|
||||
const link = document.createElement("a");
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = "모바일_추가_서류" + getDateTimeString() + ".xlsx";
|
||||
link.click();
|
||||
URL.revokeObjectURL(link.href);
|
||||
}
|
||||
|
||||
|
||||
function getDateTimeString() {
|
||||
const d = new Date();
|
||||
const yyyy = d.getFullYear();
|
||||
const mm = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const dd = String(d.getDate()).padStart(2, '0');
|
||||
const hh = String(d.getHours()).padStart(2, '0');
|
||||
const mi = String(d.getMinutes()).padStart(2, '0');
|
||||
const ss = String(d.getSeconds()).padStart(2, '0');
|
||||
return `${yyyy}${mm}${dd}${hh}${mi}${ss}`;
|
||||
}
|
||||
|
||||
function extractCode(code) {
|
||||
|
||||
var codeArr = new Array();
|
||||
|
||||
if (codes.length) {
|
||||
|
||||
for (var i = 0; i < codes.length; i++) {
|
||||
|
||||
if (code === codes[i].category) {
|
||||
codeArr.push(codes[i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return codeArr;
|
||||
}
|
||||
|
||||
|
||||
// 이미지 프리뷰
|
||||
function fn_preview(src) {
|
||||
const $img = $('#imgPreview');
|
||||
|
||||
// 이미지 표시
|
||||
$img.attr('src', src).show();
|
||||
|
||||
$('#previewTitle').text('이미지 미리보기');
|
||||
|
||||
|
||||
const modal = new bootstrap.Modal(document.getElementById('previewModal'));
|
||||
modal.show();
|
||||
}
|
||||
|
||||
|
||||
// 코드명 조회
|
||||
function getCodeName(val, type) {
|
||||
var str = "";
|
||||
|
||||
if (codeArr.length > 0) {
|
||||
for (var i = 0; i < codeArr.length; i++) {
|
||||
if (type === codeArr[i].category) {
|
||||
if (val === codeArr[i].cd) {
|
||||
str = codeArr[i].cd_nm;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
|
||||
}
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
813
app/Views/pages/v2/m710/lists.php
Normal file
813
app/Views/pages/v2/m710/lists.php
Normal file
@@ -0,0 +1,813 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#resultList tbody tr {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-header-tab {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
.table-scroll {
|
||||
max-height: 300px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.swal2-cancel {
|
||||
background-color: #ff0000 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>전송대기매물 현황</h1>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form id="frm_srch_info" method="get" onsubmit="return false;">
|
||||
<input type="hidden" name="m" id="m" value="M801" />
|
||||
<input type="hidden" name="todo" id="todo" value="inq" />
|
||||
<input type="hidden" name="usr_id" value="" />
|
||||
|
||||
<!-- 안내 -->
|
||||
<div class="alert alert-warning py-2 mb-3">
|
||||
<small class="mb-0">
|
||||
매물번호를 입력하면 <b>다른 조건은 무시</b>됩니다.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- 검색 폼 -->
|
||||
<div class="row g-3">
|
||||
|
||||
<!-- 매물번호 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물번호</label>
|
||||
<input type="text" name="atcl_no" class="form-control form-control-sm" placeholder="매물번호" maxlength="10"
|
||||
onkeypress="atcl_no_enter(event)">
|
||||
</div>
|
||||
|
||||
<!-- 현재상태 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">현재상태</label>
|
||||
<select name="stat_cd" class="form-select form-select-sm">
|
||||
<option value="">-선택-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "STEP_VERIFICATION"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 중개소 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">중개소</label>
|
||||
<input type="text" name="realtor_nm" class="form-control form-control-sm" placeholder="중개소">
|
||||
</div>
|
||||
|
||||
<!-- 배정여부 (2개 셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">배정여부</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="charger_gbn" id="code_charger_gbn" class="form-select form-select-sm">
|
||||
<option value="1">전화/서류담당자</option>
|
||||
<option value="2">등기부등본담당자</option>
|
||||
</select>
|
||||
<select name="assign_yn" id="assign_yn" class="form-select form-select-sm">
|
||||
<option value="A">-전체-</option>
|
||||
<option value="Y">배정</option>
|
||||
<option value="N">미배정</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 접수기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">접수기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="date" class="form-control" name="receipt_sdate" id="receipt_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="date" class="form-control" name="receipt_edate" id="receipt_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 완료기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">완료기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control" name="complete_sdate" id="complete_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="text" class="form-control" name="complete_edate" id="complete_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 지역구분 -->
|
||||
<div class="col-md-4">
|
||||
<label class="form-label mb-1">지역구분</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="srcSido" id="srcSido" class="form-select form-select-sm">
|
||||
<option value="">-시/도-</option>
|
||||
<?php foreach ($sido as $s): ?>
|
||||
<option value="<?= $s['region_cd'] ?>"><?= $s['region_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="srcGugun" id="srcGugun" class="form-select form-select-sm">
|
||||
<option value="">-시/군/구-</option>
|
||||
</select>
|
||||
<select name="srcDong" id="srcDong" class="form-select form-select-sm">
|
||||
<option value="">-읍/면/동-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 담당자 (본부/팀/담당 3셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">담당자</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="bonbu" id="bonbu" class="form-select form-select-sm">
|
||||
<option value="">-본부-</option>
|
||||
<?php foreach ($bonbu as $d): ?>
|
||||
<option value="<?= $d['dept_sq'] ?>"><?= $d['dept_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="team" id="team" class="form-select form-select-sm">
|
||||
<option value="">-팀-</option>
|
||||
</select>
|
||||
<select name="damdang" id="damdang" class="form-select form-select-sm">
|
||||
<option value="">-담당자-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 검증방식 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">검증방식</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="vrfcreq_way" id="vrfcreq_way" class="form-select form-select-sm">
|
||||
<option value="">-검증방식-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "VRFCREQ_WAY"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="vrfc_type_sub" id="vrfc_type_sub" class="form-select form-select-sm">
|
||||
<option value="">-선택-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 매체사 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매체사</label>
|
||||
<select name="rcpt_cpid" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "CP_ID"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 매물종류 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물종류</label>
|
||||
<select name="rlet_type_cd" class="form-select form-select-sm">
|
||||
<option value="">-매물종류-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "ARTICLE_TYPE"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 참고용 파일 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">전송여부</label>
|
||||
<select name="status" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<option value="stop">전송전</option>
|
||||
<option value="wait">전송중</option>
|
||||
<option value="err">오류</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-1 d-grid">
|
||||
<label class="form-label mb-1 invisible">검색</label>
|
||||
<button type="button" class="btn btn-primary" id="btnSearch">
|
||||
<i class="pe-7s-search me-1"></i>검색
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header d-flex align-items-center">
|
||||
<div class="d-flex align-items-center flex-wrap" style="gap: 8px; flex: 1">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ml-auto">
|
||||
<button class="btn btn-sm btn-outline-light" id="excel-download" onclick="send_api('O');">
|
||||
모바일 V2 전송
|
||||
</button>
|
||||
<button class="btn btn-sm btn-outline-light" id="excel-download" onclick="send_api('H');">
|
||||
홍보확인서 전송
|
||||
</button>
|
||||
<button class="btn btn-sm btn-outline-light" id="excel-download" onclick="send_api('T');">
|
||||
전화확인 전송
|
||||
</button>
|
||||
<button class="btn btn-sm btn-outline-light" id="excel-download" onclick="send_api('D');">
|
||||
등기부등본 전송
|
||||
</button>
|
||||
<button class="btn btn-sm btn-outline-success" id="excel-download">
|
||||
<i class="fa fa-fw" aria-hidden="true" title="file-excel-o"></i>
|
||||
엑셀다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table id="resultList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>전송여부</th>
|
||||
<th>매물번호</th>
|
||||
<th>진행상태</th>
|
||||
<th>접수시간</th>
|
||||
<th>검증방식</th>
|
||||
<th>주소</th>
|
||||
<th>상세주소</th>
|
||||
<th>매체사</th>
|
||||
<th>중개소</th>
|
||||
<th>서류/전화<br />담당자</th>
|
||||
<th>서류/전화<br />확인완료시간</th>
|
||||
<th>등기부등본<br />담당자</th>
|
||||
<th>등기부등본<br />확인시간</th>
|
||||
<th>검증완료<br />일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 여기는 비워둠: AJAX로 채움 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css" />
|
||||
<link href="https://unpkg.com/dropzone@6.0.0-beta.1/dist/dropzone.css" rel="stylesheet" type="text/css" />
|
||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="/architectui/assets/js/datatable.kor.js"></script>
|
||||
<script type="text/javascript" src="https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=dtounkwjc5"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
const date = new Date();
|
||||
const bonbuArr = <?= json_encode($bonbu, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const teamArr = <?= json_encode($team, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const userArr = <?= json_encode($user, JSON_UNESCAPED_UNICODE); ?>;
|
||||
|
||||
var table;
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#bonbu").on("change", function (e) {
|
||||
|
||||
const value = e.target.value
|
||||
|
||||
$("#dept_sq").empty()
|
||||
|
||||
var str = "<option value=''>선택</option>"
|
||||
if (teamArr != null) {
|
||||
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
if (value === teamArr[i].pdept_sq) {
|
||||
str += "<option value='" + teamArr[i].dept_sq + "'>" + teamArr[i].dept_nm + "</option>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#dept_sq").append(str)
|
||||
|
||||
});
|
||||
|
||||
$("#srcSido, #srcGugun, #srcSido2, #srcGugun2").on("change", function (e) {
|
||||
|
||||
const targetId = this.id;
|
||||
|
||||
const isSecond = this.id.endsWith("2");
|
||||
|
||||
const params = {
|
||||
srcSido: isSecond
|
||||
? $("#srcSido2").val()
|
||||
: $("#frm_srch_info [name=srcSido]").val(),
|
||||
|
||||
srcGugun: isSecond
|
||||
? $("#srcGugun2").val()
|
||||
: $("#frm_srch_info [name=srcGugun]").val(),
|
||||
};
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/manage/areas/getAreaList",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
data: params,
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
switch (targetId) {
|
||||
case "srcSido":
|
||||
$("#srcGugun").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>시/군/구</option>";
|
||||
|
||||
if ($("#srcSido").val() !== "") {
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcGugun").append(str);
|
||||
|
||||
break;
|
||||
|
||||
case "srcGugun":
|
||||
$("#srcDong").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>읍/면/동</option>";
|
||||
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcDong").append(str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#bonbu, #team, #bonbu2, #team2").on("change", function (e) {
|
||||
const targetId = this.id;
|
||||
|
||||
|
||||
var str = "";
|
||||
if (targetId === "bonbu" || targetId === "bonbu2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-팀-</option>`;
|
||||
if (teamArr.length > 0) {
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(teamArr[i].pdept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${teamArr[i].dept_sq}">${teamArr[i].dept_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "bonbu") {
|
||||
$("#team").html(str);
|
||||
} else if (targetId === "bonbu2") {
|
||||
$("#team2").html(str);
|
||||
}
|
||||
|
||||
} else if (targetId === "team" || targetId === "team2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-담당자-</option>`;
|
||||
if (userArr.length > 0) {
|
||||
for (var i = 0; i < userArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(userArr[i].dept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${userArr[i].usr_id}">${userArr[i].usr_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "team") {
|
||||
$("#damdang").html(str);
|
||||
} else if (targetId === "team2") {
|
||||
$("#damdang2").html(str);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 검증방식 onchange
|
||||
$("#vrfcreq_way").on("change", function (e) {
|
||||
const val = e.target.value;
|
||||
|
||||
var str = "";
|
||||
str += `<option value="">-선택-</option>`;
|
||||
if (e.val !== "") {
|
||||
$.getJSON("/common/common/getVrfcCode?type=" + val, function (result) {
|
||||
var total = result.length;
|
||||
for (var i = 0; i < total; i++) {
|
||||
var cateNm = result[i].cd_nm;
|
||||
|
||||
if (total == 1) {
|
||||
str += "<option value=\"" + result[i].cd + "\" selected>" + cateNm + "</option>";
|
||||
} else {
|
||||
str += "<option value=\"" + result[i].cd + "\">" + cateNm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#vrfc_type_sub").html(str);
|
||||
});
|
||||
} else {
|
||||
$("#vrfc_type_sub").html(str);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
initReceiptDate();
|
||||
table = $('#resultList').DataTable({
|
||||
language: lang_kor,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
ajax: {
|
||||
url: '/m710/m710a/getResultList',
|
||||
type: 'GET',
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
data: function (d) {
|
||||
|
||||
d.atcl_no = $("#frm_srch_info [name=atcl_no]").val(); // 매물번호
|
||||
d.stat_cd = $("#frm_srch_info [name=stat_cd]").val(); // 현재상태
|
||||
d.realtor_nm = $("#frm_srch_info [name=realtor_nm]").val(); // 중개소
|
||||
d.charger_gbn = $("#frm_srch_info [name=charger_gbn]").val(); // 배정여부
|
||||
d.assign_yn = $("#frm_srch_info [name=assign_yn]").val(); // 배정여부2
|
||||
d.receipt_sdate = $("#frm_srch_info [name=receipt_sdate]").val(); // 접수기간1
|
||||
d.receipt_edate = $("#frm_srch_info [name=receipt_edate]").val(); // 접수기간2
|
||||
d.complete_sdate = $("#frm_srch_info [name=complete_sdate]").val(); // 완료기간1
|
||||
d.complete_edate = $("#frm_srch_info [name=complete_edate]").val(); // 완료기간2
|
||||
d.srcSido = $("#frm_srch_info [name=srcSido]").val(); // 시도
|
||||
d.srcGugun = $("#frm_srch_info [name=srcGugun]").val(); // 시군구
|
||||
d.srcDong = $("#frm_srch_info [name=srcDong]").val(); // 읍면동
|
||||
d.bonbu = $("#frm_srch_info [name=bonbu]").val(); // 본부
|
||||
d.team = $("#frm_srch_info [name=team]").val(); // 팀
|
||||
d.damdang = $("#frm_srch_info [name=damdang]").val(); // 담당
|
||||
d.vrfcreq_way = $("#frm_srch_info [name=vrfcreq_way]").val(); // 검증방식1
|
||||
d.vrfc_type_sub = $("#frm_srch_info [name=vrfc_type_sub]").val(); // 검증방식2
|
||||
d.rcpt_cpid = $("#frm_srch_info [name=rcpt_cpid]").val(); // 매체사
|
||||
d.rlet_type_cd = $("#frm_srch_info [name=rlet_type_cd]").val(); // 매물종류
|
||||
d.status = $("#frm_srch_info [name=status]").val(); // 전송여부
|
||||
|
||||
|
||||
d.start = d.start || 0
|
||||
d.length = d.length || 10
|
||||
},
|
||||
},
|
||||
"columnDefs": [
|
||||
{ className: 'text-center', targets: '_all' },
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
],
|
||||
columns: [
|
||||
{ data: null, render: fn_status_render },
|
||||
{ data: 'atcl_no' },
|
||||
{ data: 'pre_stat' },
|
||||
{ data: 'insert_tm' },
|
||||
{ data: 'vrfc_type' },
|
||||
{ data: null, render: fn_region_render },
|
||||
{ data: null, render: fn_addr_render },
|
||||
{ data: 'cpid' },
|
||||
{ data: 'realtor_nm' },
|
||||
{ data: 'usr_nm', width: "80px" },
|
||||
{ data: null, render: fn_tm_render },
|
||||
{ data: 'reg_charger' },
|
||||
{ data: 'rgbk_check_tm' },
|
||||
{ data: 'result_tm' },
|
||||
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
});
|
||||
|
||||
$('#resultList tbody').on('click', 'tr', function (e) {
|
||||
if ($(e.target).closest('td.dt-no-rowclick').length) return;
|
||||
|
||||
const rowData = table.row(this).data();
|
||||
if (!rowData) return;
|
||||
|
||||
const vr_sq = rowData.vr_sq;
|
||||
location.href = "<?= site_url('m701/m701a/detail') ?>/" + vr_sq;
|
||||
});
|
||||
|
||||
$('#btnSearch').on('click', function () {
|
||||
table.ajax.reload()
|
||||
});
|
||||
|
||||
// 엑셀 다운로드 click
|
||||
$("#excel-download").on("click", function () {
|
||||
$.ajax({
|
||||
url: "/m710/m710a/excel",
|
||||
method: "GET",
|
||||
dataType: "json",
|
||||
data: $("#frm_srch_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
downloadExcel(result.data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
// 접수기간 초기화
|
||||
function initReceiptDate() {
|
||||
|
||||
const before3 = new Date();
|
||||
before3.setDate(date.getDate() - 2);
|
||||
|
||||
const fmt = d => d.toISOString().slice(0, 10);
|
||||
|
||||
$('#receipt_sdate').val(fmt(before3));
|
||||
$('#receipt_edate').val(fmt(date));
|
||||
|
||||
}
|
||||
|
||||
|
||||
function atcl_no_enter(event) {
|
||||
if (event.keyCode == 13) {
|
||||
table.ajax.reload()
|
||||
}
|
||||
}
|
||||
|
||||
function fn_status_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
switch (row.status) {
|
||||
case "stop": str = "전송전"; break;
|
||||
case "wait": str = "전송중"; break;
|
||||
case "err": str = "오류"; break;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_region_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
str = row.region_nm + " " + row.rm_no;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 주소 render
|
||||
function fn_addr_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.address2b == null) {
|
||||
str = row.address2 + " " + row.address3;
|
||||
} else {
|
||||
str = row.address2b + " " + row.address3;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_tm_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.update_res_tm == null) {
|
||||
str = row.stat_39_tm;
|
||||
} else {
|
||||
str = row.update_res_tm;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 엑셀 다운로드
|
||||
function downloadExcel(data) {
|
||||
const ws = XLSX.utils.json_to_sheet(data);
|
||||
ws['!cols'] = [
|
||||
{ wpx: 80 },
|
||||
{ wpx: 80 },
|
||||
{ wpx: 80 },
|
||||
{ wpx: 80 },
|
||||
{ wpx: 80 },
|
||||
{ wpx: 150 },
|
||||
{ wpx: 120 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
];
|
||||
|
||||
const wb = XLSX.utils.book_new();
|
||||
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
|
||||
|
||||
const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
|
||||
|
||||
const blob = new Blob([wbout], { type: 'application/octet-stream' });
|
||||
|
||||
const link = document.createElement("a");
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = "전송대기매물현황" + getDateTimeString() + ".xlsx";
|
||||
link.click();
|
||||
URL.revokeObjectURL(link.href);
|
||||
}
|
||||
|
||||
|
||||
// 전송 api
|
||||
function send_api(type) {
|
||||
var nm = "";
|
||||
|
||||
if (type == "O") {
|
||||
var nm = "모바일확인 V2";
|
||||
} else if (type == 'H') {
|
||||
var nm = '홍보확인서';
|
||||
} else if (type == 'T') {
|
||||
var nm = '전화확인';
|
||||
} else {
|
||||
var nm = '등기부등본';
|
||||
}
|
||||
|
||||
swal.fire({
|
||||
text: nm + " API를 전송하시겠습니까?",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "예",
|
||||
cancelButtonText: "아니오",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
|
||||
$.ajax({
|
||||
url: '/m710/m710a/sendApi',
|
||||
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
method: 'POST',
|
||||
data: { 'type': type },
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
error: function (xhr, error, thrown) {
|
||||
blockUI.unblockPage()
|
||||
var msg = "";
|
||||
if (xhr.responseText != null) {
|
||||
msg = xhr.responseText
|
||||
} else {
|
||||
msg = "잠시후 다시 시도해 주세요."
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
title: msg,
|
||||
icon: "error"
|
||||
})
|
||||
},
|
||||
success: function (result) {
|
||||
if (result.code == '0') {
|
||||
|
||||
const fax_sq = result.data.fax_sq;
|
||||
|
||||
location.replace("<?= site_url('m708/m708a/detail') ?>/" + fax_sq);
|
||||
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: result.msg,
|
||||
icon: "error"
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function getDateTimeString() {
|
||||
const d = new Date();
|
||||
const yyyy = d.getFullYear();
|
||||
const mm = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const dd = String(d.getDate()).padStart(2, '0');
|
||||
const hh = String(d.getHours()).padStart(2, '0');
|
||||
const mi = String(d.getMinutes()).padStart(2, '0');
|
||||
const ss = String(d.getSeconds()).padStart(2, '0');
|
||||
return `${yyyy}${mm}${dd}${hh}${mi}${ss}`;
|
||||
}
|
||||
|
||||
function extractCode(code) {
|
||||
|
||||
var codeArr = new Array();
|
||||
|
||||
if (codes.length) {
|
||||
|
||||
for (var i = 0; i < codes.length; i++) {
|
||||
|
||||
if (code === codes[i].category) {
|
||||
codeArr.push(codes[i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return codeArr;
|
||||
}
|
||||
|
||||
|
||||
// 이미지 프리뷰
|
||||
function fn_preview(src) {
|
||||
const $img = $('#imgPreview');
|
||||
|
||||
// 이미지 표시
|
||||
$img.attr('src', src).show();
|
||||
|
||||
$('#previewTitle').text('이미지 미리보기');
|
||||
|
||||
|
||||
const modal = new bootstrap.Modal(document.getElementById('previewModal'));
|
||||
modal.show();
|
||||
}
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
96
app/Views/pages/v2/m711/lists.php
Normal file
96
app/Views/pages/v2/m711/lists.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#aptList tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
|
||||
.swal2-cancel {
|
||||
background-color: #ff0000 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>모바일 자동검증</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form class="row align-items-end" id="frm_srch_info" onsubmit="return false;">
|
||||
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">매물번호</label>
|
||||
<input type="text" class="form-control" name="atcl_no">
|
||||
</div>
|
||||
|
||||
<!-- 검색 버튼 -->
|
||||
<div class="col-md-1 d-grid">
|
||||
<button type="button" class="btn btn-primary" id="btnSearch">
|
||||
검색
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header d-flex align-items-center">
|
||||
<div class="d-flex align-items-center flex-wrap" style="gap: 8px; flex: 1">
|
||||
</div>
|
||||
<div class="ml-auto">
|
||||
<button class="btn btn-sm btn-outline-success" id="excel-download">
|
||||
<i class="fa fa-fw" aria-hidden="true" title="file-excel-o"></i>
|
||||
엑셀다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="aptList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>매물번호</th>
|
||||
<th>매물종류</th>
|
||||
<th>거래종류</th>
|
||||
<th>등록시간</th>
|
||||
<th>노출일시</th>
|
||||
<th>주소</th>
|
||||
<th>상세주소</th>
|
||||
<th>매체사</th>
|
||||
<th>중개업소명</th>
|
||||
<th>매물검증방식코드</th>
|
||||
<th>자동검증통과여부</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
1577
app/Views/pages/v2/m712/detail.php
Normal file
1577
app/Views/pages/v2/m712/detail.php
Normal file
File diff suppressed because it is too large
Load Diff
717
app/Views/pages/v2/m712/lists.php
Normal file
717
app/Views/pages/v2/m712/lists.php
Normal file
@@ -0,0 +1,717 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#resultList tbody tr {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-header-tab {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
.table-scroll {
|
||||
max-height: 300px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.swal2-cancel {
|
||||
background-color: #ff0000 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>신홍보확인서 현황</h1>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form id="frm_srch_info" method="get" onsubmit="return false;">
|
||||
<input type="hidden" name="m" id="m" value="M801" />
|
||||
<input type="hidden" name="todo" id="todo" value="inq" />
|
||||
<input type="hidden" name="usr_id" value="" />
|
||||
|
||||
<!-- 안내 -->
|
||||
<div class="alert alert-warning py-2 mb-3">
|
||||
<small class="mb-0">
|
||||
매물번호를 입력하면 <b>다른 조건은 무시</b>됩니다.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- 검색 폼 -->
|
||||
<div class="row g-3">
|
||||
|
||||
<!-- 매물번호 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물번호</label>
|
||||
<input type="text" name="atcl_no" class="form-control form-control-sm" placeholder="매물번호" maxlength="10"
|
||||
onkeypress="atcl_no_enter(event)">
|
||||
</div>
|
||||
|
||||
<!-- 현재상태 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">현재상태</label>
|
||||
<select name="stat_cd" class="form-select form-select-sm">
|
||||
<option value="">-선택-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "STEP_VERIFICATION"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 중개소 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">중개소</label>
|
||||
<input type="text" name="realtor_nm" class="form-control form-control-sm" placeholder="중개소">
|
||||
</div>
|
||||
|
||||
<!-- 배정여부 (2개 셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">배정여부</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="charger_gbn" id="code_charger_gbn" class="form-select form-select-sm">
|
||||
<option value="1">전화/서류담당자</option>
|
||||
<option value="2" selected>등기부등본담당자</option>
|
||||
</select>
|
||||
<select name="assign_yn" id="assign_yn" class="form-select form-select-sm">
|
||||
<option value="A">-전체-</option>
|
||||
<option value="Y">배정</option>
|
||||
<option value="N">미배정</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 접수기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">접수기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="date" class="form-control" name="receipt_sdate" id="receipt_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="date" class="form-control" name="receipt_edate" id="receipt_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 완료기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">완료기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control" name="complete_sdate" id="complete_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="text" class="form-control" name="complete_edate" id="complete_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 지역구분 -->
|
||||
<div class="col-md-4">
|
||||
<label class="form-label mb-1">지역구분</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="srcSido" id="srcSido" class="form-select form-select-sm">
|
||||
<option value="">-시/도-</option>
|
||||
<?php foreach ($sido as $s): ?>
|
||||
<option value="<?= $s['region_cd'] ?>"><?= $s['region_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="srcGugun" id="srcGugun" class="form-select form-select-sm">
|
||||
<option value="">-시/군/구-</option>
|
||||
</select>
|
||||
<select name="srcDong" id="srcDong" class="form-select form-select-sm">
|
||||
<option value="">-읍/면/동-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 담당자 (본부/팀/담당 3셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">담당자</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="bonbu" id="bonbu" class="form-select form-select-sm">
|
||||
<option value="">-본부-</option>
|
||||
<?php foreach ($bonbu as $d): ?>
|
||||
<option value="<?= $d['dept_sq'] ?>"><?= $d['dept_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="team" id="team" class="form-select form-select-sm">
|
||||
<option value="">-팀-</option>
|
||||
</select>
|
||||
<select name="damdang" id="damdang" class="form-select form-select-sm">
|
||||
<option value="">-담당자-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 매체사 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매체사</label>
|
||||
<select name="rcpt_cpid" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "CP_ID"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 매물종류 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물종류</label>
|
||||
<select name="rlet_type_cd" class="form-select form-select-sm">
|
||||
<option value="">-매물종류-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "ARTICLE_TYPE"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 참고용 파일 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">참고용 파일</label>
|
||||
<select name="reference_file_url_yn" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<option value="Y">Y</option>
|
||||
<option value="N">N</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 법인소유 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">소유자 구분</label>
|
||||
<select name="ownerTypeCode" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<option value="0">개인</option>
|
||||
<option value="1">법인</option>
|
||||
<option value="2">외국인</option>
|
||||
<option value="3">위임장</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">서류미수취</label>
|
||||
<select name="document_not_received_yn" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<option value="Y">Y</option>
|
||||
<option value="N">N</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1 d-grid">
|
||||
<label class="form-label mb-1 invisible">검색</label>
|
||||
<button type="button" class="btn btn-primary" id="btnSearch">
|
||||
<i class="pe-7s-search me-1"></i>검색
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1 invisible">배정확인</label>
|
||||
<button type="button" class="btn btn-outline-secondary" id="btnBatch">
|
||||
배정확인
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header d-flex align-items-center">
|
||||
<div class="d-flex align-items-center flex-wrap" style="gap: 8px; flex: 1">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ml-auto">
|
||||
<button class="btn btn-sm btn-outline-success" id="excel-download">
|
||||
<i class="fa fa-fw" aria-hidden="true" title="file-excel-o"></i>
|
||||
엑셀다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table id="resultList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>매물번호</th>
|
||||
<th>진행상태</th>
|
||||
<th>접수시간</th>
|
||||
<th>검증방식</th>
|
||||
<th>주소</th>
|
||||
<th>상세주소</th>
|
||||
<th>매체사</th>
|
||||
<th>중개소</th>
|
||||
<th>등기부등본<br />담당자</th>
|
||||
<th>등기부등본<br />확인시간</th>
|
||||
<th>검증완료<br />일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 여기는 비워둠: AJAX로 채움 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css" />
|
||||
<link href="https://unpkg.com/dropzone@6.0.0-beta.1/dist/dropzone.css" rel="stylesheet" type="text/css" />
|
||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="/architectui/assets/js/datatable.kor.js"></script>
|
||||
<script type="text/javascript" src="https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=dtounkwjc5"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
const date = new Date();
|
||||
const bonbuArr = <?= json_encode($bonbu, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const teamArr = <?= json_encode($team, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const userArr = <?= json_encode($user, JSON_UNESCAPED_UNICODE); ?>;
|
||||
|
||||
var table;
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#bonbu").on("change", function (e) {
|
||||
|
||||
const value = e.target.value
|
||||
|
||||
$("#dept_sq").empty()
|
||||
|
||||
var str = "<option value=''>선택</option>"
|
||||
if (teamArr != null) {
|
||||
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
if (value === teamArr[i].pdept_sq) {
|
||||
str += "<option value='" + teamArr[i].dept_sq + "'>" + teamArr[i].dept_nm + "</option>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#dept_sq").append(str)
|
||||
|
||||
});
|
||||
|
||||
$("#srcSido, #srcGugun, #srcSido2, #srcGugun2").on("change", function (e) {
|
||||
|
||||
const targetId = this.id;
|
||||
|
||||
const isSecond = this.id.endsWith("2");
|
||||
|
||||
const params = {
|
||||
srcSido: isSecond
|
||||
? $("#srcSido2").val()
|
||||
: $("#frm_srch_info [name=srcSido]").val(),
|
||||
|
||||
srcGugun: isSecond
|
||||
? $("#srcGugun2").val()
|
||||
: $("#frm_srch_info [name=srcGugun]").val(),
|
||||
};
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/manage/areas/getAreaList",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
data: params,
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
switch (targetId) {
|
||||
case "srcSido":
|
||||
$("#srcGugun").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>시/군/구</option>";
|
||||
|
||||
if ($("#srcSido").val() !== "") {
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcGugun").append(str);
|
||||
|
||||
break;
|
||||
|
||||
case "srcGugun":
|
||||
$("#srcDong").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>읍/면/동</option>";
|
||||
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcDong").append(str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#bonbu, #team, #bonbu2, #team2").on("change", function (e) {
|
||||
const targetId = this.id;
|
||||
|
||||
|
||||
var str = "";
|
||||
if (targetId === "bonbu" || targetId === "bonbu2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-팀-</option>`;
|
||||
if (teamArr.length > 0) {
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(teamArr[i].pdept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${teamArr[i].dept_sq}">${teamArr[i].dept_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "bonbu") {
|
||||
$("#team").html(str);
|
||||
} else if (targetId === "bonbu2") {
|
||||
$("#team2").html(str);
|
||||
}
|
||||
|
||||
} else if (targetId === "team" || targetId === "team2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-담당자-</option>`;
|
||||
if (userArr.length > 0) {
|
||||
for (var i = 0; i < userArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(userArr[i].dept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${userArr[i].usr_id}">${userArr[i].usr_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "team") {
|
||||
$("#damdang").html(str);
|
||||
} else if (targetId === "team2") {
|
||||
$("#damdang2").html(str);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 검증방식 onchange
|
||||
$("#vrfcreq_way").on("change", function (e) {
|
||||
const val = e.target.value;
|
||||
|
||||
var str = "";
|
||||
str += `<option value="">-선택-</option>`;
|
||||
if (e.val !== "") {
|
||||
$.getJSON("/common/common/getVrfcCode?type=" + val, function (result) {
|
||||
var total = result.length;
|
||||
for (var i = 0; i < total; i++) {
|
||||
var cateNm = result[i].cd_nm;
|
||||
|
||||
if (total == 1) {
|
||||
str += "<option value=\"" + result[i].cd + "\" selected>" + cateNm + "</option>";
|
||||
} else {
|
||||
str += "<option value=\"" + result[i].cd + "\">" + cateNm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#vrfc_type_sub").html(str);
|
||||
});
|
||||
} else {
|
||||
$("#vrfc_type_sub").html(str);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
initReceiptDate();
|
||||
table = $('#resultList').DataTable({
|
||||
language: lang_kor,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
ajax: {
|
||||
url: '/m712/m712a/getResultList',
|
||||
type: 'GET',
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
data: function (d) {
|
||||
|
||||
d.atcl_no = $("#frm_srch_info [name=atcl_no]").val(); // 매물번호
|
||||
d.stat_cd = $("#frm_srch_info [name=stat_cd]").val(); // 현재상태
|
||||
d.realtor_nm = $("#frm_srch_info [name=realtor_nm]").val(); // 중개소
|
||||
d.charger_gbn = $("#frm_srch_info [name=charger_gbn]").val(); // 배정여부
|
||||
d.assign_yn = $("#frm_srch_info [name=assign_yn]").val(); // 배정여부2
|
||||
d.receipt_sdate = $("#frm_srch_info [name=receipt_sdate]").val(); // 접수기간1
|
||||
d.receipt_edate = $("#frm_srch_info [name=receipt_edate]").val(); // 접수기간2
|
||||
d.complete_sdate = $("#frm_srch_info [name=complete_sdate]").val(); // 완료기간1
|
||||
d.complete_edate = $("#frm_srch_info [name=complete_edate]").val(); // 완료기간2
|
||||
d.srcSido = $("#frm_srch_info [name=srcSido]").val(); // 시도
|
||||
d.srcGugun = $("#frm_srch_info [name=srcGugun]").val(); // 시군구
|
||||
d.srcDong = $("#frm_srch_info [name=srcDong]").val(); // 읍면동
|
||||
d.bonbu = $("#frm_srch_info [name=bonbu]").val(); // 본부
|
||||
d.team = $("#frm_srch_info [name=team]").val(); // 팀
|
||||
d.damdang = $("#frm_srch_info [name=damdang]").val(); // 담당
|
||||
d.vrfcreq_way = $("#frm_srch_info [name=vrfcreq_way]").val(); // 검증방식1
|
||||
d.vrfc_type_sub = $("#frm_srch_info [name=vrfc_type_sub]").val(); // 검증방식2
|
||||
d.rcpt_cpid = $("#frm_srch_info [name=rcpt_cpid]").val(); // 매체사
|
||||
d.rlet_type_cd = $("#frm_srch_info [name=rlet_type_cd]").val(); // 매물종류
|
||||
d.reference_file_url_yn = $("#frm_srch_info [name=reference_file_url_yn]").val(); // 참고용
|
||||
d.ownerTypeCode = $("#frm_srch_info [name=ownerTypeCode]").val(); // 소유자구분
|
||||
d.document_not_received_yn = $("#frm_srch_info [name=document_not_received_yn]").val(); // 서류미수취
|
||||
|
||||
d.start = d.start || 0
|
||||
d.length = d.length || 10
|
||||
},
|
||||
},
|
||||
"columnDefs": [
|
||||
{ className: 'text-center', targets: '_all' },
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
],
|
||||
columns: [
|
||||
{ data: 'atcl_no' },
|
||||
{ data: 'pre_stat' },
|
||||
{ data: 'insert_tm' },
|
||||
{ data: 'vrfc_type' },
|
||||
{ data: null, render: fn_region_render },
|
||||
{ data: null, render: fn_addr_render },
|
||||
{ data: 'cpid' },
|
||||
{ data: 'realtor_nm' },
|
||||
{ data: 'reg_charger' },
|
||||
{ data: 'rgbk_check_tm' },
|
||||
{ data: 'result_tm' },
|
||||
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
});
|
||||
|
||||
$('#resultList tbody').on('click', 'tr', function (e) {
|
||||
if ($(e.target).closest('td.dt-no-rowclick').length) return;
|
||||
|
||||
const rowData = table.row(this).data();
|
||||
if (!rowData) return;
|
||||
|
||||
const vr_sq = rowData.vr_sq;
|
||||
location.href = "<?= site_url('m712/m712a/detail') ?>/" + vr_sq;
|
||||
});
|
||||
|
||||
$('#btnSearch').on('click', function () {
|
||||
table.ajax.reload()
|
||||
});
|
||||
|
||||
// 엑셀 다운로드 click
|
||||
$("#excel-download").on("click", function () {
|
||||
$.ajax({
|
||||
url: "/m701/m701a/excel",
|
||||
method: "GET",
|
||||
dataType: "json",
|
||||
data: $("#frm_srch_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
downloadExcel(result.data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
// 접수기간 초기화
|
||||
function initReceiptDate() {
|
||||
|
||||
const before3 = new Date();
|
||||
before3.setDate(date.getDate() - 2);
|
||||
|
||||
const fmt = d => d.toISOString().slice(0, 10);
|
||||
|
||||
$("#frm_srch_info [name=stat_cd]").val("40");
|
||||
|
||||
$('#receipt_sdate').val(fmt(before3));
|
||||
$('#receipt_edate').val(fmt(date));
|
||||
|
||||
}
|
||||
|
||||
|
||||
function atcl_no_enter(event) {
|
||||
if (event.keyCode == 13) {
|
||||
table.ajax.reload()
|
||||
}
|
||||
}
|
||||
|
||||
function fn_region_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
str = row.address;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 주소 render
|
||||
function fn_addr_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
str = row.address_ext;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_tm_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.update_res_tm == null) {
|
||||
str = row.stat_39_tm;
|
||||
} else {
|
||||
str = row.update_res_tm;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 엑셀 다운로드
|
||||
function downloadExcel(data) {
|
||||
const ws = XLSX.utils.json_to_sheet(data);
|
||||
ws['!cols'] = [
|
||||
{ wpx: 80 },
|
||||
{ wpx: 80 },
|
||||
{ wpx: 80 },
|
||||
{ wpx: 80 },
|
||||
{ wpx: 150 },
|
||||
{ wpx: 120 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
];
|
||||
|
||||
const wb = XLSX.utils.book_new();
|
||||
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
|
||||
|
||||
const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
|
||||
|
||||
const blob = new Blob([wbout], { type: 'application/octet-stream' });
|
||||
|
||||
const link = document.createElement("a");
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = "신홍보확인서_현황" + getDateTimeString() + ".xlsx";
|
||||
link.click();
|
||||
URL.revokeObjectURL(link.href);
|
||||
}
|
||||
|
||||
|
||||
function getDateTimeString() {
|
||||
const d = new Date();
|
||||
const yyyy = d.getFullYear();
|
||||
const mm = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const dd = String(d.getDate()).padStart(2, '0');
|
||||
const hh = String(d.getHours()).padStart(2, '0');
|
||||
const mi = String(d.getMinutes()).padStart(2, '0');
|
||||
const ss = String(d.getSeconds()).padStart(2, '0');
|
||||
return `${yyyy}${mm}${dd}${hh}${mi}${ss}`;
|
||||
}
|
||||
|
||||
function extractCode(code) {
|
||||
|
||||
var codeArr = new Array();
|
||||
|
||||
if (codes.length) {
|
||||
|
||||
for (var i = 0; i < codes.length; i++) {
|
||||
|
||||
if (code === codes[i].category) {
|
||||
codeArr.push(codes[i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return codeArr;
|
||||
}
|
||||
|
||||
|
||||
// 이미지 프리뷰
|
||||
function fn_preview(src) {
|
||||
const $img = $('#imgPreview');
|
||||
|
||||
// 이미지 표시
|
||||
$img.attr('src', src).show();
|
||||
|
||||
$('#previewTitle').text('이미지 미리보기');
|
||||
|
||||
|
||||
const modal = new bootstrap.Modal(document.getElementById('previewModal'));
|
||||
modal.show();
|
||||
}
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
1601
app/Views/pages/v2/m713/detail.php
Normal file
1601
app/Views/pages/v2/m713/detail.php
Normal file
File diff suppressed because it is too large
Load Diff
739
app/Views/pages/v2/m713/lists.php
Normal file
739
app/Views/pages/v2/m713/lists.php
Normal file
@@ -0,0 +1,739 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#resultList tbody tr {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-header-tab {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
.table-scroll {
|
||||
max-height: 300px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.swal2-cancel {
|
||||
background-color: #ff0000 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>모바일확인V2 매물현황</h1>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form id="frm_srch_info" method="get" onsubmit="return false;">
|
||||
<input type="hidden" name="m" id="m" value="M801" />
|
||||
<input type="hidden" name="todo" id="todo" value="inq" />
|
||||
<input type="hidden" name="usr_id" value="" />
|
||||
|
||||
<!-- 안내 -->
|
||||
<div class="alert alert-warning py-2 mb-3">
|
||||
<small class="mb-0">
|
||||
매물번호를 입력하면 <b>다른 조건은 무시</b>됩니다.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- 검색 폼 -->
|
||||
<div class="row g-3">
|
||||
|
||||
<!-- 매물번호 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물번호</label>
|
||||
<input type="text" name="atcl_no" class="form-control form-control-sm" placeholder="매물번호" maxlength="10"
|
||||
onkeypress="atcl_no_enter(event)">
|
||||
</div>
|
||||
|
||||
<!-- 현재상태 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">현재상태</label>
|
||||
<select name="stat_cd" class="form-select form-select-sm">
|
||||
<option value="">-선택-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "STEP_VERIFICATION"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 중개소 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">중개소</label>
|
||||
<input type="text" name="realtor_nm" class="form-control form-control-sm" placeholder="중개소">
|
||||
</div>
|
||||
|
||||
<!-- 배정여부 (2개 셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">배정여부</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="charger_gbn" id="code_charger_gbn" class="form-select form-select-sm">
|
||||
<option value="1">전화/서류담당자</option>
|
||||
<option value="2" selected>등기부등본담당자</option>
|
||||
</select>
|
||||
<select name="assign_yn" id="assign_yn" class="form-select form-select-sm">
|
||||
<option value="A">-전체-</option>
|
||||
<option value="Y">배정</option>
|
||||
<option value="N">미배정</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 검증방식 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">검증방식</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="vrfcreq_way" id="vrfcreq_way" class="form-select form-select-sm">
|
||||
<option value="">-검증방식-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "VRFCREQ_WAY"): ?>
|
||||
<option value="<?= $c['cd'] ?>">
|
||||
<?= $c['cd_nm'] ?>
|
||||
</option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="vrfc_type_sub" id="vrfc_type_sub" class="form-select form-select-sm">
|
||||
<option value="">-선택-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 접수기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">접수기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="date" class="form-control" name="receipt_sdate" id="receipt_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="date" class="form-control" name="receipt_edate" id="receipt_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 완료기간 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">완료기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control" name="complete_sdate" id="complete_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="text" class="form-control" name="complete_edate" id="complete_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 지역구분 -->
|
||||
<div class="col-md-4">
|
||||
<label class="form-label mb-1">지역구분</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="srcSido" id="srcSido" class="form-select form-select-sm">
|
||||
<option value="">-시/도-</option>
|
||||
<?php foreach ($sido as $s): ?>
|
||||
<option value="<?= $s['region_cd'] ?>"><?= $s['region_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="srcGugun" id="srcGugun" class="form-select form-select-sm">
|
||||
<option value="">-시/군/구-</option>
|
||||
</select>
|
||||
<select name="srcDong" id="srcDong" class="form-select form-select-sm">
|
||||
<option value="">-읍/면/동-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<!-- 담당자 (본부/팀/담당 3셀렉트) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">담당자</label>
|
||||
<div class="d-flex gap-2">
|
||||
<select name="bonbu" id="bonbu" class="form-select form-select-sm">
|
||||
<option value="">-본부-</option>
|
||||
<?php foreach ($bonbu as $d): ?>
|
||||
<option value="<?= $d['dept_sq'] ?>"><?= $d['dept_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="team" id="team" class="form-select form-select-sm">
|
||||
<option value="">-팀-</option>
|
||||
</select>
|
||||
<select name="damdang" id="damdang" class="form-select form-select-sm">
|
||||
<option value="">-담당자-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 매체사 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매체사</label>
|
||||
<select name="rcpt_cpid" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "CP_ID"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 매물종류 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물종류</label>
|
||||
<select name="rlet_type_cd" class="form-select form-select-sm">
|
||||
<option value="">-매물종류-</option>
|
||||
<?php foreach ($codes as $c): ?>
|
||||
<?php if ($c['category'] === "ARTICLE_TYPE"): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">면적확인</label>
|
||||
<select name="chk_spc_yn" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<option value="Y">Y</option>
|
||||
<option value="N">N</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 법인소유 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">법인소유</label>
|
||||
<select name="corp_own" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<option value="Y">Y</option>
|
||||
<option value="N">N</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 참고용 파일 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">참고용 파일</label>
|
||||
<select name="reference_file_url_yn" class="form-select form-select-sm">
|
||||
<option value="">-전체-</option>
|
||||
<option value="Y">Y</option>
|
||||
<option value="N">N</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 d-grid">
|
||||
<label class="form-label mb-1 invisible">검색</label>
|
||||
<button type="button" class="btn btn-primary" id="btnSearch">
|
||||
<i class="pe-7s-search me-1"></i>검색
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1 invisible">배정확인</label>
|
||||
<button type="button" class="btn btn-outline-secondary" id="btnBatch">
|
||||
배정확인
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header d-flex align-items-center">
|
||||
<div class="d-flex align-items-center flex-wrap" style="gap: 8px; flex: 1">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ml-auto">
|
||||
<button class="btn btn-sm btn-outline-success" id="excel-download">
|
||||
<i class="fa fa-fw" aria-hidden="true" title="file-excel-o"></i>
|
||||
엑셀다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table id="resultList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>매물번호</th>
|
||||
<th>진행상태</th>
|
||||
<th>접수시간</th>
|
||||
<th>검증방식</th>
|
||||
<th>주소</th>
|
||||
<th>상세주소</th>
|
||||
<th>매체사</th>
|
||||
<th>중개소</th>
|
||||
<th>서류/전화<br>담당자</th>
|
||||
<th>서류/전화<br />확인시간</th>
|
||||
<th>등기부등본<br />담당자</th>
|
||||
<th>검증완료<br />일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 여기는 비워둠: AJAX로 채움 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css" />
|
||||
<link href="https://unpkg.com/dropzone@6.0.0-beta.1/dist/dropzone.css" rel="stylesheet" type="text/css" />
|
||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="/architectui/assets/js/datatable.kor.js"></script>
|
||||
<script type="text/javascript" src="https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=dtounkwjc5"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
const date = new Date();
|
||||
const bonbuArr = <?= json_encode($bonbu, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const teamArr = <?= json_encode($team, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const userArr = <?= json_encode($user, JSON_UNESCAPED_UNICODE); ?>;
|
||||
|
||||
var table;
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#bonbu").on("change", function (e) {
|
||||
|
||||
const value = e.target.value
|
||||
|
||||
$("#dept_sq").empty()
|
||||
|
||||
var str = "<option value=''>선택</option>"
|
||||
if (teamArr != null) {
|
||||
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
if (value === teamArr[i].pdept_sq) {
|
||||
str += "<option value='" + teamArr[i].dept_sq + "'>" + teamArr[i].dept_nm + "</option>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#dept_sq").append(str)
|
||||
|
||||
});
|
||||
|
||||
$("#srcSido, #srcGugun, #srcSido2, #srcGugun2").on("change", function (e) {
|
||||
|
||||
const targetId = this.id;
|
||||
|
||||
const isSecond = this.id.endsWith("2");
|
||||
|
||||
const params = {
|
||||
srcSido: isSecond
|
||||
? $("#srcSido2").val()
|
||||
: $("#frm_srch_info [name=srcSido]").val(),
|
||||
|
||||
srcGugun: isSecond
|
||||
? $("#srcGugun2").val()
|
||||
: $("#frm_srch_info [name=srcGugun]").val(),
|
||||
};
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/manage/areas/getAreaList",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
data: params,
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
switch (targetId) {
|
||||
case "srcSido":
|
||||
$("#srcGugun").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>시/군/구</option>";
|
||||
|
||||
if ($("#srcSido").val() !== "") {
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcGugun").append(str);
|
||||
|
||||
break;
|
||||
|
||||
case "srcGugun":
|
||||
$("#srcDong").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>읍/면/동</option>";
|
||||
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcDong").append(str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#bonbu, #team, #bonbu2, #team2").on("change", function (e) {
|
||||
const targetId = this.id;
|
||||
|
||||
|
||||
var str = "";
|
||||
if (targetId === "bonbu" || targetId === "bonbu2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-팀-</option>`;
|
||||
if (teamArr.length > 0) {
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(teamArr[i].pdept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${teamArr[i].dept_sq}">${teamArr[i].dept_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "bonbu") {
|
||||
$("#team").html(str);
|
||||
} else if (targetId === "bonbu2") {
|
||||
$("#team2").html(str);
|
||||
}
|
||||
|
||||
} else if (targetId === "team" || targetId === "team2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-담당자-</option>`;
|
||||
if (userArr.length > 0) {
|
||||
for (var i = 0; i < userArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(userArr[i].dept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${userArr[i].usr_id}">${userArr[i].usr_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "team") {
|
||||
$("#damdang").html(str);
|
||||
} else if (targetId === "team2") {
|
||||
$("#damdang2").html(str);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 검증방식 onchange
|
||||
$("#vrfcreq_way").on("change", function (e) {
|
||||
const val = e.target.value;
|
||||
|
||||
var str = "";
|
||||
str += `<option value="">-선택-</option>`;
|
||||
if (e.val !== "") {
|
||||
$.getJSON("/common/common/getVrfcCode?type=" + val, function (result) {
|
||||
var total = result.length;
|
||||
for (var i = 0; i < total; i++) {
|
||||
var cateNm = result[i].cd_nm;
|
||||
|
||||
if (total == 1) {
|
||||
str += "<option value=\"" + result[i].cd + "\" selected>" + cateNm + "</option>";
|
||||
} else {
|
||||
str += "<option value=\"" + result[i].cd + "\">" + cateNm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#vrfc_type_sub").html(str);
|
||||
});
|
||||
} else {
|
||||
$("#vrfc_type_sub").html(str);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
initReceiptDate();
|
||||
table = $('#resultList').DataTable({
|
||||
language: lang_kor,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
ajax: {
|
||||
url: '/m713/m713a/getResultList',
|
||||
type: 'GET',
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
data: function (d) {
|
||||
|
||||
d.atcl_no = $("#frm_srch_info [name=atcl_no]").val(); // 매물번호
|
||||
d.stat_cd = $("#frm_srch_info [name=stat_cd]").val(); // 현재상태
|
||||
d.realtor_nm = $("#frm_srch_info [name=realtor_nm]").val(); // 중개소
|
||||
d.charger_gbn = $("#frm_srch_info [name=charger_gbn]").val(); // 배정여부
|
||||
d.assign_yn = $("#frm_srch_info [name=assign_yn]").val(); // 배정여부2
|
||||
d.receipt_sdate = $("#frm_srch_info [name=receipt_sdate]").val(); // 접수기간1
|
||||
d.receipt_edate = $("#frm_srch_info [name=receipt_edate]").val(); // 접수기간2
|
||||
d.complete_sdate = $("#frm_srch_info [name=complete_sdate]").val(); // 완료기간1
|
||||
d.complete_edate = $("#frm_srch_info [name=complete_edate]").val(); // 완료기간2
|
||||
d.srcSido = $("#frm_srch_info [name=srcSido]").val(); // 시도
|
||||
d.srcGugun = $("#frm_srch_info [name=srcGugun]").val(); // 시군구
|
||||
d.srcDong = $("#frm_srch_info [name=srcDong]").val(); // 읍면동
|
||||
d.bonbu = $("#frm_srch_info [name=bonbu]").val(); // 본부
|
||||
d.team = $("#frm_srch_info [name=team]").val(); // 팀
|
||||
d.damdang = $("#frm_srch_info [name=damdang]").val(); // 담당
|
||||
d.vrfcreq_way = $("#frm_srch_info [name=vrfcreq_way]").val(); // 검증방식1
|
||||
d.vrfc_type_sub = $("#frm_srch_info [name=vrfc_type_sub]").val(); // 검증방식2
|
||||
d.rcpt_cpid = $("#frm_srch_info [name=rcpt_cpid]").val(); // 매체사
|
||||
d.rlet_type_cd = $("#frm_srch_info [name=rlet_type_cd]").val(); // 매물종류
|
||||
d.chk_spc_yn = $("#frm_srch_info [name=chk_spc_yn]").val(); // 면적확인
|
||||
d.reference_file_url_yn = $("#frm_srch_info [name=reference_file_url_yn]").val(); // 참고용
|
||||
d.corp_own = $("#frm_srch_info [name=corp_own]").val(); // 법인소유
|
||||
|
||||
d.start = d.start || 0
|
||||
d.length = d.length || 10
|
||||
},
|
||||
},
|
||||
"columnDefs": [
|
||||
{ className: 'text-center', targets: '_all' },
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
],
|
||||
columns: [
|
||||
{ data: 'atcl_no' },
|
||||
{ data: 'pre_stat' },
|
||||
{ data: 'insert_tm' },
|
||||
{ data: 'vrfc_type' },
|
||||
{ data: null, render: fn_region_render },
|
||||
{ data: null, render: fn_addr_render },
|
||||
{ data: 'cpid' },
|
||||
{ data: 'realtor_nm' },
|
||||
{ data: 'usr_nm' },
|
||||
{ data: null, render: fn_tm_render },
|
||||
{ data: 'reg_charger' },
|
||||
{ data: 'result_tm' },
|
||||
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
});
|
||||
|
||||
$('#resultList tbody').on('click', 'tr', function (e) {
|
||||
if ($(e.target).closest('td.dt-no-rowclick').length) return;
|
||||
|
||||
const rowData = table.row(this).data();
|
||||
if (!rowData) return;
|
||||
|
||||
const vr_sq = rowData.vr_sq;
|
||||
location.href = "<?= site_url('m713/m713a/detail') ?>/" + vr_sq;
|
||||
});
|
||||
|
||||
$('#btnSearch').on('click', function () {
|
||||
table.ajax.reload()
|
||||
});
|
||||
|
||||
// 엑셀 다운로드 click
|
||||
$("#excel-download").on("click", function () {
|
||||
$.ajax({
|
||||
url: "/m701/m701a/excel",
|
||||
method: "GET",
|
||||
dataType: "json",
|
||||
data: $("#frm_srch_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
downloadExcel(result.data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
// 접수기간 초기화
|
||||
function initReceiptDate() {
|
||||
|
||||
const before3 = new Date();
|
||||
before3.setDate(date.getDate() - 2);
|
||||
|
||||
const fmt = d => d.toISOString().slice(0, 10);
|
||||
|
||||
$("#frm_srch_info [name=stat_cd]").val("40");
|
||||
$("#bonbu").val("3");
|
||||
|
||||
$('#receipt_sdate').val(fmt(before3));
|
||||
$('#receipt_edate').val(fmt(date));
|
||||
|
||||
}
|
||||
|
||||
|
||||
function atcl_no_enter(event) {
|
||||
if (event.keyCode == 13) {
|
||||
table.ajax.reload()
|
||||
}
|
||||
}
|
||||
|
||||
function fn_region_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
str = row.region_nm + " " + row.rm_no;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 주소 render
|
||||
function fn_addr_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
str = row.address2a + " ";
|
||||
if (row.address2b == null) {
|
||||
str += row.address2 + " " + row.address3;
|
||||
} else {
|
||||
str += row.address2b + " " + row.address3;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function fn_tm_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
if (row.update_res_tm == null) {
|
||||
str = row.stat_39_tm;
|
||||
} else {
|
||||
str = row.update_res_tm;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 엑셀 다운로드
|
||||
function downloadExcel(data) {
|
||||
const ws = XLSX.utils.json_to_sheet(data);
|
||||
ws['!cols'] = [
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 150 },
|
||||
{ wpx: 120 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
];
|
||||
|
||||
const wb = XLSX.utils.book_new();
|
||||
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
|
||||
|
||||
const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
|
||||
|
||||
const blob = new Blob([wbout], { type: 'application/octet-stream' });
|
||||
|
||||
const link = document.createElement("a");
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = "모바일확인V2_매물현황" + getDateTimeString() + ".xlsx";
|
||||
link.click();
|
||||
URL.revokeObjectURL(link.href);
|
||||
}
|
||||
|
||||
|
||||
function getDateTimeString() {
|
||||
const d = new Date();
|
||||
const yyyy = d.getFullYear();
|
||||
const mm = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const dd = String(d.getDate()).padStart(2, '0');
|
||||
const hh = String(d.getHours()).padStart(2, '0');
|
||||
const mi = String(d.getMinutes()).padStart(2, '0');
|
||||
const ss = String(d.getSeconds()).padStart(2, '0');
|
||||
return `${yyyy}${mm}${dd}${hh}${mi}${ss}`;
|
||||
}
|
||||
|
||||
function extractCode(code) {
|
||||
|
||||
var codeArr = new Array();
|
||||
|
||||
if (codes.length) {
|
||||
|
||||
for (var i = 0; i < codes.length; i++) {
|
||||
|
||||
if (code === codes[i].category) {
|
||||
codeArr.push(codes[i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return codeArr;
|
||||
}
|
||||
|
||||
|
||||
// 이미지 프리뷰
|
||||
function fn_preview(src) {
|
||||
const $img = $('#imgPreview');
|
||||
|
||||
// 이미지 표시
|
||||
$img.attr('src', src).show();
|
||||
|
||||
$('#previewTitle').text('이미지 미리보기');
|
||||
|
||||
|
||||
const modal = new bootstrap.Modal(document.getElementById('previewModal'));
|
||||
modal.show();
|
||||
}
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
BIN
public/plugin/img/pdf.png
Normal file
BIN
public/plugin/img/pdf.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
BIN
public/plugin/img/zip.png
Normal file
BIN
public/plugin/img/zip.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 784 B |
Reference in New Issue
Block a user