dbms_primeidc_init...1

This commit is contained in:
최준흠 2025-04-21 14:45:14 +09:00
parent 735c9c4c46
commit 37e3c1ac23
33 changed files with 307 additions and 227 deletions

View File

@ -124,3 +124,7 @@ define('DBMS_GEARLIST_CPU_TYPES', [
'DX3', 'DX3',
'DQ233' 'DQ233'
]); ]);
define('DBMS_CLIENT_POINT_TYPE', [
'deposit' => '입금',
'withdrawal' => '출금',
]);

View File

@ -2,7 +2,7 @@
namespace lib\Configs; namespace lib\Configs;
use lib\Controllers\DBMS\Client\ClientController; use lib\Controllers\DBMS\Client\DashboardController as ClientDashboardController;
use lib\Controllers\DBMS\Client\CouponController; use lib\Controllers\DBMS\Client\CouponController;
use lib\Controllers\DBMS\Client\MemoController; use lib\Controllers\DBMS\Client\MemoController;
use lib\Controllers\DBMS\Client\PaymentController; use lib\Controllers\DBMS\Client\PaymentController;
@ -16,10 +16,13 @@ use lib\Core\Router;
//Client관련련 //Client관련련
$router->group('dbms/client', function (Router $router) { $router->group('dbms/client', function (Router $router) {
$router->add('GET', 'totalcount', function ($params) { //Dashboard관련
$controller = new ClientCOntroller($params); $router->group('dashboard', function (Router $router) {
return $controller->totalcount(); $router->add('GET', 'totalcount', function ($params) {
// Response::view($result); $controller = new ClientDashboardController($params);
return $controller->totalcount();
// Response::view($result);
});
}); });
//메모관련 //메모관련
$router->group('memo', function (Router $router) { $router->group('memo', function (Router $router) {

View File

@ -4,10 +4,10 @@ namespace lib\Controllers;
use lib\Core\Controller as Core; use lib\Core\Controller as Core;
class CommonController extends Core abstract class CommonController extends Core
{ {
protected function __construct() protected function __construct(array $params = [])
{ {
parent::__construct(); parent::__construct($params);
} // } //
} //Class } //Class

View File

@ -6,13 +6,13 @@ use lib\Controllers\DBMS\DBMSController;
use lib\Services\ClientService; use lib\Services\ClientService;
use lib\Services\MemberService; use lib\Services\MemberService;
class ClientController extends DBMSController abstract class ClientController extends DBMSController
{ {
private ?ClientService $_clientService = null; private ?ClientService $_clientService = null;
private ?MemberService $_memberService = null; private ?MemberService $_memberService = null;
public function __construct() protected function __construct(array $params = [])
{ {
parent::__construct(); parent::__construct($params);
$this->getView()->setPath('client'); $this->getView()->setPath('client');
} // } //
final public function getClientService(): ClientService final public function getClientService(): ClientService
@ -29,7 +29,6 @@ class ClientController extends DBMSController
} }
return $this->_memberService; return $this->_memberService;
} }
protected function setDefaultRequestData(): array protected function setDefaultRequestData(): array
{ {
$this->client = null; $this->client = null;
@ -71,46 +70,4 @@ class ClientController extends DBMSController
} }
return [$client_code, $member_code, $service_code]; return [$client_code, $member_code, $service_code];
} }
//서비스카운팅 , total_counting_customer.php
//CLI 접속방법 : php index.php site/client/totalcount/client_code/코드번호
//WEB 접속방법 : http://localhost/site/client/totalcount/client_code/코드번호
public function totalcount()
{
//사용자정보
$client_code = $this->request->get('client_code');
// echo "Client_Code:" . $client_code;
if ($client_code) {
$this->getClientService()->getModel()->where('Client_Code', $client_code);
$client = $this->getClientService()->getEntity();
if (!$client) {
throw new \Exception("[$client_code]에 해당하는 고객정보가 존재하지 않습니다.");
}
$this->client = $client;
}
//서비스위치별(치바,도쿄등)
$dashboard = [];
foreach (DBMS_SERVICE_SWITCHCODE as $district => $switchcodes) {
$switchcode_begin = $switchcodes['begin'];
$switchcode_end = $switchcodes['end'];
$this->getServiceService()->getModel()->where("client_code", "{$client_code}");
$this->getServiceService()->getModel()->where("service_sw BETWEEN '{$switchcode_begin}' AND '{$switchcode_end}'");
$this->getServiceService()->getModel()->where("service_status", "o");
$this->getServiceService()->getModel()->whereNotIn("service_line", ['solo', 'test', 'event', 'substitution']);
$dashboard[$district] = $this->getServiceService()->getCount();
} //foreach
//서비스라인별(일반,방어,전용,테스트,대체,vpn,event등)
foreach (DBMS_SERVICE_LINE_ALL as $service_line => $label) {
$this->getServiceService()->getModel()->where('client_code', $client_code);
$this->getServiceService()->getModel()->where('service_line', $service_line);
$dashboard[$service_line] = $this->getServiceService()->getCount("SUM(coupon) as cnt");
} //foreach
//서비스상태별(일반,방어만)
$this->getServiceService()->getModel()->where("client_code", $client_code);
$this->getServiceService()->getModel()->whereNotIn("service_line", ['solo', 'test', 'event', 'substitution']);
$dashboard['coupon'] = $this->getServiceService()->getCount("SUM(coupon) as cnt");
$this->dashboard = $dashboard;
$this->client_code = $client_code;
return $this->render(__FUNCTION__);
}
} //Class } //Class

View File

@ -10,9 +10,9 @@ class CouponController extends ClientController
{ {
private ?OnetimeService $_onetimeService = null; private ?OnetimeService $_onetimeService = null;
private ?HistoryService $_historyService = null; private ?HistoryService $_historyService = null;
public function __construct() public function __construct(array $params = [])
{ {
parent::__construct(); parent::__construct($params);
$this->getView()->setPath('coupon'); $this->getView()->setPath('coupon');
} // } //
public function getOnetimeService(): OnetimeService public function getOnetimeService(): OnetimeService

View File

@ -0,0 +1,99 @@
<?php
namespace lib\Controllers\DBMS\Client;
use lib\Services\ClientService;
use lib\Services\MemberService;
class DashboardController extends ClientController
{
public function __construct(array $params = [])
{
parent::__construct($params);
$this->getView()->setPath('dashboard');
} //
protected function setDefaultRequestData(): array
{
$this->client = null;
$this->member = null;
$this->service = null;
//사용자정보
$client_code = $this->request->get('client_code');
// echo "Client_Code:" . $client_code;
// exit;
if ($client_code) {
$this->getClientService()->getModel()->where('Client_Code', $client_code);
$client = $this->getClientService()->getEntity();
if (!$client) {
throw new \Exception("[$client_code]에 해당하는 고객정보가 존재하지 않습니다.");
}
$this->client = $client;
}
//관리자정보(등록자)
$member_code = $this->request->get('mkid');
// echo "member_code:" . $member_code;
if ($member_code) {
$this->getMemberService()->getModel()->where($this->getMemberService()->getModel()::PKField, $member_code);
$member = $this->getMemberService()->getEntity();
if (!$member) {
throw new \Exception("[$member_code]에 해당하는 관리자정보가 존재하지 않습니다.");
}
$this->member = $member;
}
//서비스정보
$service_code = $this->request->get('service_code');
// echo "service_code:" . $service_code;
if ($service_code) {
$this->getServiceService()->getModel()->where($this->getServiceService()->getModel()::PKField, $service_code);
$service = $this->getServiceService()->getEntity();
if (!$service) {
throw new \Exception("[$service_code]에 해당하는 서비스정보가 존재하지 않습니다.");
}
$this->service = $service;
}
return [$client_code, $member_code, $service_code];
}
//서비스카운팅 , total_counting_customer.php
//CLI 접속방법 : php index.php site/client/totalcount/client_code/코드번호
//WEB 접속방법 : http://localhost/site/client/totalcount/client_code/코드번호
public function totalcount()
{
//사용자정보
$client_code = $this->request->get('client_code');
// echo "Client_Code:" . $client_code;
if ($client_code) {
$this->getClientService()->getModel()->where('Client_Code', $client_code);
$client = $this->getClientService()->getEntity();
if (!$client) {
throw new \Exception("[$client_code]에 해당하는 고객정보가 존재하지 않습니다.");
}
$this->client = $client;
}
//서비스위치별(치바,도쿄등)
$dashboard = [];
foreach (DBMS_SERVICE_SWITCHCODE as $district => $switchcodes) {
$switchcode_begin = $switchcodes['begin'];
$switchcode_end = $switchcodes['end'];
$this->getServiceService()->getModel()->where("client_code", "{$client_code}");
$this->getServiceService()->getModel()->where("service_sw BETWEEN '{$switchcode_begin}' AND '{$switchcode_end}'");
$this->getServiceService()->getModel()->where("service_status", "o");
$this->getServiceService()->getModel()->whereNotIn("service_line", ['solo', 'test', 'event', 'substitution']);
$dashboard[$district] = $this->getServiceService()->getCount();
} //foreach
//서비스라인별(일반,방어,전용,테스트,대체,vpn,event등)
foreach (DBMS_SERVICE_LINE_ALL as $service_line => $label) {
$this->getServiceService()->getModel()->where('client_code', $client_code);
$this->getServiceService()->getModel()->where('service_line', $service_line);
$dashboard[$service_line] = $this->getServiceService()->getCount("SUM(coupon) as cnt");
} //foreach
//서비스상태별(일반,방어만)
$this->getServiceService()->getModel()->where("client_code", $client_code);
$this->getServiceService()->getModel()->whereNotIn("service_line", ['solo', 'test', 'event', 'substitution']);
$dashboard['coupon'] = $this->getServiceService()->getCount("SUM(coupon) as cnt");
$this->dashboard = $dashboard;
$this->client_code = $client_code;
return $this->render(__FUNCTION__);
}
} //Class

View File

@ -6,9 +6,9 @@ use lib\Helpers\ServiceHelper;
class MemoController extends ClientController class MemoController extends ClientController
{ {
public function __construct() public function __construct(array $params = [])
{ {
parent::__construct(); parent::__construct($params);
$this->getView()->setPath('memo'); $this->getView()->setPath('memo');
$this->helper = new ServiceHelper(); $this->helper = new ServiceHelper();
} // } //

View File

@ -6,9 +6,9 @@ use lib\Utils\Pagination;
class PaymentController extends ClientController class PaymentController extends ClientController
{ {
public function __construct() public function __construct(array $params = [])
{ {
parent::__construct(); parent::__construct($params);
$this->getView()->setPath('payment'); $this->getView()->setPath('payment');
} // } //

View File

@ -6,16 +6,18 @@ use lib\Services\HistoryService;
use lib\Services\OnetimeService; use lib\Services\OnetimeService;
use lib\Services\PointService; use lib\Services\PointService;
use lib\Utils\Pagination; use lib\Utils\Pagination;
use lib\Helpers\DBMS\Client\PointHelper;
class PointController extends ClientController class PointController extends ClientController
{ {
private ?PointService $_pointService = null; private ?PointService $_pointService = null;
private ?OnetimeService $_onetimeService = null; private ?OnetimeService $_onetimeService = null;
private ?HistoryService $_historyService = null; private ?HistoryService $_historyService = null;
public function __construct() public function __construct(array $params = [])
{ {
parent::__construct(); parent::__construct($params);
$this->getView()->setPath('point'); $this->getView()->setPath('point');
$this->helper = new PointHelper();
} // } //
public function getPointService(): PointService public function getPointService(): PointService
{ {
@ -39,20 +41,19 @@ class PointController extends ClientController
return $this->_historyService; return $this->_historyService;
} }
//IdcPointListMK.jsp -> domain_point.php //IdcClientPointList.jsp
//CLI 접속방법 : php index.php site/client/point/index //CLI 접속방법 : php index.php site/client/point/index
//WEB 접속방법 : http://localhost/site/client/point/index //WEB 접속방법 : http://localhost/site/client/point/index
public function index() public function index()
{ {
//전체 고객객정보 //전체 고객객정보
$this->clients = $this->getClientService()->getEntities(); $this->clients = $this->getClientService()->getEntities();
//전체 관리자정보(등록자) //사용자코드가 있으면,
$this->members = $this->getMemberService()->getEntities();
//사용자별 포인트내역
$client_code = $this->request->get('client_code'); $client_code = $this->request->get('client_code');
if ($client_code) { if ($client_code) {
$this->getPointService()->getModel()->where('client_code', $client_code); $this->getPointService()->getModel()->where('client_code', $client_code);
} }
$this->client_code = $client_code;
$this->curPage = intval($this->request->get('curPage', 1)); $this->curPage = intval($this->request->get('curPage', 1));
$this->perPage = intval($this->request->get('perPage', VIEW_LIST_PERPAGE)); $this->perPage = intval($this->request->get('perPage', VIEW_LIST_PERPAGE));
[$this->total, $this->entities] = $this->getPointService()->getList($this->curPage, $this->perPage); [$this->total, $this->entities] = $this->getPointService()->getList($this->curPage, $this->perPage);
@ -60,14 +61,19 @@ class PointController extends ClientController
return $this->render(__FUNCTION__); return $this->render(__FUNCTION__);
} }
//IdcPointBuyMK.jsp -> domain_point_buy.php //IdcClientPointInsert.jsp
//CLI 접속방법 : php index.php site/client/point/insert_form //CLI 접속방법 : php index.php site/client/point/insert_form
//WEB 접속방법 : http://localhost/site/client/point/insert_form //WEB 접속방법 : http://localhost/site/client/point/insert_form
public function insert_form() public function insert_form()
{ {
//기본적으로 필요한 client_code, mkid, service_code를 설정합니다. //전체 고객객정보
list($client_code, $member_code, $service_code) = $this->setDefaultRequestData(); $this->clients = $this->getClientService()->getEntities();
$this->today = date("Y-m-d"); //사용자코드가 있으면,
$client_code = $this->request->get('client_code');
if ($client_code) {
$this->getPointService()->getModel()->where('client_code', $client_code);
}
$this->client_code = $client_code;
return $this->render(__FUNCTION__); return $this->render(__FUNCTION__);
} }
@ -76,35 +82,32 @@ class PointController extends ClientController
//WEB 접속방법 : http://localhost/site/client/point/insert_form //WEB 접속방법 : http://localhost/site/client/point/insert_form
public function insert() public function insert()
{ {
//기본적으로 필요한 client_code, mkid, service_code를 설정합니다.
list($client_code, $member_code, $service_code) = $this->setDefaultRequestData();
//포인트 형식
$type = $this->request->get('type');
if (!$type) {
throw new \Exception("포인트 형식이 정의되지 않았습니다.");
}
//포인트 제목
$title = $this->request->get('title');
if (!$title) {
throw new \Exception("포인트 제목이 정의되지 않았습니다.");
}
//포인트 값
$amount = intval($this->request->get('amount'));
if (! $amount || $amount < 1) {
throw new \Exception("포인트 값이 정의되지 않았거나, 포인트값은 1 이상이어야 합니다.");
}
//포인트 작업 내용
$note = $this->request->get('note');
// //onetime_case 사용용도
// $onetime_case = $this->request->get('onetime_case', 'point');
// //onetime_request_date 사용일
// $onetime_request_date = $this->request->get('onetime_request_date') ?? date("Y-m-d");
try { try {
//Client Code 형식
$client_code = $this->request->get('client_code');
if (!$client_code) {
throw new \Exception("고객을 선택하지 않으셨습니다.");
}
//포인트 형식
$type = $this->request->get('type');
if (!$type) {
throw new \Exception("포인트 형식이 정의되지 않았습니다.");
}
//포인트 값
$amount = intval($this->request->get('amount'));
if (! $amount || $amount < 1) {
throw new \Exception("포인트 값이 정의되지 않았거나, 포인트값은 1 이상이어야 합니다.");
}
//포인트 작업 내용
$note = $this->request->get('note');
// //onetime_case 사용용도
// $onetime_case = $this->request->get('onetime_case', 'point');
// //onetime_request_date 사용일
// $onetime_request_date = $this->request->get('onetime_request_date') ?? date("Y-m-d");
$formDatas = [ $formDatas = [
'client_code' => $client_code, 'client_code' => $client_code,
'member_code' => $member_code,
'type' => $type, 'type' => $type,
'title' => $title, 'title' => date("Y-m-d") . ", [$amount] 포인트, " . DBMS_CLIENT_POINT_TYPE[$type],
'amount' => $amount, 'amount' => $amount,
'note' => $note 'note' => $note
]; ];
@ -118,9 +121,11 @@ class PointController extends ClientController
$this->getPointService()->getModel()->insert($formDatas); $this->getPointService()->getModel()->insert($formDatas);
$this->getServiceService()->commit(); $this->getServiceService()->commit();
return $this->redirect->to(DBMS_SITE_URL . "/IdcPointList.cup")->with('success', ['message' => '포인트 작업이 완료되었습니다.']); return $this->redirect->to(DBMS_SITE_URL . "/IdcPointList.cup")->with('success', ['message' => '포인트 작업이 완료되었습니다.']);
} catch (\Exception $e) { } catch (\PDOException $e) {
$this->getServiceService()->rollback(); $this->getServiceService()->rollback();
return $this->redirect->back()->withInput()->with('error', ['message' => '포인트 사용에 실패하였습니다.:' . $e->getMessage()]); return $this->redirect->back()->withInput()->with('error', ['message' => '포인트 사용에 실패하였습니다.:' . $e->getMessage()]);
} catch (\Exception $e) {
return $this->redirect->back()->withInput()->with('error', ['message' => '포인트 사용에 실패하였습니다.:' . $e->getMessage()]);
} }
} }
} //Class } //Class

View File

@ -8,9 +8,9 @@ use lib\Services\ServiceService;
abstract class DBMSController extends CommonController abstract class DBMSController extends CommonController
{ {
private ?ServiceService $_service = null; private ?ServiceService $_service = null;
protected function __construct() protected function __construct(array $params = [])
{ {
parent::__construct(); parent::__construct($params);
//View의 추가디렉토리 //View의 추가디렉토리
$this->getView()->setPath('dbms'); $this->getView()->setPath('dbms');
} // } //

View File

@ -7,7 +7,7 @@ use lib\Services\ClientService;
use lib\Services\VPCService; use lib\Services\VPCService;
use lib\Services\KCSService; use lib\Services\KCSService;
use lib\Services\HistoryService; use lib\Services\HistoryService;
use lib\Helpers\ServiceHelper; use lib\Helpers\DBMS\ServiceHelper;
class DashboardController extends DBMSController class DashboardController extends DBMSController
{ {
@ -17,9 +17,9 @@ class DashboardController extends DBMSController
private ?KCSService $_kcsService = null; private ?KCSService $_kcsService = null;
private ?HistoryService $_historyService = null; private ?HistoryService $_historyService = null;
public function __construct() public function __construct(array $params = [])
{ {
parent::__construct(); parent::__construct($params);
$this->getView()->setPath('dashboard'); $this->getView()->setPath('dashboard');
$this->helper = new ServiceHelper(); $this->helper = new ServiceHelper();
} // } //

View File

@ -8,9 +8,9 @@ use lib\Utils\Pagination;
class DefenceController extends DBMSController class DefenceController extends DBMSController
{ {
private ?DefenceService $_clientService = null; private ?DefenceService $_clientService = null;
public function __construct() public function __construct(array $params = [])
{ {
parent::__construct(); parent::__construct($params);
$this->getView()->setPath('defence'); $this->getView()->setPath('defence');
} // } //
public function getDefenceService(): DefenceService public function getDefenceService(): DefenceService

View File

@ -10,9 +10,9 @@ class GearlistController extends DBMSController
{ {
private ?GearlistService $_gearlistServicerService = null; private ?GearlistService $_gearlistServicerService = null;
private ?ServerService $_serverService = null; private ?ServerService $_serverService = null;
public function __construct() public function __construct(array $params = [])
{ {
parent::__construct(); parent::__construct($params);
$this->getView()->setPath('gearlist'); $this->getView()->setPath('gearlist');
} // } //
public function getGearlistService(): GearlistService public function getGearlistService(): GearlistService

View File

@ -10,9 +10,9 @@ class NavigatorController extends DBMSController
{ {
private ?ClientService $_clientService = null; private ?ClientService $_clientService = null;
public function __construct() public function __construct(array $params = [])
{ {
parent::__construct(); parent::__construct($params);
$this->getView()->setPath('navigator'); $this->getView()->setPath('navigator');
$this->helper = new ServiceHelper(); $this->helper = new ServiceHelper();
} // } //

View File

@ -10,9 +10,9 @@ class ServerController extends DBMSController
{ {
private ?ServerService $_serverService = null; private ?ServerService $_serverService = null;
private ?ClientService $_clientService = null; private ?ClientService $_clientService = null;
public function __construct() public function __construct(array $params = [])
{ {
parent::__construct(); parent::__construct($params);
$this->getView()->setPath('server'); $this->getView()->setPath('server');
} // } //
public function getServerService(): ServerService public function getServerService(): ServerService

View File

@ -12,9 +12,9 @@ class ServiceController extends DBMSController
private ?ClientService $_clientService = null; private ?ClientService $_clientService = null;
private ?AddDbService $_addDbService = null; private ?AddDbService $_addDbService = null;
public function __construct() public function __construct(array $params = [])
{ {
parent::__construct(); parent::__construct($params);
$this->getView()->setPath('service'); $this->getView()->setPath('service');
} // } //
public function getClientService(): ClientService public function getClientService(): ClientService

View File

@ -4,7 +4,11 @@ namespace lib\Controllers;
use lib\Http\Response; use lib\Http\Response;
class HomeController class HomeController extends CommonController
{ {
public function __construct(array $params = [])
{
parent::__construct($params);
} //
public function index(): void {} public function index(): void {}
} }

View File

@ -13,9 +13,9 @@ use lib\Http\Url;
abstract class Controller abstract class Controller
{ {
private ?View $_view = null; private ?View $_view = null;
protected ?Url $url = null;
protected ?Session $session = null; protected ?Session $session = null;
protected ?Redirect $redirect = null; protected ?Redirect $redirect = null;
protected ?Url $url = null;
protected ?Request $request = null; protected ?Request $request = null;
protected function __construct(array $params = []) protected function __construct(array $params = [])
{ {
@ -36,6 +36,10 @@ abstract class Controller
{ {
if ($this->_view === null) { if ($this->_view === null) {
$this->_view = new View(); $this->_view = new View();
$this->_view->url = $this->url;
$this->_view->session = $this->session;
$this->_view->redirect = $this->redirect;
$this->_view->request = $this->request;
} }
return $this->_view; return $this->_view;
} }

View File

@ -32,6 +32,6 @@ class ClientEntity extends Entity
} }
public function getPoint(): string public function getPoint(): string
{ {
return $this->Client_Poinit; return $this->Client_Point;
} }
} //Class } //Class

View File

@ -25,5 +25,9 @@ class CommonEntity extends Core
$field = constant("static::PairField"); $field = constant("static::PairField");
return $this->$field; return $this->$field;
} }
public function getCreatedAt(): string
{
return $this->created_at;
} //
//공통부분 //공통부분
} //Class } //Class

View File

@ -14,4 +14,21 @@ class PointEntity extends Entity
{ {
parent::__construct($datas); parent::__construct($datas);
} // } //
public function getClientCode(): string
{
return $this->client_code;
} //
public function getType(): string
{
return $this->type;
} //
public function getAmount(): string
{
return $this->amount;
} //
public function getNote(): string
{
return $this->note;
} //
} //Class } //Class

View File

@ -0,0 +1,14 @@
<?php
namespace lib\Helpers\DBMS\Client;
use lib\Helpers\CommonHelper;
use lib\Models\ClientModel;
abstract class ClientHelper extends CommonHelper
{
protected function __construct()
{
parent::__construct();
} //
} //Class

View File

@ -0,0 +1,11 @@
<?php
namespace lib\Helpers\DBMS\Client;
class PointHelper extends ClientHelper
{
public function __construct()
{
parent::__construct();
} //
} //Class

View File

@ -1,6 +1,9 @@
<?php <?php
namespace lib\Helpers; namespace lib\Helpers\DBMS;
use lib\Helpers\CommonHelper;
use lib\Models\ServiceModel;
class ServiceHelper extends CommonHelper class ServiceHelper extends CommonHelper
{ {

View File

@ -4,12 +4,13 @@
<thead> <thead>
<tr> <tr>
<th style="text-align:center;">No</th> <th style="text-align:center;">No</th>
<th style="text-align:center;">고객명</th>
<th style="text-align:center;">형식</th>
<th style="text-align:center;">제목</th> <th style="text-align:center;">제목</th>
<th style="text-align:center;">금액</th> <th style="text-align:center;">고객명</th>
<th style="text-align:center;">상태</th> <th style="text-align:center;">현재금액</th>
<th style="text-align:center;">입금액</th>
<th style="text-align:center;">출금액</th>
<th style="text-align:center;">작업일</th> <th style="text-align:center;">작업일</th>
<th style="text-align:center;">비고</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -18,25 +19,19 @@
<?php $num = count($this->entities) - $i; ?> <?php $num = count($this->entities) - $i; ?>
<tr> <tr>
<td><?= $num ?></td> <td><?= $num ?></td>
<td><?= $this->client->getServiceCode() ?></td> <td><?= $entity->getTitle() ?></td>
<td><?= $service->getServerCode() ?></td> <td><?= $this->clients[$entity->getClientCode()]->getTitle() ?></td>
<td><?= $service->service_ip ?></td> <td><?= number_format($this->clients[$entity->getClientCode()]->getPoint()) ?></td>
<td><?= $service->service_open_date ?></td> <td><?= number_format($entity->getType() == 'deposit' ? $entity->getAmount() : 0) ?></td>
<td><?= $service->service_line ?></td> <td><?= number_format($entity->getType() == 'withdrawal' ? $entity->getAmount() : 0) ?></td>
<td><?= $service->getCoupon() + $service->getUsedCoupon() ?></td> <td><?= $entity->getCreatedAt() ?></td>
<td><?= $service->getCoupon() ?></td> <td><?= $entity->getNote() ?></td>
<td><?= $service->getUsedCoupon() ?></td>
</tr> </tr>
<?php $i++; ?> <?php $i++; ?>
<?php } ?> <?php } ?>
</tbody> </tbody>
</table> </table>
<div align='center'><?= $this->pagination->render(DBMS_SITE_URL . "/IdcClientPointList.cup", ['curPage' => $this->curPage, 'perPage' => $this->perPage]) ?></div> <div style="text-align:center;"><?= $this->pagination->render(DBMS_SITE_URL . "/IdcClientPointList.cli", ['client_code' => $this->client_code, 'curPage' => $this->curPage, 'perPage' => $this->perPage]) ?></div>
<div class="row"> <?php $insert_url = DBMS_SITE_URL . "/IdcClientPointInsert.cli?client_code=" . $this->client_code ?>
<div class="col-sm-12 col-md-12 col-lg-12"> <div style="text-align:center;"><button type="button" class="btn btn-primary" onclick="location.href='<?= $insert_url ?>'">포인트 추가</button></div>
<div class="form-group"> </div>
<div class="col-sm-12 col-md-12 col-lg-12">
<button type="button" class="btn btn-primary" onclick="location.href='<?= $this->url->baseUrl() ?>/insert_form'">포인트 추가</button>
</div>
</div>
</div>

View File

@ -1,52 +1,42 @@
<div class="table-responsive"> <div class="table-responsive">
<form method="post" action="<?= DBMS_SITE_HOST ?>/dbms/client/coupon/insert/service_code/<?= $this->service->getServiceCode() ?>/mkid/<?= $this->member->getPK() ?>"> <form method="post" action="<?= DBMS_SITE_HOST ?>/dbms/client/point/insert">
<table class="table table-bordered table-hover table-striped"> <table class="table table-bordered table-hover table-striped">
<thead></thead> <thead></thead>
<tbody> <tbody>
<tr> <tr>
<td>고객명</td> <td>고객명</td>
<td colspan="5"><?= $this->client->getTitle() ?></td> <td>
<select name="client_code" id="client_code">
<?php foreach ($this->clients as $client) { ?>
<option value="<?= $client->getClientCode() ?>" <?= $this->client_code == $client->getClientCode() ? "selected" : "" ?>><?= $client->getTitle() ?></option>
<?php } ?>
</select>
</td>
</tr> </tr>
<tr> <tr>
<td>형식</td> <td>형식</td>
<td colspan="5"><?= $this->client->getServiceCode() ?></td> <td>
</tr> <input type="radio" name="type" id="type" value="deposit" checked><?= DBMS_CLIENT_POINT_TYPE['deposit'] ?>
<tr> <input type="radio" name="type" id="type" value="withdrawal"><?= DBMS_CLIENT_POINT_TYPE['withdrawal'] ?>
<td>장비번호</td>
<td colspan="5"><?= $this->service->getServerCode() ?></td>
</tr>
<tr>
<td>도메인 구매 수량</td>
<td colspan="5">
<select name="coupon" id="coupon">
<?php for ($i = 1; $i < $this->service->getCoupon(); $i++) { ?>
<option value="<?= $i ?>"><?= $i ?>개</option>
<?php } ?>
</select> (개별 서버에 할당된 남은 쿠폰 수량 : <?= $this->service->getCoupon() ?>)
</td> </td>
</tr> </tr>
<tr> <tr>
<td>서비스 금액</td> <td>금액</td>
<td colspan="3">도메인 쿠폰 사용</td> <td colspan=" 5">
</tr> <input type="text" name="amount" id="amount" value="0" onkeyup="this.value=this.value.replace(/[^0-9]/g,'');">
<tr> <br> (포인트는 1 이상이어야 합니다.)
<td>도메인 신청일</td>
<td><?= $this->today ?></td>
<td>쿠폰 사용일</td>
<td colspan="3"><?= $this->today ?></td>
</tr>
<tr>
<td>도메인 리스트</td>
<td colspan="5"><textarea cols="100" rows="4" type="text" name="note" id="note"></textarea>
<br>(공백을 허용하지 않습니다. 예제처럼 붙여쓰기 하세요 / 예제 : test.com/123.com/idcjp.jp)
</td> </td>
</tr> </tr>
<tr>
<td>비고</td>
<td><textarea cols="100" rows="4" type="text" name="note" id="note"></textarea></td>
</tr>
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="6"> <td colspan="6">
<input class="btn btn-outline btn-primary" type="submit" value="저장하기"> <input class="btn btn-outline btn-primary" type="submit" value="저장하기">
<input class="btn btn-outline btn-default" type="button" value="취소" onclick="location.href='/IdcCouponUseMK.cup?client_code=<?= $this->service->getClientCode() ?>'"> <input class="btn btn-outline btn-default" type="button" value="취소" onclick="history.back()">
</td> </td>
</tr> </tr>
</tfoot> </tfoot>

View File

@ -0,0 +1,19 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<% pageContext.setAttribute("phpurl",request.getScheme()+"://"+request.getServerName()); %>
<!-- 여기가 본 페이지이다 -->
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">
<h4><i class="fa fa-desktop fa-fw"></i> 포인트 입력</h4>
</div>
<div class="panel-body"><c:import url="${phpurl}/dbms/client/point/insert_form?client_code=${param.client_code}" /></div>
<!-- panel-body -->
</div>
<!-- panel panel-default -->
</div>
<!-- col-lg-12 -->
</div>
<!-- row -->
<!-- /#page-wrapper -->

View File

@ -1,54 +1,6 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<% pageContext.setAttribute("phpurl",request.getScheme()+"://"+request.getServerName()); %> <% pageContext.setAttribute("phpurl",request.getScheme()+"://"+request.getServerName()); %>
<script src="IDC/js/setToken.js"></script>
<script>
var tableToExcel = (function(){
var uri = 'data:application/vnd.ms-excel;base64,'
, template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--><meta http-equiv="content-type" content="text/plain; charset=UTF-8"/></head><body><table>{table}</table></body></html>'
, base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) }
, format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) }
return function(table, name) {
if (!table.nodeType) table = document.getElementById(table)
var ctx = {worksheet: name || 'Worksheet', table: table.innerHTML}
window.location.href = uri + base64(format(template, ctx))
}
})();
</script>
<script type="text/javascript">
$(function()
{
//사용버튼/삭제
$(".useCup").click(function()
{
var result = $(this).attr("val");
if(result>0)
window.location = $(this).attr("value")+"&token="+$("#token").val();
else
alert("사용할 쿠폰이 없습니다.");
});
//삭제, 수정
$(".delBtn").click(function()
{
var temp= $(this).parents("tr").find("input");
var a="&cupon_request_date="+$(temp[0]).val();
var b="&cupon_current="+$(temp[1]).val();
var c="&cupon_use="+$(temp[2]).val();
var d="&cupon_result="+$(temp[3]).val();
if($(temp[4]).prop("checked"))
{
e="&server_upgrade=o"
}
if($(temp[5]).prop("checked"))
{
e="&server_upgrade=x"
}
var f="&cupon_end_date="+$(temp[6]).val();
var g="&cupon_note="+$(temp[7]).val();
window.location = $(this).attr("value")+"&token="+$("#token").val()+a+b+c+d+e+f+g;
});
});
</script>
<!-- 여기가 본 페이지이다 --> <!-- 여기가 본 페이지이다 -->
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
@ -56,10 +8,7 @@ $(function()
<div class="panel-heading"> <div class="panel-heading">
<h4><i class="fa fa-desktop fa-fw"></i> 포인트 리스트</h4> <h4><i class="fa fa-desktop fa-fw"></i> 포인트 리스트</h4>
</div> </div>
<div class="panel-body"> <div class="panel-body"><c:import url="${phpurl}/dbms/client/point/index?client_code=${param.client_code}" /></div>
<c:import url="${phpurl}/dbms/client/point/index" />
</div>
<!-- panel-body --> <!-- panel-body -->
</div> </div>
<!-- panel panel-default --> <!-- panel panel-default -->

View File

@ -3,7 +3,6 @@
<% pageContext.setAttribute("phpurl",request.getScheme()+"://"+request.getServerName()); %> <% pageContext.setAttribute("phpurl",request.getScheme()+"://"+request.getServerName()); %>
<script src="IDC/js/setToken.js"></script> <script src="IDC/js/setToken.js"></script>
<!-- 여기가 본 페이지이다 --> <!-- 여기가 본 페이지이다 -->
<c:set var="mk_client_code" value="${param.client_code }"/>
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="panel panel-default"> <div class="panel panel-default">
@ -11,7 +10,7 @@
<h4><i class="fa fa-desktop fa-fw"></i> 도메인 쿠폰 사용하기</h4> <h4><i class="fa fa-desktop fa-fw"></i> 도메인 쿠폰 사용하기</h4>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<c:import url="${phpurl}/dbms/client/coupon/index?client_code=${mk_client_code}&mkid=${member.id}&curPage=${curPage}" /> <c:import url="${phpurl}/dbms/client/coupon/index?client_code=${param.client_code}&mkid=${member.id}&curPage=${curPage}" />
</div> </div>
<!-- panel-body --> <!-- panel-body -->
</div> </div>

View File

@ -973,7 +973,7 @@ $(function()
</h4> </h4>
</div> </div>
<!-- 사용정보 시작--> <!-- 사용정보 시작-->
<c:import url="${phpurl}/dbms/client/totalcount?client_code=${client_code}" /> <c:import url="${phpurl}/dbms/client/dashboard/totalcount?client_code=${client_code}" />
<!-- end 사용정보 --> <!-- end 사용정보 -->
<c:if test="${member.power5 eq 'o'}"> <c:if test="${member.power5 eq 'o'}">
<div class="col-lg-4 col-md-12" style="padding:3px"> <div class="col-lg-4 col-md-12" style="padding:3px">

View File

@ -987,7 +987,7 @@ $(function()
</h4> </h4>
</div> </div>
<!-- 사용정보 시작--> <!-- 사용정보 시작-->
<c:import url="${phpurl}/dbms/client/totalcount/client_code/${client_code }" /> <c:import url="${phpurl}/dbms/client/dashboard/totalcount?client_code=${client_code}" />
<!-- end 사용정보 --> <!-- end 사용정보 -->
<c:if test="${member.power5 eq 'o'}"> <c:if test="${member.power5 eq 'o'}">
<div class="col-lg-4 col-md-12" style="padding:3px"> <div class="col-lg-4 col-md-12" style="padding:3px">

View File

@ -123,16 +123,19 @@ public class IdcClientFrontController extends HttpServlet {
cmd = new IdcClientAllServerListCmd(); cmd = new IdcClientAllServerListCmd();
cmd.execute(request,response); cmd.execute(request,response);
request.setAttribute("TargetFile", CLIENT_PATH+"IdcClientAllServerList.jsp"); request.setAttribute("TargetFile", CLIENT_PATH+"IdcClientAllServerList.jsp");
} }
//현재 서버 보유현황 목록 보기 //2025-04-21 choi.jh 포인트 기능추가
//사용자별 Point 목록 보기
if(cmdURI.equals("/IdcClientPointList.cli")) if(cmdURI.equals("/IdcClientPointList.cli"))
{ {
cmd = new IdcClientAllServerListCmd();
cmd.execute(request,response);
request.setAttribute("TargetFile", CLIENT_PATH+"IdcClientPointList.jsp"); request.setAttribute("TargetFile", CLIENT_PATH+"IdcClientPointList.jsp");
} }
//사용자별 Point 입력폼
if(cmdURI.equals("/IdcClientPointInsert.cli"))
{
request.setAttribute("TargetFile", CLIENT_PATH+"IdcClientPointInsert.jsp");
}
//2025-04-21 choi.jh 포인트 기능추가
//메인페이지 //메인페이지
if(cmdURI.equals("/DefaultPage.main")) if(cmdURI.equals("/DefaultPage.main"))
{ {