dbmsv2_init...1
This commit is contained in:
parent
2c27bbf09f
commit
20915e2557
@ -40,18 +40,4 @@ class ServiceCell extends CustomerCell
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
//서비스 방식에 따른 서비스별 Count
|
||||
final public function totalCountDashboard(array $params): string
|
||||
{
|
||||
$totalCounts = $this->getService()->getTotalServiceCount(array_key_exists('where', $params) ? $params['where'] : []);
|
||||
$template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
|
||||
return view('cells/service/' . $template, [
|
||||
'serviceCellDatas' => [
|
||||
'control' => $this->getService()->getControlDatas(),
|
||||
'service' => $this->getService(),
|
||||
'totalCounts' => $totalCounts,
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
29
app/Cells/Equipment/ServerCell.php
Normal file
29
app/Cells/Equipment/ServerCell.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Cells\Equipment;
|
||||
|
||||
use App\Services\Equipment\ServerService;
|
||||
|
||||
class ServerCell extends EquipmentCell
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(new ServerService());
|
||||
}
|
||||
|
||||
//서비스 방식에 따른 서비스별 Count
|
||||
final public function totalCountDashboard(array $params): string
|
||||
{
|
||||
$totalCounts = $this->getService()->getTotalServiceCount(array_key_exists('where', $params) ? $params['where'] : []);
|
||||
$template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
|
||||
return view('cells/server/' . $template, [
|
||||
'serviceCellDatas' => [
|
||||
'control' => $this->getService()->getControlDatas(),
|
||||
'service' => $this->getService(),
|
||||
'label' => $params['where']['serviceinfo.site'],
|
||||
'totalCounts' => $totalCounts,
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
@ -6,11 +6,9 @@ use App\Controllers\CommonController;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use App\Services\Customer\ServiceService;
|
||||
|
||||
abstract class AdminController extends CommonController
|
||||
{
|
||||
private ?ServiceService $_serviceService = null;
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
@ -19,12 +17,4 @@ abstract class AdminController extends CommonController
|
||||
$this->view_path = "admin" . DIRECTORY_SEPARATOR;
|
||||
$this->content_title = "관리자";
|
||||
}
|
||||
//Service,ServicePaymentController사용
|
||||
final public function getServiceService(): ServiceService
|
||||
{
|
||||
if (!$this->_serviceService) {
|
||||
$this->_serviceService = new ServiceService();
|
||||
}
|
||||
return $this->_serviceService;
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,6 +28,8 @@ class ClientController extends CustomerController
|
||||
}
|
||||
return $this->_service;
|
||||
}
|
||||
|
||||
|
||||
//Index,FieldForm관련
|
||||
protected function doValidation(Validation $validation, string $field, string $rule): Validation
|
||||
{
|
||||
@ -84,7 +86,7 @@ class ClientController extends CustomerController
|
||||
if (!$entity instanceof ClientEntity) {
|
||||
throw new \Exception("{$uid}에 해당하는 고객정보를 찾을수 없습니다.");
|
||||
}
|
||||
$this->totalCounts = $this->getService()->getServiceService()->getTotalServiceCount(['clientinfo_uid' => $entity->getPK()]);
|
||||
$this->totalCounts = $this->getService()->getServerService()->getTotalServiceCount(['serviceinfo.clientinfo_uid' => $entity->getPK()]);
|
||||
$this->totalAmounts = $this->getService()->getServiceService()->getTotalAmounts([
|
||||
'clientinfo_uid' => $entity->getPK(),
|
||||
'status' => STATUS['AVAILABLE']
|
||||
|
||||
@ -3,8 +3,9 @@
|
||||
namespace App\Controllers\Admin\Customer;
|
||||
|
||||
use App\Entities\Customer\ServiceEntity;
|
||||
use App\Services\PaymentService;
|
||||
use App\Services\Customer\ServiceService;
|
||||
use App\Services\Equipment\ServerService;
|
||||
use App\Services\PaymentService;
|
||||
use CodeIgniter\HTTP\RedirectResponse;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
@ -13,6 +14,7 @@ use Psr\Log\LoggerInterface;
|
||||
class ServiceController extends CustomerController
|
||||
{
|
||||
private ?PaymentService $_paymentService = null;
|
||||
private ?ServerService $_serverService = null;
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
@ -24,14 +26,21 @@ class ServiceController extends CustomerController
|
||||
}
|
||||
public function getService(): ServiceService
|
||||
{
|
||||
if (!$this->_service) {
|
||||
if ($this->_service === null) {
|
||||
$this->_service = new ServiceService();
|
||||
}
|
||||
return $this->_service;
|
||||
}
|
||||
public function getServerService(): ServerService
|
||||
{
|
||||
if ($this->_serverService === null) {
|
||||
$this->_serverService = new ServerService();
|
||||
}
|
||||
return $this->_serverService;
|
||||
}
|
||||
public function getPaymentService(): PaymentService
|
||||
{
|
||||
if (!$this->_paymentService) {
|
||||
if ($this->_paymentService === null) {
|
||||
$this->_paymentService = new PaymentService();
|
||||
}
|
||||
return $this->_paymentService;
|
||||
@ -78,13 +87,30 @@ class ServiceController extends CustomerController
|
||||
$this->getService()->setFormDatas($formDatas);
|
||||
parent::create_form_process();
|
||||
}
|
||||
private function getChildServers(ServiceEntity $entity): array
|
||||
{
|
||||
$servers = [];
|
||||
foreach ($this->getServerService()->getEntities(['serviceinfo_uid' => $entity->getPK()]) as $serverEntity) {
|
||||
$servers[] = view_cell("\App\Cells\Equipment\ServerPartCell::parttable", [
|
||||
'serverinfo_uid' => $serverEntity->getPK(),
|
||||
'types' => SERVERPART['SERVICE_PARTTYPES'],
|
||||
'template' => 'partlist_service'
|
||||
]);
|
||||
}
|
||||
return $servers;
|
||||
}
|
||||
//List 관련
|
||||
protected function index_process(array $entities = []): array
|
||||
{
|
||||
//서비스별 미납 Count
|
||||
$this->unPaids = $this->getPaymentService()->getUnPaids('serviceinfo_uid',);
|
||||
//부모함수처리
|
||||
return parent::index_process($entities);
|
||||
$childServers = [];
|
||||
$this->unPaids = $this->getPaymentService()->getUnPaids('serviceinfo_uid');
|
||||
foreach ($this->getService()->getEntities() as $entity) {
|
||||
$entities[] = $entity;
|
||||
$childServers[$entity->getPK()] = $this->getChildServers($entity);
|
||||
}
|
||||
$this->childServers = $childServers;
|
||||
return $entities;
|
||||
}
|
||||
|
||||
public function history(int $uid): RedirectResponse|string
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Controllers\Admin\Equipment;
|
||||
|
||||
use App\Entities\Equipment\ServerEntity;
|
||||
use App\Services\Equipment\ServerService;
|
||||
use CodeIgniter\HTTP\RedirectResponse;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
"settings": {
|
||||
"width": 3000,
|
||||
"height": 3000,
|
||||
"scrollTop": -1298.7873,
|
||||
"scrollLeft": -287.741,
|
||||
"scrollTop": -1049.7873,
|
||||
"scrollLeft": -1469.741,
|
||||
"zoomLevel": 0.79,
|
||||
"show": 511,
|
||||
"database": 4,
|
||||
@ -254,7 +254,7 @@
|
||||
"JRdeV7n53lb1iSmmYnhHX",
|
||||
"4iRyOhmW3b7kbiZT8lQyY",
|
||||
"34psXzS7RLX0sWXZyDGGf",
|
||||
"m77kSp3scTgMhInPBjsc3",
|
||||
"I8DumSwkLWz-Ve5_vc0uE",
|
||||
"9F6QpQqxeEggZ0FHM81O1",
|
||||
"tsDqk1dzwzUtvBzpjmarJ",
|
||||
"hmZlcR-Pw2C_ife1zzo5o",
|
||||
@ -287,6 +287,7 @@
|
||||
"3fZMQ9qB1DO8y44eJRKdt",
|
||||
"6fnpnhwe9G-y5QQ1j30W9",
|
||||
"34psXzS7RLX0sWXZyDGGf",
|
||||
"I8DumSwkLWz-Ve5_vc0uE",
|
||||
"m77kSp3scTgMhInPBjsc3",
|
||||
"9F6QpQqxeEggZ0FHM81O1",
|
||||
"EKrwHre6e66jqAMnAW_KR",
|
||||
@ -326,15 +327,15 @@
|
||||
"aY2pn1J3VHF_qV5XFM_zf"
|
||||
],
|
||||
"ui": {
|
||||
"x": 1158.9021,
|
||||
"y": 2142.6056,
|
||||
"x": 1086.7498,
|
||||
"y": 1832.4788,
|
||||
"zIndex": 2,
|
||||
"widthName": 60,
|
||||
"widthComment": 60,
|
||||
"color": ""
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1758759786248,
|
||||
"updateAt": 1758849792568,
|
||||
"createAt": 1745819764137
|
||||
}
|
||||
},
|
||||
@ -854,15 +855,15 @@
|
||||
"S-_BBM4Qv5LCTvGVKmQQw"
|
||||
],
|
||||
"ui": {
|
||||
"x": 1821.1787,
|
||||
"y": 1819.4106,
|
||||
"x": 1995.8626,
|
||||
"y": 1900.4232,
|
||||
"zIndex": 4045,
|
||||
"widthName": 60,
|
||||
"widthComment": 201,
|
||||
"color": ""
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1758513193576,
|
||||
"updateAt": 1758849606246,
|
||||
"createAt": 1755244574868
|
||||
}
|
||||
},
|
||||
@ -1027,15 +1028,15 @@
|
||||
"LrJ1wi95G76oooLA-9Etg"
|
||||
],
|
||||
"ui": {
|
||||
"x": 603.7978,
|
||||
"y": 2021.25,
|
||||
"x": 630.3799,
|
||||
"y": 2273.1488,
|
||||
"zIndex": 5380,
|
||||
"widthName": 60,
|
||||
"widthComment": 60,
|
||||
"color": ""
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1758759928890,
|
||||
"updateAt": 1758849634812,
|
||||
"createAt": 1758759596462
|
||||
}
|
||||
},
|
||||
@ -1104,15 +1105,15 @@
|
||||
"s-UqSelR4i1Nkogv6fWsD"
|
||||
],
|
||||
"ui": {
|
||||
"x": 607.5948,
|
||||
"y": 2317.4523,
|
||||
"x": 630.3796,
|
||||
"y": 2570.6169,
|
||||
"zIndex": 5440,
|
||||
"widthName": 60,
|
||||
"widthComment": 60,
|
||||
"color": ""
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1758762827598,
|
||||
"updateAt": 1758849630889,
|
||||
"createAt": 1758760696242
|
||||
}
|
||||
}
|
||||
@ -9417,6 +9418,26 @@
|
||||
"updateAt": 1758762826114,
|
||||
"createAt": 1758762826113
|
||||
}
|
||||
},
|
||||
"I8DumSwkLWz-Ve5_vc0uE": {
|
||||
"id": "I8DumSwkLWz-Ve5_vc0uE",
|
||||
"tableId": "B4qGh3KZsXHQ3_4EOgwJZ",
|
||||
"name": "type",
|
||||
"comment": "서비스형식((일반, 자사,코로케이션 등)",
|
||||
"dataType": "VARCHAR(20)",
|
||||
"default": "",
|
||||
"options": 8,
|
||||
"ui": {
|
||||
"keys": 0,
|
||||
"widthName": 60,
|
||||
"widthComment": 205,
|
||||
"widthDataType": 75,
|
||||
"widthDefault": 60
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1758849665144,
|
||||
"createAt": 1758849665142
|
||||
}
|
||||
}
|
||||
},
|
||||
"relationshipEntities": {
|
||||
@ -9822,8 +9843,8 @@
|
||||
"columnIds": [
|
||||
"RITMHZcQAJ7KvtxkTtMv-"
|
||||
],
|
||||
"x": 1551.9021,
|
||||
"y": 2142.6056,
|
||||
"x": 1581.7498,
|
||||
"y": 1832.4788,
|
||||
"direction": 4
|
||||
},
|
||||
"end": {
|
||||
@ -9850,8 +9871,8 @@
|
||||
"columnIds": [
|
||||
"RITMHZcQAJ7KvtxkTtMv-"
|
||||
],
|
||||
"x": 1682.9021,
|
||||
"y": 2372.6056,
|
||||
"x": 1746.7498,
|
||||
"y": 2062.4788,
|
||||
"direction": 2
|
||||
},
|
||||
"end": {
|
||||
@ -9859,8 +9880,8 @@
|
||||
"columnIds": [
|
||||
"GtBqjKsmtYWvsd0fckBc0"
|
||||
],
|
||||
"x": 1821.1787,
|
||||
"y": 2113.4106,
|
||||
"x": 1995.8626,
|
||||
"y": 2194.4232,
|
||||
"direction": 1
|
||||
},
|
||||
"meta": {
|
||||
@ -9887,8 +9908,8 @@
|
||||
"columnIds": [
|
||||
"4iRyOhmW3b7kbiZT8lQyY"
|
||||
],
|
||||
"x": 1682.9021,
|
||||
"y": 2188.6056,
|
||||
"x": 1746.7498,
|
||||
"y": 1878.4788,
|
||||
"direction": 2
|
||||
},
|
||||
"meta": {
|
||||
@ -9915,8 +9936,8 @@
|
||||
"columnIds": [
|
||||
"JRdeV7n53lb1iSmmYnhHX"
|
||||
],
|
||||
"x": 1289.9021,
|
||||
"y": 2142.6056,
|
||||
"x": 1251.7498,
|
||||
"y": 1832.4788,
|
||||
"direction": 4
|
||||
},
|
||||
"meta": {
|
||||
@ -9962,8 +9983,8 @@
|
||||
"columnIds": [
|
||||
"RITMHZcQAJ7KvtxkTtMv-"
|
||||
],
|
||||
"x": 1158.9021,
|
||||
"y": 2326.6056,
|
||||
"x": 1086.7498,
|
||||
"y": 2016.4788,
|
||||
"direction": 1
|
||||
},
|
||||
"end": {
|
||||
@ -9990,8 +10011,8 @@
|
||||
"columnIds": [
|
||||
"RITMHZcQAJ7KvtxkTtMv-"
|
||||
],
|
||||
"x": 1682.9021,
|
||||
"y": 2464.6056,
|
||||
"x": 1746.7498,
|
||||
"y": 2154.4788,
|
||||
"direction": 2
|
||||
},
|
||||
"end": {
|
||||
@ -10083,8 +10104,8 @@
|
||||
"columnIds": [
|
||||
"7Tqt0jVOln16nire8AE2K"
|
||||
],
|
||||
"x": 2090.1787,
|
||||
"y": 1819.4106,
|
||||
"x": 2264.8626,
|
||||
"y": 1900.4232,
|
||||
"direction": 4
|
||||
},
|
||||
"meta": {
|
||||
@ -10167,8 +10188,8 @@
|
||||
"columnIds": [
|
||||
"q_IaRBb367b9mgGozh6jB"
|
||||
],
|
||||
"x": 1821.1787,
|
||||
"y": 1917.4106,
|
||||
"x": 1995.8626,
|
||||
"y": 1998.4232,
|
||||
"direction": 1
|
||||
},
|
||||
"meta": {
|
||||
@ -10232,34 +10253,6 @@
|
||||
"createAt": 1757047705587
|
||||
}
|
||||
},
|
||||
"hRJKHAzKFZj_GjTbfDqUC": {
|
||||
"id": "hRJKHAzKFZj_GjTbfDqUC",
|
||||
"identification": false,
|
||||
"relationshipType": 8,
|
||||
"startRelationshipType": 1,
|
||||
"start": {
|
||||
"tableId": "QCNA57Pi6A9dJDgybxS5v",
|
||||
"columnIds": [
|
||||
"GMPyqxaroK2OjQZnoCRwn"
|
||||
],
|
||||
"x": 2338.5336,
|
||||
"y": 853.2996666666667,
|
||||
"direction": 1
|
||||
},
|
||||
"end": {
|
||||
"tableId": "B4qGh3KZsXHQ3_4EOgwJZ",
|
||||
"columnIds": [
|
||||
"6fnpnhwe9G-y5QQ1j30W9"
|
||||
],
|
||||
"x": 1385.442266666667,
|
||||
"y": 2042.6057,
|
||||
"direction": 4
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1758500709809,
|
||||
"createAt": 1758500709809
|
||||
}
|
||||
},
|
||||
"45um-cLGZhGmT2PGzssrQ": {
|
||||
"id": "45um-cLGZhGmT2PGzssrQ",
|
||||
"identification": false,
|
||||
@ -10326,8 +10319,8 @@
|
||||
"columnIds": [
|
||||
"RITMHZcQAJ7KvtxkTtMv-"
|
||||
],
|
||||
"x": 1682.9021,
|
||||
"y": 2280.6056,
|
||||
"x": 1746.7498,
|
||||
"y": 1970.4788,
|
||||
"direction": 2
|
||||
},
|
||||
"end": {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -484,7 +484,7 @@ CREATE TABLE `serverinfo` (
|
||||
|
||||
LOCK TABLES `serverinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `serverinfo` DISABLE KEYS */;
|
||||
INSERT INTO `serverinfo` VALUES (17,820,52,'250922-M1','HP','HP DL360 Gen6',200000,'2025-08-31 15:00:00','0000-00-00 00:00:00','occupied','2025-09-25 08:29:40','2025-09-22 02:19:25',NULL),(18,1161,53,'250922-M18','HP','HP DL360 Gen7',400000,'2025-09-01 15:00:00',NULL,'occupied','2025-09-25 07:56:43','2025-09-22 02:21:51',NULL),(19,1087,54,'250922-M19','HP','HP DL360 Gen8',500000,'2025-09-02 15:00:00',NULL,'occupied','2025-09-25 08:36:43','2025-09-22 02:22:14',NULL),(20,NULL,NULL,'250922-M20','HP','HP DL360 Gen9',600000,'2025-09-03 15:00:00',NULL,'available',NULL,'2025-09-22 02:22:39',NULL),(21,NULL,NULL,'250922-M21','HP','HP DL360 Gen10',700000,'2025-09-04 15:00:00',NULL,'available',NULL,'2025-09-22 02:23:08',NULL),(22,NULL,NULL,'250922-M22','HP','Hitach HA3000',800000,'2025-09-05 15:00:00','0000-00-00 00:00:00','available','2025-09-22 02:23:53','2025-09-22 02:23:36',NULL);
|
||||
INSERT INTO `serverinfo` VALUES (17,820,52,'250922-M1','normal','HP DL360 Gen6',200000,'2025-08-31 15:00:00','0000-00-00 00:00:00','occupied','2025-09-26 01:28:25','2025-09-22 02:19:25',NULL),(18,1161,53,'250922-M18','normal','HP DL360 Gen7',400000,'2025-09-01 15:00:00',NULL,'occupied','2025-09-26 01:28:35','2025-09-22 02:21:51',NULL),(19,1087,54,'250922-M19','normal','HP DL360 Gen8',500000,'2025-09-02 15:00:00',NULL,'occupied','2025-09-26 01:28:44','2025-09-22 02:22:14',NULL),(20,820,52,'250922-M20','alternative','HP DL360 Gen9',600000,'2025-09-03 15:00:00',NULL,'occupied','2025-09-26 04:02:28','2025-09-22 02:22:39',NULL),(21,NULL,NULL,'250922-M21','normal','HP DL360 Gen10',700000,'2025-09-04 15:00:00',NULL,'available','2025-09-26 01:41:11','2025-09-22 02:23:08',NULL),(22,NULL,NULL,'250922-M22','normal','Hitach HA3000',800000,'2025-09-05 15:00:00','0000-00-00 00:00:00','available','2025-09-26 01:41:20','2025-09-22 02:23:36',NULL);
|
||||
/*!40000 ALTER TABLE `serverinfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@ -545,7 +545,6 @@ CREATE TABLE `serviceinfo` (
|
||||
`payment_uid` int(11) DEFAULT NULL,
|
||||
`code` varchar(20) NOT NULL COMMENT '서비스코드',
|
||||
`site` varchar(20) NOT NULL DEFAULT 'prime' COMMENT 'Site구분',
|
||||
`type` varchar(20) NOT NULL COMMENT '서비스형식((일반, 자사,코로케이션 등)',
|
||||
`location` varchar(20) NOT NULL DEFAULT 'chiba' COMMENT '지역코드(chiba,tokyo,3center등)',
|
||||
`rack` int(11) NOT NULL DEFAULT 0 COMMENT '상면비용',
|
||||
`line` int(11) NOT NULL DEFAULT 0 COMMENT '회선비용',
|
||||
@ -577,7 +576,7 @@ CREATE TABLE `serviceinfo` (
|
||||
|
||||
LOCK TABLES `serviceinfo` WRITE;
|
||||
/*!40000 ALTER TABLE `serviceinfo` DISABLE KEYS */;
|
||||
INSERT INTO `serviceinfo` VALUES (52,1,820,17,17,'prime_s68d4e145a474d','prime','normal','chiba',100000,300000,'2025-09-25',700000,'2025-09-25',NULL,NULL,'available','2025-09-25 08:30:39','2025-09-25 06:29:25',NULL),(53,1,1161,18,18,'itsolution_s68d4e1b6','itsolution','normal','chiba',100000,300000,'2025-09-25',900000,'2025-09-25',NULL,NULL,'available','2025-09-25 08:14:06','2025-09-25 06:31:18',NULL),(54,1,1087,19,20,'gdidc_s68d4ff1b03fab','gdidc','normal','chiba',100000,300000,'2025-09-25',900000,'2025-09-25',NULL,NULL,'available','2025-09-25 08:36:43','2025-09-25 08:36:43',NULL);
|
||||
INSERT INTO `serviceinfo` VALUES (52,1,820,17,17,'prime_s68d4e145a474d','prime','chiba',100000,300000,'2025-09-25',700000,'2025-09-25',NULL,NULL,'available','2025-09-25 08:30:39','2025-09-25 06:29:25',NULL),(53,1,1161,18,18,'itsolution_s68d4e1b6','itsolution','chiba',100000,300000,'2025-09-25',900000,'2025-09-25',NULL,NULL,'available','2025-09-25 08:14:06','2025-09-25 06:31:18',NULL),(54,1,1087,19,20,'gdidc_s68d4ff1b03fab','gdidc','chiba',100000,300000,'2025-09-25',900000,'2025-09-25',NULL,NULL,'available','2025-09-25 08:36:43','2025-09-25 08:36:43',NULL);
|
||||
/*!40000 ALTER TABLE `serviceinfo` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@ -726,4 +725,4 @@ UNLOCK TABLES;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2025-09-25 17:52:38
|
||||
-- Dump completed on 2025-09-26 13:04:46
|
||||
|
||||
@ -52,10 +52,6 @@ class ServiceEntity extends CustomerEntity
|
||||
{
|
||||
return $this->attributes['site'] ?? "";
|
||||
}
|
||||
public function getType(): string
|
||||
{
|
||||
return $this->attributes['type'] ?? "";
|
||||
}
|
||||
final public function getLocation(): string
|
||||
{
|
||||
return $this->attributes['location'] ?? "";
|
||||
|
||||
@ -26,4 +26,8 @@ class ServerEntity extends EquipmentEntity
|
||||
{
|
||||
return $this->attributes['price'] ?? 0;
|
||||
}
|
||||
public function getType(): string
|
||||
{
|
||||
return $this->attributes['type'] ?? "";
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,18 +57,6 @@ class ServerPartHelper extends EquipmentHelper
|
||||
$attributes = ['data-title' => 'getTitle', 'data-price' => 'getPrice'];
|
||||
$form = $this->form_dropdown_common($field, $value, $viewDatas, $extras, $attributes);
|
||||
break;
|
||||
// case 'billing':
|
||||
// //결제방식이 항상 매월지급으로 설정되는 항목형식(IP,CS)
|
||||
// if (array_key_exists('type', $viewDatas['control']['form_datas'])) {
|
||||
// switch ($viewDatas['control']['form_datas']['type']) {
|
||||
// case 'IP':
|
||||
// case 'CS':
|
||||
// $value = PAYMENT['BILLING']['MONTH'];
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// $form = parent::getFieldForm($field, $value, $viewDatas, $extras);;
|
||||
// break;
|
||||
case 'extra':
|
||||
if (array_key_exists('type', $viewDatas['control']['form_datas']) && $viewDatas['control']['form_datas']['type'] === 'DISK') {
|
||||
$options = ["" => lang("{$viewDatas['class_path']}.label.{$field}") . " 선택", ...lang("{$viewDatas['class_path']}.EXTRA.{$viewDatas['control']['form_datas']['type']}")];
|
||||
@ -86,10 +74,11 @@ class ServerPartHelper extends EquipmentHelper
|
||||
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
|
||||
{
|
||||
switch ($field) {
|
||||
case 'Server':
|
||||
case 'SERVER':
|
||||
if (array_key_exists('serverEntity', $viewDatas)) {
|
||||
$value = form_label(
|
||||
$value,
|
||||
|
||||
$value ? $value : "[" . lang("Equipment/Server.TYPE")[$viewDatas['serverEntity']->getType()] . "] " . $viewDatas['serverEntity']->getCode(),
|
||||
$field,
|
||||
[
|
||||
"data-src" => "/admin/equipment/server/modify/{$viewDatas['serverEntity']->getPK()}?ActionTemplate=popup",
|
||||
|
||||
@ -7,7 +7,6 @@ return [
|
||||
'serverinfo_uid' => "서버",
|
||||
'site' => "사이트",
|
||||
'code' => "코드",
|
||||
'type' => "형식",
|
||||
'location' => "위치",
|
||||
'rack' => "상면비",
|
||||
'line' => "회선비",
|
||||
@ -27,17 +26,7 @@ return [
|
||||
"tokyo" => "도쿄",
|
||||
"3center" => "3센터",
|
||||
],
|
||||
"TYPE" => [
|
||||
"normal" => "일반",
|
||||
"defence" => "방어",
|
||||
"dedicated" => "전용",
|
||||
"vpn" => "VPN",
|
||||
"event" => "이벤트",
|
||||
"test" => "테스트",
|
||||
"alternative" => "대체",
|
||||
"ours" => "자사용",
|
||||
"colocation" => "코로케이션",
|
||||
],
|
||||
|
||||
"RACK" => [
|
||||
"0" => "0원",
|
||||
"100000" => "10만원",
|
||||
|
||||
@ -5,7 +5,7 @@ return [
|
||||
'clientinfo_uid' => "고객번호",
|
||||
'serviceinfo_uid' => "서비스번호",
|
||||
'code' => "장비번호",
|
||||
'type' => "장비벤더",
|
||||
'type' => "형식",
|
||||
'title' => "모델명",
|
||||
'price' => "기본가",
|
||||
'manufactur_at' => "입고일",
|
||||
@ -16,9 +16,16 @@ return [
|
||||
'deleted_at' => "삭제일",
|
||||
"serverpartinfo" => "부품정보",
|
||||
],
|
||||
"TYPE" => [
|
||||
'HP' => "HP",
|
||||
"INTEL" => "INTEL",
|
||||
"TYPE" => [
|
||||
"normal" => "일반",
|
||||
"defence" => "방어",
|
||||
"dedicated" => "전용",
|
||||
"vpn" => "VPN",
|
||||
"event" => "이벤트",
|
||||
"test" => "테스트",
|
||||
"alternative" => "대체",
|
||||
"ours" => "자사용",
|
||||
"colocation" => "코로케이션",
|
||||
],
|
||||
"TITLE" => [
|
||||
"HP DL360 Gen6" => "HP DL360 Gen6",
|
||||
|
||||
@ -22,7 +22,6 @@ class ServiceModel extends CustomerModel
|
||||
"code",
|
||||
"site",
|
||||
"location",
|
||||
"type",
|
||||
"rack",
|
||||
"line",
|
||||
"billing_at",
|
||||
@ -55,7 +54,6 @@ class ServiceModel extends CustomerModel
|
||||
$rule = "permit_empty|numeric";
|
||||
break;
|
||||
case "site":
|
||||
case "type":
|
||||
case "location":
|
||||
case "status":
|
||||
$rule = "required|trim|string";
|
||||
|
||||
@ -179,10 +179,6 @@ abstract class CommonService
|
||||
foreach ($this->getModel()->select(implode(',', $columns))->findAll() as $entity) {
|
||||
$entities[$entity->getPK()] = $this->getEntity_process($entity);
|
||||
}
|
||||
$debug = sprintf("debug.%s.%s", str_replace("\\", ".", get_class($this)), __FUNCTION__);
|
||||
if (env($debug, false)) {
|
||||
echo $debug . "=>" . $this->getModel()->getLastQuery() . "<BR>";
|
||||
}
|
||||
return $entities;
|
||||
}
|
||||
final public function getEntities(mixed $where = null, array $columns = ['*']): array
|
||||
@ -191,7 +187,7 @@ abstract class CommonService
|
||||
$entities = $this->getEntities_process($where, $columns);
|
||||
$debug = sprintf("debug.%s.%s", str_replace("\\", ".", get_class($this)), __FUNCTION__);
|
||||
if (env($debug, false)) {
|
||||
echo $this->getModel()->getLastQuery() . "<BR>";
|
||||
echo $this->getModel()->getLastQuery();
|
||||
}
|
||||
return $entities;
|
||||
} catch (\Exception $e) {
|
||||
|
||||
@ -5,12 +5,15 @@ namespace App\Services\Customer;
|
||||
use App\Entities\Customer\ClientEntity;
|
||||
use App\Helpers\Customer\ClientHelper;
|
||||
use App\Models\Customer\ClientModel;
|
||||
use App\Services\Customer\ServiceService;
|
||||
use App\Services\Equipment\ServerService;
|
||||
use App\Services\PaymentService;
|
||||
|
||||
class ClientService extends CustomerService
|
||||
{
|
||||
private ?ClientService $_clientService = null;
|
||||
private ?ServiceService $_serviceService = null;
|
||||
private ?ServerService $_serverService = null;
|
||||
private ?PaymentService $_paymentService = null;
|
||||
public function __construct()
|
||||
{
|
||||
@ -69,6 +72,13 @@ class ClientService extends CustomerService
|
||||
}
|
||||
return $this->_serviceService;
|
||||
}
|
||||
public function getServerService(): ServerService
|
||||
{
|
||||
if (!$this->_serverService) {
|
||||
$this->_serverService = new ServerService();
|
||||
}
|
||||
return $this->_serverService;
|
||||
}
|
||||
final public function getPaymentService(): PaymentService
|
||||
{
|
||||
if (!$this->_paymentService) {
|
||||
|
||||
@ -26,7 +26,6 @@ class ServiceService extends CustomerService
|
||||
return [
|
||||
"site",
|
||||
"location",
|
||||
"type",
|
||||
"clientinfo_uid",
|
||||
'serverinfo_uid',
|
||||
"rack",
|
||||
@ -43,7 +42,6 @@ class ServiceService extends CustomerService
|
||||
return [
|
||||
'site',
|
||||
'location',
|
||||
'type',
|
||||
'clientinfo_uid',
|
||||
'serverinfo_uid',
|
||||
'rack',
|
||||
@ -56,7 +54,6 @@ class ServiceService extends CustomerService
|
||||
return [
|
||||
'site',
|
||||
'location',
|
||||
'type',
|
||||
'clientinfo_uid',
|
||||
'serverinfo_uid',
|
||||
'amount',
|
||||
@ -71,7 +68,6 @@ class ServiceService extends CustomerService
|
||||
return [
|
||||
'site',
|
||||
'location',
|
||||
'type',
|
||||
'clientinfo_uid',
|
||||
'serverinfo_uid',
|
||||
'user_uid', //home의 최신신규서버현황에서 사용
|
||||
@ -80,7 +76,7 @@ class ServiceService extends CustomerService
|
||||
}
|
||||
public function getBatchjobFields(): array
|
||||
{
|
||||
return ['site', 'location', 'type', 'clientinfo_uid', 'status'];
|
||||
return ['site', 'location', 'clientinfo_uid', 'status'];
|
||||
}
|
||||
public function getFormRule(string $action, string $field): string
|
||||
{
|
||||
@ -142,54 +138,6 @@ class ServiceService extends CustomerService
|
||||
{
|
||||
return $this->getEntities(sprintf("start_at >= NOW()-INTERVAL {$interval} DAY AND status = '%s'", $status));
|
||||
}
|
||||
final public function getTotalServiceCount(array $where = []): array
|
||||
{
|
||||
$rows = $this->getModel()->groupBy(['site', 'type'])->select("site,type,
|
||||
COUNT(CASE WHEN location = 'chiba' THEN 1 END) AS chiba,
|
||||
COUNT(CASE WHEN location = 'tokyo' THEN 1 END) AS tokyo,
|
||||
COUNT(CASE WHEN location IN ('chiba', 'tokyo') THEN 1 END) AS summary")
|
||||
->where($where)
|
||||
->get()->getResult();
|
||||
|
||||
$totalCounts = [
|
||||
'normal' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'defence' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'dedicated' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'vpn' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'event' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'test' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'alternative' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0]
|
||||
];
|
||||
foreach ($rows as $row) {
|
||||
// echo "site:{$row->site},type:{$row->type}";
|
||||
if (!array_key_exists($row->site, $totalCounts)) {
|
||||
$totalCounts[$row->site] = [
|
||||
'chiba_summary' => 0,
|
||||
'tokyo_summary' => 0,
|
||||
'all_summary' => 0,
|
||||
'normal' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'defence' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'dedicated' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'vpn' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'event' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'test' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'alternative' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
];
|
||||
}
|
||||
if (!array_key_exists($row->type, $totalCounts[$row->site])) {
|
||||
$totalCounts[$row->site][$row->type] = [];
|
||||
}
|
||||
$totalCounts[$row->type]['chiba'] += $totalCounts[$row->site][$row->type]['chiba'] = $row->chiba;
|
||||
$totalCounts[$row->type]['tokyo'] += $totalCounts[$row->site][$row->type]['tokyo'] = $row->tokyo;
|
||||
$totalCounts[$row->type]['summary'] += $totalCounts[$row->site][$row->type]['summary'] = $row->summary;
|
||||
$totalCounts[$row->site]['chiba_summary'] += $row->chiba;
|
||||
$totalCounts[$row->site]['tokyo_summary'] += $row->tokyo;
|
||||
$totalCounts[$row->site]['all_summary'] = $totalCounts[$row->site]['chiba_summary'] + $totalCounts[$row->site]['tokyo_summary'];
|
||||
}
|
||||
// dd($totalCounts);
|
||||
return $totalCounts;
|
||||
}
|
||||
|
||||
//서비스별 총 금액
|
||||
final public function getTotalAmounts($where = []): array
|
||||
{
|
||||
|
||||
@ -14,16 +14,7 @@ class ServiceService extends ParentService implements ServerInterface
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
private function action_process(ServerEntity $serverEntity): ServiceEntity
|
||||
{
|
||||
//Service Entity 가져오기
|
||||
$entity = $this->getEntity($serverEntity->getServiceInfoUID());
|
||||
if (!$entity instanceof ServiceEntity) {
|
||||
throw new \Exception("[{$serverEntity->getServiceInfoUID()}]에 대한 서비스정보를 찾을수 없습니다.");
|
||||
}
|
||||
//서비스금액변경 사항이 있는지 확인후 처리
|
||||
return $this->setAmount($entity);
|
||||
}
|
||||
|
||||
public function createServer(ServerEntity $serverEntity): ServerEntity
|
||||
{
|
||||
//아무것도 하지 않음
|
||||
@ -31,7 +22,16 @@ class ServiceService extends ParentService implements ServerInterface
|
||||
}
|
||||
public function modifyServer(ServerEntity $serverEntity): ServerEntity
|
||||
{
|
||||
$this->action_process($serverEntity);
|
||||
//서비스정보가 NULL이 아니고 형식이 대체(alternative)가 아닌경우만 적용
|
||||
if ($serverEntity->getServiceInfoUID() !== null && $serverEntity->getType() !== "alternative") {
|
||||
//Service Entity 가져오기
|
||||
$entity = $this->getEntity($serverEntity->getServiceInfoUID());
|
||||
if (!$entity instanceof ServiceEntity) {
|
||||
throw new \Exception("[{$serverEntity->getServiceInfoUID()}]에 대한 서비스정보를 찾을수 없습니다.");
|
||||
}
|
||||
//서비스금액변경 사항이 있는지 확인후 처리
|
||||
$entity = $this->setAmount($entity);
|
||||
}
|
||||
return $serverEntity;
|
||||
}
|
||||
public function deleteServer(ServerEntity $serverEntity): ServerEntity
|
||||
|
||||
@ -85,6 +85,41 @@ class ServerService extends EquipmentService
|
||||
}
|
||||
return $entity;
|
||||
}
|
||||
final public function getTotalServiceCount(array $where = []): array
|
||||
{
|
||||
$totalCounts = [
|
||||
'chiba_summary' => 0,
|
||||
'tokyo_summary' => 0,
|
||||
'all_summary' => 0,
|
||||
'normal' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'defence' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'dedicated' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'vpn' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'event' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'test' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
'alternative' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||
];
|
||||
$rows = $this->getModel()
|
||||
->select("serverinfo.type,
|
||||
COUNT(CASE WHEN serviceinfo.location = 'chiba' THEN 1 END) AS chiba,
|
||||
COUNT(CASE WHEN serviceinfo.location = 'tokyo' THEN 1 END) AS tokyo,
|
||||
COUNT(CASE WHEN serviceinfo.location IN ('chiba', 'tokyo') THEN 1 END) AS summary")
|
||||
->join('serviceinfo', 'serviceinfo.uid = serverinfo.serviceinfo_uid') // JOIN 조건
|
||||
->where($where)
|
||||
->groupBy('serverinfo.type')
|
||||
->get()
|
||||
->getResult();
|
||||
foreach ($rows as $row) {
|
||||
$totalCounts[$row->type]['chiba'] = $row->chiba;
|
||||
$totalCounts[$row->type]['tokyo'] = $row->tokyo;
|
||||
$totalCounts[$row->type]['summary'] = $row->summary;
|
||||
$totalCounts['chiba_summary'] += $row->chiba;
|
||||
$totalCounts['tokyo_summary'] += $row->tokyo;
|
||||
$totalCounts['all_summary'] = $totalCounts['chiba_summary'] + $totalCounts['tokyo_summary'];
|
||||
}
|
||||
// dd($totalCounts);
|
||||
return $totalCounts;
|
||||
}
|
||||
//기본 기능부분
|
||||
//FieldForm관련용
|
||||
public function getFormOption(string $field, $options = []): array
|
||||
|
||||
@ -50,19 +50,19 @@
|
||||
<th>전체미납금</th>
|
||||
</tr>
|
||||
<tr class="text-center">
|
||||
<td><?= $viewDatas['totalCounts'][$viewDatas['entity']->getSite()]['tokyo_summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$viewDatas['entity']->getSite()]['chiba_summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$viewDatas['entity']->getSite()]['vpn']['summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$viewDatas['entity']->getSite()]['normal']['summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$viewDatas['entity']->getSite()]['defence']['summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$viewDatas['entity']->getSite()]['dedicated']['summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$viewDatas['entity']->getSite()]['event']['summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$viewDatas['entity']->getSite()]['test']['summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$viewDatas['entity']->getSite()]['alternative']['summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts']['tokyo_summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts']['chiba_summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts']['vpn']['summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts']['normal']['summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts']['defence']['summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts']['dedicated']['summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts']['event']['summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts']['test']['summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts']['alternative']['summary'] ?></td>
|
||||
<td><?= $viewDatas['entity']->getCouponBalance() ?>%</td>
|
||||
<td><?= $viewDatas['entity']->getSaleRate() ?>%</td>
|
||||
<td><?= $viewDatas['entity']->getAccountBalance() ?></td>
|
||||
<td><?= array_key_exists($viewDatas['entity']->getPK(), $viewDatas['totalAmounts']) ? number_format($viewDatas['totalAmounts'][$viewDatas['entity']->getPK()]) : 0 ?></td>
|
||||
<td><?= number_format($viewDatas['entity']->getAccountBalance()) ?>원</td>
|
||||
<td><?= array_key_exists($viewDatas['entity']->getPK(), $viewDatas['totalAmounts']) ? number_format($viewDatas['totalAmounts'][$viewDatas['entity']->getPK()]) : 0 ?>원</td>
|
||||
<td><?= array_key_exists($viewDatas['entity']->getPK(), $viewDatas['unPaids']) ? "총:" . $viewDatas['unPaids'][$viewDatas['entity']->getPK()]['cnt'] . "건/" . number_format($viewDatas['unPaids'][$viewDatas['entity']->getPK()]['amount']) : 0 ?>원</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -33,20 +33,15 @@
|
||||
<table class="index_table data table table-bordered table-hover table-striped" data-rtc-resizable-table="reisze_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="index_head_short_column">번호</th>
|
||||
<th class="index_head_short_column" style="width:40px;">번호</th>
|
||||
<th class="index_head_short_column">
|
||||
<?= $viewDatas['service']->getHelper()->getListLabel('site', lang("{$viewDatas['class_path']}.label.site"), $viewDatas) ?>
|
||||
</th>
|
||||
<th class="index_head_short_column">
|
||||
<?= $viewDatas['service']->getHelper()->getListLabel('location', lang("{$viewDatas['class_path']}.label.location"), $viewDatas) ?>
|
||||
</th>
|
||||
<th class="index_head_short_column">
|
||||
<?= $viewDatas['service']->getHelper()->getListLabel('type', lang("{$viewDatas['class_path']}.label.type"), $viewDatas) ?>
|
||||
/ <?= $viewDatas['service']->getHelper()->getListLabel('location', lang("{$viewDatas['class_path']}.label.location"), $viewDatas) ?>
|
||||
</th>
|
||||
<th class="index_head_short_column">
|
||||
<?= $viewDatas['service']->getHelper()->getListLabel('clientinfo_uid', lang("{$viewDatas['class_path']}.label.clientinfo_uid"), $viewDatas) ?>
|
||||
</th>
|
||||
<th class="index_head_short_column" style="width:500px;">
|
||||
<th class="index_head_short_column" style="width:650px;">
|
||||
서버정보<div class="float-end rounded border border-primary" style="cursor:pointer;" onclick="copyServerPartsToClipboard()">All COPY</div>
|
||||
</th>
|
||||
<th class="index_head_short_column">
|
||||
@ -72,23 +67,12 @@
|
||||
<td nowrap><?= $viewDatas['service']->getHelper()->getListButton('modify', $num, $viewDatas) ?></td>
|
||||
<td nowrap>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('site', $entity->site, $viewDatas) ?>
|
||||
</td>
|
||||
<td nowrap>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('location', $entity->location, $viewDatas) ?>
|
||||
</td>
|
||||
<td nowrap>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('type', $entity->type, $viewDatas) ?>
|
||||
/ <?= $viewDatas['service']->getHelper()->getFieldView('location', $entity->location, $viewDatas) ?>
|
||||
</td>
|
||||
<td nowrap>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('clientinfo_uid', $entity->clientinfo_uid, $viewDatas) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= view_cell("\App\Cells\Equipment\ServerPartCell::parttable", [
|
||||
'serverinfo_uid' => $entity->getServerEntity()->getPK(),
|
||||
'types' => SERVERPART['SERVICE_PARTTYPES'],
|
||||
'template' => 'partlist_service'
|
||||
]) ?>
|
||||
</td>
|
||||
<td nowrap><?= implode("", $viewDatas['childServers'][$entity->getPK()]) ?></td>
|
||||
<td nowrap>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('amount', $entity->amount, $viewDatas) ?>
|
||||
</td>
|
||||
|
||||
@ -13,7 +13,6 @@
|
||||
<tr class="text-center">
|
||||
<th>사이트</th>
|
||||
<th>업체명</th>
|
||||
<th>구분</th>
|
||||
<th>
|
||||
장비번호 / 스위치정보 / IP정보 / CS정보
|
||||
<div class="float-end rounded border border-primary" style="cursor:pointer;" onclick="copyServerPartsToClipboard()">All COPY</div>
|
||||
@ -27,12 +26,11 @@
|
||||
<tr class="text-center">
|
||||
<td><?= SITES[$entity->getSite()] ?></td>
|
||||
<td nowrap><?= $viewDatas['service']->getHelper()->getFieldView('clientinfo_uid', $entity->getClientInfoUID(), $viewDatas) ?></td>
|
||||
<td nowrap><?= $viewDatas['service']->getHelper()->getFieldView('type', $entity->getType(), $viewDatas) ?></td>
|
||||
<td><?= view_cell("\App\Cells\Equipment\ServerPartCell::parttable", [
|
||||
'serverinfo_uid' => $entity->getServerEntity()->getPK(),
|
||||
'types' => SERVERPART['SERVICE_PARTTYPES'],
|
||||
'template' => 'partlist_service'
|
||||
]) ?></td>
|
||||
<td class="text-start"><?= view_cell("\App\Cells\Equipment\ServerPartCell::parttable", [
|
||||
'serverinfo_uid' => $entity->getServerEntity()->getPK(),
|
||||
'types' => SERVERPART['SERVICE_PARTTYPES'],
|
||||
'template' => 'partlist_service'
|
||||
]) ?></td>
|
||||
<td nowrap><?= $viewDatas['service']->getHelper()->getFieldView('user_uid', $entity->getUserUID(), $viewDatas) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
|
||||
@ -8,6 +8,52 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||
<?= view_cell("\App\Cells\Customer\ServiceCell::totalCountDashboard") ?>
|
||||
<table class="table table-bordered table-hover align-middle">
|
||||
<tr class="text-center">
|
||||
<th rowspan="2">고객명</th>
|
||||
<th colspan="2">일반</th>
|
||||
<th colspan="2">방어</th>
|
||||
<th colspan="2">전용</th>
|
||||
<th colspan="2">대체</th>
|
||||
<th colspan="3">테스트</th>
|
||||
<th colspan="3">합계</th>
|
||||
</tr>
|
||||
<tr class="text-center">
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>합계</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>합계</th>
|
||||
</tr>
|
||||
<?= view_cell("\App\Cells\Equipment\ServerCell::totalCountDashboard", ['where' => ['serviceinfo.site' => 'PRIME']]) ?>
|
||||
<?= view_cell("\App\Cells\Equipment\ServerCell::totalCountDashboard", ['where' => ['serviceinfo.site' => 'ITSOLUTION']]) ?>
|
||||
<?= view_cell("\App\Cells\Equipment\ServerCell::totalCountDashboard", ['where' => ['serviceinfo.site' => 'GDIDC']]) ?>
|
||||
<tr class="text-center">
|
||||
<td>총합계</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="layout_footer"></div>
|
||||
17
app/Views/cells/server/totalCountDashboard.php
Normal file
17
app/Views/cells/server/totalCountDashboard.php
Normal file
@ -0,0 +1,17 @@
|
||||
<tr class="text-center">
|
||||
<td><?= $serviceCellDatas['label'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['normal']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['normal']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['defence']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['defence']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['dedicated']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['dedicated']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['alternative']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['alternative']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['test']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['test']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['test']['summary'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['tokyo_summary'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['chiba_summary'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts']['all_summary'] ?></td>
|
||||
</tr>
|
||||
@ -20,4 +20,4 @@
|
||||
<?php $view_texts[] = implode(',', $texts[$type]) ?>
|
||||
<?php endforeach ?>
|
||||
<?php $text = implode(" / ", $view_texts) ?>
|
||||
<div class="serverparts float-end rounded border border-primary" style="cursor:pointer;" onClick="copyServerPartToClipboard('<?= $text ?>')" text-data="<?= $text ?>">COPY</div>
|
||||
<span class="serverparts float-end rounded border border-primary" style="cursor:pointer;" onClick="copyServerPartToClipboard('<?= $text ?>')" text-data="<?= $text ?>">COPY</span>
|
||||
@ -10,14 +10,13 @@
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
<?php $view_htmls = [$serverPartCellDatas['service']->getHelper()->getFieldView('Server', $serverPartCellDatas['serverEntity']->getCode(), $serverPartCellDatas)] ?>
|
||||
<?php $view_htmls = [$serverPartCellDatas['service']->getHelper()->getFieldView('SERVER', "", $serverPartCellDatas)] ?>
|
||||
<?php foreach ($htmls as $type => $datas): ?>
|
||||
<?php $view_htmls[] = $serverPartCellDatas['service']->getHelper()->getListButton($type, '', $serverPartCellDatas) . implode(",", $datas) ?>
|
||||
<?php endforeach ?>
|
||||
<?= implode(" / ", $view_htmls) ?>
|
||||
<?php $view_texts = [!$serverPartCellDatas['serverEntity'] ? "" : $serverPartCellDatas['serverEntity']->getCode()] ?>
|
||||
<?php foreach ($htmls as $type => $datas): ?>
|
||||
<?php $view_texts[] = implode(',', $texts[$type]) ?>
|
||||
<?php foreach ($texts as $type => $datas): ?>
|
||||
<?php $view_texts[] = implode(',', $datas) ?>
|
||||
<?php endforeach ?>
|
||||
<?php $text = implode(" / ", $view_texts) ?>
|
||||
<div class="serverparts float-end rounded border border-primary" style="cursor:pointer;" onClick="copyServerPartToClipboard('<?= $text ?>')" text-data="<?= $text ?>">COPY</div>
|
||||
<div class="text-nowrap"><?= implode(" / ", $view_htmls) ?><span class="serverparts float-end rounded border border-primary" style="cursor:pointer;" onClick="copyServerPartToClipboard('<?= $text ?>')" text-data="<?= $text ?>">COPY</span></div>
|
||||
@ -27,7 +27,6 @@
|
||||
<td class="text-center">
|
||||
<div><?= $serviceCellDatas['service']->getHelper()->getFieldView('site', $entity->getSite(), $serviceCellDatas) ?></div>
|
||||
<div><?= $serviceCellDatas['service']->getHelper()->getFieldView('location', $entity->getLocation(), $serviceCellDatas) ?></div>
|
||||
<div><?= $serviceCellDatas['service']->getHelper()->getFieldView('type', $entity->getType(), $serviceCellDatas) ?></div>
|
||||
</td>
|
||||
<?= view_cell("\App\Cells\Equipment\ServerPartCell::parttable", [
|
||||
'serverinfo_uid' => $entity->getServerEntity()->getPK(),
|
||||
|
||||
@ -1,63 +0,0 @@
|
||||
<table class="table table-bordered table-hover align-middle">
|
||||
<tr class="text-center">
|
||||
<th rowspan="2">고객명</th>
|
||||
<th colspan="2">일반</th>
|
||||
<th colspan="2">방어</th>
|
||||
<th colspan="2">전용</th>
|
||||
<th colspan="2">대체</th>
|
||||
<th colspan="3">테스트</th>
|
||||
<th colspan="3">합계</th>
|
||||
</tr>
|
||||
<tr class="text-center">
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>합계</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>합계</th>
|
||||
</tr>
|
||||
<?php foreach (SITES as $key => $label): ?>
|
||||
<tr class="text-center">
|
||||
<td><?= $label ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['normal']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['normal']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['defence']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['defence']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['dedicated']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['dedicated']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['alternative']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['alternative']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['test']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['test']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['test']['summary'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['tokyo_summary'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['chiba_summary'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['all_summary'] ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
<tr class="text-center">
|
||||
<td>총합계</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
</table>
|
||||
Loading…
Reference in New Issue
Block a user