This commit is contained in:
@@ -143,6 +143,12 @@ $routes->group('', ['namespace' => 'App\Controllers\V2'], static function ($rout
|
|||||||
$routes->get('m705a/getResultList', 'M705::getResultList');
|
$routes->get('m705a/getResultList', 'M705::getResultList');
|
||||||
$routes->get('m705a/excel', 'M705::excel');
|
$routes->get('m705a/excel', 'M705::excel');
|
||||||
|
|
||||||
|
$routes->post('m705a/rotateImage', 'M705::rotateImage'); // 이미지 회전
|
||||||
|
$routes->post('m705a/saveCorp', 'M705::saveCorp'); // 법인저장
|
||||||
|
$routes->post('m705a/uploadFile', 'M705::uploadFile'); // 파일업로드
|
||||||
|
|
||||||
|
$routes->post('m705a/getNextInfo', 'M705::getNextInfo'); // 다음매물확인
|
||||||
|
$routes->post('m705a/nextRegi', 'M705::saveRegi'); // 매물저장
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
namespace App\Controllers\V2;
|
namespace App\Controllers\V2;
|
||||||
|
|
||||||
use App\Controllers\BaseController;
|
use App\Controllers\BaseController;
|
||||||
|
use App\Libraries\Common;
|
||||||
|
use App\Libraries\MyUpload;
|
||||||
use App\Models\common\CodeModel;
|
use App\Models\common\CodeModel;
|
||||||
use App\Models\v2\M705Model;
|
use App\Models\v2\M705Model;
|
||||||
|
|
||||||
@@ -144,4 +146,205 @@ class M705 extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 상세화면
|
||||||
|
public function detail($id)
|
||||||
|
{
|
||||||
|
$id = (int) $id;
|
||||||
|
|
||||||
|
if ($id <= 0) {
|
||||||
|
throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
$codes = $this->codeModel->getCodeLists(['VRFCREQ_WAY', 'CONFIRM_RESULT_D11', 'CONFIRM_RESULT_T11', 'TRADE_TYPE', 'CERT_UNCNFRM_STATUS']); // 코드조회
|
||||||
|
|
||||||
|
$data = $this->model->getDetail($id);
|
||||||
|
$record = $this->model->getRecordInfo($id, '1'); // 홍보확인서
|
||||||
|
$regist = $this->model->getRecordInfo($id, '2'); // 등기부등본
|
||||||
|
$memo = $this->model->getMemo($id); // 메모
|
||||||
|
$display = $this->model->getDisplay('M705_detail');
|
||||||
|
$reference = $this->model->getAllRecordInfo($id, '7'); //참고용파일 (2017.09.26 추가)
|
||||||
|
|
||||||
|
$this->data['codes'] = $codes;
|
||||||
|
$this->data['data'] = $data;
|
||||||
|
$this->data['record'] = $record;
|
||||||
|
$this->data['regist'] = $regist;
|
||||||
|
$this->data['memo'] = $memo;
|
||||||
|
$this->data['display'] = $display;
|
||||||
|
$this->data['reference'] = $reference;
|
||||||
|
|
||||||
|
return view("pages/v2/m705/detail", $this->data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 이미지회전
|
||||||
|
public function rotateImage()
|
||||||
|
{
|
||||||
|
$common = new Common();
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
$vr_sq = $this->request->getPost('vr_sq');
|
||||||
|
$degress = $this->request->getPost('degress');
|
||||||
|
|
||||||
|
if (empty($degrees) || !is_numeric($degrees)) {
|
||||||
|
$degrees = 90;
|
||||||
|
}
|
||||||
|
|
||||||
|
$regist = $this->model->getRecordInfo($vr_sq, '2');
|
||||||
|
$fullPath = $regist['file_path'] . $regist['file_name'];
|
||||||
|
$fullPath = $_SERVER['DOCUMENT_ROOT'] . $common->realpath_to_webpath($fullPath);
|
||||||
|
|
||||||
|
$degrees = (float) $degrees;
|
||||||
|
|
||||||
|
$im = new \Imagick($fullPath);
|
||||||
|
|
||||||
|
// 배경색(회전 시 빈 공간 채우는 색). 투명 원하면 'transparent'
|
||||||
|
$im->setImageBackgroundColor(new \ImagickPixel('white'));
|
||||||
|
|
||||||
|
// 회전
|
||||||
|
$im->rotateImage($im->getImageBackgroundColor(), $degrees);
|
||||||
|
|
||||||
|
// 포맷/압축 유지(옵션)
|
||||||
|
$im->setImageCompressionQuality(90);
|
||||||
|
|
||||||
|
// 덮어쓰기
|
||||||
|
$im->writeImage($fullPath);
|
||||||
|
|
||||||
|
$im->clear();
|
||||||
|
$im->destroy();
|
||||||
|
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '0',
|
||||||
|
'msg' => 'success',
|
||||||
|
]);
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '9',
|
||||||
|
'msg' => $e->getMessage(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 법인저장
|
||||||
|
public function saveCorp()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
$vr_sq = $this->request->getPost('vr_sq');
|
||||||
|
$atcl_no = $this->request->getPost('atcl_no');
|
||||||
|
|
||||||
|
$this->model->saveCorp($vr_sq, $atcl_no);
|
||||||
|
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '0',
|
||||||
|
'msg' => 'success',
|
||||||
|
]);
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '9',
|
||||||
|
'msg' => $e->getMessage(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 파일업로드
|
||||||
|
public function uploadFile()
|
||||||
|
{
|
||||||
|
$lib = new MyUpload();
|
||||||
|
|
||||||
|
try {
|
||||||
|
$usr_id = session('usr_id');
|
||||||
|
$vr_sq = $this->request->getPost('vr_sq');
|
||||||
|
|
||||||
|
$file = $this->request->getFile('file');
|
||||||
|
|
||||||
|
if ($file && $file->isValid() && !$file->hasMoved()) {
|
||||||
|
|
||||||
|
$uploadPath = "/upload/v2_file/" . $vr_sq . "/";
|
||||||
|
|
||||||
|
$arrUploadfile = [];
|
||||||
|
if ($file->isValid() && !$file->hasMoved()) {
|
||||||
|
$uploadData = $lib->do_upload2($file, $uploadPath);
|
||||||
|
|
||||||
|
if ($uploadData !== false) {
|
||||||
|
$arrUploadfile[] = $uploadData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($arrUploadfile)) {
|
||||||
|
foreach ($arrUploadfile as $key => $uploadFile) {
|
||||||
|
$data = [
|
||||||
|
'vr_sq' => $vr_sq,
|
||||||
|
// 'file_sq' => $this->request->getPost('file_sq'),
|
||||||
|
'orig_name' => $uploadFile['origin_name'],
|
||||||
|
'new_name' => $uploadFile['file_name'],
|
||||||
|
'file_path' => $uploadPath, // 필요에 따라 상대경로로만 저장
|
||||||
|
'ext' => '.' . $uploadFile['ext'],
|
||||||
|
'size' => $file->getSize(),
|
||||||
|
'img_yn' => null,
|
||||||
|
'img_height' => null,
|
||||||
|
'img_width' => null,
|
||||||
|
'usr_id' => $usr_id,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($data)) {
|
||||||
|
|
||||||
|
// 파일업로드 정보 저장
|
||||||
|
$this->model->saveFileInfo($data);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '0',
|
||||||
|
'msg' => 'success'
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '9',
|
||||||
|
'msg' => $e->getMessage(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 다음매물 확인
|
||||||
|
public function getNextInfo()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
$vr_sq = $this->request->getPost('vr_sq');
|
||||||
|
|
||||||
|
$data = $this->model->getNextInfo($vr_sq);
|
||||||
|
|
||||||
|
if (empty($data)) {
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '9',
|
||||||
|
'msg' => '등기부등본 이미지가 존재하지 않습니다.'
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '0',
|
||||||
|
'msg' => 'success',
|
||||||
|
'resw' => $data['vr_sq']
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '9',
|
||||||
|
'msg' => $e->getMessage(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -33,4 +33,27 @@ class Common
|
|||||||
return $pagination;
|
return $pagination;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 서버상의 위치를 웹상의 위치로 변경한다...
|
||||||
|
*/
|
||||||
|
public function realpath_to_webpath($realpath)
|
||||||
|
{
|
||||||
|
$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/',
|
||||||
|
);
|
||||||
|
|
||||||
|
$return_path = str_replace($arrImagePath, '/upload/', $realpath);
|
||||||
|
$return_path = str_replace(' ', '', $return_path);
|
||||||
|
return $return_path;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -788,4 +788,310 @@ class M705Model extends Model
|
|||||||
|
|
||||||
return $query->getResultArray();
|
return $query->getResultArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 상세정보
|
||||||
|
public function getDetail($vr_sq)
|
||||||
|
{
|
||||||
|
$sql = "SELECT
|
||||||
|
a.vr_sq,
|
||||||
|
a.dong_ho_chk,
|
||||||
|
a.reg_status,
|
||||||
|
a.hscplqry_lv,
|
||||||
|
a.atcl_no,
|
||||||
|
b.stat_cd,
|
||||||
|
a.cpid,
|
||||||
|
a.cp_atcl_id,
|
||||||
|
a.rlet_type_cd,
|
||||||
|
a.address1,
|
||||||
|
a.sise,
|
||||||
|
a.rdate,
|
||||||
|
a.hscp_no as chk_hscp_no,
|
||||||
|
b.try_cnt,
|
||||||
|
a.seller_tel_no,
|
||||||
|
a.seller_nm,
|
||||||
|
a.realtor_nm,
|
||||||
|
a.realtor_tel_no,
|
||||||
|
a.charger,
|
||||||
|
a.ownerNm,
|
||||||
|
a.ownerTelNo,
|
||||||
|
b.reg_try_cnt,
|
||||||
|
b.insert_tm,
|
||||||
|
a.reg_charger,
|
||||||
|
i2.usr_nm as reg_charger_nm,
|
||||||
|
c.bild_nm,
|
||||||
|
b.vrfc_type as vrfc_type_cd,
|
||||||
|
c.rm_no,
|
||||||
|
c.floor,
|
||||||
|
c.floor2,
|
||||||
|
c.address_code,
|
||||||
|
c.address2,
|
||||||
|
c1.address2a,
|
||||||
|
c1.address2b,
|
||||||
|
c.address3,
|
||||||
|
c.address4,
|
||||||
|
c.trade_type as trade_type_cd,
|
||||||
|
c.deal_amt,
|
||||||
|
c.wrrnt_amt,
|
||||||
|
c.lease_amt,
|
||||||
|
c.isale_amt,
|
||||||
|
c.prem_amt,
|
||||||
|
c.sply_spc,
|
||||||
|
c.excls_spc,
|
||||||
|
c.tot_spc,
|
||||||
|
c.grnd_spc,
|
||||||
|
c.bldg_spc,
|
||||||
|
c.hscp_no,
|
||||||
|
c.ptp_no,
|
||||||
|
d.insert_tm as update_res_tm,
|
||||||
|
e.insert_tm as result_tm,
|
||||||
|
f.region_nm,
|
||||||
|
g.cd_nm as pre_stat,
|
||||||
|
g.cd as pre_stat_cd,
|
||||||
|
h.cd_nm as vrfc_type,
|
||||||
|
i.usr_nm,
|
||||||
|
j.cd_nm as trade_type,
|
||||||
|
j.cd as trade_type_cd,
|
||||||
|
c.hscp_nm,
|
||||||
|
c.ptp_nm,
|
||||||
|
l.success,
|
||||||
|
k.cd_nm as atcl_nm,
|
||||||
|
m.code as result_d11,
|
||||||
|
m.comment,
|
||||||
|
n.code as fax_conf_yn_2,
|
||||||
|
o.code as fax_conf_yn_3,
|
||||||
|
p.code as fax_conf_yn_4,
|
||||||
|
n.comment as fax_conf_yn_info_2,
|
||||||
|
o.comment as fax_conf_yn_info_3,
|
||||||
|
p.comment as fax_conf_yn_info_4,
|
||||||
|
v.success AS tel_suc,
|
||||||
|
r.code AS tel_agree,
|
||||||
|
s.code AS tel_conf_yn_2,
|
||||||
|
t.code AS tel_conf_yn_3,
|
||||||
|
u.code AS tel_conf_yn_4,
|
||||||
|
s.comment AS tel_conf_yn_info_2,
|
||||||
|
t.comment AS tel_conf_yn_info_3,
|
||||||
|
u.comment AS tel_conf_yn_info_4,
|
||||||
|
w.success AS reg_conf_yn_1,
|
||||||
|
x.code AS reg_conf_yn_2,
|
||||||
|
y.code AS reg_conf_yn_3,
|
||||||
|
x.comment AS reg_conf_yn_info_2,
|
||||||
|
y.comment AS reg_conf_yn_info_3,
|
||||||
|
b.rgbk_confirm,
|
||||||
|
a.redvlp_area_nm,
|
||||||
|
a.biz_stp_desc,
|
||||||
|
a.cert_register,
|
||||||
|
a.confirm_doc_img_url,
|
||||||
|
a.cert_register_save_yn,
|
||||||
|
a.confirm_doc_img_url_save_yn,
|
||||||
|
b.confirm_doc_owner_check_yn,
|
||||||
|
a.owner_birth,
|
||||||
|
a.vrfc_type_sub,
|
||||||
|
b.owner_verifiable,
|
||||||
|
a.reference_file_url,
|
||||||
|
a.reference_file_url_save_yn,
|
||||||
|
a.reference_file_url_yn,
|
||||||
|
z.corp_own,
|
||||||
|
c1.vir_addr_yn,
|
||||||
|
c1.cert_uncnfrm_status,
|
||||||
|
c1.noRgbkVrfcReqYn,
|
||||||
|
c1.areaByBdbkVrfcReqYn,
|
||||||
|
sm.sm_apporval_date ,
|
||||||
|
sm.sm_end_date,
|
||||||
|
sm.sm_seq,
|
||||||
|
a.registerBookUniqueNumber,
|
||||||
|
(select count(*) from v2_article_fail d3 where d3.vr_sq = a.vr_sq ) as final_fail_cnt
|
||||||
|
FROM v2_article_info a
|
||||||
|
JOIN v2_vrfc_req b ON a.vr_sq = b.vr_sq
|
||||||
|
JOIN v2_modify_info c ON a.vr_sq = c.vr_sq
|
||||||
|
LEFT JOIN v2_article_info_etc c1 ON c1.vr_sq = a.vr_sq
|
||||||
|
LEFT JOIN region_codes f ON a.address_code = f.region_cd
|
||||||
|
LEFT JOIN v2_chg_stat d ON a.vr_sq = d.vr_sq AND d.stat_cd = '35'
|
||||||
|
LEFT JOIN v2_chg_stat e ON a.vr_sq = e.vr_sq AND e.stat_cd = '60'
|
||||||
|
LEFT JOIN codes g ON b.stat_cd = g.cd AND g.category = 'STEP_VERIFICATION'
|
||||||
|
LEFT JOIN codes h ON b.vrfc_type = h.cd AND h.category = 'VRFCREQ_WAY'
|
||||||
|
LEFT JOIN codes j ON c.trade_type = j.cd AND j.category = 'TRADE_TYPE'
|
||||||
|
LEFT JOIN codes k ON a.rlet_type_cd = k.cd AND k.category = 'ARTICLE_TYPE'
|
||||||
|
LEFT JOIN v2_confirm l ON a.vr_sq = l.vr_sq AND l.vrfc_type = 'D'
|
||||||
|
LEFT JOIN v2_check_list m ON a.vr_sq = m.vr_sq AND m.type = 'D11'
|
||||||
|
LEFT JOIN v2_check_list n ON a.vr_sq = n.vr_sq AND n.type = 'D12'
|
||||||
|
LEFT JOIN v2_check_list o ON a.vr_sq = o.vr_sq AND o.type = 'D13'
|
||||||
|
LEFT JOIN v2_check_list p ON a.vr_sq = p.vr_sq AND p.type = 'D14'
|
||||||
|
LEFT JOIN v2_confirm v ON a.vr_sq = v.vr_sq AND v.vrfc_type = 'T'
|
||||||
|
LEFT JOIN v2_check_list r ON a.vr_sq = r.vr_sq AND r.type = 'T11'
|
||||||
|
LEFT JOIN v2_check_list s ON a.vr_sq = s.vr_sq AND s.type = 'T12'
|
||||||
|
LEFT JOIN v2_check_list t ON a.vr_sq = t.vr_sq AND t.type = 'T13'
|
||||||
|
LEFT JOIN v2_check_list u ON a.vr_sq = u.vr_sq AND u.type = 'T14'
|
||||||
|
LEFT JOIN v2_confirm w ON a.vr_sq = w.vr_sq AND w.vrfc_type = 'R'
|
||||||
|
LEFT JOIN v2_check_list x ON a.vr_sq = x.vr_sq AND x.type = '21'
|
||||||
|
LEFT JOIN v2_check_list y ON a.vr_sq = y.vr_sq AND y.type = '22'
|
||||||
|
LEFT JOIN users i ON a.charger = i.usr_id
|
||||||
|
LEFT JOIN users i2 ON a.reg_charger = i2.usr_id
|
||||||
|
LEFT JOIN v2_article_info_etc z ON a.vr_sq = z.vr_sq
|
||||||
|
LEFT JOIN scomplex_manage sm ON a.hscp_no = sm.sm_code
|
||||||
|
|
||||||
|
|
||||||
|
WHERE a.vr_sq = " . $vr_sq;
|
||||||
|
|
||||||
|
$query = $this->db->query($sql);
|
||||||
|
|
||||||
|
return $query->getRowArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRecordInfo($vr_sq, $file_type)
|
||||||
|
{
|
||||||
|
$sql = "SELECT seq, vr_sq, use_yn, file_type, view_odr, file_path, file_name, file_ext, file_size, img_width, img_height, meta_data, insert_user, insert_tm , cloud_upload_yn " .
|
||||||
|
" FROM v2_files" .
|
||||||
|
" WHERE vr_sq = ?" .
|
||||||
|
" AND use_yn = 'Y'" .
|
||||||
|
" AND file_type = ?" .
|
||||||
|
" ORDER BY seq DESC";
|
||||||
|
$data = [
|
||||||
|
$vr_sq,
|
||||||
|
$file_type
|
||||||
|
];
|
||||||
|
|
||||||
|
$query = $this->db->query($sql, [$vr_sq, $file_type]);
|
||||||
|
|
||||||
|
return $query->getRowArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 메모
|
||||||
|
public function getMemo($vr_sq)
|
||||||
|
{
|
||||||
|
$sql = "SELECT memo FROM v2_vrfc_req where vr_sq = ?";
|
||||||
|
|
||||||
|
$query = $this->db->query($sql, [$vr_sq]);
|
||||||
|
|
||||||
|
return $query->getRowArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDisplay($menu_position)
|
||||||
|
{
|
||||||
|
$sql = "select display_yn " .
|
||||||
|
"from page_display " .
|
||||||
|
"where menu_position = ? ";
|
||||||
|
$data = [$menu_position];
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
|
||||||
|
return $query->getRowArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 모든 이미지 파일 */
|
||||||
|
public function getAllRecordInfo($vr_sq, $file_type)
|
||||||
|
{
|
||||||
|
$sql = "SELECT seq, vr_sq, use_yn, file_type, view_odr, file_path, file_name, file_ext, file_size, img_width, img_height, meta_data, insert_user, insert_tm " .
|
||||||
|
" FROM v2_files" .
|
||||||
|
" WHERE vr_sq = ?" .
|
||||||
|
" AND file_type = ?";
|
||||||
|
$data = [
|
||||||
|
$vr_sq,
|
||||||
|
$file_type
|
||||||
|
];
|
||||||
|
|
||||||
|
$query = $this->db->query($sql, $data);
|
||||||
|
|
||||||
|
return $query->getResultArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 법인저장
|
||||||
|
public function saveCorp($vr_sq, $atcl_no)
|
||||||
|
{
|
||||||
|
$sql = "INSERT v2_article_info_etc(vr_sq,atcl_no,corp_own)" .
|
||||||
|
" VALUES(?,?,'Y')" .
|
||||||
|
" ON DUPLICATE KEY UPDATE corp_own='Y'";
|
||||||
|
$data = [
|
||||||
|
$vr_sq,
|
||||||
|
$atcl_no
|
||||||
|
];
|
||||||
|
|
||||||
|
if ($this->db->query($sql, $data) === false) {
|
||||||
|
return [
|
||||||
|
'success' => false,
|
||||||
|
'msg' => '저장 실패',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [
|
||||||
|
'success' => true
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 파일업로드
|
||||||
|
public function saveFileInfo($data)
|
||||||
|
{
|
||||||
|
$this->db->transStart();
|
||||||
|
|
||||||
|
// 기존파일 확인후 업데이트
|
||||||
|
$sql = "SELECT seq FROM v2_files WHERE vr_sq = {$data['vr_sq']} AND use_yn = 'Y' AND file_type = '2'";
|
||||||
|
$query = $this->db->query($sql);
|
||||||
|
$row = $query->getNumRows();
|
||||||
|
|
||||||
|
if ($row > 0) {
|
||||||
|
|
||||||
|
$sql = "UPDATE v2_files SET use_yn = 'N' WHERE vr_sq = {$data['vr_sq']} AND use_yn = 'Y' AND file_type '2'";
|
||||||
|
|
||||||
|
$this->db->query($sql);
|
||||||
|
|
||||||
|
$sql = "INSERT INTO v2_files
|
||||||
|
(vr_sq, file_type, view_odr, file_path, file_name, file_ext, file_size, insert_user, insert_tm, cloud_upload_yn)
|
||||||
|
VALUES
|
||||||
|
(?, '2', 0, ?, ?, ?, ?, ?, NOW(), 'Y')
|
||||||
|
";
|
||||||
|
|
||||||
|
$param = [
|
||||||
|
$data['vr_sq'],
|
||||||
|
$data['file_path'],
|
||||||
|
$data['new_name'],
|
||||||
|
$data['ext'],
|
||||||
|
$data['size'],
|
||||||
|
$data['usr_id'],
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
if ($this->db->query($sql, $param)) {
|
||||||
|
return [
|
||||||
|
'success' => false,
|
||||||
|
'msg' => '파일정보 저장 실패',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->db->transComplete();
|
||||||
|
|
||||||
|
return [
|
||||||
|
'success' => true
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 다음매물확인
|
||||||
|
public function getNextInfo($vr_sq)
|
||||||
|
{
|
||||||
|
$this->db->transStart();
|
||||||
|
$usr_id = session('usr_id');
|
||||||
|
|
||||||
|
$sql = " SELECT b.vr_sq" .
|
||||||
|
" FROM v2_article_info b" .
|
||||||
|
" INNER JOIN v2_vrfc_req a ON a.vr_sq = b.vr_sq AND a.vr_sq != ? AND a.rgbk_confirm = '1' AND a.stat_cd BETWEEN '35' AND '49' AND a.stat_cd NOT IN ('35','39','45')" .
|
||||||
|
" LEFT JOIN v2_chg_stat c ON c.vr_sq = b.vr_sq AND c.stat_cd = '35'" .
|
||||||
|
" WHERE a.insert_tm < DATE_FORMAT(curdate(), '%Y%m%d172959')" .
|
||||||
|
" AND (b.reg_charger IS NULL OR b.reg_charger = '')" .
|
||||||
|
" AND a.vrfc_type NOT IN ( 'N' , 'O' ) " .
|
||||||
|
" ORDER BY CASE a.vrfc_type WHEN 'M' THEN 1 ELSE 2 END, a.vr_sq" .
|
||||||
|
" LIMIT 1" .
|
||||||
|
" FOR UPDATE skip locked";
|
||||||
|
|
||||||
|
$query = $this->db->query($sql, [$vr_sq]);
|
||||||
|
$row = $query->getRowArray();
|
||||||
|
|
||||||
|
$sql = "UPDATE v2_article_info" .
|
||||||
|
" SET reg_charger='" . $usr_id . "'" .
|
||||||
|
" WHERE vr_sq = '" . $row['vr_sq'] . "'";
|
||||||
|
$this->db->query($sql);
|
||||||
|
|
||||||
|
$this->db->transComplete();
|
||||||
|
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -20,11 +20,11 @@
|
|||||||
<div class="row">
|
<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">
|
||||||
|
<?php if (($data['receiver'] ?? '') != "API"): ?>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<div class="d-flex align-items-center w-100">
|
<div class="d-flex align-items-center w-100">
|
||||||
<span class="me-2">홍보확인서 상세</span>
|
|
||||||
<div class="ms-auto d-flex gap-1">
|
<div class="ms-auto d-flex gap-1">
|
||||||
<?php if (($data['receiver'] ?? '') != "API"): ?>
|
|
||||||
<span class="text-muted small me-2">
|
<span class="text-muted small me-2">
|
||||||
발신번호 : <?= esc(str_replace('-', '', $data['caller_no'] ?? '')) ?>
|
발신번호 : <?= esc(str_replace('-', '', $data['caller_no'] ?? '')) ?>
|
||||||
</span>
|
</span>
|
||||||
@@ -35,11 +35,10 @@
|
|||||||
onclick="faximage_rotate(180)">180˚</button>
|
onclick="faximage_rotate(180)">180˚</button>
|
||||||
<button type="button" class="btn btn-sm btn-outline-secondary"
|
<button type="button" class="btn btn-sm btn-outline-secondary"
|
||||||
onclick="faximage_rotate(270)">270˚</button>
|
onclick="faximage_rotate(270)">270˚</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<!-- table 유지 + 반응형 -->
|
<!-- table 유지 + 반응형 -->
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
|
|||||||
@@ -452,7 +452,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
initReceiptDate();
|
||||||
table = $('#resultList').DataTable({
|
table = $('#resultList').DataTable({
|
||||||
language: lang_kor,
|
language: lang_kor,
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
@@ -469,7 +469,7 @@
|
|||||||
blockUI.unblockPage()
|
blockUI.unblockPage()
|
||||||
},
|
},
|
||||||
data: function (d) {
|
data: function (d) {
|
||||||
initReceiptDate();
|
|
||||||
|
|
||||||
d.atcl_no = $("#frm_srch_info [name=atcl_no]").val(); // 매물번호
|
d.atcl_no = $("#frm_srch_info [name=atcl_no]").val(); // 매물번호
|
||||||
d.chk_atcl_no = $("#frm_srch_info [name=chk_atcl_no]").val(); // 매물번호입력
|
d.chk_atcl_no = $("#frm_srch_info [name=chk_atcl_no]").val(); // 매물번호입력
|
||||||
|
|||||||
@@ -1039,7 +1039,7 @@ if (!empty($regist2)) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/m703/m703a/getNextFaxImgs',
|
url: '/m704/m704a/getNextTelInfo',
|
||||||
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
|
|||||||
1717
app/Views/pages/v2/m705/detail.php
Normal file
1717
app/Views/pages/v2/m705/detail.php
Normal file
File diff suppressed because it is too large
Load Diff
BIN
public/plugin/img/pdf.png
Normal file
BIN
public/plugin/img/pdf.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
Reference in New Issue
Block a user