Compare commits
9 Commits
fc4ce793e3
...
feature/te
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d87a209e0 | ||
|
|
a7dca8c5fa | ||
|
|
9a27018922 | ||
|
|
8b621a065e | ||
| 53695a1dc3 | |||
|
|
d92bbfef1a | ||
|
|
4a8178b185 | ||
| b9b3f43956 | |||
|
|
790216404c |
@@ -67,11 +67,13 @@ $routes->group('', ['namespace' => 'App\Controllers\Article'], static function (
|
|||||||
$routes->get('excel', 'Receipt::excel');
|
$routes->get('excel', 'Receipt::excel');
|
||||||
|
|
||||||
$routes->post('saveTel', 'Receipt::saveTel'); // 연락가능전화 저장
|
$routes->post('saveTel', 'Receipt::saveTel'); // 연락가능전화 저장
|
||||||
|
$routes->post('resDbYn', 'Receipt::resDbYn'); // 거주여부 저장
|
||||||
$routes->post('resGround', 'Receipt::resGround'); // 평면도요청 저장
|
$routes->post('resGround', 'Receipt::resGround'); // 평면도요청 저장
|
||||||
$routes->post('assignRegist', 'Receipt::assignRegist'); // 예약확정 저장
|
$routes->post('assignRegist', 'Receipt::assignRegist'); // 예약확정 저장
|
||||||
$routes->post('requestMovie', 'Receipt::requestMovie'); // 동영상 촬영여부저장
|
$routes->post('requestMovie', 'Receipt::requestMovie'); // 동영상 촬영여부저장
|
||||||
$routes->post('requestMessage', 'Receipt::requestMessage'); // 중개사메모 저장
|
$routes->post('requestMessage', 'Receipt::requestMessage'); // 중개사메모 저장
|
||||||
$routes->post('rsrvcancel', 'Receipt::rsrvcancel'); // 예약취소
|
$routes->post('rsrvcancel', 'Receipt::rsrvcancel'); // 예약취소
|
||||||
|
$routes->post('chgStatus', 'Receipt::chgStatus'); // 상태변경
|
||||||
$routes->post('sendSms', 'Receipt::sendSms'); // 문자발송
|
$routes->post('sendSms', 'Receipt::sendSms'); // 문자발송
|
||||||
$routes->post('saveRecInfo', 'Receipt::saveRecInfo'); // 거주인정보저장
|
$routes->post('saveRecInfo', 'Receipt::saveRecInfo'); // 거주인정보저장
|
||||||
$routes->post('uploadFile', 'Receipt::uploadFile'); // 파일업로드
|
$routes->post('uploadFile', 'Receipt::uploadFile'); // 파일업로드
|
||||||
@@ -324,7 +326,8 @@ $routes->group('', ['namespace' => 'App\Controllers\V2'], static function ($rout
|
|||||||
$routes->post('m708a/saveBunyang', 'M708::saveBunyang'); // 분양권 저장
|
$routes->post('m708a/saveBunyang', 'M708::saveBunyang'); // 분양권 저장
|
||||||
$routes->post('m708a/saveRequestMessage', 'M708::saveRequestMessage'); // 중개인 요청사항 저장
|
$routes->post('m708a/saveRequestMessage', 'M708::saveRequestMessage'); // 중개인 요청사항 저장
|
||||||
$routes->post('m708a/saveResult', 'M708::saveResult'); // 결과저장
|
$routes->post('m708a/saveResult', 'M708::saveResult'); // 결과저장
|
||||||
$routes->post('m708a/saveBunyangCnt', 'M708::saveBunyangCnt'); // 분양계약서저장
|
$routes->post('m708a/saveBunyangCnt', 'M708::saveBunyangCnt'); // 분양계약서조회
|
||||||
|
$routes->post('m708a/saveResult3', 'M708::saveResult3'); // 분양계약서저장
|
||||||
$routes->post('m708a/getNextFaxImgs', 'M708::getNextFaxImgs'); // 다음매물
|
$routes->post('m708a/getNextFaxImgs', 'M708::getNextFaxImgs'); // 다음매물
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -413,7 +416,8 @@ $routes->group('', ['namespace' => 'App\Controllers\V2'], static function ($rout
|
|||||||
$routes->get('m713a/excel', 'M713::excel');
|
$routes->get('m713a/excel', 'M713::excel');
|
||||||
$routes->post('m713a/rotateImage', 'M713::rotateImage'); // 이미지 회전
|
$routes->post('m713a/rotateImage', 'M713::rotateImage'); // 이미지 회전
|
||||||
$routes->post('m713a/saveCorpOwn', 'M713::saveCorpOwn'); // 법인매물저장
|
$routes->post('m713a/saveCorpOwn', 'M713::saveCorpOwn'); // 법인매물저장
|
||||||
$routes->post('m713a/saveRegi', 'M713::saveRegi'); // 매물저장
|
$routes->post('m713a/saveModify', 'M713::saveModify');
|
||||||
|
$routes->post('m713a/saveRegi', 'M713::saveRegi'); // 등기부등본 저장
|
||||||
$routes->post('m713a/nextRegi', 'M713::nextRegi'); // 다음매물
|
$routes->post('m713a/nextRegi', 'M713::nextRegi'); // 다음매물
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,8 +5,11 @@ use App\Controllers\BaseController;
|
|||||||
|
|
||||||
use App\Libraries\Common;
|
use App\Libraries\Common;
|
||||||
use App\Libraries\MyUpload;
|
use App\Libraries\MyUpload;
|
||||||
|
use App\Libraries\NaverApiClient;
|
||||||
|
use App\Models\article\DeptModel;
|
||||||
use App\Models\article\ReceiptModel;
|
use App\Models\article\ReceiptModel;
|
||||||
use App\Models\common\CodeModel;
|
use App\Models\common\CodeModel;
|
||||||
|
use Exception;
|
||||||
|
|
||||||
class Receipt extends BaseController
|
class Receipt extends BaseController
|
||||||
{
|
{
|
||||||
@@ -20,18 +23,31 @@ class Receipt extends BaseController
|
|||||||
|
|
||||||
public function lists(): string
|
public function lists(): string
|
||||||
{
|
{
|
||||||
|
$usr_id = $this->request->getGet('usr_id') ?: '';
|
||||||
|
$sBonbu = $this->request->getGet('bonbu') ?: '';
|
||||||
|
$sTeanm = $this->request->getGet('dept_sq') ?: '';
|
||||||
|
|
||||||
$codes = $this->codeModel->getCodeLists(['NHN_DEAL_TYPE', 'CP_ID', 'ARTICLE_TYPE', 'VRFCREQ_WAY', 'STEP_VERIFICATION']); // 코드조회
|
$codes = $this->codeModel->getCodeLists(['NHN_DEAL_TYPE', 'CP_ID', 'ARTICLE_TYPE', 'VRFCREQ_WAY', 'STEP_VERIFICATION']); // 코드조회
|
||||||
$sido = $this->model->getAreaList(); // 지역조회
|
$sido = $this->model->getAreaList(); // 지역조회
|
||||||
$bonbu = $this->model->getBonbuList();
|
$bonbu = $this->model->getBonbuList();
|
||||||
$team = $this->model->getTeamList();
|
$team = $this->model->getTeamList();
|
||||||
$user = $this->model->getUserList();
|
$user = $this->model->getUserList();
|
||||||
|
|
||||||
|
|
||||||
$this->data['sido'] = $sido;
|
$this->data['sido'] = $sido;
|
||||||
$this->data['bonbu'] = $bonbu;
|
$this->data['bonbu'] = $bonbu;
|
||||||
$this->data['team'] = $team;
|
$this->data['team'] = $team;
|
||||||
$this->data['user'] = $user;
|
$this->data['user'] = $user;
|
||||||
$this->data['codes'] = $codes;
|
$this->data['codes'] = $codes;
|
||||||
|
|
||||||
|
if (!empty($usr_id)) {
|
||||||
|
$srchUser = $this->model->getSrchUserInfo($usr_id);
|
||||||
|
$this->data['srchUser'] = $srchUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->data['sBonbu'] = $sBonbu;
|
||||||
|
$this->data['sTeanm'] = $sTeanm;
|
||||||
|
|
||||||
|
|
||||||
return view("pages/article/receipt/lists", $this->data);
|
return view("pages/article/receipt/lists", $this->data);
|
||||||
}
|
}
|
||||||
@@ -143,6 +159,7 @@ class Receipt extends BaseController
|
|||||||
// 상세화면
|
// 상세화면
|
||||||
public function detail($id)
|
public function detail($id)
|
||||||
{
|
{
|
||||||
|
$naver = new NaverApiClient();
|
||||||
$id = (string) $id;
|
$id = (string) $id;
|
||||||
|
|
||||||
if ($id === '') {
|
if ($id === '') {
|
||||||
@@ -161,6 +178,10 @@ class Receipt extends BaseController
|
|||||||
$team = $this->model->getTeamList();
|
$team = $this->model->getTeamList();
|
||||||
log_message('info', '[Receipt::detail] getTeamList {ms}ms', ['ms' => (int) ((microtime(true) - $t2) * 1000)]);
|
log_message('info', '[Receipt::detail] getTeamList {ms}ms', ['ms' => (int) ((microtime(true) - $t2) * 1000)]);
|
||||||
|
|
||||||
|
$damdang = $this->model->getUserList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// sms 코드
|
// sms 코드
|
||||||
$sms = [];
|
$sms = [];
|
||||||
foreach ($codes as $c) {
|
foreach ($codes as $c) {
|
||||||
@@ -209,6 +230,9 @@ class Receipt extends BaseController
|
|||||||
$tmCount = $this->model->getUsrRsrvDateTmCount($id);
|
$tmCount = $this->model->getUsrRsrvDateTmCount($id);
|
||||||
log_message('info', '[Receipt::detail] getUsrRsrvDateTmCount {ms}ms', ['ms' => (int) ((microtime(true) - $t10) * 1000)]);
|
log_message('info', '[Receipt::detail] getUsrRsrvDateTmCount {ms}ms', ['ms' => (int) ((microtime(true) - $t10) * 1000)]);
|
||||||
|
|
||||||
|
// 당일 방문예정 매물.
|
||||||
|
$assignList = $this->model->getAssignReceiptListByUser($data['rsrv_date'], $data['usr_sq'], array($id));
|
||||||
|
|
||||||
// 체크리스트 조회
|
// 체크리스트 조회
|
||||||
$t11 = microtime(true);
|
$t11 = microtime(true);
|
||||||
if ($data['exp_photo_yn'] === "N") {
|
if ($data['exp_photo_yn'] === "N") {
|
||||||
@@ -217,13 +241,30 @@ class Receipt extends BaseController
|
|||||||
$result_check = [];
|
$result_check = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$pdept = '';
|
||||||
|
if (!empty($data['dept_sq'])) {
|
||||||
|
$pdept = $this->model->getDeptDetail($data['dept_sq']);
|
||||||
|
} else {
|
||||||
|
$pdept = $this->model->getDeptDetail($data['region_dept_sq']);
|
||||||
|
}
|
||||||
|
|
||||||
$complexList = [];
|
$complexList = [];
|
||||||
$ptpList = [];
|
$ptpList = [];
|
||||||
|
|
||||||
|
// print_r($data);
|
||||||
|
// exit;
|
||||||
|
|
||||||
if ($data['comp_sq'] == '2') {
|
if ($data['comp_sq'] == '2') {
|
||||||
// $callApi = new CallApi();
|
// 아파트단지목록
|
||||||
|
$complexList = $naver->complexList($data['rcpt_dong']);
|
||||||
|
|
||||||
|
// 평형목록
|
||||||
|
$ptpList = $naver->ptpList($data['rcpt_hscp_no']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// print_r($ptpList);
|
||||||
|
// exit;
|
||||||
|
|
||||||
log_message('info', '[Receipt::detail] getChecklist {ms}ms', ['ms' => (int) ((microtime(true) - $t11) * 1000)]);
|
log_message('info', '[Receipt::detail] getChecklist {ms}ms', ['ms' => (int) ((microtime(true) - $t11) * 1000)]);
|
||||||
|
|
||||||
log_message('info', '[Receipt::detail] total {ms}ms', ['ms' => (int) ((microtime(true) - $t0) * 1000)]);
|
log_message('info', '[Receipt::detail] total {ms}ms', ['ms' => (int) ((microtime(true) - $t0) * 1000)]);
|
||||||
@@ -231,9 +272,13 @@ class Receipt extends BaseController
|
|||||||
$this->data['codes'] = $codes;
|
$this->data['codes'] = $codes;
|
||||||
$this->data['bonbu'] = $bonbu;
|
$this->data['bonbu'] = $bonbu;
|
||||||
$this->data['team'] = $team;
|
$this->data['team'] = $team;
|
||||||
|
$this->data['damdang'] = $damdang;
|
||||||
|
$this->data['pdept'] = $pdept;
|
||||||
|
|
||||||
$this->data['sms'] = $sms;
|
$this->data['sms'] = $sms;
|
||||||
|
|
||||||
$this->data['data'] = $data;
|
$this->data['data'] = $data;
|
||||||
|
$this->data['assignList'] = $assignList;
|
||||||
$this->data['history'] = $history;
|
$this->data['history'] = $history;
|
||||||
|
|
||||||
$this->data['dupleGroundPlan'] = $dupleGroundPlan;
|
$this->data['dupleGroundPlan'] = $dupleGroundPlan;
|
||||||
@@ -247,6 +292,9 @@ class Receipt extends BaseController
|
|||||||
$this->data['tmCount'] = $tmCount;
|
$this->data['tmCount'] = $tmCount;
|
||||||
$this->data['result_check'] = $result_check;
|
$this->data['result_check'] = $result_check;
|
||||||
|
|
||||||
|
$this->data['complexList'] = $complexList;
|
||||||
|
$this->data['ptpList'] = $ptpList;
|
||||||
|
|
||||||
|
|
||||||
return view("pages/article/receipt/detail", $this->data);
|
return view("pages/article/receipt/detail", $this->data);
|
||||||
}
|
}
|
||||||
@@ -275,6 +323,48 @@ class Receipt extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 거주여부 저장
|
||||||
|
public function resDbYn()
|
||||||
|
{
|
||||||
|
$naver = new NaverApiClient();
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
$rcpt_key = $this->request->getPost('rcpt_key');
|
||||||
|
$rcpt_sq = $this->request->getPost('rcpt_sq');
|
||||||
|
$rsrv_sq = $this->request->getPost('rsrv_sq');
|
||||||
|
$res_yn = $this->request->getPost('resYn');
|
||||||
|
$dbUsageAgrYn = $this->request->getPost('dbUsageAgrYn');
|
||||||
|
|
||||||
|
$this->model->saveResDB($rcpt_sq, $rsrv_sq, $res_yn, $dbUsageAgrYn);
|
||||||
|
|
||||||
|
$receipt = $this->getDetail($rcpt_key);
|
||||||
|
if ($res_yn == 'Y') {
|
||||||
|
$isResidentsExist = true;
|
||||||
|
} else {
|
||||||
|
$isResidentsExist = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$api_result = $naver->residentsExistence($rcpt_key, $isResidentsExist);
|
||||||
|
|
||||||
|
|
||||||
|
if (!isset($api_result['result'])) {
|
||||||
|
throw new \Exception('API 통신오류입니다.\n다시 저장하여 주십시요.');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '0',
|
||||||
|
'msg' => 'success'
|
||||||
|
]);
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '9',
|
||||||
|
'msg' => $e->getMessage(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 평면도요청 저장
|
// 평면도요청 저장
|
||||||
public function resGround()
|
public function resGround()
|
||||||
{
|
{
|
||||||
@@ -302,13 +392,42 @@ class Receipt extends BaseController
|
|||||||
// 예약확정 저장
|
// 예약확정 저장
|
||||||
public function assignRegist()
|
public function assignRegist()
|
||||||
{
|
{
|
||||||
|
$naver = new NaverApiClient();
|
||||||
|
$deptModel = new DeptModel();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
//전달받은 값
|
||||||
|
$rcpt_sq = $this->request->getPost('rcpt_sq');
|
||||||
|
$rcpt_key = $this->request->getPost('rcpt_key');
|
||||||
|
$rsrv_sq = $this->request->getPost('rsrv_sq');
|
||||||
|
$rsrv_date = $this->request->getPost('rsrv_date');
|
||||||
|
$rsrv_tm_ap = $this->request->getPost('rsrv_tm_ap');
|
||||||
|
$rsrv_tm_hour = $this->request->getPost('rsrv_tm_hour');
|
||||||
|
$bonbu = $this->request->getPost('bonbu');
|
||||||
|
$dept_sq = $this->request->getPost('dept_sq');
|
||||||
|
$usr_sq = $this->request->getPost('usr_sq');
|
||||||
|
|
||||||
|
$bonbuInfo = $deptModel->getDeptDetail($bonbu);
|
||||||
|
$deptInfo = $deptModel->getDeptDetail($dept_sq);
|
||||||
|
$userInfo = $this->model->getUserDetail($usr_sq);
|
||||||
|
$receipt = $this->model->getDetail($rcpt_key);
|
||||||
|
|
||||||
|
/*** 네이버 연동[s] ***/
|
||||||
|
$na_result = $naver->reserveSuccess($rcpt_key, 'Y', $bonbuInfo['dept_nm'], $deptInfo['dept_nm'], $userInfo['usr_nm'], $userInfo['usr_tel1'], $rsrv_date, $rsrv_tm_ap);
|
||||||
|
/*** 네이버 연동[e] ***/
|
||||||
|
|
||||||
|
if (array_key_exists('result', $na_result)) { //네이버연동 상태변경 완료
|
||||||
|
$result = $this->model->assignRegist($rcpt_sq, $rsrv_date, $rsrv_tm_ap, $rsrv_tm_hour, $dept_sq, $usr_sq, $receipt);
|
||||||
|
|
||||||
return $this->response->setJSON([
|
return $this->response->setJSON([
|
||||||
'code' => '0',
|
'code' => '0',
|
||||||
'msg' => 'success'
|
'msg' => 'success'
|
||||||
]);
|
]);
|
||||||
|
} else {
|
||||||
|
throw new \Exception($na_result['message']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return $this->response->setJSON([
|
return $this->response->setJSON([
|
||||||
@@ -371,10 +490,44 @@ class Receipt extends BaseController
|
|||||||
// 예약취소
|
// 예약취소
|
||||||
public function rsrvcancel()
|
public function rsrvcancel()
|
||||||
{
|
{
|
||||||
|
$naver = new NaverApiClient();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
//전달받은 값
|
||||||
|
$rcpt_sq = $this->request->getPost('rcpt_sq');
|
||||||
|
$rsrv_sq = $this->request->getPost('rsrv_sq');
|
||||||
|
$rcpt_key = $this->request->getPost('rcpt_key');
|
||||||
|
$result_cd2 = $this->request->getPost('result_cd2');
|
||||||
|
$result_cd3 = $this->request->getPost('result_cd3');
|
||||||
|
$result_msg = $this->request->getPost('result_msg');
|
||||||
|
$rcpt_stat1 = $this->request->getPost('rcpt_stat1');
|
||||||
|
|
||||||
|
$receipt = $this->model->getDetail($rcpt_key);
|
||||||
|
|
||||||
|
/*** 네이버 연동[s] ***/
|
||||||
|
if ($result_cd2 == '9010' || $result_cd2 == '9020') { //예약취소
|
||||||
|
$na_result = $naver->reserveFail($rcpt_key, "E11", $result_msg);
|
||||||
|
} else if ($result_cd2 == '9030') {
|
||||||
|
if ($rcpt_stat1 == '70') {
|
||||||
|
throw new \Exception('방문전 취소 할 수 없습니다.');
|
||||||
|
} else {
|
||||||
|
$na_result = $naver->shootFail($rcpt_key, "E21", $result_msg);
|
||||||
|
}
|
||||||
|
} else if ($result_cd2 == '9040') {
|
||||||
|
$na_result = $naver->shootFail($rcpt_key, "E22", $result_msg);
|
||||||
|
} else if ($result_cd2 == '9045') {
|
||||||
|
$na_result = $naver->shootFail($rcpt_key, "E23", $result_msg);
|
||||||
|
} else if ($result_cd2 == '9050') {
|
||||||
|
$na_result = $naver->inspectFail($rcpt_key, 'E31', $result_msg);
|
||||||
|
}
|
||||||
|
/*** 네이버 연동[e] ***/
|
||||||
|
|
||||||
|
if (array_key_exists('result', $na_result)) { //네이버연동 상태변경 완료
|
||||||
|
$result = $this->model->rsrvcancel($rcpt_sq, $rsrv_sq, $result_cd2, $result_cd3, $result_msg, $receipt);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
throw new \Exception($na_result['message']);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->response->setJSON([
|
return $this->response->setJSON([
|
||||||
'code' => '0',
|
'code' => '0',
|
||||||
@@ -389,6 +542,55 @@ class Receipt extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 상태변경
|
||||||
|
public function chgStatus()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
$rcpt_sq = $this->request->getPost('rcpt_sq');
|
||||||
|
$rcpt_key = $this->request->getPost('rcpt_key');
|
||||||
|
$rcpt_stat = $this->request->getGet('rcpt_stat');
|
||||||
|
$rsrv_sq = $this->request->getPost('rsrv_sq');
|
||||||
|
$req_rec_yn = $this->request->getGet('reqRecYn');
|
||||||
|
|
||||||
|
$rsrv_date = $this->request->getPost('rsrv_date');
|
||||||
|
$rsrv_tm_ap = $this->request->getPost('rsrv_tm_ap');
|
||||||
|
$rsrv_tm_hour = $this->request->getPost('rsrv_tm_hour');
|
||||||
|
$bonbu = $this->request->getPost('bonbu');
|
||||||
|
$dept_sq = $this->request->getPost('dept_sq');
|
||||||
|
$usr_sq = $this->request->getPost('usr_sq');
|
||||||
|
|
||||||
|
$rletTypeCd = $this->request->getGet('rletTypeCd');
|
||||||
|
|
||||||
|
// 파라미터 디버그 로깅
|
||||||
|
$p = [
|
||||||
|
'rcpt_sq' => $rcpt_sq,
|
||||||
|
'rcpt_key' => $rcpt_key,
|
||||||
|
'rcpt_stat' => $rcpt_stat,
|
||||||
|
'rsrv_sq' => $rsrv_sq,
|
||||||
|
'req_rec_yn' => $req_rec_yn,
|
||||||
|
'rsrv_date' => $rsrv_date,
|
||||||
|
'rsrv_tm_ap' => $rsrv_tm_ap,
|
||||||
|
'rsrv_tm_hour' => $rsrv_tm_hour,
|
||||||
|
'bonbu' => $bonbu,
|
||||||
|
'dept_sq' => $dept_sq,
|
||||||
|
'usr_sq' => $usr_sq,
|
||||||
|
'rletTypeCd' => $rletTypeCd,
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
print_r($p);
|
||||||
|
exit;
|
||||||
|
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '9',
|
||||||
|
'msg' => $e->getMessage(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 문자발송
|
// 문자발송
|
||||||
public function sendSms()
|
public function sendSms()
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ class M703 extends BaseController
|
|||||||
// 상세화면
|
// 상세화면
|
||||||
public function detail($id)
|
public function detail($id)
|
||||||
{
|
{
|
||||||
|
$naver = new NaverApiClient();
|
||||||
$id = (string) $id;
|
$id = (string) $id;
|
||||||
|
|
||||||
if ($id === '') {
|
if ($id === '') {
|
||||||
@@ -162,11 +163,11 @@ class M703 extends BaseController
|
|||||||
$apt_rlet_type_cd = ['A01', 'A02', 'A03', 'A04', 'B01', 'B02', 'B03'];
|
$apt_rlet_type_cd = ['A01', 'A02', 'A03', 'A04', 'B01', 'B02', 'B03'];
|
||||||
$villa_rlet_type_cd = ['A05', 'A06'];
|
$villa_rlet_type_cd = ['A05', 'A06'];
|
||||||
if (in_array($article['rlet_type_cd'], $apt_rlet_type_cd)) { // apt 단지
|
if (in_array($article['rlet_type_cd'], $apt_rlet_type_cd)) { // apt 단지
|
||||||
// $detail_hscp = $this->call_kiso_api->aptDetail($article['hscp_no']);
|
$detail_hscp = $naver->aptDetail($article['hscp_no']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($article['rlet_type_cd'], $villa_rlet_type_cd)) { // villa 단지
|
if (in_array($article['rlet_type_cd'], $villa_rlet_type_cd)) { // villa 단지
|
||||||
// $detail_hscp = $this->call_kiso_api->villaDetail($article['hscp_no']);
|
$detail_hscp = $naver->villaDetail($article['hscp_no']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->data['hscp_info'] = $hscp_info;
|
$this->data['hscp_info'] = $hscp_info;
|
||||||
|
|||||||
@@ -547,7 +547,7 @@ class M706 extends BaseController
|
|||||||
|
|
||||||
//memo 저장
|
//memo 저장
|
||||||
if (!empty($memo)) {
|
if (!empty($memo)) {
|
||||||
$this->model->updateMemo([$memo, $atcl_vr_sq]);
|
$this->model->saveMemo([$memo, $atcl_vr_sq]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//API 호출
|
//API 호출
|
||||||
|
|||||||
@@ -3,8 +3,12 @@ namespace App\Controllers\V2;
|
|||||||
|
|
||||||
use App\Controllers\BaseController;
|
use App\Controllers\BaseController;
|
||||||
use App\Libraries\Common;
|
use App\Libraries\Common;
|
||||||
|
use App\Libraries\NaverApiClient;
|
||||||
use App\Models\common\CodeModel;
|
use App\Models\common\CodeModel;
|
||||||
|
use App\Models\results\M415Model;
|
||||||
use App\Models\v2\M708Model;
|
use App\Models\v2\M708Model;
|
||||||
|
use App\Models\v2\M710Model;
|
||||||
|
use Exception;
|
||||||
|
|
||||||
class M708 extends BaseController
|
class M708 extends BaseController
|
||||||
{
|
{
|
||||||
@@ -129,7 +133,6 @@ class M708 extends BaseController
|
|||||||
$data = $this->model->getDetail($id);
|
$data = $this->model->getDetail($id);
|
||||||
$memo = $this->model->getMemo($id);
|
$memo = $this->model->getMemo($id);
|
||||||
|
|
||||||
|
|
||||||
$article = null;
|
$article = null;
|
||||||
$confirm = null;
|
$confirm = null;
|
||||||
if (!empty($data)) {
|
if (!empty($data)) {
|
||||||
@@ -360,6 +363,11 @@ class M708 extends BaseController
|
|||||||
// 확인결과 저장
|
// 확인결과 저장
|
||||||
public function saveResult()
|
public function saveResult()
|
||||||
{
|
{
|
||||||
|
$naver = new NaverApiClient();
|
||||||
|
$model710 = new M710Model();
|
||||||
|
$model415 = new M415Model();
|
||||||
|
$v2DailyModel = new V2StDailyModel();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$fax_sq = $this->request->getPost('fax_sq');
|
$fax_sq = $this->request->getPost('fax_sq');
|
||||||
$vr_sq = $this->request->getPost('vr_sq');
|
$vr_sq = $this->request->getPost('vr_sq');
|
||||||
@@ -387,9 +395,72 @@ class M708 extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DB에 결과 저장
|
// 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->model->saveHongBoFAX($fax_sq, $vr_sq, $atcl_no, $work_type, $send_yn, $result_d11 ?? null, $comment_d11 ?? null, $fax_conf_yn_1 ?? null, $fax_conf_yn_2 ?? null, $fax_conf_yn_3 ?? null, $fax_conf_info_1 ?? null, $fax_conf_info_2 ?? null, $fax_conf_info_3 ?? null, $file_type);
|
||||||
|
|
||||||
|
if (empty($return['code']) && $work_type == '2') {
|
||||||
|
// 검증센터에 데이터를 전송한다.
|
||||||
|
$sendData = $this->model->getDataConfirmAPI($vr_sq);
|
||||||
|
|
||||||
|
if (($fax_conf_yn_3 ?? 'N') == 'Y' || (int) $article['try_cnt'] < 1) {
|
||||||
|
$send_result = $naver->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 ($sendData['try_cnt'] >= '1') {
|
||||||
|
$stat_cd = '69'; // 검증실패
|
||||||
|
$this->model->saveChangeStep($fax_sq, $vr_sq, $stat_cd); // 전송완료 상태로 변경..
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0302', '1', 'add'); // 최종실패로 저장
|
||||||
|
} else {
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0301', '1', 'add'); // 1차실패로 저장
|
||||||
|
}
|
||||||
|
// $res_try = $this->m708_model->chgTryCnt($vr_sq, intval($sendData['try_cnt']) +1);
|
||||||
|
|
||||||
|
$this->model->increseTryCnt($vr_sq);
|
||||||
|
|
||||||
|
if (($result_d11 ?? '') == '20013') {
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0203', '1', 'add'); // 기타로 저장
|
||||||
|
} else {
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0202', '1', 'add'); // 불일치로 저장
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$stat_cd = '35'; // 서류/전화 확인 성공
|
||||||
|
$this->model->saveChangeStep($fax_sq, $vr_sq, $stat_cd); // 전송완료 상태로 변경..
|
||||||
|
|
||||||
|
$rgbk_cofirm = $this->model->getRgbk_confirm($vr_sq);
|
||||||
|
if ($rgbk_cofirm == '1') {
|
||||||
|
$stat_cd = '40';
|
||||||
|
$this->model->saveChangeStep($fax_sq, $vr_sq, $stat_cd); // 등기부등본 확인중 상태로 변경..
|
||||||
|
|
||||||
|
$v2DailyModel->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); // 검증완료 상태로 변경..
|
||||||
|
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0205', '1', 'add'); // 홍보확인서완료 등기부등본확인 안함 저장
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new \Exception($send_result['error']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$stat_cd = '39'; // 서류/전화 확인 실패
|
||||||
|
$this->model->saveChangeStep($fax_sq, $vr_sq, $stat_cd);
|
||||||
|
|
||||||
|
$stat_cd = '30'; // 서류/전화 확인 중
|
||||||
|
$this->model->saveChangeStep($fax_sq, $vr_sq, $stat_cd);
|
||||||
|
|
||||||
|
$this->model->increseTryCnt($vr_sq);
|
||||||
|
|
||||||
|
throw new \Exception('의뢰인 정보 불일치로 저장되었습니다.');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return $this->response->setJSON([
|
return $this->response->setJSON([
|
||||||
@@ -408,14 +479,131 @@ class M708 extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 분양계약서 저장
|
// 분양계약서 조회
|
||||||
public function saveBunyangCnt()
|
public function saveBunyangCnt()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$vr_sq = $this->request->getPost('vr_sq');
|
$vr_sq = $this->request->getPost('vr_sq');
|
||||||
|
|
||||||
|
$rsrv_sq = $this->model->get_rsrv_sq($vr_sq);
|
||||||
|
$cnt = $this->model->getI8Cnt($rsrv_sq['rsrv_sq']);
|
||||||
|
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '0',
|
||||||
|
'msg' => 'success',
|
||||||
|
'cnt' => $cnt,
|
||||||
|
]);
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '9',
|
||||||
|
'msg' => $e->getMessage(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 분양계약서 저장
|
||||||
|
public function saveResult3()
|
||||||
|
{
|
||||||
|
$naver = new NaverApiClient();
|
||||||
|
$v2StDailyModel = new V2StDailyModel();
|
||||||
|
|
||||||
|
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');
|
||||||
|
|
||||||
|
$resyn = $this->request->getPost('resYn');
|
||||||
|
$dbusageagryn = $this->request->getPost('dbUsageAgrYn');
|
||||||
|
$send_yn = 'Y'; // 업데이트 된다면 미처리->처리상태로 변경
|
||||||
|
|
||||||
|
$article = $this->model->getArticleInfo2($atcl_no, $vr_sq);
|
||||||
|
$v2_vrfc_req = $v2StDailyModel->get_v2_vrfc_req($vr_sq);
|
||||||
|
|
||||||
|
if ((int) $article['stat_cd'] >= 40) {
|
||||||
|
throw new \Exception('이미 저장된 데이터입니다.');
|
||||||
|
} else {
|
||||||
|
if (!empty($resyn)) {
|
||||||
|
$this->model->updateResDB($resyn, $dbusageagryn, $vr_sq);
|
||||||
|
}
|
||||||
|
|
||||||
|
// DB에 결과를 저장한다.
|
||||||
|
$return = $this->model->saveresult3FAX($fax_sq, $vr_sq, $atcl_no, $work_type, $send_yn, $result_d11 ?? null, $comment_d11 ?? null, $fax_conf_yn_1 ?? null, $fax_conf_yn_2 ?? null, $fax_conf_yn_3 ?? null, $fax_conf_info_1 ?? null, $fax_conf_info_2 ?? null, $fax_conf_info_3 ?? null);
|
||||||
|
|
||||||
|
if (empty($return['code']) && $work_type == '2') {
|
||||||
|
// 검증센터에 데이터를 전송한다.
|
||||||
|
$sendData = $this->model->getDataConfirmAPI($vr_sq);
|
||||||
|
|
||||||
|
if (($fax_conf_yn_3 ?? 'N') == 'Y' || $article['try_cnt'] < '1') {
|
||||||
|
$send_result = $naver->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 ($sendData['try_cnt'] >= '1') {
|
||||||
|
$stat_cd = '69'; // 검증실패
|
||||||
|
$this->model->saveChangeStep($fax_sq, $vr_sq, $stat_cd); // 전송완료 상태로 변경..
|
||||||
|
$v2StDailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0302', '1', 'add'); // 최종실패로 저장
|
||||||
|
} else {
|
||||||
|
$v2StDailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0301', '1', 'add'); // 1차실패로 저장
|
||||||
|
}
|
||||||
|
// $res_try = $this->m708_model->chgTryCnt($vr_sq, intval($sendData['try_cnt']) +1);
|
||||||
|
|
||||||
|
$this->model->increseTryCnt($vr_sq);
|
||||||
|
|
||||||
|
if (($result_d11 ?? '') == '20013') {
|
||||||
|
$v2StDailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0203', '1', 'add'); // 기타로 저장
|
||||||
|
} else {
|
||||||
|
$v2StDailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0202', '1', 'add'); // 불일치로 저장
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$stat_cd = '35'; // 서류/전화 확인 성공
|
||||||
|
$this->model->saveChangeStep($fax_sq, $vr_sq, $stat_cd); // 전송완료 상태로 변경..
|
||||||
|
|
||||||
|
$rgbk_cofirm = $this->model->getRgbk_confirm($vr_sq);
|
||||||
|
if ($rgbk_cofirm == '1') {
|
||||||
|
$stat_cd = '40';
|
||||||
|
$this->model->saveChangeStep($fax_sq, $vr_sq, $stat_cd); // 등기부등본 확인중 상태로 변경..
|
||||||
|
|
||||||
|
$v2StDailyModel->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); // 검증완료 상태로 변경..
|
||||||
|
|
||||||
|
$v2StDailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0205', '1', 'add'); // 홍보확인서완료 등기부등본확인 안함 저장
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new \Exception($send_result['error']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$stat_cd = '39'; // 서류/전화 확인 실패
|
||||||
|
$this->model->saveChangeStep($fax_sq, $vr_sq, $stat_cd);
|
||||||
|
|
||||||
|
$stat_cd = '30'; // 서류/전화 확인 중
|
||||||
|
$this->model->saveChangeStep($fax_sq, $vr_sq, $stat_cd);
|
||||||
|
|
||||||
|
$this->model->increseTryCnt($vr_sq);
|
||||||
|
|
||||||
|
|
||||||
|
throw new \Exception('의뢰인 정보 불일치로 저장되었습니다.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '0',
|
||||||
|
'msg' => 'success',
|
||||||
|
]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return $this->response->setJSON([
|
return $this->response->setJSON([
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ namespace App\Controllers\V2;
|
|||||||
use App\Controllers\BaseController;
|
use App\Controllers\BaseController;
|
||||||
use App\Libraries\Common;
|
use App\Libraries\Common;
|
||||||
use App\Libraries\MyUpload;
|
use App\Libraries\MyUpload;
|
||||||
|
use App\Libraries\NaverApiClient;
|
||||||
use App\Models\common\CodeModel;
|
use App\Models\common\CodeModel;
|
||||||
|
use App\Models\results\M415Model;
|
||||||
use App\Models\v2\M712Model;
|
use App\Models\v2\M712Model;
|
||||||
|
|
||||||
class M712 extends BaseController
|
class M712 extends BaseController
|
||||||
@@ -124,6 +126,7 @@ class M712 extends BaseController
|
|||||||
public function detail($id): string
|
public function detail($id): string
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$naver = new NaverApiClient();
|
||||||
$id = (string) $id;
|
$id = (string) $id;
|
||||||
|
|
||||||
if ($id === '') {
|
if ($id === '') {
|
||||||
@@ -139,12 +142,37 @@ class M712 extends BaseController
|
|||||||
$regist = $this->model->getRecordInfo($id, '2'); //등기부등본
|
$regist = $this->model->getRecordInfo($id, '2'); //등기부등본
|
||||||
$display = $this->model->getDisplay('M705_detail');
|
$display = $this->model->getDisplay('M705_detail');
|
||||||
|
|
||||||
|
$hscp_info = [];
|
||||||
|
if (!empty($data['hscp_no'])) {
|
||||||
|
$apt_rlet_type_cd = ['A01', 'A02', 'A03', 'A04', 'B01', 'B02', 'B03'];
|
||||||
|
$villa_rlet_type_cd = ['A05', 'A06'];
|
||||||
|
|
||||||
|
|
||||||
|
if (in_array($data['rlet_type_cd'], $apt_rlet_type_cd)) { // apt 단지
|
||||||
|
$detail_hscp = $naver->aptDetail($data['hscp_no']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (in_array($data['rlet_type_cd'], $villa_rlet_type_cd)) { // villa 단지
|
||||||
|
$detail_hscp = $naver->villaDetail($data['hscp_no']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// print_r($data);
|
||||||
|
// print_r($detail_hscp);
|
||||||
|
// exit;
|
||||||
|
|
||||||
|
if (!empty($detail_hscp) && isset($detail_hscp['result'])) {
|
||||||
|
$hscp_info = $detail_hscp['result'];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$this->data['codes'] = $codes;
|
$this->data['codes'] = $codes;
|
||||||
$this->data['data'] = $data;
|
$this->data['data'] = $data;
|
||||||
$this->data['memo'] = $memo;
|
$this->data['memo'] = $memo;
|
||||||
$this->data['record'] = $record;
|
$this->data['record'] = $record;
|
||||||
$this->data['regist'] = $regist;
|
$this->data['regist'] = $regist;
|
||||||
$this->data['display'] = $display;
|
$this->data['display'] = $display;
|
||||||
|
$this->data['hscp_info'] = $hscp_info;
|
||||||
|
|
||||||
return view("pages/v2/m712/detail", $this->data);
|
return view("pages/v2/m712/detail", $this->data);
|
||||||
}
|
}
|
||||||
@@ -294,14 +322,384 @@ class M712 extends BaseController
|
|||||||
// 정보저장
|
// 정보저장
|
||||||
public function saveRegi()
|
public function saveRegi()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
1.0.1 POST 데이터 받기.
|
||||||
|
1.1.1 1차 검증인지 2차검증인지 확인.
|
||||||
|
1.1.2 1차, 2차 검증이면 v2_confirm.type에 넣을 값을 알맞게 셋팅.
|
||||||
|
1.2.1 v2_confirms에 데이터가 있는지 확인.
|
||||||
|
1.3.1 데이터가 있음 : success 여부 판단 후 updateConfirm 실행 success값만 UPDATE. (수정변경이력 저장)
|
||||||
|
1.4.1 데이터가 없음 : success 여부 판단 후 insertConfirm 실행 v2_confirms INSERT. (수정변경이력 저장)
|
||||||
|
1.4.2 상태변경 하기 : 등기부등본 확인중 상태로 변경. (수정변경이력 저장)
|
||||||
|
1.5.1 이미지파일 서버에 UPLOAD (수정변경이력 저장)
|
||||||
|
1.6.1 기존파일 탐색.
|
||||||
|
1.7.1 기존파일 있음 : 기존파일 use_yn 'N'으로 UPDATE 후 v2_files INSERT.
|
||||||
|
1.8.1 기존파일 없음 : v2_files INSERT.
|
||||||
|
1.9.1 매물주소, 의뢰인 정보 v2_check_list INSERT. (수정변경이력 저장)
|
||||||
|
1.10.1 API 전송.
|
||||||
|
1.11.1 API 전송결과 : SUCCESS 이면 상태값 변경 : 등기부등본 확인완료 상태. (수정변경이력 저장)
|
||||||
|
1.12.1 서류 확인내용 v2_article_info_etc document_cert_method 저장
|
||||||
|
*/
|
||||||
|
|
||||||
|
$naver = new NaverApiClient();
|
||||||
|
// $model710 = new M710Model();
|
||||||
|
$model415 = new M415Model();
|
||||||
|
$v2DailyModel = new V2StDailyModel();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
$usr_id = session('usr_id');
|
||||||
|
$toDay = date('Y-m-d H:i:s');
|
||||||
|
$atcl_vrtc_way = 'R'; //검증구분
|
||||||
|
$atcl_vr_sq = $this->request->getPost('rcpt_key');
|
||||||
|
// $atcl_no = $this->request->getPost('atcl_no');
|
||||||
|
$reg_conf_yn_1 = $this->request->getPost('reg_conf_yn_1'); //확인내용
|
||||||
|
$reg_conf_yn_2 = $this->request->getPost('reg_conf_yn_2'); //매물주소
|
||||||
|
$reg_conf_yn_3 = $this->request->getPost('reg_conf_yn_3'); //의뢰인정보
|
||||||
|
$reg_conf_yn_info_2 = $this->request->getPost('reg_conf_yn_info_2'); //매물주소
|
||||||
|
$reg_conf_yn_info_3 = $this->request->getPost('reg_conf_yn_info_3'); //의뢰인정보
|
||||||
|
$memo = $this->request->getPost('memo'); //메모
|
||||||
|
$owner_verifiable = $this->request->getPost('owner_verifiable'); //실소유주 확인여부
|
||||||
|
$noimg_chk_chk = $this->request->getPost('noimg_chk_chk'); // 등기부등본이미지 파일없음.
|
||||||
|
$img_chk_chk = $this->request->getPost('img_chk_chk'); // 등기소, 리얼탑 열람, 리얼탑 기열람, 열람
|
||||||
|
$atcl_vrtc_type = $this->request->getPost('atcl_vrtc_type'); // 검증구분
|
||||||
|
$vrfc_type_sub = $this->request->getPost('vrfc_type_sub'); // 하위검증구분
|
||||||
|
$arr_uncnfrm_status = $this->request->getPost('arr_uncnfrm_status'); // 등기부등본 미확인여부 상세
|
||||||
|
$ownerTypeCode = $this->request->getPost('ownerTypeCode'); // 소유자명 확인 일치 , 불일치
|
||||||
|
$document_cert_method = $this->request->getPost('document_cert_method'); // 서류 내용 확인
|
||||||
|
|
||||||
|
if ($owner_verifiable == "1") {
|
||||||
|
$owner_verifiable = true;
|
||||||
|
} else {
|
||||||
|
$owner_verifiable = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//상태가 이미 등기부등본확인중 이상이면 저장하지 않는다.
|
||||||
|
$resStat = $this->model->chkStat($atcl_vr_sq);
|
||||||
|
$v2_vrfc_req = $v2DailyModel->get_v2_vrfc_req($atcl_vr_sq);
|
||||||
|
$rlet_type_cd = $model415->get_rlet_type_cd($atcl_vr_sq);
|
||||||
|
|
||||||
|
if ((int) $resStat['stat_cd'] >= 60 || (int) $resStat['stat_cd'] == 19) {
|
||||||
|
throw new \Exception('이미 저장된 데이터입니다.');
|
||||||
|
} else {
|
||||||
|
$resultCnt = $this->model->chkRegiTryCnt($atcl_vr_sq); //1차검증인지 2차검증인지 확인 쿼리 : v2_vrfc_req.type_cnt
|
||||||
|
if ($resultCnt['reg_try_cnt'] == 0) { // 1차 검증일 때
|
||||||
|
log_message('debug', '712 page >> 매물번호 : ' . $atcl_vr_sq . ' 등기부등본 불일치 횟수 : 0 ');
|
||||||
|
$try_cnt = '1';
|
||||||
|
} else if ($resultCnt['reg_try_cnt'] == 1) { // 2차 검증일 때
|
||||||
|
log_message('debug', '712 page >> 매물번호 : ' . $atcl_vr_sq . ' 등기부등본 불일치 횟수 : 1 ');
|
||||||
|
$try_cnt = '2';
|
||||||
|
} else {
|
||||||
|
log_message('debug', '712 page >> 매물번호 : ' . $atcl_vr_sq . ' 등기부등본 불일치 횟수 : 예외처리 ');
|
||||||
|
$try_cnt = '2';
|
||||||
|
//$try_cnt = intval($try_cnt) + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->model->chkConfirm($atcl_vr_sq, $atcl_vrtc_way);
|
||||||
|
if ($result == 0) { //v2_confirm 존재하지 않는다면
|
||||||
|
if ($reg_conf_yn_2 == '10000' && $reg_conf_yn_3 == '10000') { //success 여부 판단
|
||||||
|
$chk_type = '1';
|
||||||
|
//$chk_delay = '0'; //지연여부
|
||||||
|
//$chk_zombie = '0'; //좀비매물
|
||||||
|
} else {
|
||||||
|
// 2015.06.29 추가
|
||||||
|
// 불일치가 날 경우에 10분 이내에 다시 불일치 처리 불가능(같은 매물을 두사람이 중복처리할 가능성 사전 방지)
|
||||||
|
// 1. 현재 매물의 마지막으로 업데이트 된 시간을 가져옴.
|
||||||
|
// 2. 현재 시간과 비교하여 10분 이내면 경고창을 띄어줌.
|
||||||
|
|
||||||
|
$chk_type = '0';
|
||||||
|
//$chk_delay = '1'; //지연여부
|
||||||
|
//$chk_zombie = '0'; //좀비매물
|
||||||
|
|
||||||
|
$result_tm = $this->model->getUpdateFailTime($atcl_vr_sq);
|
||||||
|
$update_tm = $result_tm['insert_tm'];
|
||||||
|
$ten_ago = date("Y-m-d H:i:s", mktime(date("H"), date("i") - 1, date("s"), date("m"), date("d"), date("Y")));
|
||||||
|
|
||||||
|
if ($update_tm > $ten_ago) {
|
||||||
|
// 수정한 시간이 현재시간10분전 보다 클 경우 수정불가능
|
||||||
|
throw new \Exception('이미 불일치 처리 된 매물입니다.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->model->insertConfirm($atcl_vr_sq, $atcl_vrtc_way, $chk_type, $try_cnt);
|
||||||
|
} else {
|
||||||
|
if ($reg_conf_yn_2 == '10000' && $reg_conf_yn_3 == '10000') { //success 여부 판단
|
||||||
|
$chk_type = '1';
|
||||||
|
//$chk_delay = '0'; //지연여부
|
||||||
|
//$chk_zombie = '0'; //좀비매물
|
||||||
|
} else {
|
||||||
|
// 2015.06.29 추가
|
||||||
|
// 불일치가 날 경우에 10분 이내에 다시 불일치 처리 불가능(같은 매물을 두사람이 중복처리할 가능성 사전 방지)
|
||||||
|
// 1. 현재 매물의 마지막으로 업데이트 된 시간을 가져옴.
|
||||||
|
// 2. 현재 시간과 비교하여 10분 이내면 경고창을 띄어줌.
|
||||||
|
|
||||||
|
$chk_type = '0';
|
||||||
|
//$chk_delay = '1'; //지연여부
|
||||||
|
//$chk_zombie = '0'; //좀비매물
|
||||||
|
|
||||||
|
$result_tm = $this->model->getUpdateFailTime($atcl_vr_sq);
|
||||||
|
$update_tm = $result_tm['insert_tm'];
|
||||||
|
$ten_ago = date("Y-m-d H:i:s", mktime(date("H"), date("i") - 1, date("s"), date("m"), date("d"), date("Y")));
|
||||||
|
|
||||||
|
if ($update_tm > $ten_ago) {
|
||||||
|
throw new \Exception('이미 불일치 처리 된 매물입니다.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->model->updateConfirm($atcl_vr_sq, $atcl_vrtc_way, $chk_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$this->model->InsResChar($atcl_vr_sq); //담당자 업데이트
|
||||||
|
|
||||||
|
// 모바일v1,v2고 등기부등본 미확인여부 상세 저장
|
||||||
|
if ($vrfc_type_sub == 'M1' || $vrfc_type_sub == 'O1') {
|
||||||
|
$this->model->add_cert_uncnfrm_status($atcl_vr_sq, $arr_uncnfrm_status);
|
||||||
|
if (strpos($arr_uncnfrm_status, '20020') !== false) { //등기부등본 미확인여부 상세에 20020(파일 오첨부)있고
|
||||||
|
if ($vrfc_type_sub == 'M1') { // 모바일v1일땐 코드 20020,코멘트x
|
||||||
|
$reg_conf_yn_2 = '20020';
|
||||||
|
$reg_conf_yn_info_2 = '';
|
||||||
|
} else { // 모바일v2일땐 일반 불일치코드,코멘트=파일 오첨부
|
||||||
|
$reg_conf_yn_info_2 = '파일 오첨부';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//v2_check_list 확인여부 INSERT
|
||||||
|
$this->model->insertChkList($atcl_vr_sq, $atcl_vrtc_way, '21', $reg_conf_yn_2, $reg_conf_yn_info_2);
|
||||||
|
|
||||||
|
//v2_check_list 매물주소 INSERT
|
||||||
|
$this->model->insertChkList($atcl_vr_sq, $atcl_vrtc_way, '22', $reg_conf_yn_3, $reg_conf_yn_info_3);
|
||||||
|
|
||||||
|
//memo 저장
|
||||||
|
$this->model->saveMemo([$memo, $atcl_vr_sq]);
|
||||||
|
|
||||||
|
// document_cert_method
|
||||||
|
$this->model->updatedocument_cert_method($atcl_vr_sq, $document_cert_method);
|
||||||
|
|
||||||
|
|
||||||
|
//실소유주 확인 저장
|
||||||
|
$this->model->update_owner_verifiable($atcl_vr_sq, $owner_verifiable);
|
||||||
|
$sendData = $this->model->getDatacertAPI($atcl_vr_sq, 'R');
|
||||||
|
|
||||||
|
log_message('debug', '712 saveRegi => ' . $sendData['atclNo'] . ' ::: ' . json_encode($sendData) . PHP_EOL);
|
||||||
|
|
||||||
|
$d_yn = $this->model->get_send_yn('D');
|
||||||
|
|
||||||
|
if ($d_yn['stop_yn'] == 'N') { //전송금지
|
||||||
|
//1.해당매물정보를v2_stop_api_save_info에다 넣음
|
||||||
|
$this->model->insert_v2_stop_api_save_info($sendData['atclNo'], $atcl_vr_sq, 'D', '');
|
||||||
|
//2.아무렇지않게 행동한다
|
||||||
|
$send_result['result'] = 'success';
|
||||||
|
} else {
|
||||||
|
//API 호출
|
||||||
|
$send_result = $naver->certification_712($sendData['atclNo'], $try_cnt, $sendData['success'], $sendData['checkList'], $sendData['charger'], $sendData['date'], $sendData['modifyInfo'], $sendData['ownerVerifiable']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($send_result['result'] == 'success') {
|
||||||
|
if ($chk_type == '1') {
|
||||||
|
//상태변경 TABLE INSERT : 등기부등본 확인완료 상태로 변경
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '45', $toDay);
|
||||||
|
$chgVrfc45 = $this->model->chgStatVrfc($atcl_vr_sq, '45'); //v2_vrfc_req INSERT
|
||||||
|
$statFaxUp45 = $this->model->chgStatFax($atcl_vr_sq, '45'); //fax_imgs
|
||||||
|
|
||||||
|
//상태변경 TABLE INSERT : 검증완료 상태로 변경
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '60', $toDay);
|
||||||
|
$chgVrfc60 = $this->model->chgStatVrfc($atcl_vr_sq, '60'); //v2_vrfc_req INSERT
|
||||||
|
$statFaxUp60 = $this->model->chgStatFax($atcl_vr_sq, '60'); //fax_imgs
|
||||||
|
|
||||||
|
// ★ 검증완료
|
||||||
|
//0.불일치 이력이 있는지 확인
|
||||||
|
$cnt = $model415->get_cert_failTimeForHistory($atcl_vr_sq);
|
||||||
|
if (empty($cnt)) {
|
||||||
|
if ($atcl_vrtc_type == 'M' || $atcl_vrtc_type == 'N') { //모바일은 등기가 첨 시작이니까 insert해줘야함
|
||||||
|
if (!($atcl_vrtc_type == 'M' && in_array($rlet_type_cd['rlet_type_cd'], array('B01', 'B02', 'B03')))) {//만약 분양권들이면 넘어가고 아니면 체크
|
||||||
|
//1.등기부등본 확인중 시간
|
||||||
|
$tel_doc_conf_dt = $model415->get_cert_M_timeForHistory($atcl_vr_sq);
|
||||||
|
//2.등기부등본 확인완료 시간
|
||||||
|
$cert_comple_dt = $model415->get_cert_confTimeForHistory($atcl_vr_sq);
|
||||||
|
//3.검증완료시간
|
||||||
|
$finishTime = $model415->get_60_ForHistory($atcl_vr_sq);
|
||||||
|
//4.해당 정보를 테이블에 넣는다
|
||||||
|
$model415->insert_v2_time_required_M($v2_vrfc_req['atcl_no'], $v2_vrfc_req['cpid'], $atcl_vrtc_type, $tel_doc_conf_dt['insert_tm'], $cert_comple_dt['insert_tm'], $finishTime['insert_tm']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//1.등기부등본 확인중 시간
|
||||||
|
$tel_doc_conf_dt = $model415->get_cert_ing_TimeForHistory($atcl_vr_sq);
|
||||||
|
//2.등기부등본 확인완료 시간
|
||||||
|
$cert_comple_dt = $model415->get_cert_confTimeForHistory($atcl_vr_sq);
|
||||||
|
//3.해당 정보를 테이블에 넣는다
|
||||||
|
$model415->update_v2_time_required_Conf_Done($v2_vrfc_req['atcl_no'], $v2_vrfc_req['cpid'], $atcl_vrtc_type, $tel_doc_conf_dt['insert_tm'], $cert_comple_dt['insert_tm']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($noimg_chk_chk == 'Y') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '70', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'Y'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0103', '1', 'add'); // 등기부등본이미지 없음 저장
|
||||||
|
}
|
||||||
|
if ($img_chk_chk == 'O') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '76', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'O'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0105', '1', 'add'); // (열람)간소화확인으로 저장
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0101', '1', 'add'); // 일치로 저장
|
||||||
|
} else if ($img_chk_chk == 'T') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '80', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'T'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0111', '1', 'add'); // 등기소로 일치로 저장
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0101', '1', 'add'); // 일치로 저장
|
||||||
|
} else if ($img_chk_chk == 'R') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '86', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'R'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0107', '1', 'add'); // 리얼탑 열람 일치로 저장
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0101', '1', 'add'); // 일치로 저장
|
||||||
|
} else if ($img_chk_chk == 'G') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '87', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'G'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0108', '1', 'add'); // 리얼탑 기열람 일치으로 저장
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0101', '1', 'add'); // 일치로 저장
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($atcl_vrtc_type == 'M') {
|
||||||
|
//상태변경 TABLE INSERT : 등기부등본 확인 불일치 상태로 변경
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '49', $toDay);
|
||||||
|
$chgVrfc49 = $this->model->chgStatVrfc($atcl_vr_sq, '49'); //v2_vrfc_req INSERT
|
||||||
|
$statFaxUp49 = $this->model->chgStatFax($atcl_vr_sq, '49'); //fax_imgs
|
||||||
|
|
||||||
|
//v2_vrfc_req try_cnt 값을 1로 update
|
||||||
|
$this->model->chgRegiTryCnt($atcl_vr_sq, '2');
|
||||||
|
|
||||||
|
//상태변경 TABLE INSERT : 검증실패 상태로 변경
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '69', $toDay);
|
||||||
|
$chgVrfc69 = $this->model->chgStatVrfc($atcl_vr_sq, '69'); //v2_vrfc_req INSERT
|
||||||
|
$statFaxUp69 = $this->model->chgStatFax($atcl_vr_sq, '69'); //fax_imgs
|
||||||
|
|
||||||
|
// ★모바일이고 검증실패
|
||||||
|
if (!in_array($rlet_type_cd['rlet_type_cd'], array('B01', 'B02', 'B03'))) {//만약 분양권들이면 넘어가고 아니면 체크
|
||||||
|
//1.등기부등본 확인중 시간
|
||||||
|
$tel_doc_conf_dt = $model415->get_cert_M_timeForHistory($atcl_vr_sq);
|
||||||
|
//2.등기부등본 확인실패 시간
|
||||||
|
$cert_comple_dt = $model415->get_cert_failTimeForHistory($atcl_vr_sq);
|
||||||
|
//3.검증실패시간
|
||||||
|
$finishTime = $model415->get_69_ForHistory($atcl_vr_sq);
|
||||||
|
//4.해당 정보를 테이블에 넣는다
|
||||||
|
$model415->insert_v2_time_required_M($v2_vrfc_req['atcl_no'], $v2_vrfc_req['cpid'], $atcl_vrtc_type, $tel_doc_conf_dt['insert_tm'], $cert_comple_dt['insert_tm'], $finishTime['insert_tm']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//상태변경 TABLE INSERT : 등기부등본 확인 불일치 상태로 변경
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '49', $toDay);
|
||||||
|
$chgVrfc49 = $this->model->chgStatVrfc($atcl_vr_sq, '49'); //v2_vrfc_req INSERT
|
||||||
|
$statFaxUp49 = $this->model->chgStatFax($atcl_vr_sq, '49'); //fax_imgs
|
||||||
|
|
||||||
|
//등기부등본 확인중 상태로 변경.
|
||||||
|
$this->model->saveChangedHistory($atcl_vr_sq, '30', 'C9', $usr_id, '상태변경 : 49 => 30'); //검증결과 변동사항 HISTORY
|
||||||
|
$chgVrfc40 = $this->model->chgStatVrfc($atcl_vr_sq, '30'); //v2_vrfc_req INSERT
|
||||||
|
$statFaxUp40 = $this->model->chgStatFax($atcl_vr_sq, '30'); //fax_imgs
|
||||||
|
|
||||||
|
if ($try_cnt == '1') {
|
||||||
|
//v2_vrfc_req try_cnt 값을 1로 update
|
||||||
|
$this->model->chgRegiTryCnt($atcl_vr_sq, '1');
|
||||||
|
if ($atcl_vrtc_type == 'T') {
|
||||||
|
//검증구분이 전화매물일 경우 사전에 일치로 처리된 값을 초기화 시켜준다.
|
||||||
|
$reset_query = $this->model->resetTelConf($atcl_vr_sq);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ★1차실패
|
||||||
|
if ($atcl_vrtc_type == 'N') {
|
||||||
|
//1.등기부등본 확인중 시간
|
||||||
|
$tel_doc_conf_dt = $model415->get_cert_M_timeForHistory($atcl_vr_sq);
|
||||||
|
//2.등기부등본 확인실패 시간
|
||||||
|
$cert_comple_dt = $model415->get_cert_failTimeForHistory($atcl_vr_sq);
|
||||||
|
//3.검증실패시간
|
||||||
|
$finishTime = $model415->get_69_ForHistory($atcl_vr_sq);
|
||||||
|
//4.해당 정보를 테이블에 넣는다
|
||||||
|
$model415->insert_v2_time_required_M($v2_vrfc_req['atcl_no'], $v2_vrfc_req['cpid'], $atcl_vrtc_type, $tel_doc_conf_dt['insert_tm'], $cert_comple_dt['insert_tm'], $finishTime['insert_tm']);
|
||||||
|
} else {
|
||||||
|
//1.등기부등본 확인중 시간
|
||||||
|
$tel_doc_conf_dt = $model415->get_cert_ing_TimeForHistory($atcl_vr_sq);
|
||||||
|
//2.등기부등본 확인실패 시간
|
||||||
|
$cert_comple_dt = $model415->get_cert_failTimeForHistory($atcl_vr_sq);
|
||||||
|
//3.해당 정보를 테이블에 넣는다
|
||||||
|
$sf = 'F';
|
||||||
|
$model415->update_v2_time_required_Conf($v2_vrfc_req['atcl_no'], $v2_vrfc_req['cpid'], $atcl_vrtc_type, $tel_doc_conf_dt['insert_tm'], $cert_comple_dt['insert_tm'], $sf);
|
||||||
|
}
|
||||||
|
} else if ($try_cnt == '2') {
|
||||||
|
//v2_vrfc_req try_cnt 값을 2로 update
|
||||||
|
$this->model->chgRegiTryCnt($atcl_vr_sq, '2');
|
||||||
|
|
||||||
|
//상태변경 TABLE INSERT : 검증실패 상태로 변경.
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '69', $toDay);
|
||||||
|
$chgVrfc69 = $this->model->chgStatVrfc($atcl_vr_sq, '69'); //v2_vrfc_req INSERT
|
||||||
|
$statFaxUp69 = $this->model->chgStatFax($atcl_vr_sq, '69'); //fax_imgs
|
||||||
|
|
||||||
|
// ★모바일 이외 검증실패
|
||||||
|
if ($atcl_vrtc_type == 'N') {
|
||||||
|
//1.등기부등본 확인중 시간
|
||||||
|
$tel_doc_conf_dt = $model415->get_cert_M_timeForHistory($atcl_vr_sq);
|
||||||
|
//2.등기부등본 확인실패 시간
|
||||||
|
$cert_comple_dt = $model415->get_cert_failTimeForHistory($atcl_vr_sq);
|
||||||
|
//3.검증실패시간
|
||||||
|
$finishTime = $model415->get_69_ForHistory($atcl_vr_sq);
|
||||||
|
//4.해당 정보를 테이블에 넣는다
|
||||||
|
$model415->insert_v2_time_required_M($v2_vrfc_req['atcl_no'], $v2_vrfc_req['cpid'], $atcl_vrtc_type, $tel_doc_conf_dt['insert_tm'], $cert_comple_dt['insert_tm'], $finishTime['insert_tm']);
|
||||||
|
} else {
|
||||||
|
//1.등기부등본 확인중 시간
|
||||||
|
$tel_doc_conf_dt = $model415->get_cert_ing_TimeForHistory($atcl_vr_sq);
|
||||||
|
//2.등기부등본 확인실패 시간
|
||||||
|
$cert_comple_dt = $model415->get_cert_failTimeForHistory($atcl_vr_sq);
|
||||||
|
//3.해당 정보를 테이블에 넣는다
|
||||||
|
$model415->update_v2_time_required_Conf_Done($v2_vrfc_req['atcl_no'], $v2_vrfc_req['cpid'], $atcl_vrtc_type, $tel_doc_conf_dt['insert_tm'], $cert_comple_dt['insert_tm']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($noimg_chk_chk == 'Y') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '70', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'Y'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0103', '1', 'add'); // 등기부등본이미지 없음 저장
|
||||||
|
}
|
||||||
|
if ($img_chk_chk == 'O') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '77', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'O'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0105', '1', 'add'); // (열람)간소화확인으로 저장
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0102', '1', 'add'); // 불일치로 저장
|
||||||
|
} else if ($img_chk_chk == 'T') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '85', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'T'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0112', '1', 'add'); // 등기소 불일치로 저장
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0102', '1', 'add'); // 불일치로 저장
|
||||||
|
} else if ($img_chk_chk == 'R') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '88', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'R'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0109', '1', 'add'); // 리얼탑 열람 불일치로 저장
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0102', '1', 'add'); // 불일치로 저장
|
||||||
|
} else if ($img_chk_chk == 'G') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '89', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'G'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0110', '1', 'add'); // 리얼탑 기열람 불일치로 저장
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0102', '1', 'add'); // 불일치로 저장
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (isset($send_result['error'])) {
|
||||||
|
$error_message = $send_result['error']['code'] . "\\n" . $send_result['error']['message'];
|
||||||
|
|
||||||
|
// API 호출 에러 발생시 해당 내용들을 DB에 저장해준다.
|
||||||
|
$err_time = date("Y-m-d H:i:s");
|
||||||
|
$this->model->saveApiErr($atcl_vr_sq, $send_result['error']['code'], $send_result['error']['message'], $err_time, $v2_vrfc_req['atcl_no']);
|
||||||
|
throw new \Exception($error_message);
|
||||||
|
} else {
|
||||||
|
throw new \Exception('네이버 전송 중 오류가 발생되었습니다. 다시 시도하세요.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return $this->response->setJSON([
|
return $this->response->setJSON([
|
||||||
'code' => '0',
|
'code' => '0',
|
||||||
'msg' => 'success',
|
'msg' => 'success',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return $this->response->setJSON([
|
return $this->response->setJSON([
|
||||||
'code' => '9',
|
'code' => '9',
|
||||||
|
|||||||
@@ -3,7 +3,10 @@ namespace App\Controllers\V2;
|
|||||||
|
|
||||||
use App\Controllers\BaseController;
|
use App\Controllers\BaseController;
|
||||||
use App\Libraries\MyUpload;
|
use App\Libraries\MyUpload;
|
||||||
|
use App\Libraries\NaverApiClient;
|
||||||
use App\Models\common\CodeModel;
|
use App\Models\common\CodeModel;
|
||||||
|
use App\Models\results\M415Model;
|
||||||
|
use App\Models\v2\M710Model;
|
||||||
use App\Models\v2\M713Model;
|
use App\Models\v2\M713Model;
|
||||||
|
|
||||||
class M713 extends BaseController
|
class M713 extends BaseController
|
||||||
@@ -121,6 +124,7 @@ class M713 extends BaseController
|
|||||||
// 상세화면
|
// 상세화면
|
||||||
public function detail($id): string
|
public function detail($id): string
|
||||||
{
|
{
|
||||||
|
$naver = new NaverApiClient();
|
||||||
$id = (string) $id;
|
$id = (string) $id;
|
||||||
|
|
||||||
if ($id === '') {
|
if ($id === '') {
|
||||||
@@ -138,6 +142,30 @@ class M713 extends BaseController
|
|||||||
|
|
||||||
$sido = $this->model->getAreaList(); // 지역조회
|
$sido = $this->model->getAreaList(); // 지역조회
|
||||||
|
|
||||||
|
$hscp_info = [];
|
||||||
|
if (!empty($data['hscp_no'])) {
|
||||||
|
$apt_rlet_type_cd = ['A01', 'A02', 'A03', 'A04', 'B01', 'B02', 'B03'];
|
||||||
|
$villa_rlet_type_cd = ['A05', 'A06'];
|
||||||
|
|
||||||
|
|
||||||
|
if (in_array($data['rlet_type_cd'], $apt_rlet_type_cd)) { // apt 단지
|
||||||
|
$detail_hscp = $naver->aptDetail($data['hscp_no']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (in_array($data['rlet_type_cd'], $villa_rlet_type_cd)) { // villa 단지
|
||||||
|
$detail_hscp = $naver->villaDetail($data['hscp_no']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// print_r($data);
|
||||||
|
// print_r($detail_hscp);
|
||||||
|
// exit;
|
||||||
|
|
||||||
|
if (!empty($detail_hscp) && isset($detail_hscp['result'])) {
|
||||||
|
$hscp_info = $detail_hscp['result'];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$this->data['codes'] = $codes;
|
$this->data['codes'] = $codes;
|
||||||
$this->data['data'] = $data;
|
$this->data['data'] = $data;
|
||||||
$this->data['memo'] = $memo;
|
$this->data['memo'] = $memo;
|
||||||
@@ -145,6 +173,7 @@ class M713 extends BaseController
|
|||||||
$this->data['regist'] = $regist;
|
$this->data['regist'] = $regist;
|
||||||
$this->data['display'] = $display;
|
$this->data['display'] = $display;
|
||||||
$this->data['sido'] = $sido;
|
$this->data['sido'] = $sido;
|
||||||
|
$this->data['hscp_info'] = $hscp_info;
|
||||||
|
|
||||||
return view("pages/v2/m713/detail", $this->data);
|
return view("pages/v2/m713/detail", $this->data);
|
||||||
}
|
}
|
||||||
@@ -293,6 +322,414 @@ class M713 extends BaseController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function saveModify()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
$vr_sq = $this->request->getPost('vr_sq');
|
||||||
|
$owner_birth = $this->request->getPost('owner_birth');
|
||||||
|
$address2 = $this->request->getPost('address2');
|
||||||
|
$address2a = $this->request->getPost('address2a');
|
||||||
|
$address2b = $this->request->getPost('address2b');
|
||||||
|
$address3 = $this->request->getPost('address3');
|
||||||
|
$address4 = $this->request->getPost('address4');
|
||||||
|
$address_code = $this->request->getPost('dong');
|
||||||
|
$hscp_no = $this->request->getPost('hscp_no');
|
||||||
|
$hscp_nm = $this->request->getPost('hscp_nm');
|
||||||
|
$owner_birth = trim($owner_birth);
|
||||||
|
|
||||||
|
$this->model->modify_info($vr_sq, $owner_birth, $address2, $address2a, $address2b, $address3, $address4, $address_code, $hscp_no, $hscp_nm);
|
||||||
|
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '0',
|
||||||
|
'msg' => 'success'
|
||||||
|
]);
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '9',
|
||||||
|
'msg' => $e->getMessage(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 등기부등본 저장
|
||||||
|
public function saveRegi()
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
1.0.1 POST 데이터 받기.
|
||||||
|
1.1.1 1차 검증인지 2차검증인지 확인.
|
||||||
|
1.1.2 1차, 2차 검증이면 v2_confirm.type에 넣을 값을 알맞게 셋팅.
|
||||||
|
1.2.1 v2_confirms에 데이터가 있는지 확인.
|
||||||
|
1.3.1 데이터가 있음 : success 여부 판단 후 updateConfirm 실행 success값만 UPDATE. (수정변경이력 저장)
|
||||||
|
1.4.1 데이터가 없음 : success 여부 판단 후 insertConfirm 실행 v2_confirms INSERT. (수정변경이력 저장)
|
||||||
|
1.4.2 상태변경 하기 : 등기부등본 확인중 상태로 변경. (수정변경이력 저장)
|
||||||
|
1.5.1 이미지파일 서버에 UPLOAD (수정변경이력 저장)
|
||||||
|
1.6.1 기존파일 탐색.
|
||||||
|
1.7.1 기존파일 있음 : 기존파일 use_yn 'N'으로 UPDATE 후 v2_files INSERT.
|
||||||
|
1.8.1 기존파일 없음 : v2_files INSERT.
|
||||||
|
1.9.1 매물주소, 의뢰인 정보 v2_check_list INSERT. (수정변경이력 저장)
|
||||||
|
1.10.1 API 전송.
|
||||||
|
1.11.1 API 전송결과 : SUCCESS 이면 상태값 변경 : 등기부등본 확인완료 상태. (수정변경이력 저장)
|
||||||
|
*/
|
||||||
|
|
||||||
|
$naver = new NaverApiClient();
|
||||||
|
$model710 = new M710Model();
|
||||||
|
$model415 = new M415Model();
|
||||||
|
$v2DailyModel = new V2StDailyModel();
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
$usr_id = session('usr_id');
|
||||||
|
$toDay = date('Y-m-d H:i:s');
|
||||||
|
$atcl_vrtc_way = 'R'; //검증구분
|
||||||
|
$atcl_vr_sq = $this->request->getPost('rcpt_key');
|
||||||
|
// $atcl_no = $this->request->getPost('atcl_no');
|
||||||
|
$reg_conf_yn_1 = $this->request->getPost('reg_conf_yn_1'); //확인내용
|
||||||
|
$reg_conf_yn_2 = $this->request->getPost('reg_conf_yn_2'); //매물주소
|
||||||
|
$reg_conf_yn_3 = $this->request->getPost('reg_conf_yn_3'); //의뢰인정보
|
||||||
|
$reg_conf_yn_info_2 = $this->request->getPost('reg_conf_yn_info_2'); //매물주소
|
||||||
|
$reg_conf_yn_info_3 = $this->request->getPost('reg_conf_yn_info_3'); //의뢰인정보
|
||||||
|
$memo = $this->request->getPost('memo'); //메모
|
||||||
|
$owner_verifiable = $this->request->getPost('owner_verifiable'); //실소유주 확인여부
|
||||||
|
$noimg_chk_chk = $this->request->getPost('noimg_chk_chk'); // 등기부등본이미지 파일없음.
|
||||||
|
$img_chk_chk = $this->request->getPost('img_chk_chk'); // 등기소, 리얼탑 열람, 리얼탑 기열람, 열람
|
||||||
|
$atcl_vrtc_type = $this->request->getPost('atcl_vrtc_type'); // 검증구분
|
||||||
|
$vrfc_type_sub = $this->request->getPost('vrfc_type_sub'); // 하위검증구분
|
||||||
|
$arr_uncnfrm_status = $this->request->getPost('arr_uncnfrm_status'); // 등기부등본 미확인여부 상세
|
||||||
|
|
||||||
|
//상태가 이미 등기부등본확인중 이상이면 저장하지 않는다.
|
||||||
|
$resStat = $this->model->chkStat($atcl_vr_sq);
|
||||||
|
$v2_vrfc_req = $v2DailyModel->get_v2_vrfc_req($atcl_vr_sq);
|
||||||
|
$rlet_type_cd = $model415->get_rlet_type_cd($atcl_vr_sq);
|
||||||
|
|
||||||
|
if ((int) $resStat['stat_cd'] >= 60 || (int) $resStat['stat_cd'] == 19) {
|
||||||
|
throw new \Exception('이미 저장된 데이터입니다.');
|
||||||
|
} else {
|
||||||
|
$resultCnt = $this->model->chkRegiTryCnt($atcl_vr_sq); //1차검증인지 2차검증인지 확인 쿼리 : v2_vrfc_req.type_cnt
|
||||||
|
if ($resultCnt['reg_try_cnt'] == 0) { // 1차 검증일 때
|
||||||
|
log_message('debug', '713 page >> 매물번호 : ' . $atcl_vr_sq . ' 등기부등본 불일치 횟수 : 0 ');
|
||||||
|
$try_cnt = '1';
|
||||||
|
} else if ($resultCnt['reg_try_cnt'] == 1) { // 2차 검증일 때
|
||||||
|
log_message('debug', '713 page >> 매물번호 : ' . $atcl_vr_sq . ' 등기부등본 불일치 횟수 : 1 ');
|
||||||
|
$try_cnt = '2';
|
||||||
|
} else {
|
||||||
|
log_message('debug', '713 page >> 매물번호 : ' . $atcl_vr_sq . ' 등기부등본 불일치 횟수 : 예외처리 ');
|
||||||
|
$try_cnt = '2';
|
||||||
|
//$try_cnt = intval($try_cnt) + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->model->chkConfirm($atcl_vr_sq, $atcl_vrtc_way);
|
||||||
|
if ($result == 0) { //v2_confirm 존재하지 않는다면
|
||||||
|
if ($reg_conf_yn_2 == '10000' && $reg_conf_yn_3 == '10000') { //success 여부 판단
|
||||||
|
$chk_type = '1';
|
||||||
|
//$chk_delay = '0'; //지연여부
|
||||||
|
//$chk_zombie = '0'; //좀비매물
|
||||||
|
} else {
|
||||||
|
// 2015.06.29 추가
|
||||||
|
// 불일치가 날 경우에 10분 이내에 다시 불일치 처리 불가능(같은 매물을 두사람이 중복처리할 가능성 사전 방지)
|
||||||
|
// 1. 현재 매물의 마지막으로 업데이트 된 시간을 가져옴.
|
||||||
|
// 2. 현재 시간과 비교하여 10분 이내면 경고창을 띄어줌.
|
||||||
|
|
||||||
|
$chk_type = '0';
|
||||||
|
//$chk_delay = '1'; //지연여부
|
||||||
|
//$chk_zombie = '0'; //좀비매물
|
||||||
|
|
||||||
|
$result_tm = $this->model->getUpdateFailTime($atcl_vr_sq);
|
||||||
|
$update_tm = $result_tm['insert_tm'];
|
||||||
|
$ten_ago = date("Y-m-d H:i:s", mktime(date("H"), date("i") - 1, date("s"), date("m"), date("d"), date("Y")));
|
||||||
|
|
||||||
|
if ($update_tm > $ten_ago) {
|
||||||
|
// 수정한 시간이 현재시간10분전 보다 클 경우 수정불가능
|
||||||
|
throw new \Exception('이미 불일치 처리 된 매물입니다.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->model->insertConfirm($atcl_vr_sq, $atcl_vrtc_way, $chk_type, $try_cnt);
|
||||||
|
} else {
|
||||||
|
if ($reg_conf_yn_2 == '10000' && $reg_conf_yn_3 == '10000') { //success 여부 판단
|
||||||
|
$chk_type = '1';
|
||||||
|
//$chk_delay = '0'; //지연여부
|
||||||
|
//$chk_zombie = '0'; //좀비매물
|
||||||
|
} else {
|
||||||
|
// 2015.06.29 추가
|
||||||
|
// 불일치가 날 경우에 10분 이내에 다시 불일치 처리 불가능(같은 매물을 두사람이 중복처리할 가능성 사전 방지)
|
||||||
|
// 1. 현재 매물의 마지막으로 업데이트 된 시간을 가져옴.
|
||||||
|
// 2. 현재 시간과 비교하여 10분 이내면 경고창을 띄어줌.
|
||||||
|
|
||||||
|
$chk_type = '0';
|
||||||
|
//$chk_delay = '1'; //지연여부
|
||||||
|
//$chk_zombie = '0'; //좀비매물
|
||||||
|
|
||||||
|
$result_tm = $this->model->getUpdateFailTime($atcl_vr_sq);
|
||||||
|
$update_tm = $result_tm['insert_tm'];
|
||||||
|
$ten_ago = date("Y-m-d H:i:s", mktime(date("H"), date("i") - 1, date("s"), date("m"), date("d"), date("Y")));
|
||||||
|
|
||||||
|
if ($update_tm > $ten_ago) {
|
||||||
|
// 수정한 시간이 현재시간10분전 보다 클 경우 수정불가능
|
||||||
|
throw new \Exception('이미 불일치 처리 된 매물입니다.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->model->updateConfirm($atcl_vr_sq, $atcl_vrtc_way, $chk_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$this->model->InsResChar($atcl_vr_sq); //담당자 업데이트
|
||||||
|
|
||||||
|
// 모바일v1,v2고 등기부등본 미확인여부 상세 저장
|
||||||
|
if ($vrfc_type_sub == 'M1' || $vrfc_type_sub == 'O1') {
|
||||||
|
$this->model->add_cert_uncnfrm_status($atcl_vr_sq, $arr_uncnfrm_status);
|
||||||
|
if (strpos($arr_uncnfrm_status, '20020') !== false) { //등기부등본 미확인여부 상세에 20020(파일 오첨부)있고
|
||||||
|
if ($vrfc_type_sub == 'M1') { // 모바일v1일땐 코드 20020,코멘트x
|
||||||
|
$reg_conf_yn_2 = '20020';
|
||||||
|
$reg_conf_yn_info_2 = '';
|
||||||
|
} else { // 모바일v2일땐 일반 불일치코드,코멘트=파일 오첨부
|
||||||
|
$reg_conf_yn_info_2 = '파일 오첨부';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//v2_check_list 확인여부 INSERT
|
||||||
|
$this->model->insertChkList($atcl_vr_sq, $atcl_vrtc_way, '21', $reg_conf_yn_2, $reg_conf_yn_info_2);
|
||||||
|
|
||||||
|
//v2_check_list 매물주소 INSERT
|
||||||
|
$this->model->insertChkList($atcl_vr_sq, $atcl_vrtc_way, '22', $reg_conf_yn_3, $reg_conf_yn_info_3);
|
||||||
|
|
||||||
|
//memo 저장
|
||||||
|
$this->model->saveMemo([$memo, $atcl_vr_sq]);
|
||||||
|
|
||||||
|
//실소유주 확인 저장
|
||||||
|
$this->model->update_owner_verifiable($atcl_vr_sq, $owner_verifiable);
|
||||||
|
|
||||||
|
$sendData = $this->model->getDatacertAPI($atcl_vr_sq, 'R');
|
||||||
|
|
||||||
|
//이미지 파일 없음 && 홍보확인서 V2일 경우
|
||||||
|
log_message('debug', '713 noimage_chk_chk sendData_return1 => ' . $sendData['atclNo'] . ' ::: ' . json_encode($sendData) . PHP_EOL);
|
||||||
|
if ($noimg_chk_chk == "Y" && $sendData['vrfcType'] == "D2") {
|
||||||
|
// $sendData['ownerVerifiable'] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$d_yn = $model710->get_send_yn('O');
|
||||||
|
if ($d_yn['stop_yn'] == 'N') { //전송금지
|
||||||
|
//1.해당매물정보를v2_stop_api_save_info에다 넣음
|
||||||
|
$model710->insert_v2_stop_api_save_info($sendData['atclNo'], $atcl_vr_sq, 'O', '');
|
||||||
|
//2.아무렇지않게 행동한다
|
||||||
|
$send_result['result'] = 'success';
|
||||||
|
} else {
|
||||||
|
//API 호출
|
||||||
|
$send_result = $naver->certification($sendData['atclNo'], $try_cnt, $sendData['success'], $sendData['checkList'], $sendData['charger'], $sendData['date'], $sendData['modifyInfo'], $sendData['ownerVerifiable']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($send_result['result'] == 'success') {
|
||||||
|
if ($chk_type == '1') {
|
||||||
|
//상태변경 TABLE INSERT : 등기부등본 확인완료 상태로 변경
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '45', $toDay);
|
||||||
|
$chgVrfc45 = $this->model->chgStatVrfc($atcl_vr_sq, '45'); //v2_vrfc_req INSERT
|
||||||
|
$statFaxUp45 = $this->model->chgStatFax($atcl_vr_sq, '45'); //fax_imgs
|
||||||
|
|
||||||
|
//상태변경 TABLE INSERT : 검증완료 상태로 변경
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '60', $toDay);
|
||||||
|
$chgVrfc60 = $this->model->chgStatVrfc($atcl_vr_sq, '60'); //v2_vrfc_req INSERT
|
||||||
|
$statFaxUp60 = $this->model->chgStatFax($atcl_vr_sq, '60'); //fax_imgs
|
||||||
|
|
||||||
|
// ★ 검증완료
|
||||||
|
//0.불일치 이력이 있는지 확인
|
||||||
|
$cnt = $model415->get_cert_failTimeForHistory($atcl_vr_sq);
|
||||||
|
if (empty($cnt)) { //검증완료일땐 불일치가없어야 통계포함된다
|
||||||
|
if ($atcl_vrtc_type == 'M' || $atcl_vrtc_type == 'O') { //모바일은 등기가 첨 시작이니까 insert해줘야함
|
||||||
|
if (!($atcl_vrtc_type == 'M' && in_array($rlet_type_cd['rlet_type_cd'], array('B01', 'B02', 'B03')))) {//만약 분양권들이면 넘어가고 아니면 체크
|
||||||
|
//1.등기부등본 확인중 시간
|
||||||
|
$tel_doc_conf_dt = $model415->get_cert_M_timeForHistory($atcl_vr_sq);
|
||||||
|
//2.등기부등본 확인완료 시간
|
||||||
|
$cert_comple_dt = $model415->get_cert_confTimeForHistory($atcl_vr_sq);
|
||||||
|
//3.검증완료시간
|
||||||
|
$finishTime = $model415->get_60_ForHistory($atcl_vr_sq);
|
||||||
|
//4.해당 정보를 테이블에 넣는다
|
||||||
|
$model415->insert_v2_time_required_M($v2_vrfc_req['atcl_no'], $v2_vrfc_req['cpid'], $atcl_vrtc_type, $tel_doc_conf_dt['insert_tm'], $cert_comple_dt['insert_tm'], $finishTime['insert_tm']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//1.등기부등본 확인중 시간
|
||||||
|
$tel_doc_conf_dt = $model415->get_cert_ing_TimeForHistory($atcl_vr_sq);
|
||||||
|
//2.등기부등본 확인완료 시간
|
||||||
|
$cert_comple_dt = $model415->get_cert_confTimeForHistory($atcl_vr_sq);
|
||||||
|
//3.해당 정보를 테이블에 넣는다
|
||||||
|
$model415->update_v2_time_required_Conf_Done($v2_vrfc_req['atcl_no'], $v2_vrfc_req['cpid'], $atcl_vrtc_type, $tel_doc_conf_dt['insert_tm'], $cert_comple_dt['insert_tm']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($noimg_chk_chk == 'Y') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '70', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'Y'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0103', '1', 'add'); // 등기부등본이미지 없음 저장
|
||||||
|
}
|
||||||
|
if ($img_chk_chk == 'O') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '76', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'O'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0105', '1', 'add'); // (열람)간소화확인으로 저장
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0101', '1', 'add'); // 일치로 저장
|
||||||
|
} else if ($img_chk_chk == 'T') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '80', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'T'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0111', '1', 'add'); // 등기소로 일치로 저장
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0101', '1', 'add'); // 일치로 저장
|
||||||
|
} else if ($img_chk_chk == 'R') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '86', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'R'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0107', '1', 'add'); // 리얼탑 열람 일치로 저장
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0101', '1', 'add'); // 일치로 저장
|
||||||
|
} else if ($img_chk_chk == 'G') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '87', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'G'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0108', '1', 'add'); // 리얼탑 기열람 일치으로 저장
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0101', '1', 'add'); // 일치로 저장
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($atcl_vrtc_type == 'M') {
|
||||||
|
//상태변경 TABLE INSERT : 등기부등본 확인 불일치 상태로 변경
|
||||||
|
$result_query7 = $this->model->chgStat($atcl_vr_sq, '49', $toDay);
|
||||||
|
$chgVrfc49 = $this->model->chgStatVrfc($atcl_vr_sq, '49'); //v2_vrfc_req INSERT
|
||||||
|
$statFaxUp49 = $this->model->chgStatFax($atcl_vr_sq, '49'); //fax_imgs
|
||||||
|
|
||||||
|
//v2_vrfc_req try_cnt 값을 1로 update
|
||||||
|
$res_try = $this->model->chgRegiTryCnt($atcl_vr_sq, '2');
|
||||||
|
|
||||||
|
//상태변경 TABLE INSERT : 검증실패 상태로 변경.
|
||||||
|
$result_query9 = $this->model->chgStat($atcl_vr_sq, '69', $toDay);
|
||||||
|
$chgVrfc69 = $this->model->chgStatVrfc($atcl_vr_sq, '69'); //v2_vrfc_req INSERT
|
||||||
|
$statFaxUp69 = $this->model->chgStatFax($atcl_vr_sq, '69'); //fax_imgs
|
||||||
|
|
||||||
|
// ★모바일이고 검증실패
|
||||||
|
if (!in_array($rlet_type_cd['rlet_type_cd'], array('B01', 'B02', 'B03'))) {//만약 분양권들이면 넘어가고 아니면 체크
|
||||||
|
//1.등기부등본 확인중 시간
|
||||||
|
$tel_doc_conf_dt = $model415->get_cert_M_timeForHistory($atcl_vr_sq);
|
||||||
|
//2.등기부등본 확인실패 시간
|
||||||
|
$cert_comple_dt = $model415->get_cert_failTimeForHistory($atcl_vr_sq);
|
||||||
|
//3.검증실패시간
|
||||||
|
$finishTime = $model415->get_69_ForHistory($atcl_vr_sq);
|
||||||
|
//4.해당 정보를 테이블에 넣는다
|
||||||
|
$model415->insert_v2_time_required_M($v2_vrfc_req['atcl_no'], $v2_vrfc_req['cpid'], $atcl_vrtc_type, $tel_doc_conf_dt['insert_tm'], $cert_comple_dt['insert_tm'], $finishTime['insert_tm']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//상태변경 TABLE INSERT : 등기부등본 확인 불일치 상태로 변경
|
||||||
|
$result_query7 = $this->model->chgStat($atcl_vr_sq, '49', $toDay);
|
||||||
|
$chgVrfc49 = $this->model->chgStatVrfc($atcl_vr_sq, '49'); //v2_vrfc_req INSERT
|
||||||
|
$statFaxUp49 = $this->model->chgStatFax($atcl_vr_sq, '49'); //fax_imgs
|
||||||
|
|
||||||
|
//등기부등본 확인중 상태로 변경.
|
||||||
|
$this->model->saveChangedHistory($atcl_vr_sq, '30', 'C9', $usr_id, '상태변경 : 49 => 30'); //검증결과 변동사항 HISTORY
|
||||||
|
$chgVrfc40 = $this->model->chgStatVrfc($atcl_vr_sq, '30'); //v2_vrfc_req INSERT
|
||||||
|
$statFaxUp40 = $this->model->chgStatFax($atcl_vr_sq, '30'); //fax_imgs
|
||||||
|
|
||||||
|
if ($try_cnt == '1') {
|
||||||
|
//v2_vrfc_req try_cnt 값을 1로 update
|
||||||
|
$this->model->chgRegiTryCnt($atcl_vr_sq, '1');
|
||||||
|
if ($atcl_vrtc_type == 'T') {
|
||||||
|
//검증구분이 전화매물일 경우 사전에 일치로 처리된 값을 초기화 시켜준다.
|
||||||
|
$reset_query = $this->model->resetTelConf($atcl_vr_sq);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ★1차실패
|
||||||
|
if ($atcl_vrtc_type == 'O') {
|
||||||
|
//1.등기부등본 확인중 시간
|
||||||
|
$tel_doc_conf_dt = $model415->get_cert_M_timeForHistory($atcl_vr_sq);
|
||||||
|
//2.등기부등본 확인실패 시간
|
||||||
|
$cert_comple_dt = $model415->get_cert_failTimeForHistory($atcl_vr_sq);
|
||||||
|
//3.검증실패시간
|
||||||
|
$finishTime = $model415->get_69_ForHistory($atcl_vr_sq);
|
||||||
|
//4.해당 정보를 테이블에 넣는다
|
||||||
|
$model415->insert_v2_time_required_M($v2_vrfc_req['atcl_no'], $v2_vrfc_req['cpid'], $atcl_vrtc_type, $tel_doc_conf_dt['insert_tm'], $cert_comple_dt['insert_tm'], $finishTime['insert_tm']);
|
||||||
|
} else {
|
||||||
|
//1.등기부등본 확인중 시간
|
||||||
|
$tel_doc_conf_dt = $model415->get_cert_ing_TimeForHistory($atcl_vr_sq);
|
||||||
|
//2.등기부등본 확인실패 시간
|
||||||
|
$cert_comple_dt = $model415->get_cert_failTimeForHistory($atcl_vr_sq);
|
||||||
|
//3.해당 정보를 테이블에 넣는다
|
||||||
|
$sf = 'F';
|
||||||
|
$model415->update_v2_time_required_Conf($v2_vrfc_req['atcl_no'], $v2_vrfc_req['cpid'], $atcl_vrtc_type, $tel_doc_conf_dt['insert_tm'], $cert_comple_dt['insert_tm'], $sf);
|
||||||
|
}
|
||||||
|
} else if ($try_cnt == '2') {
|
||||||
|
//v2_vrfc_req try_cnt 값을 2로 update
|
||||||
|
$this->model->chgRegiTryCnt($atcl_vr_sq, '2');
|
||||||
|
|
||||||
|
//상태변경 TABLE INSERT : 검증실패 상태로 변경.
|
||||||
|
$result_query9 = $this->model->chgStat($atcl_vr_sq, '69', $toDay);
|
||||||
|
$chgVrfc69 = $this->model->chgStatVrfc($atcl_vr_sq, '69'); //v2_vrfc_req INSERT
|
||||||
|
$statFaxUp69 = $this->model->chgStatFax($atcl_vr_sq, '69'); //fax_imgs
|
||||||
|
|
||||||
|
// ★모바일 이외 검증실패
|
||||||
|
if ($atcl_vrtc_type == 'O') {
|
||||||
|
//1.등기부등본 확인중 시간
|
||||||
|
$tel_doc_conf_dt = $model415->get_cert_M_timeForHistory($atcl_vr_sq);
|
||||||
|
//2.등기부등본 확인실패 시간
|
||||||
|
$cert_comple_dt = $model415->get_cert_failTimeForHistory($atcl_vr_sq);
|
||||||
|
//3.검증실패시간
|
||||||
|
$finishTime = $model415->get_69_ForHistory($atcl_vr_sq);
|
||||||
|
//4.해당 정보를 테이블에 넣는다
|
||||||
|
$model415->insert_v2_time_required_M($v2_vrfc_req['atcl_no'], $v2_vrfc_req['cpid'], $atcl_vrtc_type, $tel_doc_conf_dt['insert_tm'], $cert_comple_dt['insert_tm'], $finishTime['insert_tm']);
|
||||||
|
} else {
|
||||||
|
//1.등기부등본 확인중 시간
|
||||||
|
$tel_doc_conf_dt = $model415->get_cert_ing_TimeForHistory($atcl_vr_sq);
|
||||||
|
//2.등기부등본 확인실패 시간
|
||||||
|
$cert_comple_dt = $model415->get_cert_failTimeForHistory($atcl_vr_sq);
|
||||||
|
//3.해당 정보를 테이블에 넣는다
|
||||||
|
$model415->update_v2_time_required_Conf_Done($v2_vrfc_req['atcl_no'], $v2_vrfc_req['cpid'], $atcl_vrtc_type, $tel_doc_conf_dt['insert_tm'], $cert_comple_dt['insert_tm']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($noimg_chk_chk == 'Y') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '70', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'Y'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0103', '1', 'add'); // 등기부등본이미지 없음 저장
|
||||||
|
}
|
||||||
|
if ($img_chk_chk == 'O') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '77', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'O'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0105', '1', 'add'); // (열람)간소화확인으로 저장
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0102', '1', 'add'); // 불일치로 저장
|
||||||
|
} else if ($img_chk_chk == 'T') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '85', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'T'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0112', '1', 'add'); // 등기소 불일치로 저장
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0102', '1', 'add'); // 불일치로 저장
|
||||||
|
} else if ($img_chk_chk == 'R') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '88', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'R'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0109', '1', 'add'); // 리얼탑 열람 불일치로 저장
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0102', '1', 'add'); // 불일치로 저장
|
||||||
|
} else if ($img_chk_chk == 'G') {
|
||||||
|
$this->model->chgStat($atcl_vr_sq, '89', $toDay);
|
||||||
|
$this->model->updateStat($atcl_vr_sq, 'G'); // reg_status를 업데이트해준다.
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0110', '1', 'add'); // 리얼탑 기열람 불일치로 저장
|
||||||
|
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0102', '1', 'add'); // 불일치로 저장
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (isset($send_result['error'])) {
|
||||||
|
$error_message = $send_result['error']['code'] . "\\n" . $send_result['error']['message'];
|
||||||
|
|
||||||
|
// API 호출 에러 발생시 해당 내용들을 DB에 저장해준다.
|
||||||
|
$err_time = date("Y-m-d H:i:s");
|
||||||
|
$this->model->saveApiErr($atcl_vr_sq, $send_result['error']['code'], $send_result['error']['message'], $err_time, $v2_vrfc_req['atcl_no']);
|
||||||
|
throw new \Exception($error_message);
|
||||||
|
} else {
|
||||||
|
throw new \Exception('네이버 전송 중 오류가 발생되었습니다. 다시 시도하세요.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '0',
|
||||||
|
'msg' => 'success'
|
||||||
|
]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '9',
|
||||||
|
'msg' => $e->getMessage(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 다음매물확인
|
// 다음매물확인
|
||||||
public function nextRegi()
|
public function nextRegi()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
namespace App\Libraries;
|
namespace App\Libraries;
|
||||||
|
|
||||||
use App\Models\common\CommonModel;
|
use App\Models\common\CommonModel;
|
||||||
|
use App\Models\v2\M712Model;
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
class NaverApiClient
|
class NaverApiClient
|
||||||
{
|
{
|
||||||
@@ -122,7 +124,7 @@ class NaverApiClient
|
|||||||
*/
|
*/
|
||||||
public function aptDetail($hscpNo)
|
public function aptDetail($hscpNo)
|
||||||
{
|
{
|
||||||
$url = $this->commonModel->getCompanyInfo(2);
|
$url = $this->commonModel->getCompanyInfo(3);
|
||||||
$url = $url['api_server'] . "/confirms/APTDetail?hscpNo={$hscpNo}";
|
$url = $url['api_server'] . "/confirms/APTDetail?hscpNo={$hscpNo}";
|
||||||
return $this->request('GET', $url);
|
return $this->request('GET', $url);
|
||||||
}
|
}
|
||||||
@@ -134,7 +136,7 @@ class NaverApiClient
|
|||||||
|
|
||||||
public function villaDetail($hscpNo)
|
public function villaDetail($hscpNo)
|
||||||
{
|
{
|
||||||
$url = $this->commonModel->getCompanyInfo(2);
|
$url = $this->commonModel->getCompanyInfo(3);
|
||||||
$url = $url['api_server'] . "/confirms/villa/{$hscpNo}";
|
$url = $url['api_server'] . "/confirms/villa/{$hscpNo}";
|
||||||
return $this->request('GET', $url);
|
return $this->request('GET', $url);
|
||||||
}
|
}
|
||||||
@@ -322,6 +324,117 @@ class NaverApiClient
|
|||||||
return $this->request('POST', $url, $postData);
|
return $this->request('POST', $url, $postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 등기부 등본 확인 결과
|
||||||
|
* 712 OwnerVerifiable 전송 오류 우회 테스트
|
||||||
|
*/
|
||||||
|
public function certification_712($atclNo, $type, $success, $checkList, $charger, $date, $modifyInfo, $ownerVerifiable)
|
||||||
|
{
|
||||||
|
$url = $this->commonModel->getCompanyInfo(3);
|
||||||
|
$url = $url['api_server'] . "/confirms/certification";
|
||||||
|
|
||||||
|
$model712 = new M712Model();
|
||||||
|
$data = $model712->getOwnerVerifiable($atclNo);
|
||||||
|
|
||||||
|
$ov = $data['OwnerVerifiable_change'];
|
||||||
|
if (isset($ov)) {
|
||||||
|
if ($ov > 0) {
|
||||||
|
$ownerVerifiable = true;
|
||||||
|
} else {
|
||||||
|
$ownerVerifiable = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$ownerVerifiable = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$postData = [
|
||||||
|
"atclNo" => $atclNo,
|
||||||
|
"type" => $type,
|
||||||
|
"success" => $success,
|
||||||
|
"checkList" => $checkList,
|
||||||
|
"charger" => $charger,
|
||||||
|
"date" => $date,
|
||||||
|
"modifyInfo" => $modifyInfo,
|
||||||
|
"ownerVerifiable" => $ownerVerifiable
|
||||||
|
];
|
||||||
|
|
||||||
|
log_message('debug', '712 certification_712 => ' . $atclNo . ' ::: ' . json_encode($postData) . PHP_EOL);
|
||||||
|
|
||||||
|
return $this->request('POST', $url, $postData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 현장확인 거주인 여부 변경
|
||||||
|
*/
|
||||||
|
public function residentsExistence($reserveNumber, $isResidentsExist)
|
||||||
|
{
|
||||||
|
$url = $this->commonModel->getCompanyInfo(3);
|
||||||
|
$url = $url['api_server'] . "/residents/existence";
|
||||||
|
|
||||||
|
$postData = [
|
||||||
|
'reserveNumber' => $reserveNumber,
|
||||||
|
'isResidentsExist' => $isResidentsExist
|
||||||
|
];
|
||||||
|
|
||||||
|
return $this->request('POST', $url, $postData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 예약확인 완료
|
||||||
|
*/
|
||||||
|
public function reserveSuccess($reserveNo, $modyfyYn, $agency, $team, $staff, $staffTel, $reserveYmd, $apm)
|
||||||
|
{
|
||||||
|
$url = $this->commonModel->getCompanyInfo(3);
|
||||||
|
$url = $url['api_server'] . "/site/reserveSuccess.nhn";
|
||||||
|
|
||||||
|
$getData = ['reserveNo' => $reserveNo, 'modyfyYn' => $modyfyYn, 'agency' => $agency, 'team' => $team, 'staff' => $staff, 'staffTel' => $staffTel, 'reserveYmd' => $reserveYmd, 'apm' => $apm];
|
||||||
|
|
||||||
|
return $this->request('POST', $url, $getData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 예약확인 실패
|
||||||
|
*/
|
||||||
|
public function reserveFail($reserveNo, $errorCode, $etcTxt)
|
||||||
|
{
|
||||||
|
$url = $this->commonModel->getCompanyInfo(3);
|
||||||
|
$url = $url['api_server'] . "/site/reserveFail.nhn";
|
||||||
|
|
||||||
|
$getData = ['reserveNo' => $reserveNo, 'errorCode' => $errorCode, 'errorDesc' => $etcTxt];
|
||||||
|
|
||||||
|
return $this->request('POST', $url, $getData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 촬영 실패
|
||||||
|
*/
|
||||||
|
public function shootFail($reserveNo, $errorCode, $etcTxt)
|
||||||
|
{
|
||||||
|
$url = $this->commonModel->getCompanyInfo(3);
|
||||||
|
$url = $url['api_server'] . "/site/shootFail.nhn";
|
||||||
|
|
||||||
|
$getData = ['reserveNo' => $reserveNo, 'errorCode' => $errorCode, 'errorDesc' => $etcTxt];
|
||||||
|
|
||||||
|
return $this->request('POST', $url, $getData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 현장확인2 및 썸네일 검수 실패
|
||||||
|
*/
|
||||||
|
public function inspectFail($reserveNumber, $failDescription)
|
||||||
|
{
|
||||||
|
$url = $this->commonModel->getCompanyInfo(3);
|
||||||
|
$url = $url['api_server'] . "/site/vr/inspect/fail";
|
||||||
|
|
||||||
|
$postData = [
|
||||||
|
'reserveNumber' => $reserveNumber,
|
||||||
|
'failDescription' => $failDescription
|
||||||
|
];
|
||||||
|
|
||||||
|
return $this->request('POST', $url, $postData);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CURL 공통 실행 함수
|
* CURL 공통 실행 함수
|
||||||
*/
|
*/
|
||||||
@@ -363,7 +476,7 @@ class NaverApiClient
|
|||||||
'X-Naver-Client-Id: yqBbvQZ123_hjH3b3Df9'
|
'X-Naver-Client-Id: yqBbvQZ123_hjH3b3Df9'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
} elseif ( $method === 'PATCH') {
|
} elseif ($method === 'PATCH') {
|
||||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
|
||||||
if ($data) {
|
if ($data) {
|
||||||
$payload = json_encode($data);
|
$payload = json_encode($data);
|
||||||
|
|||||||
@@ -115,6 +115,22 @@ class DeptModel extends Model
|
|||||||
return $query->getResultArray();
|
return $query->getResultArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 부서검색(상세)
|
||||||
|
*/
|
||||||
|
public function getDeptDetail($dept_sq)
|
||||||
|
{
|
||||||
|
$sql = "SELECT dept_sq, pdept_sq, dept_nm, dept_desc, dept_head, use_yn, depth, insert_tm, insert_usr, update_tm, update_usr, lft, rgt" .
|
||||||
|
" FROM departments" .
|
||||||
|
" WHERE dept_sq = ?";
|
||||||
|
|
||||||
|
$data = array($dept_sq);
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
$row = $query->getRowArray();
|
||||||
|
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
|
|
||||||
// 조직별통계
|
// 조직별통계
|
||||||
public function getDeptStatistics($data)
|
public function getDeptStatistics($data)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -116,6 +116,19 @@ class ReceiptModel extends Model
|
|||||||
return $query->getResultArray();
|
return $query->getResultArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getSrchUserInfo($usr_id)
|
||||||
|
{
|
||||||
|
$sql = "SELECT a.usr_sq, a.usr_id, b.dept_sq, b.pdept_sq FROM users a
|
||||||
|
JOIN departments b ON b.dept_sq = a.dept_sq
|
||||||
|
WHERE a.usr_id = ? AND a.use_yn = 'Y'";
|
||||||
|
|
||||||
|
$data = [$usr_id];
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
$row = $query->getRowArray();
|
||||||
|
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 부서검색(상세)
|
* 부서검색(상세)
|
||||||
*/
|
*/
|
||||||
@@ -149,6 +162,31 @@ class ReceiptModel extends Model
|
|||||||
return $query->getResultArray();
|
return $query->getResultArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 사용자 상세정보
|
||||||
|
*/
|
||||||
|
public function getUserDetail($usr_sq)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table('users a');
|
||||||
|
|
||||||
|
$builder->select("
|
||||||
|
a.usr_sq,
|
||||||
|
a.dept_sq,
|
||||||
|
a.usr_id,
|
||||||
|
a.usr_nm,
|
||||||
|
a.usr_level,
|
||||||
|
a.usr_tel1,
|
||||||
|
a.usr_tel2,
|
||||||
|
b.dept_nm
|
||||||
|
", false);
|
||||||
|
|
||||||
|
$builder->join('departments b', 'a.dept_sq = b.dept_sq', 'left');
|
||||||
|
$builder->where('a.usr_sq', $usr_sq);
|
||||||
|
|
||||||
|
return $builder->get()->getRowArray();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function getTotalCount($data)
|
public function getTotalCount($data)
|
||||||
{
|
{
|
||||||
$usr_sq = session('usr_sq');
|
$usr_sq = session('usr_sq');
|
||||||
@@ -1179,10 +1217,27 @@ class ReceiptModel extends Model
|
|||||||
|
|
||||||
$builder->where('a.rcpt_key', $id);
|
$builder->where('a.rcpt_key', $id);
|
||||||
|
|
||||||
|
|
||||||
return $builder->get()->getRowArray();
|
return $builder->get()->getRowArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 사용자의 지정일자에 배정된 목록을 가져온다. (시간, 위치만...)
|
||||||
|
*/
|
||||||
|
public function getAssignReceiptListByUser($rsrv_date, $usr_sq, $arrExcept = [])
|
||||||
|
{
|
||||||
|
$sql = "SELECT a.rcpt_key, a.rcpt_atclno, a.rcpt_x, a.rcpt_y, b.rsrv_tm_ap, b.rsrv_tm_hour" .
|
||||||
|
" FROM receipt a" .
|
||||||
|
" INNER JOIN result b ON b.rcpt_sq = a.rcpt_sq AND b.usr_sq = ? AND b.rsrv_date = ?" .
|
||||||
|
" WHERE a.rcpt_key not in (?)";
|
||||||
|
$except_rcptKey = implode(',', $arrExcept);
|
||||||
|
$data = array($usr_sq, $rsrv_date, $except_rcptKey);
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
$res = $query->getResultArray();
|
||||||
|
|
||||||
|
|
||||||
|
return $res;
|
||||||
|
}
|
||||||
|
|
||||||
public function getDupleGP($rcpt_key, $rcpt_sido, $rcpt_gugun, $rcpt_dong, $rcpt_hscp_nm, $rcpt_dtl_addr, $rcpt_ho)
|
public function getDupleGP($rcpt_key, $rcpt_sido, $rcpt_gugun, $rcpt_dong, $rcpt_hscp_nm, $rcpt_dtl_addr, $rcpt_ho)
|
||||||
{
|
{
|
||||||
$sql = "select rcpt_sq, c.rcpt_key, c.photo_save_dt from" .
|
$sql = "select rcpt_sq, c.rcpt_key, c.photo_save_dt from" .
|
||||||
@@ -1426,6 +1481,40 @@ class ReceiptModel extends Model
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 거주여부 저장
|
||||||
|
public function saveResDB($rcpt_sq, $rsrv_sq, $resYn, $dbUsageAgrYn)
|
||||||
|
{
|
||||||
|
$this->db->transStart();
|
||||||
|
$usr_id = session('usr_id');
|
||||||
|
|
||||||
|
$sql = "SELECT result_cd3, resYn, dbUsageAgrYn FROM result WHERE rsrv_sq = ?";
|
||||||
|
$data = array($rsrv_sq);
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
$row = $query->getRowArray();
|
||||||
|
|
||||||
|
$sql = "UPDATE result" .
|
||||||
|
" SET resYn = ?" .
|
||||||
|
" ,dbUsageAgrYn = ?" .
|
||||||
|
" WHERE rsrv_sq = ?" .
|
||||||
|
" AND rcpt_sq = ?";
|
||||||
|
$data = array($resYn, $dbUsageAgrYn, $rsrv_sq, $rcpt_sq);
|
||||||
|
|
||||||
|
if ($this->db->query($sql, $data) === false) {
|
||||||
|
return [
|
||||||
|
'success' => false,
|
||||||
|
'msg' => '저장실패',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->saveChangedHistory($rcpt_sq, $row['result_cd3'], 'C24', $usr_id, $row['resYn'] . "|" . $row['dbUsageAgrYn']);
|
||||||
|
|
||||||
|
$this->db->transComplete();
|
||||||
|
|
||||||
|
return [
|
||||||
|
'success' => true,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
// 평면도요청 저장
|
// 평면도요청 저장
|
||||||
public function saveGround($rcpt_sq, $ground_plan)
|
public function saveGround($rcpt_sq, $ground_plan)
|
||||||
{
|
{
|
||||||
@@ -2044,4 +2133,202 @@ class ReceiptModel extends Model
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 배정자 등록
|
||||||
|
*/
|
||||||
|
public function assignRegist($rcpt_sq, $rsrv_date, $rsrv_tm_ap, $rsrv_tm_hour, $dept_sq, $usr_sq, $receipt)
|
||||||
|
{
|
||||||
|
// 세션정보
|
||||||
|
$usr_id = session('usr_id');
|
||||||
|
$reg_usr_sq = session('usr_sq');
|
||||||
|
|
||||||
|
$this->db->transStart();
|
||||||
|
|
||||||
|
// 변경전 기존 데이터 가져오기
|
||||||
|
$org_sql = "SELECT * FROM result WHERE rcpt_sq = ?";
|
||||||
|
$query = $this->db->query($org_sql, [$rcpt_sq]);
|
||||||
|
$row = $query->getRowArray();
|
||||||
|
|
||||||
|
// 예약확인
|
||||||
|
$sql1 = "UPDATE result" .
|
||||||
|
" SET rsrv_date = ?" .
|
||||||
|
" ,rsrv_tm_ap = ?" .
|
||||||
|
" ,rsrv_tm_hour = ?" .
|
||||||
|
" ,rsrv_save_dt = now()" .
|
||||||
|
" ,update_tm = now()" .
|
||||||
|
" ,update_usr = ?" .
|
||||||
|
" WHERE rcpt_sq = ?";
|
||||||
|
|
||||||
|
$data1 = [
|
||||||
|
$rsrv_date,
|
||||||
|
$rsrv_tm_ap,
|
||||||
|
$rsrv_tm_hour,
|
||||||
|
$reg_usr_sq,
|
||||||
|
$rcpt_sq
|
||||||
|
];
|
||||||
|
|
||||||
|
if ($this->db->query($sql1, $data1) === false) {
|
||||||
|
return [
|
||||||
|
'success' => false,
|
||||||
|
'msg' => '저장 실패',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 배정
|
||||||
|
$sql2 = "UPDATE result" .
|
||||||
|
" SET dept_sq = ?" .
|
||||||
|
" ,usr_sq = ?" .
|
||||||
|
" ,result_cd1 = 20" .
|
||||||
|
" ,result_cd2 = 2000" .
|
||||||
|
" ,result_cd3 = 200000" .
|
||||||
|
" ,update_usr = ?" .
|
||||||
|
" ,update_tm = now()" .
|
||||||
|
" ,assign_save_dt = now()" .
|
||||||
|
" ,rsrv_cplt_dt = now()" .
|
||||||
|
" WHERE rcpt_sq = ?";
|
||||||
|
|
||||||
|
$data2 = [
|
||||||
|
$dept_sq,
|
||||||
|
$usr_sq,
|
||||||
|
$reg_usr_sq,
|
||||||
|
$rcpt_sq
|
||||||
|
];
|
||||||
|
|
||||||
|
if ($this->db->query($sql2, $data2) === false) {
|
||||||
|
return [
|
||||||
|
'success' => false,
|
||||||
|
'msg' => '저장 실패',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 매물상태 변경
|
||||||
|
$rcpt_sql = "UPDATE receipt" .
|
||||||
|
" SET rcpt_stat = 200000" .
|
||||||
|
" WHERE rcpt_sq = ?";
|
||||||
|
$this->db->query($rcpt_sql, [$rcpt_sq]);
|
||||||
|
|
||||||
|
// 정보변경이력 저장
|
||||||
|
if (!empty($row)) {
|
||||||
|
$remark = "{$row['rsrv_date']} {$row['rsrv_tm_ap']} {$row['rsrv_tm_hour']}시 -> {$rsrv_date} {$rsrv_tm_ap} {$rsrv_tm_hour}시";
|
||||||
|
} else {
|
||||||
|
$remark = "{$receipt['rsrv_date']} {$receipt['rsrv_tm_ap']} -> {$rsrv_date} {$rsrv_tm_hour}";
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->saveChangedHistory($rcpt_sq, '200000', 'C11', $usr_id, $remark);
|
||||||
|
|
||||||
|
$this->db->transComplete();
|
||||||
|
|
||||||
|
|
||||||
|
return [
|
||||||
|
'success' => true,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 취소
|
||||||
|
*/
|
||||||
|
public function rsrvcancel($rcpt_sq, $rsrv_sq, $result_cd2, $result_cd3, $result_msg, $receipt)
|
||||||
|
{
|
||||||
|
// 세션정보
|
||||||
|
$usr_id = session('usr_id');
|
||||||
|
$usr_sq = session('usr_sq');
|
||||||
|
$usr_nm = session('usr_nm');
|
||||||
|
|
||||||
|
// 변경전 기존 데이터 가져오기
|
||||||
|
$org_sql = "SELECT * FROM result WHERE rcpt_sq = ?";
|
||||||
|
$query = $this->db->query($org_sql, [$rcpt_sq]);
|
||||||
|
$row = $query->getRowArray();
|
||||||
|
|
||||||
|
$this->db->transStart();
|
||||||
|
|
||||||
|
if ($result_cd2 == "9050") {
|
||||||
|
$sql = "UPDATE result" .
|
||||||
|
" SET result_cd1 = '90'" .
|
||||||
|
" ,result_cd2 = ?" .
|
||||||
|
" ,result_cd3 = ?" .
|
||||||
|
" ,result_msg = ?" .
|
||||||
|
" ,check_fail_dt = now()" .
|
||||||
|
" ,update_usr = ?" .
|
||||||
|
" ,update_tm = now()" .
|
||||||
|
" WHERE rsrv_sq = ?";
|
||||||
|
} else {
|
||||||
|
$sql = "UPDATE result" .
|
||||||
|
" SET result_cd1 = '90'" .
|
||||||
|
" ,result_cd2 = ?" .
|
||||||
|
" ,result_cd3 = ?" .
|
||||||
|
" ,result_msg = ?" .
|
||||||
|
" ,cancel_dt = now()" .
|
||||||
|
" ,update_usr = ?" .
|
||||||
|
" ,update_tm = now()" .
|
||||||
|
" WHERE rsrv_sq = ?";
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
$result_cd2,
|
||||||
|
$result_cd3,
|
||||||
|
$result_msg,
|
||||||
|
$usr_sq,
|
||||||
|
$rsrv_sq
|
||||||
|
];
|
||||||
|
|
||||||
|
$res = $this->db->query($sql, $data);
|
||||||
|
|
||||||
|
if (!$res) {
|
||||||
|
$return = [
|
||||||
|
'success' => false,
|
||||||
|
'msg' => '저장실패',
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
// 매물상태 변경
|
||||||
|
$rcpt_sql = "UPDATE receipt" .
|
||||||
|
" SET rcpt_stat = ?" .
|
||||||
|
" WHERE rcpt_sq = ?";
|
||||||
|
$rcpt_data = [$result_cd3, $rcpt_sq];
|
||||||
|
$this->db->query($rcpt_sql, $rcpt_data);
|
||||||
|
|
||||||
|
// 정보변경이력 저장
|
||||||
|
if (!empty($row['result_msg'])) {
|
||||||
|
$remark = $row['result_msg'] . " -> " . $result_msg;
|
||||||
|
} else {
|
||||||
|
$remark = $result_msg;
|
||||||
|
}
|
||||||
|
$this->saveChangedHistory($rcpt_sq, $result_cd3, 'C5', $usr_id, $remark);
|
||||||
|
|
||||||
|
// 문자발송
|
||||||
|
if ($result_cd2 == "9010" || $result_cd2 == "9020") {
|
||||||
|
// 접수취소, 예약취소
|
||||||
|
$this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S2', $receipt);
|
||||||
|
} else if ($result_cd2 == "9030") {
|
||||||
|
// 방문전 취소
|
||||||
|
$this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S4', $receipt);
|
||||||
|
} else if ($result_cd2 == "9040") {
|
||||||
|
// 방문후 취소
|
||||||
|
$this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S5', $receipt);
|
||||||
|
$this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S5-1', $receipt);
|
||||||
|
} else if ($result_cd2 == "9045") {
|
||||||
|
// 촬영후 취소
|
||||||
|
$this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S6', $receipt);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($result_cd3 == "905010") {
|
||||||
|
// 거주인녹취실패 취소(검수실패)
|
||||||
|
$this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S9', $receipt);
|
||||||
|
$this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S9-1', $receipt);
|
||||||
|
} else if ($result_cd3 == "905020") {
|
||||||
|
// 홍보확인서 미수취 취소(검수실패)
|
||||||
|
$this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S11', $receipt);
|
||||||
|
$this->sendSms($receipt['agent_head_tel'], $receipt['agent_nm'], '1600-5749', $usr_nm, 0, $rsrv_sq, $rcpt_sq, 'S11-1', $receipt);
|
||||||
|
}
|
||||||
|
|
||||||
|
$return = [
|
||||||
|
'success' => true,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->db->transComplete();
|
||||||
|
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -146,4 +146,21 @@ class ReceiptModel extends Model
|
|||||||
$data = [$imgSq, $faxSq];
|
$data = [$imgSq, $faxSq];
|
||||||
$this->db->query($sql, $data);
|
$this->db->query($sql, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// receipt 에서 지정한 1건만 가져온다.
|
||||||
|
public function selectReceiptOne($rcpt_sq)
|
||||||
|
{
|
||||||
|
$sql = "SELECT a.rcpt_sq,a.comp_sq,a.rcpt_rating,a.rcpt_key,a.rcpt_atclno,a.rcpt_type,a.rcpt_product,a.rcpt_product_nm,a.rcpt_product_area,a.rcpt_product_price,a.rcpt_product_info1,a.rcpt_product_info2,a.rcpt_product_info3,a.rcpt_product_info4,a.rcpt_product_info5,a.rcpt_office,a.rcpt_agent,a.rcpt_sido,a.rcpt_gugun,a.rcpt_dong,a.rcpt_hscp_nm,a.rcpt_dtl_addr,a.rcpt_floor,a.rcpt_bunji,a.rcpt_ho,a.rcpt_tm,a.rcpt_stat,a.rcpt_x,a.rcpt_y,a.rcpt_living_yn,a.cust_nm,a.cust_tel1,a.cust_tel2,a.cust_zip,a.cust_addr1,a.cust_addr2,a.remark,a.agent_id,a.agent_nm,a.agent_head,a.agent_head_tel,a.agent_contact,a.agent_contact_tel,a.agent_fax,a.rsrv_date,a.rsrv_tm_ap,a.insert_usr,a.insert_tm,a.update_usr,a.update_tm,a.svc_type1,a.svc_type2,a.reconf_yn,a.rcpt_exps_type" .
|
||||||
|
", b.region_nm" .
|
||||||
|
", c.rsrv_sq" .
|
||||||
|
" FROM receipt a" .
|
||||||
|
" LEFT JOIN region_codes b ON b.region_cd = a.rcpt_dong" .
|
||||||
|
" LEFT JOIN result c on c.rcpt_sq = a.rcpt_sq" .
|
||||||
|
" WHERE a.rcpt_sq = ?" .
|
||||||
|
" limit 1";
|
||||||
|
$data = [$rcpt_sq];
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
|
||||||
|
return $query->getRowArray();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1345,7 +1345,7 @@ class M701Model extends Model
|
|||||||
$comment = implode('|', $comment);
|
$comment = implode('|', $comment);
|
||||||
}
|
}
|
||||||
|
|
||||||
$usr_sq = $this->session->userdata('usr_sq');
|
$usr_sq = session('usr_sq');
|
||||||
$sql = "INSERT INTO v2_check_list" .
|
$sql = "INSERT INTO v2_check_list" .
|
||||||
"(vr_sq, vrfc_type, type, code, comment, insert_user, insert_tm)" .
|
"(vr_sq, vrfc_type, type, code, comment, insert_user, insert_tm)" .
|
||||||
"VALUES" .
|
"VALUES" .
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
namespace App\Models\v2;
|
namespace App\Models\v2;
|
||||||
|
|
||||||
use App\Models\receipt\ReceiptModel;
|
use App\Models\receipt\ReceiptModel;
|
||||||
|
use App\Models\webfax\FaxModel;
|
||||||
use CodeIgniter\Model;
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
class M703Model extends Model
|
class M703Model extends Model
|
||||||
@@ -1504,8 +1505,9 @@ class M703Model extends Model
|
|||||||
$this->saveChangedHistory($vr_sq, '35', 'C9', $insert_id, '현장확인 매물');
|
$this->saveChangedHistory($vr_sq, '35', 'C9', $insert_id, '현장확인 매물');
|
||||||
|
|
||||||
|
|
||||||
$fax = $this->fax_model->selectFax($fax_sq); // fax 이미지 파일 가져오기
|
$faxModel = new FaxModel();
|
||||||
$receipt = $this->receipt_model->selectReceiptOne($vr_sq); // 매물정보 가져오기
|
$fax = $faxModel->selectFax($fax_sq); // fax 이미지 파일 가져오기
|
||||||
|
$receipt = $this->selectReceiptOne($vr_sq); // 매물정보 가져오기
|
||||||
|
|
||||||
// 40: 촬영, 70: 검수지연... 상태가 촬용 이전 또는 검수지연 상태일 경우에만 홍보확인서를 등록한다.
|
// 40: 촬영, 70: 검수지연... 상태가 촬용 이전 또는 검수지연 상태일 경우에만 홍보확인서를 등록한다.
|
||||||
if (substr($receipt['rcpt_stat'], 0, 2) <= '40' || substr($receipt['rcpt_stat'], 0, 2) == '70') {
|
if (substr($receipt['rcpt_stat'], 0, 2) <= '40' || substr($receipt['rcpt_stat'], 0, 2) == '70') {
|
||||||
@@ -2115,8 +2117,8 @@ class M703Model extends Model
|
|||||||
*/
|
*/
|
||||||
public function saveChangeStep($fax_sq, $vr_sq, $stat_cd)
|
public function saveChangeStep($fax_sq, $vr_sq, $stat_cd)
|
||||||
{
|
{
|
||||||
$insert_user = $this->session->userdata('usr_sq');
|
$insert_user = session('usr_sq');
|
||||||
$insert_id = $this->session->userdata('usr_id');
|
$insert_id = session('usr_id');
|
||||||
|
|
||||||
$this->db->transStart();
|
$this->db->transStart();
|
||||||
|
|
||||||
|
|||||||
@@ -1187,7 +1187,7 @@ class M705Model extends Model
|
|||||||
|
|
||||||
public function InsResChar($atcl_vr_sq)
|
public function InsResChar($atcl_vr_sq)
|
||||||
{
|
{
|
||||||
$usr_id = $this->session->userdata('usr_id');
|
$usr_id = session('usr_id');
|
||||||
|
|
||||||
$sql = "UPDATE v2_article_info" .
|
$sql = "UPDATE v2_article_info" .
|
||||||
" SET reg_charger = ?" .
|
" SET reg_charger = ?" .
|
||||||
|
|||||||
@@ -1056,7 +1056,7 @@ class M706Model extends Model
|
|||||||
public function insertChkList($vr_sq, $vrfc_type, $type, $code, $comment)
|
public function insertChkList($vr_sq, $vrfc_type, $type, $code, $comment)
|
||||||
{ //v2_check_list INSERT
|
{ //v2_check_list INSERT
|
||||||
|
|
||||||
$usr_sq = $this->session->userdata('usr_sq');
|
$usr_sq = session('usr_sq');
|
||||||
|
|
||||||
|
|
||||||
$sql = "INSERT INTO v2_check_list" .
|
$sql = "INSERT INTO v2_check_list" .
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace App\Models\v2;
|
namespace App\Models\v2;
|
||||||
|
|
||||||
|
use App\Models\receipt\ReceiptModel;
|
||||||
|
use App\Models\webfax\FaxModel;
|
||||||
use CodeIgniter\Model;
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
class M708Model extends Model
|
class M708Model extends Model
|
||||||
@@ -961,7 +963,7 @@ class M708Model extends Model
|
|||||||
$current_tm = date('Y-m-d H:i:s');
|
$current_tm = date('Y-m-d H:i:s');
|
||||||
$article = $this->getArticleInfo2($atcl_no, $vr_sq);
|
$article = $this->getArticleInfo2($atcl_no, $vr_sq);
|
||||||
|
|
||||||
$this->saveFaxImgs($fax_sq, '2', $vr_sq, $atcl_no, $article['cpid'], $article['realtor_nm'], $article['stat_cd'], $current_tm, $article['address_code'], $article['address2']);
|
$this->saveFaxImgs($fax_sq, '2', $vr_sq, $atcl_no, $article['cpid'], $article['realtor_nm'], $article['stat_cd'], $current_tm, $article['address_code'], $article['address2'], 'Y');
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'success' => true,
|
'success' => true,
|
||||||
@@ -1215,6 +1217,754 @@ class M708Model extends Model
|
|||||||
return $row;
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 매물정보와 FAX를 연결해 준다.
|
||||||
|
*/
|
||||||
|
public function 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, $stat_cd = '')
|
||||||
|
{
|
||||||
|
// 1. 매물정보 저장 fax_imgs
|
||||||
|
// 2.1 확인결과 저장 v2_confirms
|
||||||
|
// 2.2 확인정보 체크 v2_check_list
|
||||||
|
// 3.1 검증요청 상태변경 v2_vrfc_req
|
||||||
|
// 3.2 상태변경 저장 v2_chg_stat
|
||||||
|
// 4. 첨부파일 저장 v2_files
|
||||||
|
// 5. 변경이력 저장 v2_chg_history
|
||||||
|
// 6. kiso 전송하기
|
||||||
|
|
||||||
|
$this->db->transStart();
|
||||||
|
|
||||||
|
$article = NULL;
|
||||||
|
$current_tm = date('Y-m-d H:i:s');
|
||||||
|
$insert_user = session('usr_sq');
|
||||||
|
$insert_id = session('usr_id');
|
||||||
|
$update_user = $insert_user;
|
||||||
|
|
||||||
|
switch ($work_type) {
|
||||||
|
case '1': // 현장확인매물
|
||||||
|
$article = $this->getArticleInfo1($atcl_no, $vr_sq);
|
||||||
|
|
||||||
|
// 1. 매물정보 저장 fax_imgs
|
||||||
|
$this->saveFaxImgs($fax_sq, $work_type, $vr_sq, $atcl_no, $article['cpid'], $article['realtor_nm'], '35', $current_tm, $article['address_code'], $article['address2'], 'Y');
|
||||||
|
|
||||||
|
// 2.1 확인결과 저장 v2_confirm
|
||||||
|
|
||||||
|
if ($result_d11 == '10000' && $fax_conf_yn_1 == 'Y' && $fax_conf_yn_2 == 'Y' && $fax_conf_yn_3 == 'Y') {
|
||||||
|
$success = TRUE;
|
||||||
|
} else {
|
||||||
|
$success = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
$fax = $this->getDetail($fax_sq);
|
||||||
|
$this->saveV2Confirm($vr_sq, 'D', $success, '1', $fax['charger'], $current_tm, $insert_user, $update_user, $work_type);
|
||||||
|
|
||||||
|
// 2.2 확인정보 체크 v2_check_list
|
||||||
|
// $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 (is_array($comment_d11)) {
|
||||||
|
$comment = implode('|', $comment_d11);
|
||||||
|
} else {
|
||||||
|
$comment = $comment_d11;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->saveV2CheckList($vr_sq, 'D', 'D11', $result_d11, $comment, $insert_user);
|
||||||
|
|
||||||
|
if ($fax_conf_yn_1 == 'Y') {
|
||||||
|
$fax_conf_yn_1 = '10000';
|
||||||
|
} else {
|
||||||
|
$fax_conf_yn_1 = '20000';
|
||||||
|
}
|
||||||
|
$this->saveV2CheckList($vr_sq, 'D', 'D12', $fax_conf_yn_1, $fax_conf_info_1, $insert_user);
|
||||||
|
|
||||||
|
if ($fax_conf_yn_2 == 'Y') {
|
||||||
|
$fax_conf_yn_2 = '10000';
|
||||||
|
} else {
|
||||||
|
$fax_conf_yn_2 = '20000';
|
||||||
|
}
|
||||||
|
$this->saveV2CheckList($vr_sq, 'D', 'D13', $fax_conf_yn_2, $fax_conf_info_2, $insert_user);
|
||||||
|
|
||||||
|
if ($fax_conf_yn_3 == 'Y') {
|
||||||
|
$fax_conf_yn_3 = '10000';
|
||||||
|
} else {
|
||||||
|
$fax_conf_yn_3 = '20000';
|
||||||
|
}
|
||||||
|
$this->saveV2CheckList($vr_sq, 'D', 'D14', $fax_conf_yn_3, $fax_conf_info_3, $insert_user);
|
||||||
|
|
||||||
|
$this->saveV2ChgHistory($vr_sq, '35', 'C9', $insert_id, '현장확인 매물');
|
||||||
|
|
||||||
|
$faxModel = new FaxModel();
|
||||||
|
$fax = $faxModel->selectFax($fax_sq); // fax 이미지 파일 가져오기
|
||||||
|
|
||||||
|
$receiptModel = new ReceiptModel();
|
||||||
|
$receipt = $receiptModel->selectReceiptOne($vr_sq); // 매물정보 가져오기
|
||||||
|
|
||||||
|
// 40: 촬영, 70: 검수지연... 상태가 촬용 이전 또는 검수지연 상태일 경우에만 홍보확인서를 등록한다.
|
||||||
|
if (substr($receipt['rcpt_stat'], 0, 2) <= '40' || substr($receipt['rcpt_stat'], 0, 2) == '70') {
|
||||||
|
$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/',
|
||||||
|
);
|
||||||
|
|
||||||
|
$image_path = str_replace($arrImagePath, '/upload/', $fax['file_path']);
|
||||||
|
|
||||||
|
$receiptModel->saveFaxImage($fax_sq, $receipt['rcpt_sq'], $receipt['rsrv_sq'], 'I1', $image_path, $fax['file_name'], '.jpg', $fax['img_size'], $fax['img_width'], $fax['img_height'], $receipt);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '2': // 일반확인매물
|
||||||
|
$article = $this->getArticleInfo2($atcl_no, $vr_sq);
|
||||||
|
|
||||||
|
$try_cnt = $article['try_cnt']; // 0 -> 1 차시도, 1 -> 2 차시도
|
||||||
|
$try_cnt = $try_cnt + 1;
|
||||||
|
|
||||||
|
//memo 저장
|
||||||
|
$res_memo = $this->saveMemo([$memo, $vr_sq]);
|
||||||
|
|
||||||
|
$stat_cd = "30"; // 전화/서류 확인 중
|
||||||
|
|
||||||
|
if ($result_d11 == '10000' && $fax_conf_yn_1 == 'Y' && $fax_conf_yn_2 == 'Y' && $fax_conf_yn_3 == 'Y') {
|
||||||
|
$success = TRUE; // 전화/서류 확인 성공
|
||||||
|
} else {
|
||||||
|
$success = FALSE; // 전화/서류 확인 실패
|
||||||
|
}
|
||||||
|
|
||||||
|
// 1. 매물정보 저장 fax_imgs
|
||||||
|
$r = $this->saveFaxImgs($fax_sq, $work_type, $article['vr_sq'], $article['atcl_no'], $article['cpid'], $article['realtor_nm'], $stat_cd, $current_tm, $article['address_code'], $article['address2'], 'Y');
|
||||||
|
|
||||||
|
// 2.1 확인결과 저장 v2_confirm
|
||||||
|
$fax = $this->getDetail($fax_sq);
|
||||||
|
$this->saveV2Confirm($vr_sq, 'D', $success, $try_cnt, $fax['charger'], $current_tm, $insert_user, $update_user, $work_type);
|
||||||
|
|
||||||
|
// 2.2 확인정보 체크 v2_check_list
|
||||||
|
// $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 (is_array($comment_d11)) {
|
||||||
|
$comment = implode('|', $comment_d11);
|
||||||
|
} else {
|
||||||
|
$comment = $comment_d11;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->saveV2CheckList($vr_sq, 'D', 'D11', $result_d11, $comment, $insert_user);
|
||||||
|
|
||||||
|
if ($fax_conf_yn_1 == 'Y') {
|
||||||
|
$fax_conf_yn_1 = '10000';
|
||||||
|
} else {
|
||||||
|
$fax_conf_yn_1 = '20000';
|
||||||
|
}
|
||||||
|
$this->saveV2CheckList($vr_sq, 'D', 'D12', $fax_conf_yn_1, $fax_conf_info_1, $insert_user);
|
||||||
|
|
||||||
|
if ($fax_conf_yn_2 == 'Y') {
|
||||||
|
$fax_conf_yn_2 = '10000';
|
||||||
|
} else {
|
||||||
|
$fax_conf_yn_2 = '20000';
|
||||||
|
}
|
||||||
|
$this->saveV2CheckList($vr_sq, 'D', 'D13', $fax_conf_yn_2, $fax_conf_info_2, $insert_user);
|
||||||
|
|
||||||
|
if ($fax_conf_yn_3 == 'Y') {
|
||||||
|
$fax_conf_yn_3 = '10000';
|
||||||
|
} else {
|
||||||
|
$fax_conf_yn_3 = '20000';
|
||||||
|
}
|
||||||
|
$this->saveV2CheckList($vr_sq, 'D', 'D14', $fax_conf_yn_3, $fax_conf_info_3, $insert_user);
|
||||||
|
|
||||||
|
if ($success == TRUE) {
|
||||||
|
$stat_cd = '35'; // 서류확인완료
|
||||||
|
$this->saveV2ChgStat($vr_sq, $stat_cd, $insert_user);
|
||||||
|
|
||||||
|
$rgbk_confirm = $this->getRgbk_confirm($vr_sq);
|
||||||
|
if (empty($rgbk_confirm)) {
|
||||||
|
// 등기부등본 확인이 불필요할 경우
|
||||||
|
$stat_cd = '60'; // 등기부등본 확인 중
|
||||||
|
$this->saveV2ChgStat($vr_sq, $stat_cd, $insert_user);
|
||||||
|
} else {
|
||||||
|
// 등기부등본 확인이 필요할 경우
|
||||||
|
$stat_cd = '40'; // 등기부등본 확인 중
|
||||||
|
$this->saveV2ChgStat($vr_sq, $stat_cd, $insert_user);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$stat_cd = '39'; // 서류확인 불일치
|
||||||
|
$this->saveV2ChgStat($vr_sq, $stat_cd, $insert_user);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3.1 검증요청 상태변경 v2_vrfc_req
|
||||||
|
$this->saveV2VrfcReq($vr_sq, $stat_cd);
|
||||||
|
|
||||||
|
// 4. 첨부파일 저장 v2_files
|
||||||
|
// fax_sq, mid, file_name, file_path, thumbnail, img_width, img_height, img_size, img_sq, remark, work_type, atcl_no, cpid, realtor_nm, stat_cd, proc_tm, send_tm, address_code, address2, charger
|
||||||
|
$pos = strpos($fax['file_name'], '.');
|
||||||
|
if ($pos === false) {
|
||||||
|
$file_ext = '';
|
||||||
|
} else {
|
||||||
|
$file_ext = substr($fax['file_name'], $pos);
|
||||||
|
}
|
||||||
|
$this->saveV2Files($vr_sq, $fax['file_path'], $fax['file_name'], $file_ext, $fax['img_size'], $fax['img_width'], $fax['img_height'], $insert_user);
|
||||||
|
|
||||||
|
// 5. 변경이력 저장 v2_chg_history
|
||||||
|
$memo = '';
|
||||||
|
$this->saveV2ChgHistory($vr_sq, $stat_cd, 'C9', $insert_id, $memo);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: // 오류
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function 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, $stat_cd = '')
|
||||||
|
{
|
||||||
|
// 1. 매물정보 저장 fax_imgs
|
||||||
|
// 2.1 확인결과 저장 v2_confirms
|
||||||
|
// 2.2 확인정보 체크 v2_check_list
|
||||||
|
// 3.1 검증요청 상태변경 v2_vrfc_req
|
||||||
|
// 3.2 상태변경 저장 v2_chg_stat
|
||||||
|
// 4. 첨부파일 저장 v2_files
|
||||||
|
// 5. 변경이력 저장 v2_chg_history
|
||||||
|
// 6. kiso 전송하기
|
||||||
|
|
||||||
|
$this->db->transStart();
|
||||||
|
|
||||||
|
$article = NULL;
|
||||||
|
$current_tm = date('Y-m-d H:i:s');
|
||||||
|
$insert_user = session('usr_sq');
|
||||||
|
$insert_id = session('usr_id');
|
||||||
|
$update_user = $insert_user;
|
||||||
|
|
||||||
|
$article = $this->getArticleInfo1($atcl_no, $vr_sq);
|
||||||
|
|
||||||
|
// 1. 매물정보 저장 fax_imgs
|
||||||
|
$this->saveFaxImgs($fax_sq, $work_type, $vr_sq, $atcl_no, $article['cpid'], $article['realtor_nm'], '35', $current_tm, $article['address_code'], $article['address2'], $send_yn);
|
||||||
|
|
||||||
|
|
||||||
|
// 2.1 확인결과 저장 v2_confirm
|
||||||
|
|
||||||
|
if ($result_d11 == '10000' && $fax_conf_yn_1 == 'Y' && $fax_conf_yn_2 == 'Y' && $fax_conf_yn_3 == 'Y') {
|
||||||
|
$success = TRUE;
|
||||||
|
} else {
|
||||||
|
$success = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
$fax = $this->getDetail($fax_sq);
|
||||||
|
$this->saveV2Confirm($vr_sq, 'D', $success, '1', $fax['charger'], $current_tm, $insert_user, $update_user, $work_type);
|
||||||
|
|
||||||
|
// 2.2 확인정보 체크 v2_check_list
|
||||||
|
// $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 (is_array($comment_d11)) {
|
||||||
|
$comment = implode('|', $comment_d11);
|
||||||
|
} else {
|
||||||
|
$comment = $comment_d11;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->saveV2CheckList($vr_sq, 'D', 'D11', $result_d11, $comment, $insert_user);
|
||||||
|
|
||||||
|
if ($fax_conf_yn_1 == 'Y') {
|
||||||
|
$fax_conf_yn_1 = '10000';
|
||||||
|
} else {
|
||||||
|
$fax_conf_yn_1 = '20000';
|
||||||
|
}
|
||||||
|
$this->saveV2CheckList($vr_sq, 'D', 'D12', $fax_conf_yn_1, $fax_conf_info_1, $insert_user);
|
||||||
|
|
||||||
|
if ($fax_conf_yn_2 == 'Y') {
|
||||||
|
$fax_conf_yn_2 = '10000';
|
||||||
|
} else {
|
||||||
|
$fax_conf_yn_2 = '20000';
|
||||||
|
}
|
||||||
|
$this->saveV2CheckList($vr_sq, 'D', 'D13', $fax_conf_yn_2, $fax_conf_info_2, $insert_user);
|
||||||
|
|
||||||
|
if ($fax_conf_yn_3 == 'Y') {
|
||||||
|
$fax_conf_yn_3 = '10000';
|
||||||
|
} else {
|
||||||
|
$fax_conf_yn_3 = '20000';
|
||||||
|
}
|
||||||
|
$this->saveV2CheckList($vr_sq, 'D', 'D14', $fax_conf_yn_3, $fax_conf_info_3, $insert_user);
|
||||||
|
|
||||||
|
$this->saveV2ChgHistory($vr_sq, '35', 'C9', $insert_id, '현장확인 매물');
|
||||||
|
|
||||||
|
$faxModel = new FaxModel();
|
||||||
|
$fax = $faxModel->selectFax($fax_sq); // fax 이미지 파일 가져오기
|
||||||
|
|
||||||
|
$receiptModel = new ReceiptModel();
|
||||||
|
$receipt = $receiptModel->selectReceiptOne($vr_sq); // 매물정보 가져오기
|
||||||
|
|
||||||
|
// 40: 촬영, 70: 검수지연... 상태가 촬용 이전 또는 검수지연 상태일 경우에만 홍보확인서를 등록한다.
|
||||||
|
if (substr($receipt['rcpt_stat'], 0, 2) <= '40' || substr($receipt['rcpt_stat'], 0, 2) == '70') {
|
||||||
|
$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/',
|
||||||
|
);
|
||||||
|
|
||||||
|
$image_path = str_replace($arrImagePath, '/upload/', $fax['file_path']);
|
||||||
|
|
||||||
|
$receiptModel->saveFaxImage($fax_sq, $receipt['rcpt_sq'], $receipt['rsrv_sq'], $file_type, $image_path, $fax['file_name'], '.jpg', $fax['img_size'], $fax['img_width'], $fax['img_height'], $receipt);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$this->db->transComplete();
|
||||||
|
$return = array(
|
||||||
|
'code' => $this->db->_error_number(),
|
||||||
|
'message' => $this->db->_error_message(),
|
||||||
|
);
|
||||||
|
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 검증결과 저장하기
|
||||||
|
*/
|
||||||
|
public function saveV2Confirm($vr_sq, $vrfc_type, $success, $type, $charger, $date, $insert_user, $update_user, $work_type = '2')
|
||||||
|
{
|
||||||
|
$insert_user = session('usr_sq');
|
||||||
|
$insert_id = session('usr_id');
|
||||||
|
$update_user = $insert_user;
|
||||||
|
|
||||||
|
// DB에서 변경되지 전 값을 읽어온다.
|
||||||
|
$sql = "select success, type, charger, date from v2_confirm" .
|
||||||
|
" where vr_sq = ?" .
|
||||||
|
" and vrfc_type = ?";
|
||||||
|
$data = array(
|
||||||
|
$vr_sq,
|
||||||
|
$vrfc_type
|
||||||
|
);
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
$data_table = array();
|
||||||
|
if ($query->getNumRows() > 0) {
|
||||||
|
$data_table = $query->getRowArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
$date = str_replace(array(' ', '-', ':'), '', $date);
|
||||||
|
$sql = "INSERT INTO v2_confirm" .
|
||||||
|
" (vr_sq, vrfc_type, success, type, charger, date, insert_user, insert_tm, update_user, update_tm, work_type)" .
|
||||||
|
" VALUES" .
|
||||||
|
" (?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ?)" .
|
||||||
|
" ON DUPLICATE KEY UPDATE" .
|
||||||
|
" success=values(success), type=values(type), charger=values(charger), date=values(date), update_user=values(update_user), update_tm=values(update_tm), work_type=values(work_type)";
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'vr_sq' => $vr_sq,
|
||||||
|
'vrfc_type' => $vrfc_type,
|
||||||
|
'success' => $success,
|
||||||
|
'type' => $type,
|
||||||
|
'charger' => $charger,
|
||||||
|
'date' => $date,
|
||||||
|
'insert_user' => $insert_user,
|
||||||
|
'update_user' => $update_user,
|
||||||
|
'work_type' => $work_type
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
|
||||||
|
// 변경이력 저장하기
|
||||||
|
if (!empty($data_table)) {
|
||||||
|
$this->saveV2ChgHistory($vr_sq, '30', 'C27', $insert_id, "검증결과 정보 저장");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 확인정보 저장하기
|
||||||
|
*/
|
||||||
|
public function saveV2CheckList($vr_sq, $vrfc_type, $type, $code, $comment, $insert_user)
|
||||||
|
{
|
||||||
|
$insert_id = session('usr_id');
|
||||||
|
|
||||||
|
$sql = "select code, comment from v2_check_list" .
|
||||||
|
" where vr_sq = ?" .
|
||||||
|
" and type = ?";
|
||||||
|
$data = array(
|
||||||
|
$vr_sq,
|
||||||
|
$type
|
||||||
|
);
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
$data_table = array();
|
||||||
|
if ($query->getNumRows() > 0) {
|
||||||
|
$data_table = $query->getRowArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "INSERT INTO v2_check_list" .
|
||||||
|
" (vr_sq, vrfc_type, type, code, comment, insert_user, insert_tm)" .
|
||||||
|
" VALUES" .
|
||||||
|
" (?, ?, ?, ?, ?, ?, now())" .
|
||||||
|
" ON DUPLICATE KEY UPDATE" .
|
||||||
|
" vr_sq=values(vr_sq), vrfc_type=values(vrfc_type), type=values(type), code=values(code), comment=values(comment), insert_user=values(insert_user), insert_tm=values(insert_tm)";
|
||||||
|
$data = array(
|
||||||
|
'vr_sq' => $vr_sq,
|
||||||
|
'vrfc_type' => $vrfc_type,
|
||||||
|
'type' => $type,
|
||||||
|
'code' => $code,
|
||||||
|
'comment' => $comment,
|
||||||
|
'insert_user' => $insert_user
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
|
||||||
|
// 변경이력 저장하기
|
||||||
|
if (!empty($data_table)) {
|
||||||
|
$this->saveV2ChgHistory($vr_sq, '30', 'C27', $insert_id, "확인정보 저장");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 상태변경시간 등록
|
||||||
|
*/
|
||||||
|
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)";
|
||||||
|
$data = array($vr_sq, $stat_cd, $insert_user);
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
log_message('debug', $this->db->getLastQuery());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 전송 후 FAX에 상태 및 전송시간을 저장한다.
|
||||||
|
*/
|
||||||
|
public function saveFaxImgsAfterSend($fax_sq, $vr_sq, $stat_cd, $send_tm = '')
|
||||||
|
{
|
||||||
|
if (empty($send_tm))
|
||||||
|
$send_tm = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
$data_fax_imgs = [
|
||||||
|
'stat_cd' => $stat_cd,
|
||||||
|
'send_tm' => $send_tm,
|
||||||
|
];
|
||||||
|
|
||||||
|
$builder = $this->db->table('fax_imgs');
|
||||||
|
$builder->where('fax_sq', $fax_sq);
|
||||||
|
$builder->where('vr_sq', $vr_sq);
|
||||||
|
$builder->update($data_fax_imgs);
|
||||||
|
|
||||||
|
log_message('debug', $this->db->getLastQuery());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 검증요청 v2_vrfc_req의 상태 stat_cd를 업데이트한다.
|
||||||
|
*/
|
||||||
|
public function saveV2VrfcReq($vr_sq, $stat_cd)
|
||||||
|
{
|
||||||
|
|
||||||
|
$sql = "update v2_vrfc_req" .
|
||||||
|
" set stat_cd = ?" .
|
||||||
|
" where vr_sq = ?";
|
||||||
|
$data = array($stat_cd, $vr_sq);
|
||||||
|
|
||||||
|
$res = $this->db->query($sql, $data);
|
||||||
|
log_message('debug', $this->db->getLastQuery());
|
||||||
|
log_message('debug', $res);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 홍보확인서를 매물정보에 등록한다.
|
||||||
|
*/
|
||||||
|
public function saveV2Files($vr_sq, $file_path, $file_name, $file_ext, $file_size, $img_width, $img_height, $insert_user)
|
||||||
|
{
|
||||||
|
$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/',
|
||||||
|
);
|
||||||
|
|
||||||
|
$file_path = str_replace($arrImagePath, '/upload/', $file_path);
|
||||||
|
$file_type = '1'; // 홍보확인서
|
||||||
|
|
||||||
|
|
||||||
|
// 1. 홍보확이서 등록여부 확인
|
||||||
|
$sql = "SELECT count(*) file_cnt FROM v2_files" .
|
||||||
|
" WHERE vr_sq = ?" .
|
||||||
|
" AND file_type = ?" .
|
||||||
|
" AND file_path = ?" .
|
||||||
|
" AND file_name = ?" .
|
||||||
|
" AND use_yn = 'Y'";
|
||||||
|
$data = array(
|
||||||
|
$vr_sq,
|
||||||
|
$file_type,
|
||||||
|
$file_path,
|
||||||
|
$file_name
|
||||||
|
);
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
$row = $query->getRowArray();
|
||||||
|
|
||||||
|
if (empty($row['file_cnt'])) {
|
||||||
|
// 2. 다른파일로 등록된 경우를 위해서 업데이트
|
||||||
|
$sql = "UPDATE v2_files SET use_yn = 'N' WHERE vr_sq = ? AND file_type = ?";
|
||||||
|
$data = array($vr_sq, $file_type);
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
|
||||||
|
// 3. 등록
|
||||||
|
$sql = "INSERT INTO v2_files " .
|
||||||
|
" (vr_sq, use_yn, file_type, view_odr, file_path, file_name, file_ext, file_size, img_width, img_height, insert_user, insert_tm)" .
|
||||||
|
" VALUES" .
|
||||||
|
" (?, 'Y', ?, '1', ?, ?, ?, ?, ?, ?, ?, NOW())";
|
||||||
|
|
||||||
|
$data = array($vr_sq, $file_type, $file_path, $file_name, $file_ext, $file_size, $img_width, $img_height, $insert_user);
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 검증결과 전송 API를 위한 데이터 조회..
|
||||||
|
*/
|
||||||
|
public function getDataConfirmAPI($vr_sq)
|
||||||
|
{
|
||||||
|
// 요청정보
|
||||||
|
$sql = "SELECT vr_sq, atcl_no, step, cpid, cp_atcl_id, trade_type, realtor_nm, realtor_tel_no, seller_tel_no, vrfc_type, rgbk_confirm, req_type, rdate, stat_cd, try_cnt, insert_user, insert_tm" .
|
||||||
|
" FROM v2_vrfc_req WHERE vr_sq = ?";
|
||||||
|
|
||||||
|
$query = $this->db->query($sql, [$vr_sq]);
|
||||||
|
$row_vrfc_req = $query->getRowArray();
|
||||||
|
|
||||||
|
// 매물정보
|
||||||
|
$sql = "SELECT vr_sq, atcl_no, cpid, cp_atcl_id, rlet_type_cd, trade_type, address_code, address1, address2, address3, sply_spc, excls_spc, tot_spc, grnd_spc, bldg_spc, deal_amt, wrrnt_amt, lease_amt, isale_amt, prem_amt, sise, floor, rdate, seller_tel_no, seller_nm, realtor_nm, realtor_tel_no, hscp_no, hscp_nm, ptp_no, ptp_nm, charger, req_price_yn, reg_charger, dept1_sq, dept2_sq, reg_dept1_sq, reg_dept2_sq, floor2" .
|
||||||
|
" FROM v2_article_info WHERE vr_sq = ?";
|
||||||
|
|
||||||
|
$query = $this->db->query($sql, [$vr_sq]);
|
||||||
|
$query->getRowArray();
|
||||||
|
|
||||||
|
// 수정정보
|
||||||
|
$sql = "SELECT vr_sq, bild_nm, rm_no, floor, address_code, address2, address3, address4, trade_type, deal_amt, wrrnt_amt, lease_amt, isale_amt, prem_amt, sply_spc, excls_spc, tot_spc, grnd_spc, bldg_spc, hscp_no, hscp_nm, ptp_no, ptp_nm, modify_yn, floor2 FROM v2_modify_info WHERE vr_sq = ?";
|
||||||
|
|
||||||
|
$query = $this->db->query($sql, [$vr_sq]);
|
||||||
|
$row_modify_info = $query->getRowArray();
|
||||||
|
|
||||||
|
// 검증결과
|
||||||
|
$sql = "SELECT vr_sq, vrfc_type, success, type, charger, date, insert_user, insert_tm, update_user, update_tm, work_type" .
|
||||||
|
" FROM v2_confirm WHERE vr_sq = ? AND vrfc_type = ?";
|
||||||
|
|
||||||
|
$query = $this->db->query($sql, [$vr_sq, $row_vrfc_req['vrfc_type']]);
|
||||||
|
$row_confirm = $query->getRowArray();
|
||||||
|
|
||||||
|
// 확인정보
|
||||||
|
$sql = "SELECT type, code, comment, ownerNm, ownerBirth FROM v2_check_list WHERE vr_sq = ? AND vrfc_type = ? AND type LIKE CONCAT(vrfc_type, '%')";
|
||||||
|
|
||||||
|
$query = $this->db->query($sql, [$vr_sq, $row_vrfc_req['vrfc_type']]);
|
||||||
|
$res_check_list = $query->getResultArray();
|
||||||
|
|
||||||
|
$atclNo = $row_vrfc_req['atcl_no'];
|
||||||
|
$success = empty($row_confirm['success']) ? false : true;
|
||||||
|
$charger = $row_confirm['charger'];
|
||||||
|
$date = $row_confirm['date'];
|
||||||
|
$try_cnt = $row_vrfc_req['try_cnt'];
|
||||||
|
|
||||||
|
$checkList = [];
|
||||||
|
foreach ($res_check_list as $row) {
|
||||||
|
$checkList[] = [
|
||||||
|
'type' => $row['type'],
|
||||||
|
'code' => $row['code'],
|
||||||
|
'comment' => $row['comment'],
|
||||||
|
'ownerNm' => $row['ownerNm'],
|
||||||
|
'ownerBirth' => $row['ownerBirth'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$modifyInfo = [];
|
||||||
|
if ($row_modify_info['modify_yn'] == 'Y') {
|
||||||
|
if (!empty($row_modify_info['hscp_no'])) {
|
||||||
|
// 공동주택
|
||||||
|
$modifyInfo = [
|
||||||
|
'hscpNo' => $row_modify_info['hscp_no'],
|
||||||
|
'ptpNo' => $row_modify_info['ptp_no'],
|
||||||
|
'bildNm' => $row_modify_info['address2'],
|
||||||
|
'rmNo' => $row_modify_info['address3'],
|
||||||
|
'tradeType' => $row_modify_info['trade_type'],
|
||||||
|
'dealAmt' => $row_modify_info['deal_amt'],
|
||||||
|
'wrrntAmt' => $row_modify_info['wrrnt_amt'],
|
||||||
|
'leaseAmt' => $row_modify_info['lease_amt'],
|
||||||
|
'isaleAmt' => $row_modify_info['isale_amt'],
|
||||||
|
'premAmt' => $row_modify_info['prem_amt'],
|
||||||
|
'floor' => $row_modify_info['floor'],
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
// 비공동주택
|
||||||
|
$modifyInfo = [
|
||||||
|
'addressCode' => $row_modify_info['address_code'],
|
||||||
|
'address2' => $row_modify_info['address2'],
|
||||||
|
'address3' => $row_modify_info['address3'],
|
||||||
|
'tradeType' => $row_modify_info['trade_type'],
|
||||||
|
'dealAmt' => $row_modify_info['deal_amt'],
|
||||||
|
'wrrntAmt' => $row_modify_info['wrrnt_amt'],
|
||||||
|
'leaseAmt' => $row_modify_info['lease_amt'],
|
||||||
|
'splySpc' => $row_modify_info['sply_spc'],
|
||||||
|
'exclsSpc' => $row_modify_info['excls_spc'],
|
||||||
|
'totSpc' => $row_modify_info['tot_spc'],
|
||||||
|
'grndSpc' => $row_modify_info['grnd_spc'],
|
||||||
|
'bldgSpc' => $row_modify_info['bldg_spc'],
|
||||||
|
'floor' => $row_modify_info['floor'],
|
||||||
|
'floor2' => $row_modify_info['floor2'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [
|
||||||
|
'atclNo' => $atclNo,
|
||||||
|
'success' => $success,
|
||||||
|
'checkList' => $checkList,
|
||||||
|
'charger' => $charger,
|
||||||
|
'modifyInfo' => $modifyInfo,
|
||||||
|
'date' => $date,
|
||||||
|
'try_cnt' => $try_cnt,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [
|
||||||
|
'atclNo' => $atclNo,
|
||||||
|
'success' => $success,
|
||||||
|
'checkList' => $checkList,
|
||||||
|
'charger' => $charger,
|
||||||
|
'date' => $date,
|
||||||
|
'try_cnt' => $try_cnt,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 담당자를 지정해준다.
|
||||||
|
*/
|
||||||
|
public function InsCharger($vr_sq)
|
||||||
|
{
|
||||||
|
$usr_id = session('usr_id');
|
||||||
|
|
||||||
|
$sql = "UPDATE v2_article_info" .
|
||||||
|
" SET charger = ?" .
|
||||||
|
" WHERE vr_sq = ?";
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
$usr_id,
|
||||||
|
$vr_sq
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 상태를 변경한다.
|
||||||
|
*/
|
||||||
|
public function saveChangeStep($fax_sq, $vr_sq, $stat_cd)
|
||||||
|
{
|
||||||
|
$insert_user = session('usr_sq');
|
||||||
|
$insert_id = session('usr_id');
|
||||||
|
|
||||||
|
$this->db->transStart();
|
||||||
|
|
||||||
|
// 1. 검증요청 상태변경 v2_vrfc_req
|
||||||
|
$this->saveV2VrfcReq($vr_sq, $stat_cd);
|
||||||
|
|
||||||
|
// 2. 상태변경 저장 v2_chg_stat
|
||||||
|
$this->saveV2ChgStat($vr_sq, $stat_cd, $insert_user);
|
||||||
|
|
||||||
|
// 3. 변경이력 저장 v2_chg_history
|
||||||
|
$this->saveV2ChgHistory($vr_sq, $stat_cd, 'C9', $insert_id, "");
|
||||||
|
|
||||||
|
// 4. FAX에 최종 저장시 상태값 저장
|
||||||
|
$this->saveFaxImgsAfterSend($fax_sq, $vr_sq, $stat_cd, $send_tm = '');
|
||||||
|
|
||||||
|
$this->db->transComplete();
|
||||||
|
|
||||||
|
$return = array(
|
||||||
|
'code' => $this->db->_error_number(),
|
||||||
|
'message' => $this->db->_error_message(),
|
||||||
|
);
|
||||||
|
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 값을 실패횟수 값을 증가시킨다.
|
||||||
|
*/
|
||||||
|
public function increseTryCnt($vr_sq)
|
||||||
|
{
|
||||||
|
$sql = "update v2_vrfc_req set try_cnt = ifnull(try_cnt,0) +1 where vr_sq = ?";
|
||||||
|
$data = array($vr_sq);
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getI8Cnt($rsrv_sq)
|
||||||
|
{
|
||||||
|
$sql = "SELECT COUNT(img_sq) cnt" .
|
||||||
|
" FROM result_imgs" .
|
||||||
|
" WHERE rsrv_sq = ?" .
|
||||||
|
" AND img_type = 'I8'" .
|
||||||
|
" AND use_yn = 'Y'";
|
||||||
|
$data = array($rsrv_sq);
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
return $query->getRowArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_rsrv_sq($rcpt_sq)
|
||||||
|
{
|
||||||
|
$sql = "SELECT rsrv_sq " .
|
||||||
|
" FROM result" .
|
||||||
|
" WHERE rcpt_sq = ?";
|
||||||
|
$data = array($rcpt_sq);
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
|
||||||
|
return $query->getRowArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 메모저장
|
||||||
|
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) === false) {
|
||||||
|
return [
|
||||||
|
'success' => false,
|
||||||
|
'msg' => '파일정보 저장 실패',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$row = $this->getDetail($data[1]);
|
||||||
|
|
||||||
|
$memo = "메모변경 : " . $row['memo'] . " => " . $data[0];
|
||||||
|
$this->saveChangedHistory($data[1], $row['pre_stat_cd'], 'C19', $usr_id, $memo);
|
||||||
|
|
||||||
|
return [
|
||||||
|
'success' => true
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 변경이력 저장하기
|
||||||
|
*/
|
||||||
|
public function saveV2ChgHistory($vr_sq, $stat_cd, $chg_type, $insert_id, $memo)
|
||||||
|
{
|
||||||
|
$sql = "INSERT INTO v2_chg_history" .
|
||||||
|
" (vr_sq, stat_cd, chg_type, insert_id, insert_tm, memo)" .
|
||||||
|
" VALUES" .
|
||||||
|
" (?, ?, ?, ?, now(), ?)";
|
||||||
|
|
||||||
|
$data = array($vr_sq, $stat_cd, $chg_type, $insert_id, $memo);
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
log_message('debug', $this->db->getLastQuery());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 변경내용 저장
|
// 변경내용 저장
|
||||||
public function saveChangedHistory($rcpt_sq, $rcpt_stat, $changed_type, $usr_id, $remark)
|
public function saveChangedHistory($rcpt_sq, $rcpt_stat, $changed_type, $usr_id, $remark)
|
||||||
|
|||||||
@@ -906,6 +906,504 @@ class M712Model extends Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 현재 상태 확인 */
|
||||||
|
public function chkStat($vr_sq)
|
||||||
|
{
|
||||||
|
$sql = "SELECT stat_cd FROM v2_vrfc_req WHERE vr_sq = ?";
|
||||||
|
$data = array(
|
||||||
|
$vr_sq
|
||||||
|
);
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
return $query->getRowArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
//1차 검증인지 2차 검증인지 확인.
|
||||||
|
public function chkRegiTryCnt($atcl_vr_sq)
|
||||||
|
{
|
||||||
|
$sql = "SELECT reg_try_cnt FROM v2_vrfc_req WHERE vr_sq = ?";
|
||||||
|
$query = $this->db->query($sql, [$atcl_vr_sq]);
|
||||||
|
return $query->getRowArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
//검증결과 table에 있는지 확인.
|
||||||
|
public function chkConfirm($atcl_vr_sq, $reg_yn)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table('v2_confirm a');
|
||||||
|
$builder->select('a.vr_sq');
|
||||||
|
$builder->where('vr_sq', $atcl_vr_sq);
|
||||||
|
|
||||||
|
if ($reg_yn) {
|
||||||
|
$builder->where('vrfc_type', $reg_yn);
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = $builder->get();
|
||||||
|
return $query->getNumRows();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUpdateFailTime($vr_sq)
|
||||||
|
{
|
||||||
|
$sql = "select vr_sq, stat_cd, insert_user, insert_tm " .
|
||||||
|
"from v2_chg_stat " .
|
||||||
|
"where vr_sq = ? and stat_cd = '49' " .
|
||||||
|
"order by insert_tm desc " .
|
||||||
|
"limit 1";
|
||||||
|
$data = array($vr_sq);
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
$row = $query->getRowArray();
|
||||||
|
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
//v2_confirm INSERT
|
||||||
|
public function insertConfirm($vr_sq, $vrfc_type, $success, $type, $usr_id = '', $usr_sq = '')
|
||||||
|
{
|
||||||
|
|
||||||
|
if (empty($usr_sq))
|
||||||
|
$usr_sq = session('usr_sq');
|
||||||
|
if (empty($usr_id))
|
||||||
|
$usr_id = session('usr_id');
|
||||||
|
|
||||||
|
$sql = "INSERT INTO v2_confirm" .
|
||||||
|
"(vr_sq, vrfc_type, success, type, charger, date, insert_user, insert_tm, update_user, update_tm)" .
|
||||||
|
"VALUES" .
|
||||||
|
"(?, ?, ?, ?, ?, '" . date('YmdHis') . "', ?, NOW(), ?, NOW()) " .
|
||||||
|
" ON DUPLICATE KEY UPDATE" .
|
||||||
|
" success=values(success), type=values(type), charger=values(charger), date=values(date)
|
||||||
|
, update_user=values(update_user), update_tm=values(update_tm)";
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
$vr_sq,
|
||||||
|
$vrfc_type,
|
||||||
|
$success,
|
||||||
|
$type,
|
||||||
|
$usr_id,
|
||||||
|
$usr_sq,
|
||||||
|
$usr_sq
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function updateConfirm($vr_sq, $vrfc_type, $success)
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
'success' => $success,
|
||||||
|
];
|
||||||
|
|
||||||
|
$builder = $this->db->table('v2_confirm');
|
||||||
|
$builder->where('vr_sq', $vr_sq);
|
||||||
|
$builder->where('vrfc_type', $vrfc_type);
|
||||||
|
$builder->update($data);
|
||||||
|
|
||||||
|
return [
|
||||||
|
'error_number' => $this->db->error()['code'],
|
||||||
|
'error_message' => $this->db->error()['message']
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function InsResChar($atcl_vr_sq)
|
||||||
|
{
|
||||||
|
$usr_id = session('usr_id');
|
||||||
|
|
||||||
|
$sql = "UPDATE v2_article_info" .
|
||||||
|
" SET reg_charger = ?" .
|
||||||
|
" WHERE vr_sq = ?";
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
$usr_id,
|
||||||
|
$atcl_vr_sq
|
||||||
|
);
|
||||||
|
//echo $this->db->last_query();
|
||||||
|
$res = $this->db->query($sql, $data);
|
||||||
|
$log_v = $this->db->getLastQuery();
|
||||||
|
log_message('debug', $log_v);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function add_cert_uncnfrm_status($vr_sq, $cert_uncnfrm_status)
|
||||||
|
{
|
||||||
|
$sql = "UPDATE v2_article_info_etc" .
|
||||||
|
" SET cert_uncnfrm_status = ?" .
|
||||||
|
" WHERE vr_sq = ?";
|
||||||
|
$data = array(
|
||||||
|
$cert_uncnfrm_status,
|
||||||
|
$vr_sq
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insertChkList($vr_sq, $vrfc_type, $type, $code, $comment)
|
||||||
|
{ //v2_check_list INSERT
|
||||||
|
|
||||||
|
$usr_sq = session('usr_sq');
|
||||||
|
|
||||||
|
$sql = "INSERT INTO v2_check_list" .
|
||||||
|
"(vr_sq, vrfc_type, type, code, comment, insert_user, insert_tm)" .
|
||||||
|
"VALUES" .
|
||||||
|
"(?, ?, ?, ?, ?, ?, NOW())" .
|
||||||
|
" ON DUPLICATE KEY UPDATE" .
|
||||||
|
" vr_sq=values(vr_sq), vrfc_type=values(vrfc_type), type=values(type), code=values(code), comment=values(comment), insert_user=values(insert_user), insert_tm=values(insert_tm)";
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
$vr_sq,
|
||||||
|
$vrfc_type,
|
||||||
|
$type,
|
||||||
|
$code,
|
||||||
|
$comment,
|
||||||
|
$usr_sq
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update updatedocument_cert_method
|
||||||
|
*/
|
||||||
|
public function updatedocument_cert_method($vr_sq, $document_cert_method)
|
||||||
|
{
|
||||||
|
$sql = "UPDATE v2_article_info_etc SET " .
|
||||||
|
" document_cert_method = ? " .
|
||||||
|
" WHERE vr_sq = ? ";
|
||||||
|
|
||||||
|
$document_cert_method = json_encode($document_cert_method, JSON_UNESCAPED_UNICODE);
|
||||||
|
if ($document_cert_method == 'false') {
|
||||||
|
$document_cert_method = NULL;
|
||||||
|
}
|
||||||
|
$data = array(
|
||||||
|
$document_cert_method,
|
||||||
|
$vr_sq
|
||||||
|
);
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
$s = $this->db->getLastQuery();
|
||||||
|
log_message('debug', "====updatedocument_cert_method:712====" . $s);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update_owner_verifiable($vr_sq, $owner_verifiable)
|
||||||
|
{
|
||||||
|
$sql = "UPDATE v2_vrfc_req" .
|
||||||
|
" SET owner_verifiable = ?" .
|
||||||
|
" WHERE vr_sq = ?";
|
||||||
|
$data = array(
|
||||||
|
$owner_verifiable,
|
||||||
|
$vr_sq
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
$s = $this->db->getLastQuery();
|
||||||
|
log_message('debug', "====update_owner_verifiable:712====" . $s);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 등기부등본 API 호출*/
|
||||||
|
public function getDatacertAPI($vr_sq, $vrfc_type = '')
|
||||||
|
{
|
||||||
|
// 요청정보
|
||||||
|
$sql = "SELECT vr_sq, atcl_no, step, cpid, cp_atcl_id, trade_type, realtor_nm, realtor_tel_no, seller_tel_no, vrfc_type, rgbk_confirm, req_type, rdate, stat_cd, try_cnt, insert_user, insert_tm, owner_verifiable" .
|
||||||
|
" FROM v2_vrfc_req where vr_sq = ?";
|
||||||
|
$query = $this->db->query($sql, [$vr_sq]);
|
||||||
|
$row_vrfc_req = $query->getRowArray();
|
||||||
|
|
||||||
|
if (!empty($vrfc_type)) {
|
||||||
|
$row_vrfc_req['vrfc_type'] = $vrfc_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
log_message('debug', 'getDatacertApi_query => ' . $this->db->getLastQuery());
|
||||||
|
log_message('debug', 'getDatacertApi_result => ' . json_encode($row_vrfc_req));
|
||||||
|
|
||||||
|
// 매물정보
|
||||||
|
$sql = "SELECT vr_sq, atcl_no, cpid, cp_atcl_id, rlet_type_cd, trade_type, address_code, address1, address2, address3, sply_spc, excls_spc, tot_spc, grnd_spc, bldg_spc, deal_amt, wrrnt_amt, lease_amt, isale_amt, prem_amt, sise, floor, rdate, seller_tel_no, seller_nm, realtor_nm, realtor_tel_no, hscp_no, hscp_nm, ptp_no, ptp_nm, charger, req_price_yn, reg_charger, dept1_sq, dept2_sq, reg_dept1_sq, reg_dept2_sq, floor2, vrfc_type_sub" .
|
||||||
|
" FROM v2_article_info where vr_sq = ?";
|
||||||
|
$query = $this->db->query($sql, [$vr_sq]);
|
||||||
|
$row_article_info = $query->getRowArray();
|
||||||
|
|
||||||
|
log_message('debug', $this->db->getLastQuery());
|
||||||
|
|
||||||
|
// 수정정보
|
||||||
|
$sql = "SELECT vr_sq, bild_nm, rm_no, floor, address_code, address2, address3, trade_type, deal_amt, wrrnt_amt, lease_amt, isale_amt, prem_amt, sply_spc, excls_spc, tot_spc, grnd_spc, bldg_spc, hscp_no, hscp_nm, ptp_no, ptp_nm, modify_yn, floor2" .
|
||||||
|
" FROM v2_modify_info where vr_sq = ?";
|
||||||
|
$query = $this->db->query($sql, [$vr_sq]);
|
||||||
|
$row_modify_info = $query->getRowArray();
|
||||||
|
|
||||||
|
log_message('debug', $this->db->getLastQuery());
|
||||||
|
|
||||||
|
// 검증결과
|
||||||
|
$sql = "SELECT vr_sq, vrfc_type, success, type, charger, date, insert_user, insert_tm, update_user, update_tm, work_type" .
|
||||||
|
" FROM v2_confirm where vr_sq = ? and vrfc_type = ?";
|
||||||
|
$query = $this->db->query($sql, [$vr_sq, $row_vrfc_req['vrfc_type']]);
|
||||||
|
$row_confirm = $query->getRowArray();
|
||||||
|
|
||||||
|
log_message('debug', $this->db->getLastQuery());
|
||||||
|
|
||||||
|
// 확인정보
|
||||||
|
$sql = "SELECT a.type, a.code, a.comment, b.ownerNm, b.owner_birth" .
|
||||||
|
" FROM v2_check_list a " .
|
||||||
|
" INNER JOIN v2_article_info b on a.vr_sq = b.vr_sq" .
|
||||||
|
" WHERE a.vr_sq = ? and a.vrfc_type = ?";
|
||||||
|
$query = $this->db->query($sql, [$vr_sq, $row_vrfc_req['vrfc_type']]);
|
||||||
|
$res_check_list = $query->getResultArray();
|
||||||
|
|
||||||
|
log_message('debug', $this->db->getLastQuery());
|
||||||
|
|
||||||
|
log_message('debug', implode(', ', $row_confirm ?? []));
|
||||||
|
|
||||||
|
$atclNo = $row_vrfc_req['atcl_no'];
|
||||||
|
$type = $row_vrfc_req['try_cnt'];
|
||||||
|
$success = empty($row_confirm['success']) ? false : true;
|
||||||
|
$charger = $row_confirm['charger'] ?? '';
|
||||||
|
$date = $row_confirm['date'] ?? '';
|
||||||
|
|
||||||
|
switch ($row_vrfc_req['owner_verifiable']) {
|
||||||
|
case "1":
|
||||||
|
case "true":
|
||||||
|
$ownerVerifiable = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$ownerVerifiable = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$checkList = [];
|
||||||
|
foreach ($res_check_list as $row) {
|
||||||
|
$checkList[] = [
|
||||||
|
'type' => $row['type'],
|
||||||
|
'code' => $row['code'],
|
||||||
|
'comment' => $row['comment'],
|
||||||
|
'ownerNm' => $row['ownerNm'],
|
||||||
|
'ownerBirth' => $row['owner_birth'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$modifyInfo = [];
|
||||||
|
if ($row_modify_info['modify_yn'] == 'Y') {
|
||||||
|
if (!empty($row_modify_info['hscp_no'])) {
|
||||||
|
// 공동주택
|
||||||
|
$modifyInfo = [
|
||||||
|
'hscpNo' => $row_modify_info['hscp_no'],
|
||||||
|
'ptpNo' => $row_modify_info['ptp_no'],
|
||||||
|
'bildNm' => $row_modify_info['address2'],
|
||||||
|
'rmNo' => $row_modify_info['address3'],
|
||||||
|
'tradeType' => $row_modify_info['trade_type'],
|
||||||
|
'dealAmt' => $row_modify_info['deal_amt'],
|
||||||
|
'wrrntAmt' => $row_modify_info['wrrnt_amt'],
|
||||||
|
'leaseAmt' => $row_modify_info['lease_amt'],
|
||||||
|
'isaleAmt' => $row_modify_info['isale_amt'],
|
||||||
|
'premAmt' => $row_modify_info['prem_amt'],
|
||||||
|
'floor' => $row_modify_info['floor'],
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
// 비공동주택
|
||||||
|
$modifyInfo = [
|
||||||
|
'addressCode' => $row_modify_info['address_code'],
|
||||||
|
'address2' => $row_modify_info['address2'],
|
||||||
|
'address3' => $row_modify_info['address3'],
|
||||||
|
'tradeType' => $row_modify_info['trade_type'],
|
||||||
|
'dealAmt' => $row_modify_info['deal_amt'],
|
||||||
|
'wrrntAmt' => $row_modify_info['wrrnt_amt'],
|
||||||
|
'leaseAmt' => $row_modify_info['lease_amt'],
|
||||||
|
'splySpc' => $row_modify_info['sply_spc'],
|
||||||
|
'exclsSpc' => $row_modify_info['excls_spc'],
|
||||||
|
'totSpc' => $row_modify_info['tot_spc'],
|
||||||
|
'grndSpc' => $row_modify_info['grnd_spc'],
|
||||||
|
'bldgSpc' => $row_modify_info['bldg_spc'],
|
||||||
|
'floor' => $row_modify_info['floor'],
|
||||||
|
'floor2' => $row_modify_info['floor2'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [
|
||||||
|
'atclNo' => $atclNo,
|
||||||
|
'type' => $type,
|
||||||
|
'success' => $success,
|
||||||
|
'checkList' => $checkList,
|
||||||
|
'charger' => $charger,
|
||||||
|
'modifyInfo' => $modifyInfo,
|
||||||
|
'date' => $date,
|
||||||
|
'vrfcType' => $row_article_info['vrfc_type_sub'],
|
||||||
|
'ownerVerifiable' => $ownerVerifiable,
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
return [
|
||||||
|
'atclNo' => $atclNo,
|
||||||
|
'type' => $type,
|
||||||
|
'success' => $success,
|
||||||
|
'checkList' => $checkList,
|
||||||
|
'charger' => $charger,
|
||||||
|
'date' => $date,
|
||||||
|
'vrfcType' => $row_article_info['vrfc_type_sub'],
|
||||||
|
'ownerVerifiable' => $ownerVerifiable,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_send_yn($type)
|
||||||
|
{
|
||||||
|
$sql = "SELECT stop_yn
|
||||||
|
FROM v2_stop_api_chg_stat
|
||||||
|
WHERE TYPE = ?
|
||||||
|
ORDER BY pk DESC
|
||||||
|
LIMIT 1";
|
||||||
|
$date = array(
|
||||||
|
$type
|
||||||
|
);
|
||||||
|
$query = $this->db->query($sql, $date);
|
||||||
|
$return = $query->getRowArray();
|
||||||
|
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 = array(
|
||||||
|
$atcl_no,
|
||||||
|
$vr_sq,
|
||||||
|
$type,
|
||||||
|
$fax_sq
|
||||||
|
);
|
||||||
|
$this->db->query($sql, $date);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 712 소유자 확인 을 위한 쿼리
|
||||||
|
*/
|
||||||
|
public function getOwnerVerifiable($atcl_no)
|
||||||
|
{
|
||||||
|
$sql = "select * ,
|
||||||
|
case
|
||||||
|
when owner_verifiable = 'true' then '1'
|
||||||
|
when owner_verifiable = '1' then '1'
|
||||||
|
when owner_verifiable = 'false' then '0'
|
||||||
|
when owner_verifiable = '0' then '0'
|
||||||
|
ELSE null
|
||||||
|
END AS OwnerVerifiable_change
|
||||||
|
from v2_vrfc_req where atcl_no = ? ";
|
||||||
|
$data = array(
|
||||||
|
$atcl_no
|
||||||
|
);
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
$row = $query->getRowArray();
|
||||||
|
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function chgStat($vr_sq, $stat_cd, $insert_tm)
|
||||||
|
{ //상태변경 TABLE INSERT
|
||||||
|
|
||||||
|
$usr_sq = session('usr_sq');
|
||||||
|
$usr_id = session('usr_id');
|
||||||
|
|
||||||
|
$list = $this->get_detail($vr_sq);
|
||||||
|
|
||||||
|
$sql = "INSERT INTO v2_chg_stat (vr_sq, stat_cd, insert_user, insert_tm)" .
|
||||||
|
"VALUES (?, ?, ?, ?)" .
|
||||||
|
"ON DUPLICATE KEY " .
|
||||||
|
"UPDATE vr_sq=VALUES(vr_sq), stat_cd=VALUES(stat_cd), insert_user=VALUES(insert_user), insert_tm=VALUES(insert_tm)";
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'vr_sq' => $vr_sq,
|
||||||
|
'stat_cd' => $stat_cd,
|
||||||
|
'usr_sq' => $usr_sq,
|
||||||
|
'insert_tm' => $insert_tm
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->db->transStart();
|
||||||
|
$res = $this->db->query($sql, $data);
|
||||||
|
|
||||||
|
$return['error_number'] = $this->db->_error_number();
|
||||||
|
$return['error_message'] = $this->db->_error_message();
|
||||||
|
|
||||||
|
if (empty($return['error_number'])) {
|
||||||
|
//로그를 남긴다.
|
||||||
|
if ($this->db->affected_rows() > 0) {
|
||||||
|
if (!empty($changed)) {
|
||||||
|
$this->saveChangedHistory($list['data']['vr_sq'], $stat_cd, 'C9', $usr_id, "상태변경 저장"); //검증결과 변동사항 HISTORY
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->db->transComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function chgStatVrfc($vr_sq, $stat_cd)
|
||||||
|
{
|
||||||
|
$data = ['stat_cd' => $stat_cd];
|
||||||
|
|
||||||
|
$builder = $this->db->table('v2_vrfc_req');
|
||||||
|
$builder->where('vr_sq', $vr_sq);
|
||||||
|
$builder->update($data);
|
||||||
|
|
||||||
|
return [
|
||||||
|
'error_number' => $this->db->error()['code'],
|
||||||
|
'error_message' => $this->db->error()['message']
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function chgStatFax($vr_sq, $stat_cd)
|
||||||
|
{
|
||||||
|
$data = ['stat_cd' => $stat_cd];
|
||||||
|
|
||||||
|
$builder = $this->db->table('fax_imgs');
|
||||||
|
$builder->where('vr_sq', $vr_sq);
|
||||||
|
$builder->update($data);
|
||||||
|
|
||||||
|
return [
|
||||||
|
'error_number' => $this->db->error()['code'],
|
||||||
|
'error_message' => $this->db->error()['message']
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
//v2_vrfc_req try_cnt 값 변경.
|
||||||
|
public function chgRegiTryCnt($vr_sq, $try_cnt)
|
||||||
|
{
|
||||||
|
$sql = "UPDATE v2_vrfc_req" .
|
||||||
|
" SET reg_try_cnt = ?" .
|
||||||
|
" WHERE vr_sq = ?";
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
$try_cnt,
|
||||||
|
$vr_sq
|
||||||
|
);
|
||||||
|
|
||||||
|
$res = $this->db->query($sql, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function resetTelConf($vr_sq)
|
||||||
|
{
|
||||||
|
$sql = "update v2_check_list " .
|
||||||
|
"set code = '' " .
|
||||||
|
"where type in ('T11', 'T12', 'T13', 'T14') " .
|
||||||
|
"and vr_sq = ?";
|
||||||
|
|
||||||
|
$data = array($vr_sq);
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 메모저장
|
||||||
|
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) === false) {
|
||||||
|
return [
|
||||||
|
'success' => false,
|
||||||
|
'msg' => '파일정보 저장 실패',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$row = $this->getDetail($data[1]);
|
||||||
|
|
||||||
|
$memo = "메모변경 : " . $row['memo'] . " => " . $data[0];
|
||||||
|
$this->saveChangedHistory($data[1], $row['pre_stat_cd'], 'C19', $usr_id, $memo);
|
||||||
|
|
||||||
|
return [
|
||||||
|
'success' => true
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
// 정보변경 이력 저장
|
// 정보변경 이력 저장
|
||||||
public function saveChangedHistory($vr_sq, $stat_cd, $chg_type, $usr_id, $memo)
|
public function saveChangedHistory($vr_sq, $stat_cd, $chg_type, $usr_id, $memo)
|
||||||
|
|||||||
@@ -930,6 +930,535 @@ class M713Model extends Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 현재 상태 확인 */
|
||||||
|
public function chkStat($vr_sq)
|
||||||
|
{
|
||||||
|
$sql = "SELECT stat_cd FROM v2_vrfc_req WHERE vr_sq = ?";
|
||||||
|
$data = array(
|
||||||
|
$vr_sq
|
||||||
|
);
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
return $query->getRowArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function chkTryCnt($atcl_vr_sq)
|
||||||
|
{
|
||||||
|
// 1차 검증인지 2차 검증인지 확인.
|
||||||
|
$sql = "SELECT a.try_cnt FROM v2_vrfc_req a WHERE vr_sq = ?";
|
||||||
|
$query = $this->db->query($sql, [$atcl_vr_sq]);
|
||||||
|
return $query->getRowArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function chkRegiTryCnt($atcl_vr_sq)
|
||||||
|
{
|
||||||
|
$sql = "SELECT a.reg_try_cnt FROM v2_vrfc_req a WHERE vr_sq = ?";
|
||||||
|
$query = $this->db->query($sql, [$atcl_vr_sq]);
|
||||||
|
return $query->getRowArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function chkConfirm($atcl_vr_sq, $reg_yn)
|
||||||
|
{
|
||||||
|
// 검증결과 table에 있는지 확인.
|
||||||
|
$builder = $this->db->table('v2_confirm a');
|
||||||
|
$builder->select('a.vr_sq');
|
||||||
|
$builder->where('vr_sq', $atcl_vr_sq);
|
||||||
|
|
||||||
|
if ($reg_yn) {
|
||||||
|
$builder->where('vrfc_type', $reg_yn); // 등기부등본 정보 확인시
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = $builder->get();
|
||||||
|
$result = $query->getNumRows();
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUpdateFailTime($vr_sq)
|
||||||
|
{
|
||||||
|
$sql = "select vr_sq, stat_cd, insert_user, insert_tm " .
|
||||||
|
"from v2_chg_stat " .
|
||||||
|
"where vr_sq = ? and stat_cd = '49' " .
|
||||||
|
"order by insert_tm desc " .
|
||||||
|
"limit 1";
|
||||||
|
$data = array($vr_sq);
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
$row = $query->getRowArray();
|
||||||
|
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insertConfirm($vr_sq, $vrfc_type, $success, $type)
|
||||||
|
{ //v2_confirm INSERT
|
||||||
|
|
||||||
|
$usr_sq = session('usr_sq');
|
||||||
|
$usr_id = session('usr_id');
|
||||||
|
|
||||||
|
$sql = "INSERT INTO v2_confirm" .
|
||||||
|
"(vr_sq, vrfc_type, success, type, charger, date, insert_user, insert_tm, update_user, update_tm)" .
|
||||||
|
"VALUES" .
|
||||||
|
"(?, ?, ?, ?, ?, '" . date('YmdHis') . "', ?, NOW(), ?, NOW())";
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
$vr_sq,
|
||||||
|
$vrfc_type,
|
||||||
|
$success,
|
||||||
|
$type,
|
||||||
|
$usr_id,
|
||||||
|
$usr_sq,
|
||||||
|
$usr_sq
|
||||||
|
);
|
||||||
|
|
||||||
|
$res = $this->db->query($sql, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function updateConfirm($vr_sq, $vrfc_type, $success): void
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
'success' => $success
|
||||||
|
];
|
||||||
|
|
||||||
|
$builder = $this->db->table('v2_confirm');
|
||||||
|
$builder->where('vr_sq', $vr_sq);
|
||||||
|
$builder->where('vrfc_type', $vrfc_type);
|
||||||
|
$builder->update($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function InsResChar($atcl_vr_sq)
|
||||||
|
{
|
||||||
|
$usr_id = session('usr_id');
|
||||||
|
|
||||||
|
$sql = "UPDATE v2_article_info" .
|
||||||
|
" SET reg_charger = ?" .
|
||||||
|
" WHERE vr_sq = ?";
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
$usr_id,
|
||||||
|
$atcl_vr_sq
|
||||||
|
);
|
||||||
|
//echo $this->db->last_query();
|
||||||
|
$res = $this->db->query($sql, $data);
|
||||||
|
$log_v = $this->db->getLastQuery();
|
||||||
|
log_message('debug', $log_v);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function add_cert_uncnfrm_status($vr_sq, $cert_uncnfrm_status)
|
||||||
|
{
|
||||||
|
$sql = "UPDATE v2_article_info_etc" .
|
||||||
|
" SET cert_uncnfrm_status = ?" .
|
||||||
|
" WHERE vr_sq = ?";
|
||||||
|
$data = array(
|
||||||
|
$cert_uncnfrm_status,
|
||||||
|
$vr_sq
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insertChkList($vr_sq, $vrfc_type, $type, $code, $comment)
|
||||||
|
{ //v2_check_list INSERT
|
||||||
|
|
||||||
|
$usr_sq = session('usr_sq');
|
||||||
|
|
||||||
|
$sql = "INSERT INTO v2_check_list" .
|
||||||
|
"(vr_sq, vrfc_type, type, code, comment, insert_user, insert_tm)" .
|
||||||
|
"VALUES" .
|
||||||
|
"(?, ?, ?, ?, ?, ?, NOW())" .
|
||||||
|
" ON DUPLICATE KEY UPDATE" .
|
||||||
|
" vr_sq=values(vr_sq), vrfc_type=values(vrfc_type), type=values(type), code=values(code), comment=values(comment), insert_user=values(insert_user), insert_tm=values(insert_tm)";
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
$vr_sq,
|
||||||
|
$vrfc_type,
|
||||||
|
$type,
|
||||||
|
$code,
|
||||||
|
$comment,
|
||||||
|
$usr_sq
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
$res = $this->db->query($sql, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update_owner_verifiable($vr_sq, $owner_verifiable)
|
||||||
|
{
|
||||||
|
$sql = "UPDATE v2_vrfc_req" .
|
||||||
|
" SET owner_verifiable = ?" .
|
||||||
|
" WHERE vr_sq = ?";
|
||||||
|
$data = array(
|
||||||
|
$owner_verifiable,
|
||||||
|
$vr_sq
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
$s = $this->db->getLastQuery();
|
||||||
|
log_message('debug', "====update_owner_verifiable====" . $s);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 등기부등본 API 호출*/
|
||||||
|
public function getDatacertAPI($vr_sq, $vrfc_type = '')
|
||||||
|
{
|
||||||
|
// 요청정보
|
||||||
|
$sql = "SELECT vr_sq, atcl_no, step, cpid, cp_atcl_id, trade_type, realtor_nm, realtor_tel_no, seller_tel_no, vrfc_type, rgbk_confirm, req_type, rdate, stat_cd, try_cnt, insert_user, insert_tm, owner_verifiable" .
|
||||||
|
" FROM v2_vrfc_req WHERE vr_sq = ?";
|
||||||
|
|
||||||
|
$query = $this->db->query($sql, [$vr_sq]);
|
||||||
|
$row_vrfc_req = $query->getRowArray();
|
||||||
|
|
||||||
|
if (!empty($vrfc_type)) {
|
||||||
|
$row_vrfc_req['vrfc_type'] = $vrfc_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
log_message('debug', 'getDatacertApi_query => ' . $this->db->getLastQuery());
|
||||||
|
log_message('debug', 'getDatacertApi_result => ' . json_encode($row_vrfc_req));
|
||||||
|
|
||||||
|
// 매물정보
|
||||||
|
$sql = "SELECT vr_sq, atcl_no, cpid, cp_atcl_id, rlet_type_cd, trade_type, address_code, address1, address2, address3, sply_spc, excls_spc, tot_spc, grnd_spc, bldg_spc, deal_amt, wrrnt_amt, lease_amt, isale_amt, prem_amt, sise, floor, rdate, seller_tel_no, seller_nm, realtor_nm, realtor_tel_no, hscp_no, hscp_nm, ptp_no, ptp_nm, charger, req_price_yn, reg_charger, dept1_sq, dept2_sq, reg_dept1_sq, reg_dept2_sq, floor2, vrfc_type_sub" .
|
||||||
|
" FROM v2_article_info WHERE vr_sq = ?";
|
||||||
|
|
||||||
|
$query = $this->db->query($sql, [$vr_sq]);
|
||||||
|
$row_article_info = $query->getRowArray();
|
||||||
|
|
||||||
|
log_message('debug', $this->db->getLastQuery());
|
||||||
|
|
||||||
|
// 수정정보
|
||||||
|
$sql = "SELECT vr_sq, bild_nm, rm_no, floor, address_code, address2, address3, trade_type, deal_amt, wrrnt_amt, lease_amt, isale_amt, prem_amt, sply_spc, excls_spc, tot_spc, grnd_spc, bldg_spc, hscp_no, hscp_nm, ptp_no, ptp_nm, modify_yn, floor2" .
|
||||||
|
" FROM v2_modify_info WHERE vr_sq = ?";
|
||||||
|
|
||||||
|
$query = $this->db->query($sql, [$vr_sq]);
|
||||||
|
$row_modify_info = $query->getRowArray();
|
||||||
|
|
||||||
|
log_message('debug', $this->db->getLastQuery());
|
||||||
|
|
||||||
|
// 검증결과
|
||||||
|
$sql = "SELECT vr_sq, vrfc_type, success, type, charger, date, insert_user, insert_tm, update_user, update_tm, work_type" .
|
||||||
|
" FROM v2_confirm WHERE vr_sq = ? AND vrfc_type = ?";
|
||||||
|
|
||||||
|
$query = $this->db->query($sql, [$vr_sq, $row_vrfc_req['vrfc_type']]);
|
||||||
|
$row_confirm = $query->getRowArray();
|
||||||
|
|
||||||
|
log_message('debug', $this->db->getLastQuery());
|
||||||
|
|
||||||
|
// 확인정보
|
||||||
|
$sql = "SELECT a.type, a.code, a.comment, b.ownerNm, b.owner_birth" .
|
||||||
|
" FROM v2_check_list a" .
|
||||||
|
" INNER JOIN v2_article_info b ON a.vr_sq = b.vr_sq" .
|
||||||
|
" WHERE a.vr_sq = ? AND a.vrfc_type = ?";
|
||||||
|
|
||||||
|
$query = $this->db->query($sql, [$vr_sq, $row_vrfc_req['vrfc_type']]);
|
||||||
|
$res_check_list = $query->getResultArray();
|
||||||
|
|
||||||
|
log_message('debug', $this->db->getLastQuery());
|
||||||
|
|
||||||
|
log_message('debug', implode(', ', $row_confirm ?? []));
|
||||||
|
|
||||||
|
$atclNo = $row_vrfc_req['atcl_no'];
|
||||||
|
$type = $row_vrfc_req['try_cnt'];
|
||||||
|
$success = empty($row_confirm['success']) ? false : true;
|
||||||
|
$charger = $row_confirm['charger'] ?? '';
|
||||||
|
$date = $row_confirm['date'] ?? '';
|
||||||
|
|
||||||
|
$ownerVerifiable = match ($row_vrfc_req['owner_verifiable']) {
|
||||||
|
"1", "true" => true,
|
||||||
|
default => false,
|
||||||
|
};
|
||||||
|
|
||||||
|
$checkList = [];
|
||||||
|
foreach ($res_check_list as $row) {
|
||||||
|
$checkList[] = [
|
||||||
|
'type' => $row['type'],
|
||||||
|
'code' => $row['code'],
|
||||||
|
'comment' => $row['comment'],
|
||||||
|
'ownerNm' => $row['ownerNm'],
|
||||||
|
'ownerBirth' => $row['owner_birth'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$modifyInfo = [];
|
||||||
|
if ($row_modify_info['modify_yn'] == 'Y') {
|
||||||
|
if (!empty($row_modify_info['hscp_no'])) {
|
||||||
|
// 공동주택
|
||||||
|
$modifyInfo = [
|
||||||
|
'hscpNo' => $row_modify_info['hscp_no'],
|
||||||
|
'ptpNo' => $row_modify_info['ptp_no'],
|
||||||
|
'bildNm' => $row_modify_info['address2'],
|
||||||
|
'rmNo' => $row_modify_info['address3'],
|
||||||
|
'tradeType' => $row_modify_info['trade_type'],
|
||||||
|
'dealAmt' => $row_modify_info['deal_amt'],
|
||||||
|
'wrrntAmt' => $row_modify_info['wrrnt_amt'],
|
||||||
|
'leaseAmt' => $row_modify_info['lease_amt'],
|
||||||
|
'isaleAmt' => $row_modify_info['isale_amt'],
|
||||||
|
'premAmt' => $row_modify_info['prem_amt'],
|
||||||
|
'floor' => $row_modify_info['floor'],
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
// 비공동주택
|
||||||
|
$modifyInfo = [
|
||||||
|
'addressCode' => $row_modify_info['address_code'],
|
||||||
|
'address2' => $row_modify_info['address2'],
|
||||||
|
'address3' => $row_modify_info['address3'],
|
||||||
|
'tradeType' => $row_modify_info['trade_type'],
|
||||||
|
'dealAmt' => $row_modify_info['deal_amt'],
|
||||||
|
'wrrntAmt' => $row_modify_info['wrrnt_amt'],
|
||||||
|
'leaseAmt' => $row_modify_info['lease_amt'],
|
||||||
|
'splySpc' => $row_modify_info['sply_spc'],
|
||||||
|
'exclsSpc' => $row_modify_info['excls_spc'],
|
||||||
|
'totSpc' => $row_modify_info['tot_spc'],
|
||||||
|
'grndSpc' => $row_modify_info['grnd_spc'],
|
||||||
|
'bldgSpc' => $row_modify_info['bldg_spc'],
|
||||||
|
'floor' => $row_modify_info['floor'],
|
||||||
|
'floor2' => $row_modify_info['floor2'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$return_data = [
|
||||||
|
'atclNo' => $atclNo,
|
||||||
|
'type' => $type,
|
||||||
|
'success' => $success,
|
||||||
|
'checkList' => $checkList,
|
||||||
|
'charger' => $charger,
|
||||||
|
'modifyInfo' => $modifyInfo,
|
||||||
|
'date' => $date,
|
||||||
|
'vrfcType' => $row_article_info['vrfc_type_sub'],
|
||||||
|
'ownerVerifiable' => $ownerVerifiable,
|
||||||
|
];
|
||||||
|
|
||||||
|
log_message('debug', "713 getDatacertAPI_1 {$atclNo} ::: " . json_encode($return_data) . PHP_EOL);
|
||||||
|
|
||||||
|
return $return_data;
|
||||||
|
} else {
|
||||||
|
$return_data = [
|
||||||
|
'atclNo' => $atclNo,
|
||||||
|
'type' => $type,
|
||||||
|
'success' => $success,
|
||||||
|
'checkList' => $checkList,
|
||||||
|
'charger' => $charger,
|
||||||
|
'date' => $date,
|
||||||
|
'vrfcType' => $row_article_info['vrfc_type_sub'],
|
||||||
|
'ownerVerifiable' => $ownerVerifiable,
|
||||||
|
];
|
||||||
|
|
||||||
|
log_message('debug', "713 getDatacertAPI_2 {$atclNo} ::: " . json_encode($return_data) . PHP_EOL);
|
||||||
|
|
||||||
|
return $return_data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function chgStat($vr_sq, $stat_cd, $insert_tm)
|
||||||
|
{
|
||||||
|
// 상태변경 TABLE INSERT
|
||||||
|
$usr_sq = session('usr_sq');
|
||||||
|
$usr_id = session('usr_id');
|
||||||
|
|
||||||
|
$list = $this->getDetail($vr_sq);
|
||||||
|
|
||||||
|
$sql = "INSERT INTO v2_chg_stat (vr_sq, stat_cd, insert_user, insert_tm)" .
|
||||||
|
"VALUES (?, ?, ?, ?)" .
|
||||||
|
"ON DUPLICATE KEY " .
|
||||||
|
"UPDATE vr_sq=VALUES(vr_sq), stat_cd=VALUES(stat_cd), insert_user=VALUES(insert_user), insert_tm=VALUES(insert_tm)";
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
$vr_sq,
|
||||||
|
$stat_cd,
|
||||||
|
$usr_sq,
|
||||||
|
$insert_tm
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->db->transStart();
|
||||||
|
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
|
||||||
|
$error = $this->db->error();
|
||||||
|
$return = [
|
||||||
|
'error_number' => $error['code'],
|
||||||
|
'error_message' => $error['message']
|
||||||
|
];
|
||||||
|
|
||||||
|
if (empty($return['error_number'])) {
|
||||||
|
// 로그를 남긴다.
|
||||||
|
if ($this->db->affectedRows() > 0) {
|
||||||
|
// $changed = $this->what_is_changed($list, $data, '');
|
||||||
|
// if (!empty($changed)) {
|
||||||
|
$this->saveChangedHistory($list['vr_sq'], $stat_cd, 'C9', $usr_id, "상태변경 저장");
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->db->transComplete();
|
||||||
|
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function chgStatVrfc($vr_sq, $stat_cd)
|
||||||
|
{
|
||||||
|
$data = ['stat_cd' => $stat_cd];
|
||||||
|
|
||||||
|
$builder = $this->db->table('v2_vrfc_req');
|
||||||
|
$builder->where('vr_sq', $vr_sq);
|
||||||
|
$builder->update($data);
|
||||||
|
|
||||||
|
$error = $this->db->error();
|
||||||
|
return [
|
||||||
|
'error_number' => $error['code'],
|
||||||
|
'error_message' => $error['message']
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function chgStatFax($vr_sq, $stat_cd)
|
||||||
|
{
|
||||||
|
$data = ['stat_cd' => $stat_cd];
|
||||||
|
|
||||||
|
$builder = $this->db->table('fax_imgs');
|
||||||
|
$builder->where('vr_sq', $vr_sq);
|
||||||
|
$builder->update($data);
|
||||||
|
|
||||||
|
$error = $this->db->error();
|
||||||
|
return [
|
||||||
|
'error_number' => $error['code'],
|
||||||
|
'error_message' => $error['message']
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function updateStat($vr_sq, $reg_status)
|
||||||
|
{
|
||||||
|
$data = ['reg_status' => $reg_status];
|
||||||
|
|
||||||
|
$builder = $this->db->table('v2_article_info');
|
||||||
|
$builder->where('vr_sq', $vr_sq);
|
||||||
|
$builder->update($data);
|
||||||
|
|
||||||
|
$error = $this->db->error();
|
||||||
|
return [
|
||||||
|
'error' => [
|
||||||
|
'code' => $error['code'],
|
||||||
|
'message' => $error['message']
|
||||||
|
]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function chgRegiTryCnt($vr_sq, $try_cnt)
|
||||||
|
{ //v2_vrfc_req try_cnt 값 변경.
|
||||||
|
$sql = "UPDATE v2_vrfc_req" .
|
||||||
|
" SET reg_try_cnt = ?" .
|
||||||
|
" WHERE vr_sq = ?";
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
$try_cnt,
|
||||||
|
$vr_sq
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->db->query($sql, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function modify_info($vr_sq, $owner_birth, $address2, $address2a, $address2b, $address3, $address4, $address_code, $hscp_no, $hscp_nm)
|
||||||
|
{
|
||||||
|
$this->db->transStart();
|
||||||
|
$usr_id = session('usr_id');
|
||||||
|
|
||||||
|
$sql = "UPDATE v2_modify_info
|
||||||
|
SET address2 = ?
|
||||||
|
,address2a = ?
|
||||||
|
,address2b = ?
|
||||||
|
,address3 = ?
|
||||||
|
,address4 = ?
|
||||||
|
,address_code = ?
|
||||||
|
,hscp_no = ?
|
||||||
|
,hscp_nm = ?
|
||||||
|
,modify_yn = 'Y'
|
||||||
|
WHERE vr_sq = ?";
|
||||||
|
$data = array(
|
||||||
|
$address2,
|
||||||
|
$address2a,
|
||||||
|
$address2b,
|
||||||
|
$address3,
|
||||||
|
$address4,
|
||||||
|
$address_code,
|
||||||
|
$hscp_no,
|
||||||
|
$hscp_nm,
|
||||||
|
$vr_sq
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($this->db->query($sql, $data) === false) {
|
||||||
|
return [
|
||||||
|
'success' => false,
|
||||||
|
'msg' => '저장 실패',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql2 = "UPDATE v2_article_info
|
||||||
|
SET owner_birth = ?
|
||||||
|
,address2 = ?
|
||||||
|
,address3 = ?
|
||||||
|
,address_code = ?
|
||||||
|
,hscp_no = ?
|
||||||
|
,hscp_nm = ?
|
||||||
|
WHERE vr_sq = ?";
|
||||||
|
$data2 = array(
|
||||||
|
$owner_birth,
|
||||||
|
$address2,
|
||||||
|
$address3,
|
||||||
|
$address_code,
|
||||||
|
$hscp_no,
|
||||||
|
$hscp_nm,
|
||||||
|
$vr_sq
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($this->db->query($sql2, $data2) === false) {
|
||||||
|
return [
|
||||||
|
'success' => false,
|
||||||
|
'msg' => '저장 실패',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql3 = "UPDATE v2_article_info_etc
|
||||||
|
SET address2a = ?
|
||||||
|
,address2b = ?
|
||||||
|
WHERE vr_sq = ?";
|
||||||
|
$data3 = array(
|
||||||
|
$address2a,
|
||||||
|
$address2b,
|
||||||
|
$vr_sq
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($this->db->query($sql3, $data) === false) {
|
||||||
|
return [
|
||||||
|
'success' => false,
|
||||||
|
'msg' => '저장 실패',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->saveChangedHistory($vr_sq, '40', 'C34', $usr_id, '생년월일 정보 변경');
|
||||||
|
|
||||||
|
$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) === false) {
|
||||||
|
return [
|
||||||
|
'success' => false,
|
||||||
|
'msg' => '파일정보 저장 실패',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$row = $this->getDetail($data[1]);
|
||||||
|
|
||||||
|
$memo = "메모변경 : " . $row['memo'] . " => " . $data[0];
|
||||||
|
$this->saveChangedHistory($data[1], $row['pre_stat_cd'], 'C19', $usr_id, $memo);
|
||||||
|
|
||||||
|
return [
|
||||||
|
'success' => true
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
// 정보변경 이력 저장
|
// 정보변경 이력 저장
|
||||||
public function saveChangedHistory($vr_sq, $stat_cd, $chg_type, $usr_id, $memo)
|
public function saveChangedHistory($vr_sq, $stat_cd, $chg_type, $usr_id, $memo)
|
||||||
|
|||||||
@@ -5,6 +5,19 @@ use CodeIgnier\Model;
|
|||||||
|
|
||||||
class FaxModel extends Model
|
class FaxModel extends Model
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* FAX 내용중 하나만 가져오기
|
||||||
|
*/
|
||||||
|
public function selectFax($faxSq)
|
||||||
|
{
|
||||||
|
$sql = "SELECT mid, caller_no, recv_time, fax_sq, file_path, file_name, thumbnail, img_width, img_height, img_size" .
|
||||||
|
" FROM fax_imgs" .
|
||||||
|
" WHERE fax_sq = ?";
|
||||||
|
$data = array($faxSq);
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
return $query->getRowArray();
|
||||||
|
}
|
||||||
|
|
||||||
public function selectFaxListNotExistsThumb()
|
public function selectFaxListNotExistsThumb()
|
||||||
{
|
{
|
||||||
helper('cron');
|
helper('cron');
|
||||||
|
|||||||
@@ -39,13 +39,13 @@
|
|||||||
$serverIp = $_SERVER['SERVER_ADDR'] ?? '';
|
$serverIp = $_SERVER['SERVER_ADDR'] ?? '';
|
||||||
|
|
||||||
// 개발 서버
|
// 개발 서버
|
||||||
$devServers = ['192.168.200.8', '192.168.10.231'];
|
$devServers = ['192.168.200.8', '192.168.10.231', '172.18.0.5'];
|
||||||
|
|
||||||
// 도커 테스트 서버
|
// 도커 테스트 서버
|
||||||
$dockerServers = ['172.18.0.2'];
|
$dockerServers = ['172.18.0.2'];
|
||||||
|
|
||||||
// 테스트 서버
|
// 테스트 서버
|
||||||
$testServers = ['192.168.200.9', '192.168.10.237', '175.126.191.182'];
|
$testServers = ['192.168.200.9', '192.168.10.237', '175.126.191.182', '192.168.10.243'];
|
||||||
|
|
||||||
// 운영 서버 IP 매핑
|
// 운영 서버 IP 매핑
|
||||||
$prodServers = [
|
$prodServers = [
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
if (in_array($serverIp, $devServers, true)) {
|
if (in_array($serverIp, $devServers, true)) {
|
||||||
// 개발
|
// 개발
|
||||||
echo "<img src='/img/gnb_dev_00.png' alt='' />";
|
echo "개발";
|
||||||
|
|
||||||
} elseif (in_array($serverIp, $dockerServers, true)) {
|
} elseif (in_array($serverIp, $dockerServers, true)) {
|
||||||
// 도커
|
// 도커
|
||||||
@@ -80,8 +80,6 @@
|
|||||||
|
|
||||||
echo "{$serverName}";
|
echo "{$serverName}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -718,7 +718,7 @@ $usr_nm = session('usr_nm');
|
|||||||
|
|
||||||
const rcpt_key = rowData.rcpt_key;
|
const rcpt_key = rowData.rcpt_key;
|
||||||
|
|
||||||
location.href = "<?= site_url('article/dept/detail') ?>/" + rcpt_key;
|
window.open("<?= site_url('article/dept/detail') ?>/" + rcpt_key, '_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('change', '#chkAll', function () {
|
$(document).on('change', '#chkAll', function () {
|
||||||
|
|||||||
@@ -749,7 +749,7 @@
|
|||||||
if (!rowData) return;
|
if (!rowData) return;
|
||||||
|
|
||||||
const id = rowData.rcpt_no;
|
const id = rowData.rcpt_no;
|
||||||
location.href = "<?= site_url('article/apt/detail') ?>/" + id;
|
window.open("<?= site_url('article/apt/detail') ?>/" + id, '_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -109,7 +109,6 @@ $usr_nm = session('usr_nm');
|
|||||||
<div class="main-card mb-3 card">
|
<div class="main-card mb-3 card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form id="frm_srch_info" method="get" onsubmit="return false;">
|
<form id="frm_srch_info" method="get" onsubmit="return false;">
|
||||||
|
|
||||||
<!-- 검색 폼 -->
|
<!-- 검색 폼 -->
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
@@ -175,19 +174,20 @@ $usr_nm = session('usr_nm');
|
|||||||
<label class="form-label mb-1">현재상태</label>
|
<label class="form-label mb-1">현재상태</label>
|
||||||
<div class="d-flex gap-1">
|
<div class="d-flex gap-1">
|
||||||
<select name="rcpt_stat1" class="form-select form-select-sm">
|
<select name="rcpt_stat1" class="form-select form-select-sm">
|
||||||
<option value="">예약확인지연</option>
|
|
||||||
|
<option value="">선택</option>
|
||||||
<?php foreach ($codes as $c): ?>
|
<?php foreach ($codes as $c): ?>
|
||||||
<?php if ($c['category'] === "STEP_VERIFICATION"): ?>
|
<?php if ($c['category'] === "STEP_VERIFICATION"): ?>
|
||||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
<select name="rcpt_stat2" id="srcGugun" class="form-select form-select-sm">
|
<!-- <select name="rcpt_stat2" id="srcGugun" class="form-select form-select-sm">
|
||||||
<option value="">-상태2-</option>
|
<option value="">-상태2-</option>
|
||||||
</select>
|
</select>
|
||||||
<select name="rcpt_stat3" id="srcDong" class="form-select form-select-sm">
|
<select name="rcpt_stat3" id="srcDong" class="form-select form-select-sm">
|
||||||
<option value="">-상태3-</option>
|
<option value="">-상태3-</option>
|
||||||
</select>
|
</select> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -404,6 +404,13 @@ $usr_nm = session('usr_nm');
|
|||||||
const bonbuArr = <?= json_encode($bonbu, JSON_UNESCAPED_UNICODE); ?>;
|
const bonbuArr = <?= json_encode($bonbu, JSON_UNESCAPED_UNICODE); ?>;
|
||||||
const teamArr = <?= json_encode($team, JSON_UNESCAPED_UNICODE); ?>;
|
const teamArr = <?= json_encode($team, JSON_UNESCAPED_UNICODE); ?>;
|
||||||
const userArr = <?= json_encode($user, JSON_UNESCAPED_UNICODE); ?>;
|
const userArr = <?= json_encode($user, JSON_UNESCAPED_UNICODE); ?>;
|
||||||
|
<?php if (isset($srchUser) && !empty($srchUser)): ?>
|
||||||
|
const srchUser = <?= json_encode($srchUser, JSON_UNESCAPED_UNICODE); ?>;
|
||||||
|
<?php else: ?>
|
||||||
|
const srchUser = null;
|
||||||
|
<?php endif; ?>
|
||||||
|
const sBonbu = "<?= $sBonbu ?? '' ?>";
|
||||||
|
const sTeam = "<?= $sTeanm ?? '' ?>";
|
||||||
|
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
var table;
|
var table;
|
||||||
@@ -412,6 +419,15 @@ $usr_nm = session('usr_nm');
|
|||||||
|
|
||||||
initReceiptDate();
|
initReceiptDate();
|
||||||
|
|
||||||
|
// srchUser 데이터가 있으면 초기값 설정 (usr_id 파라미터)
|
||||||
|
if (srchUser) {
|
||||||
|
initSrchUser();
|
||||||
|
}
|
||||||
|
// bonbu, dept_sq 파라미터가 있으면 초기값 설정
|
||||||
|
else if (sBonbu || sTeam) {
|
||||||
|
initSrchParam();
|
||||||
|
}
|
||||||
|
|
||||||
$("#srcSido, #srcGugun, #srcSido2, #srcGugun2").on("change", function (e) {
|
$("#srcSido, #srcGugun, #srcSido2, #srcGugun2").on("change", function (e) {
|
||||||
|
|
||||||
const targetId = this.id;
|
const targetId = this.id;
|
||||||
@@ -669,7 +685,7 @@ $usr_nm = session('usr_nm');
|
|||||||
if (!rowData) return;
|
if (!rowData) return;
|
||||||
|
|
||||||
const rcpt_atclno = rowData.rcpt_atclno;
|
const rcpt_atclno = rowData.rcpt_atclno;
|
||||||
location.href = "<?= site_url('article/receipt/detail') ?>/" + rcpt_atclno;
|
window.open("<?= site_url('article/receipt/detail') ?>/" + rcpt_atclno, '_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -710,6 +726,79 @@ $usr_nm = session('usr_nm');
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 검색 사용자 초기화 (usr_id 파라미터용)
|
||||||
|
function initSrchUser() {
|
||||||
|
if (!srchUser) return;
|
||||||
|
|
||||||
|
const pdept_sq = srchUser.pdept_sq;
|
||||||
|
const dept_sq = srchUser.dept_sq;
|
||||||
|
const usr_id = srchUser.usr_id;
|
||||||
|
|
||||||
|
// 1단계: 본부 선택
|
||||||
|
if (pdept_sq) {
|
||||||
|
$("#bonbu").val(pdept_sq);
|
||||||
|
|
||||||
|
// 2단계: 팀 목록 로드 및 선택
|
||||||
|
let teamStr = `<option value="">-팀-</option>`;
|
||||||
|
if (teamArr.length > 0) {
|
||||||
|
for (let i = 0; i < teamArr.length; i++) {
|
||||||
|
if (String(teamArr[i].pdept_sq) === String(pdept_sq)) {
|
||||||
|
const selected = String(teamArr[i].dept_sq) === String(dept_sq) ? 'selected' : '';
|
||||||
|
teamStr += `<option value="${teamArr[i].dept_sq}" ${selected}>${teamArr[i].dept_nm}</option>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$("#team").html(teamStr);
|
||||||
|
|
||||||
|
// 3단계: 담당자 목록 로드 및 선택
|
||||||
|
if (dept_sq) {
|
||||||
|
let damdangStr = `<option value="">-담당자-</option>`;
|
||||||
|
if (userArr.length > 0) {
|
||||||
|
for (let i = 0; i < userArr.length; i++) {
|
||||||
|
if (String(userArr[i].dept_sq) === String(dept_sq)) {
|
||||||
|
const selected = String(userArr[i].usr_id) === String(usr_id) ? 'selected' : '';
|
||||||
|
damdangStr += `<option value="${userArr[i].usr_id}" ${selected}>${userArr[i].usr_nm}</option>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$("#damdang").html(damdangStr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 검색 파라미터 초기화 (bonbu, dept_sq 파라미터용)
|
||||||
|
function initSrchParam() {
|
||||||
|
// 1단계: 본부 선택
|
||||||
|
if (sBonbu) {
|
||||||
|
$("#bonbu").val(sBonbu);
|
||||||
|
|
||||||
|
// 2단계: 팀 목록 로드 및 선택
|
||||||
|
let teamStr = `<option value="">-팀-</option>`;
|
||||||
|
if (teamArr.length > 0) {
|
||||||
|
for (let i = 0; i < teamArr.length; i++) {
|
||||||
|
if (String(teamArr[i].pdept_sq) === String(sBonbu)) {
|
||||||
|
const selected = String(teamArr[i].dept_sq) === String(sTeam) ? 'selected' : '';
|
||||||
|
teamStr += `<option value="${teamArr[i].dept_sq}" ${selected}>${teamArr[i].dept_nm}</option>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$("#team").html(teamStr);
|
||||||
|
|
||||||
|
// 3단계: 팀이 선택되어 있으면 담당자 목록 로드
|
||||||
|
if (sTeam) {
|
||||||
|
let damdangStr = `<option value="">-담당자-</option>`;
|
||||||
|
if (userArr.length > 0) {
|
||||||
|
for (let i = 0; i < userArr.length; i++) {
|
||||||
|
if (String(userArr[i].dept_sq) === String(sTeam)) {
|
||||||
|
damdangStr += `<option value="${userArr[i].usr_id}">${userArr[i].usr_nm}</option>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$("#damdang").html(damdangStr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function atcl_no_enter(event) {
|
function atcl_no_enter(event) {
|
||||||
if (event.keyCode == 13) {
|
if (event.keyCode == 13) {
|
||||||
table.ajax.reload()
|
table.ajax.reload()
|
||||||
|
|||||||
@@ -520,7 +520,7 @@ $usr_nm = session('usr_nm');
|
|||||||
if (!rowData) return;
|
if (!rowData) return;
|
||||||
|
|
||||||
const rcpt_key = rowData.rcpt_key;
|
const rcpt_key = rowData.rcpt_key;
|
||||||
location.href = "<?= site_url('article/record/detail') ?>/" + rcpt_key;
|
window.open("<?= site_url('article/record/detail') ?>/" + rcpt_key, '_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -337,7 +337,9 @@
|
|||||||
const row = table.row(this).data()
|
const row = table.row(this).data()
|
||||||
if (!row) return
|
if (!row) return
|
||||||
|
|
||||||
location.href = '/article/receipt/lists';
|
|
||||||
|
|
||||||
|
location.href = '/article/receipt/lists?usr_id=' + row.usr_id;
|
||||||
});
|
});
|
||||||
|
|
||||||
// [검색] 버튼 눌렀을 때 다시 조회
|
// [검색] 버튼 눌렀을 때 다시 조회
|
||||||
|
|||||||
@@ -144,13 +144,14 @@
|
|||||||
$nRow = 1;
|
$nRow = 1;
|
||||||
foreach ($st_list as $row) {
|
foreach ($st_list as $row) {
|
||||||
|
|
||||||
// if ($row['depth'] == '1') {
|
$pars = [];
|
||||||
// $rowPars = array_merge($pars, array('bonbu' => $row['dept_sq']));
|
if ($row['depth'] == '1') {
|
||||||
// } else {
|
$rowPars = array_merge($pars, array('bonbu' => $row['dept_sq']));
|
||||||
// $rowPars = array_merge($pars, array('bonbu' => $row['pdept_sq'], 'dept_sq' => $row['dept_sq']));
|
} else {
|
||||||
// }
|
$rowPars = array_merge($pars, array('bonbu' => $row['pdept_sq'], 'dept_sq' => $row['dept_sq']));
|
||||||
|
}
|
||||||
|
|
||||||
echo '<tr onmouseover="this.className=\'highlight\'" onmouseout="this.className=\'normal\'" style="cursor:pointer" onclick="tr_onclick();">';
|
echo '<tr onmouseover="this.className=\'highlight\'" onmouseout="this.className=\'normal\'" style="cursor:pointer" onclick="tr_onclick(\'' . make_query_string($rowPars) . '\');">';
|
||||||
echo '<td>' . $nRow . '</td>';
|
echo '<td>' . $nRow . '</td>';
|
||||||
echo '<td style="text-align:left">' . str_replace(' ', ' ', $row['dept_nm']) . '</td>';
|
echo '<td style="text-align:left">' . str_replace(' ', ' ', $row['dept_nm']) . '</td>';
|
||||||
echo '<td>' . $row['region_cnt'] . '</td>';
|
echo '<td>' . $row['region_cnt'] . '</td>';
|
||||||
@@ -231,8 +232,8 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function tr_onclick() {
|
function tr_onclick(pars) {
|
||||||
location.href = '/article/receipt/lists';
|
location.href = '/article/receipt/lists' + pars;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 엑셀 다운로드
|
// 엑셀 다운로드
|
||||||
|
|||||||
@@ -326,7 +326,7 @@
|
|||||||
|
|
||||||
// myModal.show();
|
// myModal.show();
|
||||||
|
|
||||||
location.href = '/article/receipt/lists';
|
location.href = '/article/receipt/lists?usr_id=' + row.usr_id;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -554,7 +554,7 @@
|
|||||||
if (!rowData) return;
|
if (!rowData) return;
|
||||||
|
|
||||||
const vr_sq = rowData.vr_sq;
|
const vr_sq = rowData.vr_sq;
|
||||||
location.href = "<?= site_url('m701/m701a/detail') ?>/" + vr_sq;
|
window.open("<?= site_url('m701/m701a/detail') ?>/" + vr_sq, '_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
|
|||||||
@@ -578,7 +578,7 @@
|
|||||||
if (!rowData) return;
|
if (!rowData) return;
|
||||||
|
|
||||||
const vr_sq = rowData.vr_sq;
|
const vr_sq = rowData.vr_sq;
|
||||||
location.href = "<?= site_url('m702/m702a/detail') ?>/" + vr_sq;
|
window.open("<?= site_url('m702/m702a/detail') ?>/" + vr_sq, '_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
|
|||||||
@@ -532,7 +532,7 @@
|
|||||||
if (!rowData) return;
|
if (!rowData) return;
|
||||||
|
|
||||||
const fax_sq = rowData.fax_sq;
|
const fax_sq = rowData.fax_sq;
|
||||||
location.href = "<?= site_url('m703/m703a/detail') ?>/" + fax_sq;
|
window.open("<?= site_url('m703/m703a/detail') ?>/" + fax_sq, '_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
|
|||||||
@@ -530,7 +530,7 @@
|
|||||||
if (!rowData) return;
|
if (!rowData) return;
|
||||||
|
|
||||||
const vr_sq = rowData.vr_sq;
|
const vr_sq = rowData.vr_sq;
|
||||||
location.href = "<?= site_url('m704/m704a/detail') ?>/" + vr_sq;
|
window.open("<?= site_url('m704/m704a/detail') ?>/" + vr_sq, '_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
|
|||||||
@@ -569,7 +569,7 @@
|
|||||||
if (!rowData) return;
|
if (!rowData) return;
|
||||||
|
|
||||||
const vr_sq = rowData.vr_sq;
|
const vr_sq = rowData.vr_sq;
|
||||||
location.href = "<?= site_url('m705/m705a/detail') ?>/" + vr_sq;
|
window.open("<?= site_url('m705/m705a/detail') ?>/" + vr_sq, '_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
|
|||||||
@@ -481,7 +481,7 @@
|
|||||||
if (!rowData) return;
|
if (!rowData) return;
|
||||||
|
|
||||||
const vr_sq = rowData.vr_sq;
|
const vr_sq = rowData.vr_sq;
|
||||||
location.href = "<?= site_url('m706/m706a/detail') ?>/" + vr_sq;
|
window.open("<?= site_url('m706/m706a/detail') ?>/" + vr_sq, '_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
|
|||||||
@@ -41,9 +41,9 @@ $usr_level = session('usr_level');
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<form action="">
|
<form action="" id="frmSave" name="frmSave" onsubmit="return false;">
|
||||||
<input type="hidden" name="work_type" id="work_type" value="<?= $data['work_type'] ?>" />
|
<input type="hidden" name="work_type" id="work_type" value="<?= $data['work_type'] ?>" />
|
||||||
<input type="hidden" name="atcl_no" id="atcl_no" value="<?= $data['atcl_no'] ?>" />
|
<input type="hidden" name="atcl_no" value="<?= $data['atcl_no'] ?>" />
|
||||||
<input type="hidden" name="vr_sq" id="vr_sq" value="<?= $data['vr_sq'] ?>" />
|
<input type="hidden" name="vr_sq" id="vr_sq" value="<?= $data['vr_sq'] ?>" />
|
||||||
<input type="hidden" name="fax_sq" id="fax_sq" value="<?= $data['fax_sq'] ?>" />
|
<input type="hidden" name="fax_sq" id="fax_sq" value="<?= $data['fax_sq'] ?>" />
|
||||||
<input type="hidden" name="file_type" id="file_type" value="" />
|
<input type="hidden" name="file_type" id="file_type" value="" />
|
||||||
@@ -174,7 +174,7 @@ $usr_level = session('usr_level');
|
|||||||
style="max-width: 320px;">
|
style="max-width: 320px;">
|
||||||
<input type="text" class="form-control"
|
<input type="text" class="form-control"
|
||||||
name="atcl_no" id="atcl_no"
|
name="atcl_no" id="atcl_no"
|
||||||
value="<?= $data['atcl_no'] ?>" maxlength="10"
|
value="<?= $data['fax_sq'] ?>" maxlength="10"
|
||||||
placeholder="매물번호 입력">
|
placeholder="매물번호 입력">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-outline-primary"
|
class="btn btn-outline-primary"
|
||||||
@@ -343,7 +343,7 @@ $usr_level = session('usr_level');
|
|||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<input type="text" class="form-control form-control-sm"
|
<input type="text" class="form-control form-control-sm"
|
||||||
name="address3" id="address3"
|
name="address3" id="address3"
|
||||||
value="<?= $article['rcpt_ho'] ?>" disabled>
|
value="<?= $article['rcpt_ho'] ?? '' ?>" disabled>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-sm btn-outline-light">매물확인</button>
|
class="btn btn-sm btn-outline-light">매물확인</button>
|
||||||
@@ -358,7 +358,7 @@ $usr_level = session('usr_level');
|
|||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<input type="text" class="form-control form-control-sm"
|
<input type="text" class="form-control form-control-sm"
|
||||||
name="address3" id="address3"
|
name="address3" id="address3"
|
||||||
value="<?= $article['rcpt_ho'] ?>" disabled>
|
value="<?= $article['rcpt_ho'] ?? '' ?>" disabled>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
@@ -669,6 +669,20 @@ $usr_level = session('usr_level');
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location.replace("<?= site_url('m708/m708a/detail') ?>/" + atclNo);
|
||||||
|
|
||||||
|
/*
|
||||||
|
var atclNo = $('#atcl_no').val();
|
||||||
|
|
||||||
|
if (atclNo == "") {
|
||||||
|
swal.fire({
|
||||||
|
title: "매물번호를 입력해 주세요.",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$.getJSON("/m708/m708a/getArticleInfo?&atcl_no=" + atclNo, function (res) {
|
$.getJSON("/m708/m708a/getArticleInfo?&atcl_no=" + atclNo, function (res) {
|
||||||
|
|
||||||
if (res.code == '0') {
|
if (res.code == '0') {
|
||||||
@@ -688,7 +702,19 @@ $usr_level = session('usr_level');
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
// 매물확인
|
||||||
|
function view201detail(atcl_no) {
|
||||||
|
var type = <?= $data['work_type'] ?? '' ?>;
|
||||||
|
|
||||||
|
if (type == '1') { //현장확인매물
|
||||||
|
window.open('/article/receipt/detail/' + atcl_no);
|
||||||
|
} else {
|
||||||
|
alert('현장확인 매물이 아닙니다.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 현장확인
|
// 현장확인
|
||||||
@@ -1219,7 +1245,7 @@ $usr_level = session('usr_level');
|
|||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/m703/m703a/saveResult',
|
url: '/m708/m708a/saveResult',
|
||||||
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: $("#frmSave").serialize(),
|
data: $("#frmSave").serialize(),
|
||||||
@@ -1313,11 +1339,15 @@ $usr_level = session('usr_level');
|
|||||||
},
|
},
|
||||||
success: function (result) {
|
success: function (result) {
|
||||||
if (result.code == '0') {
|
if (result.code == '0') {
|
||||||
|
if (parseInt(result.cnt) >= 4) {
|
||||||
|
Swal.fire({
|
||||||
|
title: '분양계약서가 업로드 되어 있습니다.',
|
||||||
|
icon: "warning"
|
||||||
|
|
||||||
const fax_sq = result.data.fax_sq;
|
})
|
||||||
|
} else {
|
||||||
location.replace("<?= site_url('m708/m708a/detail') ?>/" + fax_sq);
|
upload_bunyang();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: result.msg,
|
title: result.msg,
|
||||||
@@ -1330,6 +1360,84 @@ $usr_level = session('usr_level');
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 분양계약서 업로드
|
||||||
|
function upload_bunyang() {
|
||||||
|
var vr_sq = $('#frmSave > #vr_sq').val();
|
||||||
|
var work_type = $('#frmSave > #work_type').val();
|
||||||
|
var atcl_no = $('#frmSave > #atcl_no').val();
|
||||||
|
|
||||||
|
if (work_type == '' || atcl_no == '' || vr_sq == '') {
|
||||||
|
swal.fire({
|
||||||
|
title: "매물정보를 확인하세요.",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
swal.fire({
|
||||||
|
text: "확인결과를 저장하시겠습니까?",
|
||||||
|
type: "warning",
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonText: "예",
|
||||||
|
cancelButtonText: "아니오",
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: true,
|
||||||
|
confirmButtonColor: "#3085d6",
|
||||||
|
cancelButtonColor: "#d33",
|
||||||
|
}).then((result) => {
|
||||||
|
if (result.isConfirmed) {
|
||||||
|
const data = {
|
||||||
|
'curr_fax_sq': '<?= $data['fax_sq'] ?>'
|
||||||
|
};
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: '/m708/m708a/saveResult3',
|
||||||
|
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||||
|
method: 'POST',
|
||||||
|
data: data,
|
||||||
|
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') {
|
||||||
|
swal.fire({
|
||||||
|
title: '정상 처리되었습니다.',
|
||||||
|
icon: "success"
|
||||||
|
|
||||||
|
});
|
||||||
|
location.reload();
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: result.msg,
|
||||||
|
icon: "error"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// 다음매물
|
// 다음매물
|
||||||
function btnSilverNextAssign_onclick() {
|
function btnSilverNextAssign_onclick() {
|
||||||
swal.fire({
|
swal.fire({
|
||||||
|
|||||||
@@ -557,7 +557,7 @@
|
|||||||
if (!rowData) return;
|
if (!rowData) return;
|
||||||
|
|
||||||
const fax_sq = rowData.fax_sq;
|
const fax_sq = rowData.fax_sq;
|
||||||
location.href = "<?= site_url('m708/m708a/detail') ?>/" + fax_sq;
|
window.open("<?= site_url('m708/m708a/detail') ?>/" + fax_sq, '_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ $usr_level = session('usr_level');
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<form action="">
|
<form action="">
|
||||||
<input type="hidden" name="work_type" id="work_type" value="<?= $data['work_type'] ?>" />
|
<input type="hidden" name="work_type" id="work_type" value="<?= $data['work_type'] ?>" />
|
||||||
<input type="hidden" name="atcl_no" id="atcl_no" value="<?= $data['atcl_no'] ?>" />
|
<input type="hidden" name="atcl_no" value="<?= $data['atcl_no'] ?>" />
|
||||||
<input type="hidden" name="vr_sq" id="vr_sq" value="<?= $data['vr_sq'] ?>" />
|
<input type="hidden" name="vr_sq" id="vr_sq" value="<?= $data['vr_sq'] ?>" />
|
||||||
<input type="hidden" name="fax_sq" id="fax_sq" value="<?= $data['fax_sq'] ?>" />
|
<input type="hidden" name="fax_sq" id="fax_sq" value="<?= $data['fax_sq'] ?>" />
|
||||||
<input type="hidden" name="file_type" id="file_type" value="" />
|
<input type="hidden" name="file_type" id="file_type" value="" />
|
||||||
@@ -153,7 +153,7 @@ $usr_level = session('usr_level');
|
|||||||
style="max-width: 320px;">
|
style="max-width: 320px;">
|
||||||
<input type="text" class="form-control"
|
<input type="text" class="form-control"
|
||||||
name="atcl_no" id="atcl_no"
|
name="atcl_no" id="atcl_no"
|
||||||
value="<?= $data['atcl_no'] ?>" maxlength="10"
|
value="<?= $data['fax_sq'] ?>" maxlength="10"
|
||||||
placeholder="매물번호 입력">
|
placeholder="매물번호 입력">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-outline-primary"
|
class="btn btn-outline-primary"
|
||||||
@@ -669,6 +669,9 @@ $usr_level = session('usr_level');
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location.replace("<?= site_url('m709/m709a/detail') ?>/" + atclNo);
|
||||||
|
|
||||||
|
/*
|
||||||
$.getJSON("/m709/m709a/getArticleInfo?&atcl_no=" + atclNo, function (res) {
|
$.getJSON("/m709/m709a/getArticleInfo?&atcl_no=" + atclNo, function (res) {
|
||||||
|
|
||||||
if (res.code == '0') {
|
if (res.code == '0') {
|
||||||
@@ -688,6 +691,7 @@ $usr_level = session('usr_level');
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -557,7 +557,7 @@
|
|||||||
if (!rowData) return;
|
if (!rowData) return;
|
||||||
|
|
||||||
const fax_sq = rowData.fax_sq;
|
const fax_sq = rowData.fax_sq;
|
||||||
location.href = "<?= site_url('m709/m709a/detail') ?>/" + fax_sq;
|
window.open("<?= site_url('m709/m709a/detail') ?>/" + fax_sq, '_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
|
|||||||
@@ -560,7 +560,7 @@
|
|||||||
if (!rowData) return;
|
if (!rowData) return;
|
||||||
|
|
||||||
const vr_sq = rowData.vr_sq;
|
const vr_sq = rowData.vr_sq;
|
||||||
location.href = "<?= site_url('m701/m701a/detail') ?>/" + vr_sq;
|
window.open("<?= site_url('m701/m701a/detail') ?>/" + vr_sq, '_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
|
|||||||
@@ -93,7 +93,17 @@ function parseurl($url)
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<form name="rcptFrm" id="rcptFrm" method="post" action="" enctype="multipart/form-data" autocomplete="off"
|
||||||
|
onsubmit="return false;">
|
||||||
|
<input type="hidden" name="rcpt_key" id="rcpt_key" value="<?= $data['vr_sq'] ?>" />
|
||||||
|
<input type="hidden" name="nextVal" id="nextVal" />
|
||||||
|
<input type="hidden" name="reg_chk_val" value="<?= $data['rgbk_confirm'] ?>" />
|
||||||
|
<input type="hidden" name="atcl_vrtc_type" id="atcl_vrtc_type" value="<?= $data['vrfc_type_cd'] ?>" />
|
||||||
|
<input type="hidden" name="vrfc_type_sub" id="vrfc_type_sub" value="<?= $data['vrfc_type_sub'] ?>" />
|
||||||
|
<input type="hidden" name="chk_trade_type" id="chk_trade_type" value="<?= $data['trade_type'] ?>" />
|
||||||
|
<input type="hidden" name="chk_hscp_no" id="chk_hscp_no" value="<?= $data['chk_hscp_no'] ?>" />
|
||||||
|
<input type="hidden" name="atcl_no" id="atcl_no" value="<?= $data['atcl_no'] ?>" />
|
||||||
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="main-card mb-3 card">
|
<div class="main-card mb-3 card">
|
||||||
|
|
||||||
@@ -130,7 +140,8 @@ function parseurl($url)
|
|||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-bordered table-sm tbl_basic2 align-middle mb-0" style="min-width: 900px;">
|
<table class="table table-bordered table-sm tbl_basic2 align-middle mb-0"
|
||||||
|
style="min-width: 900px;">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col style="width: 60%;">
|
<col style="width: 60%;">
|
||||||
<col style="width: 40%;">
|
<col style="width: 40%;">
|
||||||
@@ -215,7 +226,8 @@ function parseurl($url)
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body p-2">
|
<div class="card-body p-2">
|
||||||
<table class="table table-sm table-bordered mb-2 tbl_basic2 align-middle">
|
<table
|
||||||
|
class="table table-sm table-bordered mb-2 tbl_basic2 align-middle">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col style="width: 110px;">
|
<col style="width: 110px;">
|
||||||
<col>
|
<col>
|
||||||
@@ -226,10 +238,10 @@ function parseurl($url)
|
|||||||
<td>
|
<td>
|
||||||
<div class="input-group input-group-sm"
|
<div class="input-group input-group-sm"
|
||||||
style="max-width: 320px;">
|
style="max-width: 320px;">
|
||||||
<input type="text" class="form-control" name="atcl_no"
|
<input type="text" class="form-control"
|
||||||
id="atcl_no" value="<?= $data['atcl_no'] ?>"
|
name="atcl_no" id="atcl_no"
|
||||||
maxlength="10" placeholder="매물번호 입력"
|
value="<?= $data['atcl_no'] ?>" maxlength="10"
|
||||||
readonly="readonly">
|
placeholder="매물번호 입력" readonly="readonly">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -300,7 +312,8 @@ function parseurl($url)
|
|||||||
<span class="fw-semibold">매물 정보</span>
|
<span class="fw-semibold">매물 정보</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body p-2">
|
<div class="card-body p-2">
|
||||||
<table class="table table-sm table-bordered mb-0 tbl_basic2 align-middle"
|
<table
|
||||||
|
class="table table-sm table-bordered mb-0 tbl_basic2 align-middle"
|
||||||
id="info_table">
|
id="info_table">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col style="width: 120px;">
|
<col style="width: 120px;">
|
||||||
@@ -320,13 +333,15 @@ function parseurl($url)
|
|||||||
<tr>
|
<tr>
|
||||||
<th>의뢰인(매도자)</th>
|
<th>의뢰인(매도자)</th>
|
||||||
<td>
|
<td>
|
||||||
<span id="span_seller_nm"><?= $data['seller_nm'] ?></span>
|
<span
|
||||||
|
id="span_seller_nm"><?= $data['seller_nm'] ?></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>매물구분</th>
|
<th>매물구분</th>
|
||||||
<td>
|
<td>
|
||||||
<span id="span_rlet_type_nm"><?= $data['atcl_nm'] ?></span>
|
<span
|
||||||
|
id="span_rlet_type_nm"><?= $data['atcl_nm'] ?></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if ($data['vrfc_type_cd'] !== "O"): ?>
|
<?php if ($data['vrfc_type_cd'] !== "O"): ?>
|
||||||
@@ -366,7 +381,8 @@ function parseurl($url)
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>단지주소</th>
|
<th>단지주소</th>
|
||||||
<td colspan="3"><?php echo $detail_hscp['addr']; ?>
|
<td colspan="3">
|
||||||
|
<?php echo $detail_hscp['addr']; ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@@ -378,9 +394,11 @@ function parseurl($url)
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>사용승인일</th>
|
<th>사용승인일</th>
|
||||||
<td><?php echo $detail_hscp['useAprvYmd']; ?></td>
|
<td><?php echo $detail_hscp['useAprvYmd']; ?>
|
||||||
|
</td>
|
||||||
<th>단지 총 동수</th>
|
<th>단지 총 동수</th>
|
||||||
<td><?php echo $detail_hscp['dongCount']; ?></td>
|
<td><?php echo $detail_hscp['dongCount']; ?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
@@ -389,7 +407,8 @@ function parseurl($url)
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>단지명</th>
|
<th>단지명</th>
|
||||||
<td><?php echo $detail_hscp['villaName']; ?></td>
|
<td><?php echo $detail_hscp['villaName']; ?>
|
||||||
|
</td>
|
||||||
<th>단지타입명</th>
|
<th>단지타입명</th>
|
||||||
<td><?php echo $detail_hscp['villaTypeName']; ?>
|
<td><?php echo $detail_hscp['villaTypeName']; ?>
|
||||||
</td>
|
</td>
|
||||||
@@ -402,7 +421,8 @@ function parseurl($url)
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>소재 주소(전체)</th>
|
<th>소재 주소(전체)</th>
|
||||||
<td colspan="3"><?php echo $detail_hscp['addr']; ?>
|
<td colspan="3">
|
||||||
|
<?php echo $detail_hscp['addr']; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -419,9 +439,11 @@ function parseurl($url)
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>단지 총 세대수</th>
|
<th>단지 총 세대수</th>
|
||||||
<td><?php echo $detail_hscp['totHsehCnt']; ?></td>
|
<td><?php echo $detail_hscp['totHsehCnt']; ?>
|
||||||
|
</td>
|
||||||
<th>단지 총 동수 </th>
|
<th>단지 총 동수 </th>
|
||||||
<td><?php echo $detail_hscp['totDongCnt']; ?></td>
|
<td><?php echo $detail_hscp['totDongCnt']; ?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
@@ -602,13 +624,15 @@ function parseurl($url)
|
|||||||
<tr>
|
<tr>
|
||||||
<th>대지면적</th>
|
<th>대지면적</th>
|
||||||
<td>
|
<td>
|
||||||
<span style="color:#002EE7"><?= $data['grnd_spc'] ?></span>
|
<span
|
||||||
|
style="color:#002EE7"><?= $data['grnd_spc'] ?></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>건축면적</th>
|
<th>건축면적</th>
|
||||||
<td>
|
<td>
|
||||||
<span style="color:#002EE7"><?= $data['bldg_spc'] ?></span>
|
<span
|
||||||
|
style="color:#002EE7"><?= $data['bldg_spc'] ?></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
@@ -682,7 +706,8 @@ function parseurl($url)
|
|||||||
<span class="fw-semibold">확인 정보</span>
|
<span class="fw-semibold">확인 정보</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body p-2">
|
<div class="card-body p-2">
|
||||||
<table class="table table-sm table-bordered mb-0 tbl_basic2 align-middle"
|
<table
|
||||||
|
class="table table-sm table-bordered mb-0 tbl_basic2 align-middle"
|
||||||
id="info_table">
|
id="info_table">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col style="width: 120px;">
|
<col style="width: 120px;">
|
||||||
@@ -694,7 +719,8 @@ function parseurl($url)
|
|||||||
<td>
|
<td>
|
||||||
<?= $data['reg_charger_nm'] ?>
|
<?= $data['reg_charger_nm'] ?>
|
||||||
|
|
||||||
<button type="button" class="btn btn-sm btn-outline-light"
|
<button type="button"
|
||||||
|
class="btn btn-sm btn-outline-light"
|
||||||
onClick="window.open('https://www.realtop.co.kr/cm/CMMBR01C2.asp2?cmInstCd=Z265&cmUserNo=<?= $usr_id ?>&cmKey=nxfT5VLGXg&cmName=<?= $usr_id ?>&cmDNm=confirms&cmAutoLogInYn=Y&cmUrl=/re/NVRET01R0&cmEncoding=UTF-8')">
|
onClick="window.open('https://www.realtop.co.kr/cm/CMMBR01C2.asp2?cmInstCd=Z265&cmUserNo=<?= $usr_id ?>&cmKey=nxfT5VLGXg&cmName=<?= $usr_id ?>&cmDNm=confirms&cmAutoLogInYn=Y&cmUrl=/re/NVRET01R0&cmEncoding=UTF-8')">
|
||||||
등기부등본 열람
|
등기부등본 열람
|
||||||
</button>
|
</button>
|
||||||
@@ -735,7 +761,8 @@ function parseurl($url)
|
|||||||
id="c_u_s_<?= $value['cd'] ?>"
|
id="c_u_s_<?= $value['cd'] ?>"
|
||||||
name="cert_uncnfrm_status[]"
|
name="cert_uncnfrm_status[]"
|
||||||
value="<?= $value['cd'] ?>" />
|
value="<?= $value['cd'] ?>" />
|
||||||
<label class="form-check-label ms-1 small"
|
<label
|
||||||
|
class="form-check-label ms-1 small"
|
||||||
for="c_u_s_<?= $value['cd'] ?>">
|
for="c_u_s_<?= $value['cd'] ?>">
|
||||||
<?= $value['cd_nm'] ?>
|
<?= $value['cd_nm'] ?>
|
||||||
</label>
|
</label>
|
||||||
@@ -883,8 +910,8 @@ function parseurl($url)
|
|||||||
<tr>
|
<tr>
|
||||||
<th>메모</th>
|
<th>메모</th>
|
||||||
<td>
|
<td>
|
||||||
<textarea name="memo" id="memo"
|
<textarea class="form-control" name="memo" id="memo"
|
||||||
style="width:300px; height:45px;"
|
style="height:60px;resize:none;"
|
||||||
readonly><?= $memo['memo'] ?></textarea>
|
readonly><?= $memo['memo'] ?></textarea>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -950,7 +977,8 @@ function parseurl($url)
|
|||||||
<span class="fw-semibold">기타 정보</span>
|
<span class="fw-semibold">기타 정보</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body p-2">
|
<div class="card-body p-2">
|
||||||
<table class="table table-sm table-bordered mb-0 tbl_basic2 align-middle"
|
<table
|
||||||
|
class="table table-sm table-bordered mb-0 tbl_basic2 align-middle"
|
||||||
id="info_table">
|
id="info_table">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col style="width: 120px;">
|
<col style="width: 120px;">
|
||||||
@@ -1018,7 +1046,8 @@ function parseurl($url)
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
<?= $this->section('modals') ?>
|
<?= $this->section('modals') ?>
|
||||||
<div class="modal" id="previewModal" tabindex="-1">
|
<div class="modal" id="previewModal" tabindex="-1">
|
||||||
@@ -1497,7 +1526,233 @@ function parseurl($url)
|
|||||||
|
|
||||||
// 정보저장
|
// 정보저장
|
||||||
function saveRegi() {
|
function saveRegi() {
|
||||||
|
var frm = document.rcptFrm;
|
||||||
|
var atcl_vrtc_type = frm.atcl_vrtc_type.value;
|
||||||
|
var chk_hscp_no = frm.chk_hscp_no.value;
|
||||||
|
var trade_type = "<?= $data['trade_type_cd'] ?>";
|
||||||
|
var vrfc_type = "<?= $data['vrfc_type_cd'] ?>";
|
||||||
|
|
||||||
|
var chkBox = $('input:checkbox[name=img_chk_chk]').is(':checked'); //등기소, 리얼탑 열람, 리얼탑 기열람, 열람
|
||||||
|
|
||||||
|
var cert_register = "<?= $data['cert_register'] ?>"; //등기부등본 url이 있을경우
|
||||||
|
var filePdf = '<?= $file_pdf ?? '' ?>';
|
||||||
|
|
||||||
|
if ($('input:checkbox[name=noimg_chk_chk]').is(":checked") == true) chkBox = true;
|
||||||
|
|
||||||
|
if (vrfc_type == "M") {
|
||||||
|
// 검증방식이 모바일이면 파일체크는 하지않고 열람인지 등기소, 리얼탑 열람, 리얼탑 기열람인지만 체크함
|
||||||
|
if (chkBox == false) {
|
||||||
|
Swal.fire({
|
||||||
|
title: "등기부등본 확인 상태를 선택해주세요.",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (chk_hscp_no == "" && trade_type == "A1") {
|
||||||
|
// 비공동매물이고 거래방식이 매매일 경우에 파일 체크를 하지 않고 열람인지 등기소, 리얼탑 열람, 리얼탑 기열람인지만 체크함.
|
||||||
|
if (chkBox == false) {
|
||||||
|
Swal.fire({
|
||||||
|
title: "등기부등본 확인 상태를 선택해주세요.",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (cert_register == "") { //등기부등본url이 없을경우
|
||||||
|
// 파일이 없으며 등기부등본 이미지 파일없음이 아니면 파일을 선택하도록 함.
|
||||||
|
if (frm.regi_file.value == "" && reg_file_yn == false) {
|
||||||
|
if (frm.img_chk_chk.checked == false) {
|
||||||
|
Swal.fire({
|
||||||
|
title: "파일을 선택해주세요",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (chkBox == false) {
|
||||||
|
Swal.fire({
|
||||||
|
title: "등기부등본 확인 상태를 선택해주세요.",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (chkBox == false) {
|
||||||
|
Swal.fire({
|
||||||
|
title: "등기부등본 확인 상태를 선택해주세요.",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var type = "<?= $data['vrfc_type_sub'] ?>";
|
||||||
|
if ((type == 'D2') && (filePdf == 'pdf' || filePdf == 'PDF')) { //홍보v2고, pdf로 업로드됐을때
|
||||||
|
var chk = $("#img_chk_chk4").prop("checked");
|
||||||
|
if (chk == false) {
|
||||||
|
Swal.fire({
|
||||||
|
title: '소유자명 확인이 필요합니다',
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
click = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var radio_val = $('input:radio[name=owner_verifiable]').is(':checked');
|
||||||
|
// if (type == 'D2' && radio_val == false) { //홍보확인서v2고 실소유주 확인 선택안되었을때
|
||||||
|
if (radio_val == false) { //홍보확인서v2고 실소유주 확인 선택안되었을때
|
||||||
|
Swal.fire({
|
||||||
|
title: '소유자명 확인 결과를 선택해주세요',
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
click = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (frm.reg_conf_yn_2.value == "") {
|
||||||
|
Swal.fire({
|
||||||
|
title: "매물주소 정보확인 결과를 선택해주세요",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
frm.reg_conf_yn_2.focus();
|
||||||
|
click = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (frm.reg_conf_yn_3.value == "") {
|
||||||
|
Swal.fire({
|
||||||
|
title: "의뢰인정보 확인 결과를 선택해주세요",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
frm.reg_conf_yn_3.focus();
|
||||||
|
click = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (frm.reg_conf_yn_2.value == "20000") {
|
||||||
|
if (frm.reg_conf_yn_info_2.value == "") {
|
||||||
|
Swal.fire({
|
||||||
|
title: "매물주소 불일치에 대한 상세내용을 작성해주세요",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
frm.reg_conf_yn_info_2.focus();
|
||||||
|
click = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (frm.reg_conf_yn_3.value == "20000") {
|
||||||
|
if (frm.reg_conf_yn_info_3.value == "") {
|
||||||
|
Swal.fire({
|
||||||
|
title: "의뢰인정보 불일치에 대한 상세내용을 작성해주세요",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
frm.reg_conf_yn_info_3.focus();
|
||||||
|
click = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 불일치가 하나라도 있으면
|
||||||
|
if ((type == 'M1' || type == 'O1') && (frm.reg_conf_yn_2.value == "20000" || frm.reg_conf_yn_3.value == "20000")) {
|
||||||
|
if (!$("input:checkbox[name='cert_uncnfrm_status[]']").is(":checked")) {
|
||||||
|
Swal.fire({
|
||||||
|
title: "등기부등본 미확인여부 상세를 체크해주세요",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
frm.cert_uncnfrm_status.focus();
|
||||||
|
click = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 다중체크된거 가져오기
|
||||||
|
var arr_uncnfrm_status = "";
|
||||||
|
var cnt = 0;
|
||||||
|
$('input:checkbox[name="cert_uncnfrm_status[]"]').each(function () {
|
||||||
|
if ($(this).is(':checked')) {
|
||||||
|
if (cnt == 0) {
|
||||||
|
arr_uncnfrm_status += $(this).val();
|
||||||
|
} else {
|
||||||
|
arr_uncnfrm_status += "|" + ($(this).val());
|
||||||
|
}
|
||||||
|
cnt++;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('#arr_uncnfrm_status').val(arr_uncnfrm_status);
|
||||||
|
}
|
||||||
|
|
||||||
|
swal.fire({
|
||||||
|
text: "다음 등기부등본 이미지를 불러오시겠습니까?",
|
||||||
|
type: "warning",
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonText: "예",
|
||||||
|
cancelButtonText: "아니오",
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: true,
|
||||||
|
confirmButtonColor: "#3085d6",
|
||||||
|
cancelButtonColor: "#d33",
|
||||||
|
}).then((result) => {
|
||||||
|
if (result.isConfirmed) {
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: '/m712/m712a/saveRegi',
|
||||||
|
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||||
|
method: 'POST',
|
||||||
|
data: $("#rcptFrm").serialize(),
|
||||||
|
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) {
|
||||||
|
swal
|
||||||
|
.fire({
|
||||||
|
title: '정상 처리되었습니다.',
|
||||||
|
icon: "success"
|
||||||
|
});
|
||||||
|
location.reload();
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: result.msg ?? '저장에 실패했습니다.',
|
||||||
|
icon: "error"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: result.msg,
|
||||||
|
icon: "error"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//다음매물확인
|
//다음매물확인
|
||||||
|
|||||||
@@ -551,7 +551,7 @@
|
|||||||
if (!rowData) return;
|
if (!rowData) return;
|
||||||
|
|
||||||
const vr_sq = rowData.vr_sq;
|
const vr_sq = rowData.vr_sq;
|
||||||
location.href = "<?= site_url('m712/m712a/detail') ?>/" + vr_sq;
|
window.open("<?= site_url('m712/m712a/detail') ?>/" + vr_sq, '_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
|
|||||||
@@ -94,7 +94,17 @@ function parseurl($url)
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<form name="rcptFrm" id="rcptFrm" method="post" action="" enctype="multipart/form-data" autocomplete="off"
|
||||||
|
onsubmit="return false;">
|
||||||
|
<input type="hidden" name="rcpt_key" id="rcpt_key" value="<?= $data['vr_sq'] ?>" />
|
||||||
|
<input type="hidden" name="nextVal" id="nextVal" />
|
||||||
|
<input type="hidden" name="reg_chk_val" value="<?= $data['rgbk_confirm'] ?>" />
|
||||||
|
<input type="hidden" name="atcl_vrtc_type" id="atcl_vrtc_type" value="<?= $data['vrfc_type_cd'] ?>" />
|
||||||
|
<input type="hidden" name="vrfc_type_sub" id="vrfc_type_sub" value="<?= $data['vrfc_type_sub'] ?>" />
|
||||||
|
<input type="hidden" name="chk_trade_type" id="chk_trade_type" value="<?= $data['trade_type'] ?>" />
|
||||||
|
<input type="hidden" name="chk_hscp_no" id="chk_hscp_no" value="<?= $data['chk_hscp_no'] ?>" />
|
||||||
|
<input type="hidden" name="atcl_no" id="atcl_no" value="<?= $data['atcl_no'] ?>" />
|
||||||
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="main-card mb-3 card">
|
<div class="main-card mb-3 card">
|
||||||
|
|
||||||
@@ -287,7 +297,8 @@ function parseurl($url)
|
|||||||
<tr>
|
<tr>
|
||||||
<th>검증방식</th>
|
<th>검증방식</th>
|
||||||
<td>
|
<td>
|
||||||
<span style="color:#FF0000"><?= $data['vrfc_type']; ?></span>
|
<span
|
||||||
|
style="color:#FF0000"><?= $data['vrfc_type']; ?></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -431,7 +442,8 @@ function parseurl($url)
|
|||||||
<th>거래구분/가격</th>
|
<th>거래구분/가격</th>
|
||||||
<td>
|
<td>
|
||||||
<?php if ($data['trade_type_cd'] == "A1"): ?>
|
<?php if ($data['trade_type_cd'] == "A1"): ?>
|
||||||
<span style='color:#ff0000'><?= $data['trade_type'] ?></span>
|
<span
|
||||||
|
style='color:#ff0000'><?= $data['trade_type'] ?></span>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?= $data['trade_type'] ?>
|
<?= $data['trade_type'] ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
@@ -646,7 +658,8 @@ function parseurl($url)
|
|||||||
<tr>
|
<tr>
|
||||||
<th>등기부등본 <br />미확인여부<br />상세</th>
|
<th>등기부등본 <br />미확인여부<br />상세</th>
|
||||||
<td>
|
<td>
|
||||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
<table border="0" cellpadding="0" cellspacing="0"
|
||||||
|
width="100%">
|
||||||
<input type="hidden" name="arr_uncnfrm_status"
|
<input type="hidden" name="arr_uncnfrm_status"
|
||||||
id="arr_uncnfrm_status" />
|
id="arr_uncnfrm_status" />
|
||||||
<tr>
|
<tr>
|
||||||
@@ -779,8 +792,8 @@ function parseurl($url)
|
|||||||
<tr>
|
<tr>
|
||||||
<th>메모</th>
|
<th>메모</th>
|
||||||
<td>
|
<td>
|
||||||
<textarea name="memo" id="memo"
|
<textarea class="form-control" name="memo" id="memo"
|
||||||
style="width:300px; height:45px;"
|
style="height:60px;resize: none;"
|
||||||
readonly><?= $memo['memo'] ?></textarea>
|
readonly><?= $memo['memo'] ?></textarea>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -789,7 +802,8 @@ function parseurl($url)
|
|||||||
<td class="d-flex gap-1">
|
<td class="d-flex gap-1">
|
||||||
<input type="checkbox" class="form-check-input mt-0"
|
<input type="checkbox" class="form-check-input mt-0"
|
||||||
name="img_chk_chk" id="img_chk_chk3" value="O"
|
name="img_chk_chk" id="img_chk_chk3" value="O"
|
||||||
style="vertical-align:middle;" onclick="check_only(this)" />
|
style="vertical-align:middle;"
|
||||||
|
onclick="check_only(this)" />
|
||||||
<span id="img_chk_chk3_label" class="padd_r">
|
<span id="img_chk_chk3_label" class="padd_r">
|
||||||
<label for="img_chk_chk3">열람</label></span>
|
<label for="img_chk_chk3">열람</label></span>
|
||||||
<? if ($data['vrfc_type_sub'] == 'D2') { //홍보확인서 v2일경우
|
<? if ($data['vrfc_type_sub'] == 'D2') { //홍보확인서 v2일경우
|
||||||
@@ -806,17 +820,20 @@ function parseurl($url)
|
|||||||
?>
|
?>
|
||||||
<input type="checkbox" class="form-check-input mt-0"
|
<input type="checkbox" class="form-check-input mt-0"
|
||||||
name="img_chk_chk" id="img_chk_chk5" value="R"
|
name="img_chk_chk" id="img_chk_chk5" value="R"
|
||||||
style="vertical-align:middle;" onclick="check_only(this)" />
|
style="vertical-align:middle;"
|
||||||
|
onclick="check_only(this)" />
|
||||||
<span id="img_chk_chk5_label" class="padd_r">
|
<span id="img_chk_chk5_label" class="padd_r">
|
||||||
<label for="img_chk_chk5">리얼탑 열람</label></span>
|
<label for="img_chk_chk5">리얼탑 열람</label></span>
|
||||||
<input type="checkbox" class="form-check-input mt-0"
|
<input type="checkbox" class="form-check-input mt-0"
|
||||||
name="img_chk_chk" id="img_chk_chk6" value="G"
|
name="img_chk_chk" id="img_chk_chk6" value="G"
|
||||||
style="vertical-align:middle;" onclick="check_only(this)" />
|
style="vertical-align:middle;"
|
||||||
|
onclick="check_only(this)" />
|
||||||
<span id="img_chk_chk6_label" class="padd_r">
|
<span id="img_chk_chk6_label" class="padd_r">
|
||||||
<label for="img_chk_chk6">리얼탑 기열람</label></span>
|
<label for="img_chk_chk6">리얼탑 기열람</label></span>
|
||||||
<input type="checkbox" class="form-check-input mt-0"
|
<input type="checkbox" class="form-check-input mt-0"
|
||||||
name="img_chk_chk" id="img_chk_chk2" value="T"
|
name="img_chk_chk" id="img_chk_chk2" value="T"
|
||||||
style="vertical-align:middle;" onclick="check_only(this)" />
|
style="vertical-align:middle;"
|
||||||
|
onclick="check_only(this)" />
|
||||||
<span id="img_chk_chk2_label" class="padd_r">
|
<span id="img_chk_chk2_label" class="padd_r">
|
||||||
<label for="img_chk_chk2">등기소</label></span>
|
<label for="img_chk_chk2">등기소</label></span>
|
||||||
<?
|
<?
|
||||||
@@ -855,7 +872,8 @@ function parseurl($url)
|
|||||||
id="owner_birth" numberonly="true" maxlength="6"
|
id="owner_birth" numberonly="true" maxlength="6"
|
||||||
value="<?= $data['owner_birth'] ?>" size="20"
|
value="<?= $data['owner_birth'] ?>" size="20"
|
||||||
style="color:#ff0000; font-weight:bold;"
|
style="color:#ff0000; font-weight:bold;"
|
||||||
onkeyup="noSpaceForm(this);" onchange="noSpaceForm(this);">
|
onkeyup="noSpaceForm(this);"
|
||||||
|
onchange="noSpaceForm(this);">
|
||||||
<button type="button" class="btn btn-sm btn-outline-light"
|
<button type="button" class="btn btn-sm btn-outline-light"
|
||||||
onclick="save_info_onclick()">
|
onclick="save_info_onclick()">
|
||||||
저장
|
저장
|
||||||
@@ -871,7 +889,8 @@ function parseurl($url)
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>지역구분</th>
|
<th>지역구분</th>
|
||||||
<td style="padding: 6px 9px; color:#FF0000;" class="d-flex gap-1">
|
<td style="padding: 6px 9px; color:#FF0000;"
|
||||||
|
class="d-flex gap-1">
|
||||||
<?php
|
<?php
|
||||||
$si = substr($data['address_code'], 0, 2) . '00000000';
|
$si = substr($data['address_code'], 0, 2) . '00000000';
|
||||||
$gugun = substr($data['address_code'], 0, 5) . '00000';
|
$gugun = substr($data['address_code'], 0, 5) . '00000';
|
||||||
@@ -908,8 +927,8 @@ function parseurl($url)
|
|||||||
<th>리 주소</th>
|
<th>리 주소</th>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" class="form-control" name="address2a"
|
<input type="text" class="form-control" name="address2a"
|
||||||
id="address2a" value="<?= $data['address2a'] ?>" size="60"
|
id="address2a" value="<?= $data['address2a'] ?>"
|
||||||
disabled="disabled"
|
size="60" disabled="disabled"
|
||||||
style="color:#ff0000; font-weight:bold;">
|
style="color:#ff0000; font-weight:bold;">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -922,8 +941,8 @@ function parseurl($url)
|
|||||||
disabled="disabled"
|
disabled="disabled"
|
||||||
style="color:#ff0000; font-weight:bold;">
|
style="color:#ff0000; font-weight:bold;">
|
||||||
<input type="text" class="form-control" name="address2b"
|
<input type="text" class="form-control" name="address2b"
|
||||||
id="address2b" value="<?= $data['address2b'] ?>" size="60"
|
id="address2b" value="<?= $data['address2b'] ?>"
|
||||||
disabled="disabled"
|
size="60" disabled="disabled"
|
||||||
style="color:#ff0000; font-weight:bold;">
|
style="color:#ff0000; font-weight:bold;">
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<input type="text" name="address2" id="address2"
|
<input type="text" name="address2" id="address2"
|
||||||
@@ -931,8 +950,8 @@ function parseurl($url)
|
|||||||
disabled="disabled"
|
disabled="disabled"
|
||||||
style="color:#ff0000; font-weight:bold;">
|
style="color:#ff0000; font-weight:bold;">
|
||||||
<input type="hidden" class="iText" name="address2b"
|
<input type="hidden" class="iText" name="address2b"
|
||||||
id="address2b" value="<?= $data['address2b'] ?>" size="60"
|
id="address2b" value="<?= $data['address2b'] ?>"
|
||||||
disabled="disabled"
|
size="60" disabled="disabled"
|
||||||
style="color:#ff0000; font-weight:bold;">
|
style="color:#ff0000; font-weight:bold;">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<input type="text" class="form-control" name="address3"
|
<input type="text" class="form-control" name="address3"
|
||||||
@@ -960,9 +979,11 @@ function parseurl($url)
|
|||||||
<div class="card-body d-flex justify-content-end gap-1">
|
<div class="card-body d-flex justify-content-end gap-1">
|
||||||
<?php if (intval($data['stat_cd']) < 45 && intval($data['stat_cd']) >= 35 && $data['stat_cd'] != '39' && $data['stat_cd'] != '49'):
|
<?php if (intval($data['stat_cd']) < 45 && intval($data['stat_cd']) >= 35 && $data['stat_cd'] != '39' && $data['stat_cd'] != '49'):
|
||||||
?>
|
?>
|
||||||
<button class="btn btn-sm btn-outline-primary" onclick="saveRegi()">전송</button>
|
<button class="btn btn-sm btn-outline-primary"
|
||||||
|
onclick="saveRegi()">전송</button>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<button class="btn btn-sm btn-outline-light" onclick="nextRegi();">다음</button>
|
<button class="btn btn-sm btn-outline-light"
|
||||||
|
onclick="nextRegi();">다음</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -973,7 +994,8 @@ function parseurl($url)
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
<?= $this->section('modals') ?>
|
<?= $this->section('modals') ?>
|
||||||
@@ -1538,6 +1560,329 @@ function parseurl($url)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function save_info_onclick() {
|
||||||
|
var ownerNm = $('#ownerNm').val();
|
||||||
|
var owner_birth = $('#owner_birth').val();
|
||||||
|
var address2 = $('#address2').val();
|
||||||
|
var address2a = $('#address2a').val();
|
||||||
|
var address2b = $('#address2b').val();
|
||||||
|
var address3 = $('#address3').val();
|
||||||
|
var address4 = $('#address4').val();
|
||||||
|
|
||||||
|
var dong = $('#dong').val();
|
||||||
|
var hscp_no = $('#hscp_no option:selected').val();
|
||||||
|
var hscp_nm = $('#hscp_no option:selected').text();
|
||||||
|
|
||||||
|
swal.fire({
|
||||||
|
text: "수정 하시겠습니까?",
|
||||||
|
type: "warning",
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonText: "예",
|
||||||
|
cancelButtonText: "아니오",
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: true,
|
||||||
|
confirmButtonColor: "#3085d6",
|
||||||
|
cancelButtonColor: "#d33",
|
||||||
|
}).then((result) => {
|
||||||
|
if (result.isConfirmed) {
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: '/m713/m713a/saveModify',
|
||||||
|
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||||
|
method: 'POST',
|
||||||
|
data: {
|
||||||
|
'vr_sq': '<?= $data['vr_sq'] ?>',
|
||||||
|
'ownerNm': ownerNm,
|
||||||
|
'owner_birth': owner_birth,
|
||||||
|
'address2': address2,
|
||||||
|
'address2a': address2a,
|
||||||
|
'address2b': address2b,
|
||||||
|
'address3': address3,
|
||||||
|
'address4': address4,
|
||||||
|
'dong': dong,
|
||||||
|
'hscp_no': hscp_no,
|
||||||
|
'hscp_nm': hscp_nm,
|
||||||
|
},
|
||||||
|
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) {
|
||||||
|
swal
|
||||||
|
.fire({
|
||||||
|
title: '정상 처리되었습니다.',
|
||||||
|
icon: "success"
|
||||||
|
});
|
||||||
|
location.reload();
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: result.msg ?? '저장에 실패했습니다.',
|
||||||
|
icon: "error"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: result.msg,
|
||||||
|
icon: "error"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 등기부등본 저장
|
||||||
|
var click = true;
|
||||||
|
function saveRegi() {
|
||||||
|
var frm = document.rcptFrm;
|
||||||
|
var atcl_vrtc_type = frm.atcl_vrtc_type.value;
|
||||||
|
var chk_hscp_no = frm.chk_hscp_no.value;
|
||||||
|
var trade_type = "<?= $data['trade_type_cd'] ?>";
|
||||||
|
var vrfc_type = "<?= $data['vrfc_type_cd'] ?>";
|
||||||
|
|
||||||
|
var chkBox = $('input:checkbox[name=img_chk_chk]').is(':checked'); //등기소, 리얼탑 열람, 리얼탑 기열람, 열람
|
||||||
|
|
||||||
|
var cert_register = "<?= $data['cert_register'] ?>"; //등기부등본 url이 있을경우
|
||||||
|
var filePdf = '<?= $file_pdf ?? '' ?>';
|
||||||
|
|
||||||
|
if (vrfc_type == "M") {
|
||||||
|
// 검증방식이 모바일이면 파일체크는 하지않고 열람인지 등기소, 리얼탑 열람, 리얼탑 기열람인지만 체크함
|
||||||
|
if (chkBox == false) {
|
||||||
|
Swal.fire({
|
||||||
|
title: "등기부등본 확인 상태를 선택해주세요.",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (chk_hscp_no == "" && trade_type == "A1") {
|
||||||
|
// 비공동매물이고 거래방식이 매매일 경우에 파일 체크를 하지 않고 열람인지 등기소, 리얼탑 열람, 리얼탑 기열람인지만 체크함.
|
||||||
|
if (chkBox == false) {
|
||||||
|
Swal.fire({
|
||||||
|
title: "등기부등본 확인 상태를 선택해주세요.",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (cert_register == "") { //등기부등본url이 없을경우
|
||||||
|
// 파일이 없으며 등기부등본 이미지 파일없음이 아니면 파일을 선택하도록 함.
|
||||||
|
if (frm.regi_file.value == "" && reg_file_yn == false) {
|
||||||
|
if (frm.img_chk_chk.checked == false) {
|
||||||
|
Swal.fire({
|
||||||
|
title: "파일을 선택해주세요",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (chkBox == false) {
|
||||||
|
Swal.fire({
|
||||||
|
title: "등기부등본 확인 상태를 선택해주세요.",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (chkBox == false) {
|
||||||
|
Swal.fire({
|
||||||
|
title: "등기부등본 확인 상태를 선택해주세요.",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var type = "<?= $data['vrfc_type_sub'] ?>";
|
||||||
|
if ((type == 'D2') && (filePdf == 'pdf' || filePdf == 'PDF')) { //홍보v2고, pdf로 업로드됐을때
|
||||||
|
var chk = $("#img_chk_chk4").prop("checked");
|
||||||
|
if (chk == false) {
|
||||||
|
Swal.fire({
|
||||||
|
title: "소유자명 확인이 필요합니다",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
click = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var radio_val = $('input:radio[name=owner_verifiable]').is(':checked');
|
||||||
|
if (type == 'D2' && radio_val == false) { //홍보확인서v2고 실소유주 확인 선택안되었을때
|
||||||
|
Swal.fire({
|
||||||
|
title: "실소유주 확인 결과를 선택해주세요",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
click = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (frm.reg_conf_yn_2.value == "") {
|
||||||
|
Swal.fire({
|
||||||
|
title: "매물주소 정보확인 결과를 선택해주세요",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
frm.reg_conf_yn_2.focus();
|
||||||
|
click = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (frm.reg_conf_yn_3.value == "") {
|
||||||
|
Swal.fire({
|
||||||
|
title: "의뢰인정보 확인 결과를 선택해주세요",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
frm.reg_conf_yn_3.focus();
|
||||||
|
click = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (frm.reg_conf_yn_2.value == "20000") {
|
||||||
|
if (frm.reg_conf_yn_info_2.value == "") {
|
||||||
|
Swal.fire({
|
||||||
|
title: "매물주소 불일치에 대한 상세내용을 작성해주세요",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
frm.reg_conf_yn_info_2.focus();
|
||||||
|
click = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (frm.reg_conf_yn_3.value == "20000") {
|
||||||
|
if (frm.reg_conf_yn_info_3.value == "") {
|
||||||
|
Swal.fire({
|
||||||
|
title: "의뢰인정보 불일치에 대한 상세내용을 작성해주세요",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
frm.reg_conf_yn_info_3.focus();
|
||||||
|
click = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 불일치가 하나라도 있으면
|
||||||
|
if ((type == 'M1' || type == 'O1') && (frm.reg_conf_yn_2.value == "20000" || frm.reg_conf_yn_3.value == "20000")) {
|
||||||
|
if (!$("input:checkbox[name='cert_uncnfrm_status[]']").is(":checked")) {
|
||||||
|
Swal.fire({
|
||||||
|
title: "등기부등본 미확인여부 상세를 체크해주세요",
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
frm.cert_uncnfrm_status.focus();
|
||||||
|
click = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 다중체크된거 가져오기
|
||||||
|
var arr_uncnfrm_status = "";
|
||||||
|
var cnt = 0;
|
||||||
|
$('input:checkbox[name="cert_uncnfrm_status[]"]').each(function () {
|
||||||
|
if ($(this).is(':checked')) {
|
||||||
|
if (cnt == 0) {
|
||||||
|
arr_uncnfrm_status += $(this).val();
|
||||||
|
} else {
|
||||||
|
arr_uncnfrm_status += "|" + ($(this).val());
|
||||||
|
}
|
||||||
|
cnt++;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('#arr_uncnfrm_status').val(arr_uncnfrm_status);
|
||||||
|
}
|
||||||
|
|
||||||
|
swal.fire({
|
||||||
|
text: "저장하시겠습니까?",
|
||||||
|
type: "warning",
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonText: "예",
|
||||||
|
cancelButtonText: "아니오",
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: true,
|
||||||
|
confirmButtonColor: "#3085d6",
|
||||||
|
cancelButtonColor: "#d33",
|
||||||
|
}).then((result) => {
|
||||||
|
if (result.isConfirmed) {
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: '/m713/m713a/saveRegi',
|
||||||
|
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||||
|
method: 'POST',
|
||||||
|
data: $("#rcptFrm").serialize(),
|
||||||
|
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) {
|
||||||
|
swal
|
||||||
|
.fire({
|
||||||
|
title: '정상 처리되었습니다.',
|
||||||
|
icon: "success"
|
||||||
|
});
|
||||||
|
location.reload();
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: result.msg ?? '저장에 실패했습니다.',
|
||||||
|
icon: "error"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: result.msg,
|
||||||
|
icon: "error"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//다음매물확인
|
//다음매물확인
|
||||||
function nextRegi() {
|
function nextRegi() {
|
||||||
swal.fire({
|
swal.fire({
|
||||||
|
|||||||
@@ -570,7 +570,7 @@
|
|||||||
if (!rowData) return;
|
if (!rowData) return;
|
||||||
|
|
||||||
const vr_sq = rowData.vr_sq;
|
const vr_sq = rowData.vr_sq;
|
||||||
location.href = "<?= site_url('m713/m713a/detail') ?>/" + vr_sq;
|
window.open("<?= site_url('m713/m713a/detail') ?>/" + vr_sq, '_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user