Compare commits
4 Commits
53695a1dc3
...
feature/te
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d87a209e0 | ||
|
|
a7dca8c5fa | ||
|
|
9a27018922 | ||
|
|
8b621a065e |
@@ -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'); // 파일업로드
|
||||||
|
|||||||
@@ -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([
|
||||||
|
'code' => '0',
|
||||||
|
'msg' => 'success'
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
|
throw new \Exception($na_result['message']);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->response->setJSON([
|
|
||||||
'code' => '0',
|
|
||||||
'msg' => 'success'
|
|
||||||
]);
|
|
||||||
|
|
||||||
} 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()
|
||||||
|
|||||||
@@ -363,6 +363,78 @@ class NaverApiClient
|
|||||||
return $this->request('POST', $url, $postData);
|
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 공통 실행 함수
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -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;
|
||||||
@@ -640,7 +656,7 @@ $usr_nm = session('usr_nm');
|
|||||||
{ data: null, render: fn_prd_render },
|
{ data: null, render: fn_prd_render },
|
||||||
{ data: 'rcpt_product_info1' },
|
{ data: 'rcpt_product_info1' },
|
||||||
<?php if ($usr_level != "45"): ?>
|
<?php if ($usr_level != "45"): ?>
|
||||||
{ data: 'dept_nm' },
|
{ data: 'dept_nm' },
|
||||||
{ data: 'usr_nm' },
|
{ data: 'usr_nm' },
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
{ data: 'parcel_out_yn' },
|
{ data: 'parcel_out_yn' },
|
||||||
@@ -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 () {
|
||||||
|
|||||||
@@ -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 () {
|
||||||
|
|||||||
@@ -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 () {
|
||||||
|
|||||||
@@ -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 () {
|
||||||
|
|||||||
@@ -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