This commit is contained in:
2026-02-09 15:40:23 +09:00
52 changed files with 10067 additions and 2879 deletions

View File

@@ -3,6 +3,8 @@
namespace App\Libraries;
use App\Models\common\CommonModel;
use App\Models\v2\M712Model;
use CodeIgniter\Model;
class NaverApiClient
{
@@ -43,7 +45,7 @@ class NaverApiClient
{
$this->charger = $charger;
$url = "{$this->baseUrl}/kiso/center/verification-article/{$articleNumber}?charger={$this->charger}";
return $this->request('PUT', $url, $updateData);
}
@@ -106,7 +108,7 @@ class NaverApiClient
{
$this->charger = $charger;
$url = "{$this->baseUrl}/kiso/center/verification-article/price/{$articleNumber}?charger={$this->charger}";
return $this->request('POST', $url, $priceData);
}
@@ -116,14 +118,14 @@ class NaverApiClient
$url .= '?reserveNoList=' . $reserveNoList;
return $this->request('GET', $url);
}
/**
* 단지상세정보조회
* hscpNo : 단지번호(숫자)
*/
public function aptDetail($hscpNo)
{
$url = $this->commonModel->getCompanyInfo(2);
$url = $this->commonModel->getCompanyInfo(3);
$url = $url['api_server'] . "/confirms/APTDetail?hscpNo={$hscpNo}";
return $this->request('GET', $url);
}
@@ -135,7 +137,7 @@ class NaverApiClient
public function villaDetail($hscpNo)
{
$url = $this->commonModel->getCompanyInfo(2);
$url = $this->commonModel->getCompanyInfo(3);
$url = $url['api_server'] . "/confirms/villa/{$hscpNo}";
return $this->request('GET', $url);
}
@@ -322,7 +324,118 @@ class NaverApiClient
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 공통 실행 함수
*/
@@ -364,7 +477,7 @@ class NaverApiClient
'X-Naver-Client-Id: yqBbvQZ123_hjH3b3Df9'
]);
}
} elseif ( $method === 'PATCH') {
} elseif ($method === 'PATCH') {
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
if ($data) {
$payload = json_encode($data);