Commit 849d7da9 authored by Antonio.Suerte's avatar Antonio.Suerte

KYC List Enhancement

parent bd2d437c
...@@ -6457,7 +6457,28 @@ WHERE ...@@ -6457,7 +6457,28 @@ WHERE
counter > 0 counter > 0
ORDER BY ORDER BY
MAX(kyc.create_time) DESC MAX(kyc.create_time) DESC
__ELEMENT02__
</LIST_KYC_ADMIN> </LIST_KYC_ADMIN>
<COUNT_KYC_ADMIN>
SELECT COUNT(*) as counter from (
SELECT
COUNT(kyc.user_account) AS counter
FROM
v_users_active AS users
LEFT OUTER JOIN t_kyc AS kyc ON(
users.user_account = kyc.user_account
)
WHERE
kyc.user_account IS NOT NULL
AND users.kyc_validate_status != '99'
__ELEMENT01__
GROUP BY
users.user_account
HAVING
counter > 0
) as KYC_comp
</COUNT_KYC_ADMIN>
<!-- <!--
......
...@@ -106,7 +106,10 @@ class LogicKYC extends KYCModelClass { ...@@ -106,7 +106,10 @@ class LogicKYC extends KYCModelClass {
* @return : なし * @return : なし
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
function lists() { function lists() {
$this -> setResult($this -> accessSelect('LIST_KYC_ADMIN', $this -> getWhere())); $countData = $this -> getRowData($this -> accessSelect('COUNT_KYC_ADMIN', $this -> getWhere()));
$this -> setCount($this -> getColumnData($countData, COLUMN_COUNTER));
$this -> setResult($this -> accessSelect('LIST_KYC_ADMIN', $this -> getWhere(true)));
} }
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
......
...@@ -23,7 +23,6 @@ class KYCModelClass extends ModelClassEx { ...@@ -23,7 +23,6 @@ class KYCModelClass extends ModelClassEx {
private $arrStatus = array(); private $arrStatus = array();
private $arrSelectAll = array(); private $arrSelectAll = array();
private $arrValidate = array(); private $arrValidate = array();
//private $country;
/** /**
* *
...@@ -31,6 +30,7 @@ class KYCModelClass extends ModelClassEx { ...@@ -31,6 +30,7 @@ class KYCModelClass extends ModelClassEx {
* *
*/ */
private $lang = NO_STRING; private $lang = NO_STRING;
private $count = NO_COUNT;
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
...@@ -204,10 +204,10 @@ class KYCModelClass extends ModelClassEx { ...@@ -204,10 +204,10 @@ class KYCModelClass extends ModelClassEx {
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
function dispPager() { function dispPager() {
echo $this -> getPagerCommon($this -> getTargetPage() echo $this -> getPagerCommon($this -> getTargetPage()
, $this -> getTotalPageCommon(VAR_DEFAULT_PAGE_COUNT, count($this -> rs)) , $this -> getTotalPageCommon(VAR_DEFAULT_PAGE_COUNT, $this -> count)
, count($this -> rs) , $this -> count
, NO_STRING , NO_STRING
, True); , true);
} }
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
...@@ -218,13 +218,22 @@ class KYCModelClass extends ModelClassEx { ...@@ -218,13 +218,22 @@ class KYCModelClass extends ModelClassEx {
public function setResult($rs) { public function setResult($rs) {
$this -> rs = $rs; $this -> rs = $rs;
} }
/*-------------------------------------------------------------------------
* @function_name: 回数の設定
* @parameter : 回数
* @return : なし
-------------------------------------------------------------------------*/
public function setCount($count){
$this -> count = $count;
}
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* @function_name: 検索条件の取得 * @function_name: 検索条件の取得
* @parameter : 結果セット * @parameter : 結果セット
* @return : 検索条件配列 * @return : 検索条件配列
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
function getWhere() { function getWhere($applyLimit = false) {
// 変数宣言部 // 変数宣言部
$where = NO_STRING; $where = NO_STRING;
...@@ -312,6 +321,12 @@ class KYCModelClass extends ModelClassEx { ...@@ -312,6 +321,12 @@ class KYCModelClass extends ModelClassEx {
} }
$where .= ' '.$having; $where .= ' '.$having;
$rtn[] = $where; $rtn[] = $where;
if($applyLimit){
$start = ($this -> getTargetPage() - VAL_INT_1) * VAR_DEFAULT_PAGE_COUNT;
$rtn[] = " LIMIT {$start}, ".VAL_INT_50;
}
return $rtn; return $rtn;
} }
...@@ -346,9 +361,6 @@ class KYCModelClass extends ModelClassEx { ...@@ -346,9 +361,6 @@ class KYCModelClass extends ModelClassEx {
// 更新用户Comments与状态 // 更新用户Comments与状态
function getDetailCondition(){ function getDetailCondition(){
$rtn = array(); $rtn = array();
$statuses = array();
$updates = NO_STRING;
$where = NO_STRING;
if($this -> updateStatus != NO_STRING){ if($this -> updateStatus != NO_STRING){
$rtn[] = $this -> updateStatus; $rtn[] = $this -> updateStatus;
...@@ -383,7 +395,6 @@ class KYCModelClass extends ModelClassEx { ...@@ -383,7 +395,6 @@ class KYCModelClass extends ModelClassEx {
function getUpdateStatusParams($arr){ function getUpdateStatusParams($arr){
$rtn = array(); $rtn = array();
$statuses = array();
$rtn[] = $arr[VAL_INT_1]; $rtn[] = $arr[VAL_INT_1];
$rtn[] = $arr[NO_COUNT]; $rtn[] = $arr[NO_COUNT];
return $rtn; return $rtn;
...@@ -424,36 +435,27 @@ class KYCModelClass extends ModelClassEx { ...@@ -424,36 +435,27 @@ class KYCModelClass extends ModelClassEx {
// 変数宣言部 // 変数宣言部
$rtn = NO_STRING; $rtn = NO_STRING;
$exist = NO_STRING;
$err = NO_STRING;
$amount = NO_STRING;
$rout = NO_STRING;
if($this -> isLoopData($this -> rs)) { if($this -> isLoopData($this -> rs)) {
// データの数だけループを回す // データの数だけループを回す
$start = ($this -> getTargetPage() - VAL_INT_1) * VAR_DEFAULT_PAGE_COUNT; foreach($this -> rs as $row){
$end = $this -> getTargetPage() * VAR_DEFAULT_PAGE_COUNT; $rtn .= '<tr>'
$listCount = count($this -> rs); . '<td>' . $this -> dispCountryCommon($this -> getColumnData($row , COLUMN_COUNTRY)) . '</td>'
for($cnt = $start; $cnt < $end && $cnt < $listCount; $cnt++) { . '<td class="l"><a href="account_edit?detail_account=' . $this -> getColumnData($row, COLUMN_USER_ACCOUNT) . '">'. $this -> getColumnData($row, COLUMN_USER_NAME) .'</a></td>'
$row = $this -> getRowData($this -> rs, $cnt); . '<td class="l">' . $this -> getNameCommon($this -> getColumnData($row, COLUMN_USER_ACCOUNT)) . '</td>'
$rtn .= '<tr>' . '<td>' . $this -> getColumnData($row, COLUMN_USER_ACCOUNT) . '</td>'
. '<td>' . $this -> dispCountryCommon($this -> getColumnData($row , COLUMN_COUNTRY)) . '</td>' . '<td class="r">' . $this -> dispUserAccountTypeCommon($this -> getColumnData($row, COLUMN_ACCOUNT_TYPE)) .'</td>'
// . '<td class="l"><a href="javascript:userDetail(\'' . $this -> getColumnData($row, COLUMN_USER_ACCOUNT) . '\', \'_blank\');">' . $this -> getColumnData($row, COLUMN_USER_NAME) . '</a></td>' . '<td class="r">' . $this -> getColumnData($row, COLUMN_MAX_CREATE_TIME) . '</td>'
. '<td class="l"><a href="account_edit?detail_account=' . $this -> getColumnData($row, COLUMN_USER_ACCOUNT) . '">'. $this -> getColumnData($row, COLUMN_USER_NAME) .'</a></td>' . '<td>' . $this -> dispUserStatusCommon($this -> getColumnData($row, COLUMN_USER_STATUS)) . '</td>'
. '<td class="l">' . $this -> getNameCommon($this -> getColumnData($row, COLUMN_USER_ACCOUNT)) . '</td>' . '<td>' . $this -> arrValidate[$this -> getColumnData($row, COLUMN_VALIDATE_STATUS)] . '</td>'
. '<td>' . $this -> getColumnData($row, COLUMN_USER_ACCOUNT) . '</td>' . '<td>' . $this -> getColumnData($row, COLUMN_PROCESS_TIME) . '</td>'
. '<td class="r">' . $this -> dispUserAccountTypeCommon($this -> getColumnData($row, COLUMN_ACCOUNT_TYPE)) .'</td>' . '<td><a href="javascript:actionDetail(\'' . $this -> getColumnData($row, COLUMN_USER_ACCOUNT) . '\');"><span class="fa fa-info-circle fa-lg"></span></a></td>'
. '<td class="r">' . $this -> getColumnData($row, COLUMN_MAX_CREATE_TIME) . '</td>' . '<td><input name="selectAll[]" value="'.$this -> getColumnData($row, COLUMN_USER_ACCOUNT).'" type="checkbox"></td>'
. '<td>' . $this -> dispUserStatusCommon($this -> getColumnData($row, COLUMN_USER_STATUS)) . '</td>' . '</tr>';
. '<td>' . $this -> arrValidate[$this -> getColumnData($row, COLUMN_VALIDATE_STATUS)] . '</td>'
. '<td>' . $this -> getColumnData($row, COLUMN_PROCESS_TIME) . '</td>'
. '<td><a href="javascript:actionDetail(\'' . $this -> getColumnData($row, COLUMN_USER_ACCOUNT) . '\');"><span class="fa fa-info-circle fa-lg"></span></a></td>'
. '<td><input name="selectAll[]" value="'.$this -> getColumnData($row, COLUMN_USER_ACCOUNT).'" type="checkbox"></td>'
. '</tr>';
} }
} else { } else
$rtn = '<tr><td colspan="11">' . $this -> getMessage(INFO, 'I_NO_SUCHE_SEARCH_DATA', array()) . '</td></tr>'; $rtn = '<tr><td colspan="11">' . $this -> getMessage(INFO, 'I_NO_SUCHE_SEARCH_DATA', array()) . '</td></tr>';
}
echo $rtn; echo $rtn;
} }
...@@ -525,8 +527,6 @@ class KYCModelClass extends ModelClassEx { ...@@ -525,8 +527,6 @@ class KYCModelClass extends ModelClassEx {
function echoImageList(){ function echoImageList(){
// 変数宣言部 // 変数宣言部
$rtn = NO_STRING; $rtn = NO_STRING;
$btn = NO_STRING;
$cnt = NO_COUNT;
$base = NO_COUNT; $base = NO_COUNT;
$rCnt = NO_COUNT; $rCnt = NO_COUNT;
$kycStatus = array(); $kycStatus = array();
...@@ -558,10 +558,7 @@ class KYCModelClass extends ModelClassEx { ...@@ -558,10 +558,7 @@ class KYCModelClass extends ModelClassEx {
for ($i = 0; $i <= 4; $i++) { for ($i = 0; $i <= 4; $i++) {
if(isset($this -> rs[$rCnt + $i][COLUMN_FILE_TYPE])) { if(isset($this -> rs[$rCnt + $i][COLUMN_FILE_TYPE])) {
$s0 = NO_STRING;
$s1 = NO_STRING;
$row = $this -> getRowData($this -> rs, $rCnt + $i); $row = $this -> getRowData($this -> rs, $rCnt + $i);
$key = $this -> getColumnData($row, COLUMN_K_ID) . DELIMIT_UNDER_BAR; $key = $this -> getColumnData($row, COLUMN_K_ID) . DELIMIT_UNDER_BAR;
...@@ -631,7 +628,6 @@ class KYCModelClass extends ModelClassEx { ...@@ -631,7 +628,6 @@ class KYCModelClass extends ModelClassEx {
function updateImagesStatus($idStr){ function updateImagesStatus($idStr){
// 変数宣言部 // 変数宣言部
$rtn = NO_COUNT;
$arr = null; $arr = null;
// まずはパラメータを分割 // まずはパラメータを分割
$arr = explode(DELIMIT_UNDER_BAR, $idStr); $arr = explode(DELIMIT_UNDER_BAR, $idStr);
...@@ -651,7 +647,6 @@ class KYCModelClass extends ModelClassEx { ...@@ -651,7 +647,6 @@ class KYCModelClass extends ModelClassEx {
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
function deleteImage($idStr){ function deleteImage($idStr){
// 変数宣言部 // 変数宣言部
$rtn = NO_COUNT;
$arr = null; $arr = null;
// まずはパラメータを分割 // まずはパラメータを分割
$arr = explode(DELIMIT_UNDER_BAR, $idStr); $arr = explode(DELIMIT_UNDER_BAR, $idStr);
...@@ -719,12 +714,14 @@ class KYCModelClass extends ModelClassEx { ...@@ -719,12 +714,14 @@ class KYCModelClass extends ModelClassEx {
public function getCheckValidateList(){ public function getCheckValidateList(){
$str = ''; $str = '';
foreach($this -> arrValidate as $key=>$val){ foreach($this -> arrValidate as $key=>$val){
$str .= '<label>'; $str .= '<label>';
$checked = ''; $checked = '';
$checked = VAL_INT_99; $checked = VAL_INT_99;
if(!empty($this -> arrStatus)){ if(!empty($this -> arrStatus)){
foreach($this -> arrStatus as $k=>$v){ foreach($this -> arrStatus as $v){
if($key == $v){ if($key == $v){
$checked = $v; $checked = $v;
break; break;
...@@ -789,7 +786,7 @@ class KYCModelClass extends ModelClassEx { ...@@ -789,7 +786,7 @@ class KYCModelClass extends ModelClassEx {
} }
//処理制限時間を外す //処理制限時間を外す
set_time_limit(0); set_time_limit(0);
foreach($arrTmp as $key=>$val){ foreach($arrTmp as $val){
$filename = basename($val); $filename = basename($val);
//取得ファイルをZipに追加 //取得ファイルをZipに追加
$zip->addFromString($filename,file_get_contents(SYSTEM_PATH.$val)); $zip->addFromString($filename,file_get_contents(SYSTEM_PATH.$val));
...@@ -990,11 +987,9 @@ class KYCModelClass extends ModelClassEx { ...@@ -990,11 +987,9 @@ class KYCModelClass extends ModelClassEx {
* @return : なし * @return : なし
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
function makeExportData() { function makeExportData() {
// 変数宣言部 // 変数宣言部
$data = NO_STRING; $data = NO_STRING;
$arr = null; $arr = null;
$intermediaryFlg = NO_STRING;
// まずはタイトル // まずはタイトル
header("Content-Type: text/html; charset=UTF-8"); header("Content-Type: text/html; charset=UTF-8");
...@@ -1042,10 +1037,8 @@ class KYCModelClass extends ModelClassEx { ...@@ -1042,10 +1037,8 @@ class KYCModelClass extends ModelClassEx {
$type = $this -> getType(); $type = $this -> getType();
$rs = array(); $rs = array();
$detail = array(); $detail = array();
$oldStatus = array();
$where = NO_STRING; $where = NO_STRING;
$status = $this -> updateStatus; $status = $this -> updateStatus;
$user = $this -> userAccount;
if($type == TYPE_UPDATE_ALL){ if($type == TYPE_UPDATE_ALL){
if(!empty($this -> arrSelectAll)){ if(!empty($this -> arrSelectAll)){
...@@ -1097,9 +1090,7 @@ class KYCModelClass extends ModelClassEx { ...@@ -1097,9 +1090,7 @@ class KYCModelClass extends ModelClassEx {
$message = 'Saved without any changes'; $message = 'Saved without any changes';
} }
}elseif($type == TYPE_SAVE_IMAGE){ }else if($type == TYPE_SAVE_IMAGE){
$result = array();
$kId = array(); $kId = array();
$arr = array(); $arr = array();
$rs = $this -> accessSelect('SELECT_USER_KYC', array($this -> userAccount)); $rs = $this -> accessSelect('SELECT_USER_KYC', array($this -> userAccount));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment