현장확인 매물검증 결과관리 - 매물 입력시 제외
This commit is contained in:
@@ -158,6 +158,22 @@ class NaverApiClient
|
|||||||
return $this->request('POST', $url, $syncData);
|
return $this->request('POST', $url, $syncData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 현장확인 매물검증 결과 관리
|
||||||
|
* API: POST /kiso/center/verification-site/{매물번호}/report?charger={담당자명}
|
||||||
|
* @param string $type 현장확인 S11: 예약, S21: 방문, S31: 검수
|
||||||
|
* @param string $code 결과코드 10000: 성공, 20000: 실패, 30000: 지연, 20121: 방문전취소, 20122:방문후취소, 20123:촬영후취소
|
||||||
|
* @param string $message 내용
|
||||||
|
* @param string $reserveDate 예약 년월일 2005-07-31
|
||||||
|
*/
|
||||||
|
public function verificationSiteReport(string $articleNumber, array $reportData, string $charger = 'admin'): ?array
|
||||||
|
{
|
||||||
|
$this->charger = $charger;
|
||||||
|
$url = "{$this->baseUrl}/kiso/center/verification-site/{$articleNumber}/report?charger={$this->charger}";
|
||||||
|
|
||||||
|
return $this->request('POST', $url, $reportData);
|
||||||
|
}
|
||||||
|
|
||||||
public function submitSyncResult(string $reserveNoList): ?array
|
public function submitSyncResult(string $reserveNoList): ?array
|
||||||
{
|
{
|
||||||
$url = "{$this->baseUrl}/site/submitSyncResult.nhn";
|
$url = "{$this->baseUrl}/site/submitSyncResult.nhn";
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ class TypeSHandler
|
|||||||
try {
|
try {
|
||||||
// 1. Receipt 데이터 저장
|
// 1. Receipt 데이터 저장
|
||||||
$receiptData = $this->parameterMapper->mapReceipt($articleNumber, $rawData, $payload);
|
$receiptData = $this->parameterMapper->mapReceipt($articleNumber, $rawData, $payload);
|
||||||
|
|
||||||
if (!$this->receiptModel->insert($receiptData)) {
|
if (!$this->receiptModel->insert($receiptData)) {
|
||||||
throw new Exception("Receipt Insert 실패: " . json_encode($this->receiptModel->errors()));
|
throw new Exception("Receipt Insert 실패: " . json_encode($this->receiptModel->errors()));
|
||||||
}
|
}
|
||||||
@@ -79,12 +80,20 @@ class TypeSHandler
|
|||||||
write_custom_log("Result Insert SQL: " . (string)$this->resultModel->getLastQuery(), 'INFO', 'service');
|
write_custom_log("Result Insert SQL: " . (string)$this->resultModel->getLastQuery(), 'INFO', 'service');
|
||||||
|
|
||||||
// 5. 네이버 예약 정보 동기화 (비동기)
|
// 5. 네이버 예약 정보 동기화 (비동기)
|
||||||
try {
|
// try {
|
||||||
$syncResult = $this->naverClient->submitSyncResult($rawData['reserveNo'] ?? '');
|
// // $syncResult = $this->naverClient->submitSyncResult($rawData['reserveNo'] ?? '');
|
||||||
write_custom_log("Naver Sync Result Response: " . json_encode($syncResult), 'INFO', 'service');
|
// $rsrv_date = $receiptData['rsrv_date'] ?? null;
|
||||||
} catch (Exception $e) {
|
// $reportData = [
|
||||||
write_custom_log("Naver Sync 실패 (계속 진행): " . $e->getMessage(), 'WARN', 'service');
|
// 'type' => 'S11',
|
||||||
}
|
// 'code' => '10000',
|
||||||
|
// 'message' => '현장확인 예약',
|
||||||
|
// 'reserveDate' => $rsrv_date
|
||||||
|
// ];
|
||||||
|
// $syncResult = $this->naverClient->verificationSiteReport($articleNumber, $reportData);
|
||||||
|
// write_custom_log("Naver Sync Result Response: " . json_encode($syncResult), 'INFO', 'service');
|
||||||
|
// } catch (Exception $e) {
|
||||||
|
// write_custom_log("Naver Sync 실패 (계속 진행): " . $e->getMessage(), 'WARN', 'service');
|
||||||
|
// }
|
||||||
|
|
||||||
return $rcptSq;
|
return $rcptSq;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user