|
|
|
|
@@ -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)
|
|
|
|
|
|