From 730e90a2aa402c8209bbc6cd7c94d0827d65cd0a Mon Sep 17 00:00:00 2001 From: "choi.jh" Date: Thu, 4 Sep 2025 13:45:50 +0900 Subject: [PATCH] dbmsv2_init...1 --- app/Config/Constants.php | 30 +- app/Config/Routes.php | 1 - .../Admin/Equipment/ServerController.php | 17 +- .../Admin/Equipment/ServerPartController.php | 2 - app/Controllers/CLI/Payment.php | 6 +- app/Database/dbmsv2.vuerd.json | 367 ++++++++---------- app/Entities/Customer/AccountEntity.php | 4 +- app/Entities/Customer/ClientEntity.php | 7 +- app/Entities/Customer/CouponEntity.php | 4 +- app/Entities/Customer/PaymentEntity.php | 6 +- app/Entities/Customer/PointEntity.php | 4 +- app/Entities/Customer/ServiceEntity.php | 5 +- app/Entities/Equipment/CSEntity.php | 5 +- app/Entities/Equipment/IPEntity.php | 5 +- app/Entities/Equipment/LineEntity.php | 5 +- app/Entities/Equipment/PartEntity.php | 5 +- app/Entities/Equipment/ServerEntity.php | 46 +-- app/Entities/Equipment/ServerPartEntity.php | 4 +- app/Entities/Equipment/SwitchEntity.php | 5 +- app/Entities/MyLogEntity.php | 4 +- app/Entities/UserEntity.php | 5 +- app/Entities/UserSNSEntity.php | 5 +- app/Helpers/Customer/ServiceHelper.php | 2 +- app/Helpers/Equipment/ServerHelper.php | 119 +----- app/Helpers/Equipment/ServerPartHelper.php | 127 +++++- app/Language/en/Customer/Account.php | 4 +- app/Language/en/Customer/Client.php | 6 +- app/Language/en/Customer/Coupon.php | 4 +- app/Language/en/Customer/Payment.php | 4 +- app/Language/en/Customer/Point.php | 4 +- app/Language/en/Customer/Service.php | 6 +- app/Language/en/Equipment/CS.php | 8 +- app/Language/en/Equipment/IP.php | 8 +- app/Language/en/Equipment/Line.php | 8 +- app/Language/en/Equipment/Part.php | 6 +- app/Language/en/Equipment/Server.php | 8 +- app/Language/en/Equipment/ServerPart.php | 2 +- app/Language/en/Equipment/Switch.php | 8 +- app/Language/en/MyLog.php | 4 +- app/Language/en/User.php | 6 +- .../DBMigration/Process/ClientProcess.php | 2 +- app/Models/Customer/PaymentModel.php | 2 +- app/Models/Equipment/ServerPartModel.php | 6 +- app/Services/Customer/AccountService.php | 2 +- app/Services/Customer/CouponService.php | 2 +- app/Services/Customer/PointService.php | 2 +- app/Services/Customer/ServiceService.php | 4 +- app/Services/Equipment/CSService.php | 19 - app/Services/Equipment/EquipmentService.php | 11 - app/Services/Equipment/IPService.php | 21 +- app/Services/Equipment/ServerPartService.php | 181 +++++++-- app/Services/Equipment/ServerService.php | 132 +------ app/Services/Equipment/SwitchService.php | 19 - app/Views/admin/server/create_form.php | 2 +- app/Views/admin/server/index.php | 7 +- app/Views/admin/server/index_org.php | 2 +- app/Views/admin/server/view.php | 26 +- app/Views/admin/serverpart/show.php | 8 + app/Views/admin/service/index.php | 2 +- app/Views/admin/service/view.php | 2 +- 60 files changed, 601 insertions(+), 727 deletions(-) create mode 100644 app/Views/admin/serverpart/show.php diff --git a/app/Config/Constants.php b/app/Config/Constants.php index bc4a2a1..3d4889f 100644 --- a/app/Config/Constants.php +++ b/app/Config/Constants.php @@ -362,17 +362,33 @@ define('LAYOUTS', [ //List의 Page당 갯수 define('DEFAULT_LIST_PERPAGE', $_ENV['LIST_PERPAGE'] ?? $_SERVER['LIST_PERPAGE'] ?? 20); -//서버 PartType -define("SERVER", [ - "PARTTYPES" => ['CPU', 'RAM', 'DISK'], +//STATUS +define("STATUS", [ + 'AVAIABLE' => "available", + 'FORBIDDEN' => "forbidden", + 'OCCUPIED' => "occupied", + 'SUCCESS' => "success", + 'FAILED' => "fail", + 'NORMAL' => "normal", + 'PAUSE' => "pause", + 'TERMINATED' => "terminated", + 'WIDTHDRAWAL' => "widthdrawal", + 'DEPOSIT' => "deposit", + 'PAID' => 'paid', + 'UNPAID' => 'unpaid', ]); - +//서버 관련 +define("SERVER", []); +//서비스 관련 define("SERVICE", [ "NEW_INTERVAL" => $_ENV['SERVICE_NEW_INTERVAL'] ?? $_SERVER['SERVICE_NEW_INTERVAL'] ?? 7, - "PARTTYPES" => ['CPU', 'RAM', 'DISK', 'DB', 'OS', 'SOFTWARE'], ]); - -//결제관련 +//서버파트 관련 +define("SERVERPART", [ + "CNT_RANGE" => array_combine(range(1, 10), range(1, 10)), + "PARTTYPES" => ['SWITCH', 'CPU', 'RAM', 'DISK', 'OS', 'DB', 'SOFTWARE', 'IP', 'CS'], +]); +//결제 관련 define("PAYMENT", [ 'BILLING' => [ 'MONTH' => 'month', diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 60d55a2..78e10d1 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -177,7 +177,6 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au $routes->get('toggle/(:num)/(:any)', 'ServerController::toggle/$1/$2'); $routes->post('batchjob', 'ServerController::batchjob'); $routes->post('batchjob_delete', 'ServerController::batchjob_delete'); - $routes->get('download/(:alpha)', 'ServerController::download/$1'); }); $routes->group('serverpart', ['namespace' => 'App\Controllers\Admin\Equipment'], function ($routes) { $routes->get('/', 'ServerPartController::index'); diff --git a/app/Controllers/Admin/Equipment/ServerController.php b/app/Controllers/Admin/Equipment/ServerController.php index 30c0fae..0d4c913 100644 --- a/app/Controllers/Admin/Equipment/ServerController.php +++ b/app/Controllers/Admin/Equipment/ServerController.php @@ -5,6 +5,7 @@ namespace App\Controllers\Admin\Equipment; use App\Entities\Equipment\ServerEntity; use App\Helpers\Equipment\ServerHelper; +use App\Helpers\Equipment\ServerPartHelper; use App\Services\Equipment\ServerService; use CodeIgniter\HTTP\RedirectResponse; use CodeIgniter\HTTP\RequestInterface; @@ -20,7 +21,6 @@ class ServerController extends EquipmentController $this->class_path .= $this->getService()->getClassName(); $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; - $this->partinfo_cnt_options = array_combine(range(1, 10), range(1, 10)); } public function getService(): ServerService { @@ -74,6 +74,8 @@ class ServerController extends EquipmentController (int)env("Server.Default.code", 0) ) ]); + //서버파트연결용 + $this->serverPartHelper = new ServerPartHelper(); parent::create_form_process(); } //생성 @@ -83,7 +85,6 @@ class ServerController extends EquipmentController $this->getService()->codeCheck($formDatas); return parent::create_process($formDatas); } - //수정 protected function modify_process(mixed $entity, array $formDatas): ServerEntity { @@ -91,4 +92,16 @@ class ServerController extends EquipmentController $this->getService()->codeCheck($formDatas); return parent::modify_process($entity, $formDatas); } + protected function view_process(mixed $entity): mixed + { + //서버파트연결용 + $this->serverPartHelper = new ServerPartHelper(); + return parent::view_process($entity); + } + protected function index_process(array $entities = []): array + { + //서버파트연결용 + $this->serverPartHelper = new ServerPartHelper(); + return parent::index_process($entities); + } } diff --git a/app/Controllers/Admin/Equipment/ServerPartController.php b/app/Controllers/Admin/Equipment/ServerPartController.php index b540e33..f4292a8 100644 --- a/app/Controllers/Admin/Equipment/ServerPartController.php +++ b/app/Controllers/Admin/Equipment/ServerPartController.php @@ -6,7 +6,6 @@ use App\Entities\Equipment\ServerPartEntity; use App\Helpers\Equipment\ServerPartHelper; use App\Services\Equipment\ServerPartService; -use CodeIgniter\HTTP\RedirectResponse; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use Psr\Log\LoggerInterface; @@ -20,7 +19,6 @@ class ServerPartController extends EquipmentController $this->class_path .= $this->getService()->getClassName(); $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; - $this->partinfo_cnt_options = array_combine(range(1, 10), range(1, 10)); } public function getService(): ServerPartService { diff --git a/app/Controllers/CLI/Payment.php b/app/Controllers/CLI/Payment.php index e21b4b1..499e419 100644 --- a/app/Controllers/CLI/Payment.php +++ b/app/Controllers/CLI/Payment.php @@ -32,15 +32,15 @@ class Payment extends BaseController $this->_db->transStart(); try { //서비스중 결제일이 오늘이고, 상태가 사용중이 경우만 서비스 모두 연장처리 - $this->getServiceService()->extendBillingAt(date('Y-m-d'), PaymentEntity::STATUS_UNPAID); + $this->getServiceService()->extendBillingAt(date('Y-m-d'), STATUS['UNPAID']); //결제일이 오늘보다 크고, 상태가 사용중인 서비스정보를 이용해서 결제정보에 신규 추가하기 - foreach ($this->getServiceService()->getEntities(['billing_at' => date("Y-m-d"), 'status' => ServiceEntity::STATUS_NORMAL]) as $serviceEntity) { + foreach ($this->getServiceService()->getEntities(['billing_at' => date("Y-m-d"), 'status' => ServiceEntity::DEFAULT_STATUS]) as $serviceEntity) { // echo $serviceEntity->getPK() . ":" . $serviceEntity->getBillingAt() . "\n"; foreach ($this->getServiceItemService()->getEntities(['serviceinfo_uid' => $serviceEntity->getPK()]) as $itemEntity) { //결제정보 ServicePaymentService에 월별 결제만 신규등록 if ($itemEntity->getBillingCycle() == "month") { //결제정보 ServicePaymentService에 등록 - $paymentFormDatas = ['status' => PaymentEntity::STATUS_UNPAID]; + $paymentFormDatas = ['status' => STATUS['UNPAID']]; $this->getServicePaymentService()->createByServiceItemService($paymentFormDatas, $itemEntity); } } diff --git a/app/Database/dbmsv2.vuerd.json b/app/Database/dbmsv2.vuerd.json index d8326a5..3ea21ea 100644 --- a/app/Database/dbmsv2.vuerd.json +++ b/app/Database/dbmsv2.vuerd.json @@ -4,9 +4,9 @@ "settings": { "width": 3000, "height": 3000, - "scrollTop": -1108.3031, - "scrollLeft": -588, - "zoomLevel": 0.76, + "scrollTop": -1805.1278, + "scrollLeft": -1141.7503, + "zoomLevel": 1, "show": 511, "database": 4, "databaseName": "", @@ -55,7 +55,6 @@ "wmEgQA24OTZKcWDKf8tSK", "Pq5Jn2IXFEMjYVBvdAwWg", "fp3dQLQSGF28FCgdXZVk1", - "FjAORncWifI_a1aI6e0LJ", "qVSQf-uiaof7exFrBC68_", "zOs903u-VzCEbWJraaxmw", "1p3LjLIbD9DdTZWgCMHXw", @@ -113,15 +112,15 @@ "w_EuwbTwtLEPAgYjS1aYq" ], "ui": { - "x": 1298.9121, - "y": 227.0855, + "x": 1598.9121, + "y": 219.9426, "zIndex": 2, "widthName": 60, "widthComment": 62, "color": "" }, "meta": { - "updateAt": 1756279440813, + "updateAt": 1756951973898, "createAt": 1745819764136 } }, @@ -175,15 +174,15 @@ "JEk5AASiK6MpT9QBRWjMX" ], "ui": { - "x": 1250.1794, - "y": 704.2103, + "x": 689.465, + "y": 922.0675, "zIndex": 2, "widthName": 60, "widthComment": 60, "color": "" }, "meta": { - "updateAt": 1756279482646, + "updateAt": 1756951977870, "createAt": 1745819764137 } }, @@ -319,15 +318,15 @@ "aY2pn1J3VHF_qV5XFM_zf" ], "ui": { - "x": 2264.5612, - "y": 1964.677, + "x": 1216.2756, + "y": 1620.1057, "zIndex": 2, "widthName": 60, "widthComment": 60, "color": "" }, "meta": { - "updateAt": 1756279464511, + "updateAt": 1756951983406, "createAt": 1745819764137 } }, @@ -368,15 +367,15 @@ "xvHi50lODgZs-Ke-lH95g" ], "ui": { - "x": 66.565, - "y": 2125.8862, + "x": 889.129, + "y": 2138.0891, "zIndex": 2, "widthName": 60, "widthComment": 60, "color": "" }, "meta": { - "updateAt": 1756778060089, + "updateAt": 1756951951547, "createAt": 1745819764138 } }, @@ -421,15 +420,15 @@ "ZgRRNC6OFpn87uomKBHbH" ], "ui": { - "x": 62.9566, - "y": 1781.5745, + "x": 55.2992, + "y": 1309.3218, "zIndex": 2, "widthName": 60, "widthComment": 60, "color": "" }, "meta": { - "updateAt": 1756279413496, + "updateAt": 1756951933749, "createAt": 1745819764138 } }, @@ -487,15 +486,15 @@ "CX9ODlVw-gFnxgfMJ1JyV" ], "ui": { - "x": 758.8735, - "y": 1837.6814, + "x": 201.8242, + "y": 1753.7017, "zIndex": 2, "widthName": 60, "widthComment": 60, "color": "" }, "meta": { - "updateAt": 1756279479074, + "updateAt": 1756951935884, "createAt": 1745819764138 } }, @@ -642,15 +641,15 @@ "n9ZWAQ9754sZ3MM4IxCAA" ], "ui": { - "x": 2195.6764, - "y": 573.0616, + "x": 2338.5336, + "y": 526.633, "zIndex": 2278, "widthName": 60, "widthComment": 60, "color": "" }, "meta": { - "updateAt": 1756279455895, + "updateAt": 1756951965260, "createAt": 1748484896313 } }, @@ -731,15 +730,15 @@ "2fzVlWt1Skh-391N_z9Ci" ], "ui": { - "x": 2160.5683, - "y": 1265.7898, + "x": 1530.1399, + "y": 808.6469, "zIndex": 2395, "widthName": 60, "widthComment": 62, "color": "" }, "meta": { - "updateAt": 1756279460059, + "updateAt": 1756951967284, "createAt": 1748485662214 } }, @@ -780,15 +779,15 @@ "qOLH2re1rmaG-63c08R8x" ], "ui": { - "x": 46.0215, - "y": 1046.3584, + "x": 2465.5679, + "y": 1164.3837, "zIndex": 2509, "widthName": 60, "widthComment": 62, "color": "" }, "meta": { - "updateAt": 1756279268718, + "updateAt": 1756952096387, "createAt": 1750898626895 } }, @@ -835,22 +834,22 @@ "S-_BBM4Qv5LCTvGVKmQQw" ], "ui": { - "x": 58.067, - "y": 1344.2285, + "x": 2218.7142, + "y": 1669.2031, "zIndex": 4045, "widthName": 60, "widthComment": 201, "color": "" }, "meta": { - "updateAt": 1756279299856, + "updateAt": 1756952094110, "createAt": 1755244574868 } }, "8GYAVBvZGaMFeq3QuXk_B": { "id": "8GYAVBvZGaMFeq3QuXk_B", - "name": "serverinfo_partinfo", - "comment": "서버정보_part정보(CASECADE)", + "name": "serverpartinfo", + "comment": "서버파트정보", "columnIds": [ "XXQzeCrEymboccXMZCzMo", "l2g7xess8DY86_ZOm7Ca1", @@ -885,15 +884,15 @@ "IMTeN4-Evbpr5MMraE__C" ], "ui": { - "x": 698.2708, - "y": 2247.9865, + "x": 1790.8624, + "y": 2142.2793, "zIndex": 4514, - "widthName": 101, - "widthComment": 165, + "widthName": 76, + "widthComment": 74, "color": "" }, "meta": { - "updateAt": 1756772659816, + "updateAt": 1756953821847, "createAt": 1755476453282 } }, @@ -6982,20 +6981,20 @@ "l2g7xess8DY86_ZOm7Ca1": { "id": "l2g7xess8DY86_ZOm7Ca1", "tableId": "8GYAVBvZGaMFeq3QuXk_B", - "name": "partinfo_uid", - "comment": "PART정보", + "name": "part_uid", + "comment": "PART_UID", "dataType": "INT", "default": "", "options": 8, "ui": { - "keys": 2, - "widthName": 66, + "keys": 0, + "widthName": 60, "widthComment": 60, "widthDataType": 60, "widthDefault": 60 }, "meta": { - "updateAt": 1755654089497, + "updateAt": 1756951367605, "createAt": 1755486693704 } }, @@ -8291,18 +8290,18 @@ "columnIds": [ "7B0zaLoZnOoMNW8OHZlrQ" ], - "x": 565.9566, - "y": 1929.5745, - "direction": 2 + "x": 306.7992, + "y": 1605.3218, + "direction": 8 }, "end": { "tableId": "ZLEpY5EjuZV21718zf-Y1", "columnIds": [ "f7_MGvRjkwL1xkCWrAgDR" ], - "x": 758.8735, - "y": 2021.6814, - "direction": 1 + "x": 467.8242, + "y": 1753.7017, + "direction": 4 }, "meta": { "updateAt": 1746595277837, @@ -8319,17 +8318,17 @@ "columnIds": [ "mfHtgzc_Aeocr6xkgwYWh" ], - "x": 1803.9121, - "y": 473.7521666666667, - "direction": 2 + "x": 1851.4121, + "y": 515.9426, + "direction": 8 }, "end": { "tableId": "B8haiEbPc1lRBWTv1g25G", "columnIds": [ "Vf3bNvvEPfu1zCs4rcHTU" ], - "x": 2323.8183, - "y": 1265.7898, + "x": 1856.6399, + "y": 808.6469, "direction": 4 }, "meta": { @@ -8347,8 +8346,8 @@ "columnIds": [ "mfHtgzc_Aeocr6xkgwYWh" ], - "x": 1803.9121, - "y": 375.0855, + "x": 2103.9121, + "y": 441.94259999999997, "direction": 2 }, "end": { @@ -8356,8 +8355,8 @@ "columnIds": [ "s1Az-lXWK0NlVQqFEEK8o" ], - "x": 2195.6764, - "y": 665.0616, + "x": 2338.5336, + "y": 587.9663333333334, "direction": 1 }, "meta": { @@ -8375,8 +8374,8 @@ "columnIds": [ "mfHtgzc_Aeocr6xkgwYWh" ], - "x": 1803.9121, - "y": 276.41883333333334, + "x": 2103.9121, + "y": 293.94259999999997, "direction": 2 }, "end": { @@ -8403,17 +8402,17 @@ "columnIds": [ "mfHtgzc_Aeocr6xkgwYWh" ], - "x": 1551.4121, - "y": 523.0855, - "direction": 8 + "x": 1598.9121, + "y": 478.94259999999997, + "direction": 1 }, "end": { "tableId": "6ajvOCaGuXU9pzV0Y9jEi", "columnIds": [ "hrPg0uHAdEjamOj--BVzO" ], - "x": 1516.6794, - "y": 704.2103, + "x": 1133.6316666666667, + "y": 922.0675, "direction": 4 }, "meta": { @@ -8431,8 +8430,8 @@ "columnIds": [ "mfHtgzc_Aeocr6xkgwYWh" ], - "x": 1298.9121, - "y": 276.41883333333334, + "x": 1598.9121, + "y": 256.94259999999997, "direction": 1 }, "end": { @@ -8459,8 +8458,8 @@ "columnIds": [ "mfHtgzc_Aeocr6xkgwYWh" ], - "x": 1298.9121, - "y": 375.0855, + "x": 1598.9121, + "y": 330.94259999999997, "direction": 1 }, "end": { @@ -8477,34 +8476,6 @@ "createAt": 1755157781478 } }, - "FjAORncWifI_a1aI6e0LJ": { - "id": "FjAORncWifI_a1aI6e0LJ", - "identification": false, - "relationshipType": 16, - "startRelationshipType": 2, - "start": { - "tableId": "ZMGIWLFEswObjH2Sx0NlW", - "columnIds": [ - "2HB01q46-mugMjuOz85YG" - ], - "x": 565.565, - "y": 2261.8862, - "direction": 2 - }, - "end": { - "tableId": "8GYAVBvZGaMFeq3QuXk_B", - "columnIds": [ - "l2g7xess8DY86_ZOm7Ca1" - ], - "x": 698.2708, - "y": 2395.9865, - "direction": 1 - }, - "meta": { - "updateAt": 1755486693704, - "createAt": 1755486693704 - } - }, "qVSQf-uiaof7exFrBC68_": { "id": "qVSQf-uiaof7exFrBC68_", "identification": false, @@ -8515,8 +8486,8 @@ "columnIds": [ "mfHtgzc_Aeocr6xkgwYWh" ], - "x": 1298.9121, - "y": 473.7521666666667, + "x": 1598.9121, + "y": 404.94259999999997, "direction": 1 }, "end": { @@ -8543,8 +8514,8 @@ "columnIds": [ "V6BuLrtFrGgCWaHSUkSLb" ], - "x": 1250.1794, - "y": 924.2103, + "x": 689.465, + "y": 1142.0675, "direction": 1 }, "end": { @@ -8571,9 +8542,9 @@ "columnIds": [ "V6BuLrtFrGgCWaHSUkSLb" ], - "x": 1250.1794, - "y": 836.2103, - "direction": 1 + "x": 955.9649999999999, + "y": 922.0675, + "direction": 4 }, "end": { "tableId": "jO40Ej5EXImXnadoJo9bn", @@ -8599,9 +8570,9 @@ "columnIds": [ "V6BuLrtFrGgCWaHSUkSLb" ], - "x": 1250.1794, - "y": 748.2103, - "direction": 1 + "x": 778.2983333333333, + "y": 922.0675, + "direction": 4 }, "end": { "tableId": "GDEF0_WuOpaYtsZxjn2zM", @@ -8627,8 +8598,8 @@ "columnIds": [ "V6BuLrtFrGgCWaHSUkSLb" ], - "x": 1783.1794, - "y": 814.2103, + "x": 1222.4650000000001, + "y": 977.0675, "direction": 2 }, "end": { @@ -8636,8 +8607,8 @@ "columnIds": [ "8mPFhDdUY8QLPvc8rNw1B" ], - "x": 2195.6764, - "y": 849.0616, + "x": 2338.5336, + "y": 833.2996666666667, "direction": 1 }, "meta": { @@ -8655,8 +8626,8 @@ "columnIds": [ "V6BuLrtFrGgCWaHSUkSLb" ], - "x": 1783.1794, - "y": 1034.2103, + "x": 1222.4650000000001, + "y": 1087.0675, "direction": 2 }, "end": { @@ -8664,8 +8635,8 @@ "columnIds": [ "N-2m8O_JzS6-sDEcL5zTv" ], - "x": 2160.5683, - "y": 1309.7898, + "x": 1530.1399, + "y": 918.6469, "direction": 1 }, "meta": { @@ -8683,18 +8654,18 @@ "columnIds": [ "nNWsAWbHfKWqx8EwxvuM1" ], - "x": 2650.3183, - "y": 1265.7898, - "direction": 4 + "x": 2183.1399, + "y": 881.9802333333332, + "direction": 2 }, "end": { "tableId": "QCNA57Pi6A9dJDgybxS5v", "columnIds": [ "vxhl-9RMNJ8zU9oqzEWo8" ], - "x": 2506.1764, - "y": 941.0616, - "direction": 8 + "x": 2338.5336, + "y": 710.633, + "direction": 1 }, "meta": { "updateAt": 1755653412891, @@ -8711,18 +8682,18 @@ "columnIds": [ "RITMHZcQAJ7KvtxkTtMv-" ], - "x": 2264.5612, - "y": 2082.277, - "direction": 1 + "x": 1740.2756, + "y": 1718.1057, + "direction": 2 }, "end": { "tableId": "IsMoJXzvtuoOFFt93qS0w", "columnIds": [ "wi1XbZM3emknh42sOMkYq" ], - "x": 563.0215000000001, - "y": 1273.0250666666668, - "direction": 2 + "x": 2465.5679, + "y": 1391.050366666667, + "direction": 1 }, "meta": { "updateAt": 1755653724845, @@ -8739,18 +8710,18 @@ "columnIds": [ "RITMHZcQAJ7KvtxkTtMv-" ], - "x": 2264.5612, - "y": 2160.677, - "direction": 1 + "x": 1740.2756, + "y": 1914.1057, + "direction": 2 }, "end": { "tableId": "SEgsi7mbM-56Rsx5-qj8K", "columnIds": [ "GtBqjKsmtYWvsd0fckBc0" ], - "x": 596.067, - "y": 1670.895166666667, - "direction": 2 + "x": 2218.7142, + "y": 1963.2031, + "direction": 1 }, "meta": { "updateAt": 1756086147218, @@ -8767,8 +8738,8 @@ "columnIds": [ "nNWsAWbHfKWqx8EwxvuM1" ], - "x": 2487.0683, - "y": 1705.7898, + "x": 1693.3899, + "y": 1248.6469, "direction": 8 }, "end": { @@ -8776,8 +8747,8 @@ "columnIds": [ "4iRyOhmW3b7kbiZT8lQyY" ], - "x": 2526.5612, - "y": 1964.677, + "x": 1478.2756, + "y": 1620.1057, "direction": 4 }, "meta": { @@ -8795,8 +8766,8 @@ "columnIds": [ "V6BuLrtFrGgCWaHSUkSLb" ], - "x": 1694.346066666667, - "y": 1144.2103, + "x": 1133.6316666666667, + "y": 1362.0675, "direction": 8 }, "end": { @@ -8804,8 +8775,8 @@ "columnIds": [ "JRdeV7n53lb1iSmmYnhHX" ], - "x": 2264.5612, - "y": 2003.877, + "x": 1216.2756, + "y": 1718.1057, "direction": 1 }, "meta": { @@ -8823,8 +8794,8 @@ "columnIds": [ "V6BuLrtFrGgCWaHSUkSLb" ], - "x": 1339.0127333333335, - "y": 1144.2103, + "x": 778.2983333333333, + "y": 1362.0675, "direction": 8 }, "end": { @@ -8832,9 +8803,9 @@ "columnIds": [ "60w6M5QqxGAvJa3EEMDbR" ], - "x": 891.8735, - "y": 1837.6814, - "direction": 4 + "x": 733.8242, + "y": 1891.7017, + "direction": 2 }, "meta": { "updateAt": 1755653938445, @@ -8851,8 +8822,8 @@ "columnIds": [ "RITMHZcQAJ7KvtxkTtMv-" ], - "x": 2264.5612, - "y": 2239.077, + "x": 1216.2756, + "y": 1914.1057, "direction": 1 }, "end": { @@ -8860,8 +8831,8 @@ "columnIds": [ "QznZ6PY_T3OGj3YD4GdOX" ], - "x": 1290.8735000000001, - "y": 2113.6814, + "x": 733.8242, + "y": 2075.7017, "direction": 2 }, "meta": { @@ -8879,18 +8850,18 @@ "columnIds": [ "RITMHZcQAJ7KvtxkTtMv-" ], - "x": 2264.5612, - "y": 2317.4770000000003, - "direction": 1 + "x": 1478.2756, + "y": 2012.1057, + "direction": 8 }, "end": { "tableId": "8GYAVBvZGaMFeq3QuXk_B", "columnIds": [ "IbWdZlEEF70bGqUDkU5ub" ], - "x": 1292.2708, - "y": 2469.9865, - "direction": 2 + "x": 1790.8624, + "y": 2290.2793, + "direction": 1 }, "meta": { "updateAt": 1755654048878, @@ -8907,8 +8878,8 @@ "columnIds": [ "nNWsAWbHfKWqx8EwxvuM1" ], - "x": 2160.5683, - "y": 1573.7898, + "x": 1530.1399, + "y": 1138.6469, "direction": 1 }, "end": { @@ -8916,8 +8887,8 @@ "columnIds": [ "sJfMcwfDgXnsZ89DVVDA2" ], - "x": 1290.8735000000001, - "y": 1929.6814, + "x": 733.8242, + "y": 1799.7017, "direction": 2 }, "meta": { @@ -8935,18 +8906,18 @@ "columnIds": [ "nNWsAWbHfKWqx8EwxvuM1" ], - "x": 2160.5683, - "y": 1397.7898, - "direction": 1 + "x": 2183.1399, + "y": 1028.6469, + "direction": 2 }, "end": { "tableId": "IsMoJXzvtuoOFFt93qS0w", "columnIds": [ "E30sHnqJytLlBmfL7ueOG" ], - "x": 563.0215000000001, - "y": 1182.3584, - "direction": 2 + "x": 2465.5679, + "y": 1209.7170333333336, + "direction": 1 }, "meta": { "updateAt": 1755664567491, @@ -8963,18 +8934,18 @@ "columnIds": [ "nNWsAWbHfKWqx8EwxvuM1" ], - "x": 2160.5683, - "y": 1485.7898, - "direction": 1 + "x": 2183.1399, + "y": 1175.3135666666667, + "direction": 2 }, "end": { "tableId": "SEgsi7mbM-56Rsx5-qj8K", "columnIds": [ "7Tqt0jVOln16nire8AE2K" ], - "x": 596.067, - "y": 1540.2285000000002, - "direction": 2 + "x": 2487.7142, + "y": 1669.2031, + "direction": 4 }, "meta": { "updateAt": 1755664615534, @@ -8991,18 +8962,18 @@ "columnIds": [ "nNWsAWbHfKWqx8EwxvuM1" ], - "x": 2160.5683, - "y": 1661.7898, - "direction": 1 + "x": 2019.8899, + "y": 1248.6469, + "direction": 8 }, "end": { "tableId": "8GYAVBvZGaMFeq3QuXk_B", "columnIds": [ "eu4eV0U7BRaP7Zk-oyBhV" ], - "x": 1292.2708, - "y": 2321.9865, - "direction": 2 + "x": 2087.8624, + "y": 2142.2793, + "direction": 4 }, "meta": { "updateAt": 1755664858263, @@ -9019,18 +8990,18 @@ "columnIds": [ "V6BuLrtFrGgCWaHSUkSLb" ], - "x": 1250.1794, - "y": 1012.2103, - "direction": 1 + "x": 1222.4650000000001, + "y": 1197.0675, + "direction": 2 }, "end": { "tableId": "IsMoJXzvtuoOFFt93qS0w", "columnIds": [ "9FYinSR3C6jDrEsRsCMpl" ], - "x": 563.0215000000001, - "y": 1091.6917333333333, - "direction": 2 + "x": 2465.5679, + "y": 1300.3837000000003, + "direction": 1 }, "meta": { "updateAt": 1755665105225, @@ -9047,18 +9018,18 @@ "columnIds": [ "V6BuLrtFrGgCWaHSUkSLb" ], - "x": 1250.1794, - "y": 1100.2103, - "direction": 1 + "x": 1222.4650000000001, + "y": 1307.0675, + "direction": 2 }, "end": { "tableId": "SEgsi7mbM-56Rsx5-qj8K", "columnIds": [ "q_IaRBb367b9mgGozh6jB" ], - "x": 596.067, - "y": 1409.5618333333334, - "direction": 2 + "x": 2218.7142, + "y": 1767.2031, + "direction": 1 }, "meta": { "updateAt": 1755665152928, @@ -9075,8 +9046,8 @@ "columnIds": [ "V6BuLrtFrGgCWaHSUkSLb" ], - "x": 1516.6794000000002, - "y": 1144.2103, + "x": 955.9649999999999, + "y": 1362.0675, "direction": 8 }, "end": { @@ -9084,9 +9055,9 @@ "columnIds": [ "4sj8hIYAiLSSF89eeNXdQ" ], - "x": 1157.8735000000001, - "y": 1837.6814, - "direction": 4 + "x": 733.8242, + "y": 1983.7017, + "direction": 2 }, "meta": { "updateAt": 1755666739577, diff --git a/app/Entities/Customer/AccountEntity.php b/app/Entities/Customer/AccountEntity.php index 29e3f72..cdee3ed 100644 --- a/app/Entities/Customer/AccountEntity.php +++ b/app/Entities/Customer/AccountEntity.php @@ -8,9 +8,7 @@ class AccountEntity extends CustomerEntity { const PK = AccountModel::PK; const TITLE = AccountModel::TITLE; - const STATUS_WIDTHDRAWAL = "widthdrawal"; - const STATUS_DEPOSIT = "deposit"; - const DEFAULT_STATUS = self::STATUS_DEPOSIT; + const DEFAULT_STATUS = STATUS['DEPOSIT']; //고객정보객체-상속 //타 객체정의 부분 } diff --git a/app/Entities/Customer/ClientEntity.php b/app/Entities/Customer/ClientEntity.php index 766b4cb..7153f18 100644 --- a/app/Entities/Customer/ClientEntity.php +++ b/app/Entities/Customer/ClientEntity.php @@ -8,12 +8,7 @@ class ClientEntity extends CustomerEntity { const PK = ClientModel::PK; const TITLE = ClientModel::TITLE; - - const STATUS_NORMAL = "normal"; - const STATUS_PAUSE = "pause"; - const STATUS_TERMINATED = "terminated"; - const DEFAULT_STATUS = self::STATUS_NORMAL; - + const DEFAULT_STATUS = STATUS['NORMAL']; //타 객체정의 부분 public function getCode(): string { diff --git a/app/Entities/Customer/CouponEntity.php b/app/Entities/Customer/CouponEntity.php index bc311ae..3162c68 100644 --- a/app/Entities/Customer/CouponEntity.php +++ b/app/Entities/Customer/CouponEntity.php @@ -8,9 +8,7 @@ class CouponEntity extends CustomerEntity { const PK = CouponModel::PK; const TITLE = CouponModel::TITLE; - const STATUS_WIDTHDRAWAL = "widthdrawal"; - const STATUS_DEPOSIT = "deposit"; - const DEFAULT_STATUS = self::STATUS_DEPOSIT; + const DEFAULT_STATUS = STATUS['DEPOSIT']; //고객정보객체-상속 //타 객체정의 부분 } diff --git a/app/Entities/Customer/PaymentEntity.php b/app/Entities/Customer/PaymentEntity.php index ebc334e..9684cec 100644 --- a/app/Entities/Customer/PaymentEntity.php +++ b/app/Entities/Customer/PaymentEntity.php @@ -9,9 +9,7 @@ class PaymentEntity extends CustomerEntity { const PK = PaymentModel::PK; const TITLE = PaymentModel::TITLE; - const STATUS_UNPAID = "unpaid"; - const STATUS_PAID = "paid"; - const DEFAULT_STATUS = self::STATUS_UNPAID; // 기본 상태는 미지급(unpaid) + const DEFAULT_STATUS = STATUS['UNPAID']; //관리자정보객체 final public function getUserUID(): int { @@ -49,7 +47,7 @@ class PaymentEntity extends CustomerEntity public function getCountDueAt(): string { $result = ""; - if ($this->getStatus() === self::STATUS_UNPAID) { + if ($this->getStatus() === self::DEFAULT_STATUS) { $now = new DateTime(); // 오늘 날짜 $due = new DateTime($this->getBillingAt()); if ($due < $now) { diff --git a/app/Entities/Customer/PointEntity.php b/app/Entities/Customer/PointEntity.php index a9be394..78a91dc 100644 --- a/app/Entities/Customer/PointEntity.php +++ b/app/Entities/Customer/PointEntity.php @@ -8,9 +8,7 @@ class PointEntity extends CustomerEntity { const PK = PointModel::PK; const TITLE = PointModel::TITLE; - const STATUS_WIDTHDRAWAL = "widthdrawal"; - const STATUS_DEPOSIT = "deposit"; - const DEFAULT_STATUS = self::STATUS_DEPOSIT; + const DEFAULT_STATUS = STATUS['DEPOSIT']; //고객정보객체-상속 //타 객체정의 부분 } diff --git a/app/Entities/Customer/ServiceEntity.php b/app/Entities/Customer/ServiceEntity.php index aa240d8..346a480 100644 --- a/app/Entities/Customer/ServiceEntity.php +++ b/app/Entities/Customer/ServiceEntity.php @@ -10,10 +10,7 @@ class ServiceEntity extends CustomerEntity { const PK = ServiceModel::PK; const TITLE = ServiceModel::TITLE; - const STATUS_NORMAL = "normal"; - const STATUS_PAUSE = "pause"; - const STATUS_TERMINATED = "terminated"; - const DEFAULT_STATUS = self::STATUS_NORMAL; + const DEFAULT_STATUS = STATUS['NORMAL']; public function setServerEntity(ServerEntity|null $entity): void { $this->attributes['serverEntity'] = $entity; diff --git a/app/Entities/Equipment/CSEntity.php b/app/Entities/Equipment/CSEntity.php index c99e521..d89f3db 100644 --- a/app/Entities/Equipment/CSEntity.php +++ b/app/Entities/Equipment/CSEntity.php @@ -8,8 +8,5 @@ class CSEntity extends EquipmentEntity { const PK = CSModel::PK; const TITLE = CSModel::TITLE; - const STATUS_AVAILABLE = "available"; - const STATUS_OCCUPIED = "occupied"; - const STATUS_FORBIDDEN = "forbidden"; - const DEFAULT_STATUS = self::STATUS_AVAILABLE; + const DEFAULT_STATUS = STATUS['AVAIABLE']; } diff --git a/app/Entities/Equipment/IPEntity.php b/app/Entities/Equipment/IPEntity.php index a5b4493..f0f20b5 100644 --- a/app/Entities/Equipment/IPEntity.php +++ b/app/Entities/Equipment/IPEntity.php @@ -8,10 +8,7 @@ class IPEntity extends EquipmentEntity { const PK = IPModel::PK; const TITLE = IPModel::TITLE; - const STATUS_AVAILABLE = "available"; - const STATUS_OCCUPIED = "occupied"; - const STATUS_FORBIDDEN = "forbidden"; - const DEFAULT_STATUS = self::STATUS_AVAILABLE; + const DEFAULT_STATUS = STATUS['AVAIABLE']; public function getIP(): string { return $this->attributes['ip']; diff --git a/app/Entities/Equipment/LineEntity.php b/app/Entities/Equipment/LineEntity.php index e82ac35..71a2e4f 100644 --- a/app/Entities/Equipment/LineEntity.php +++ b/app/Entities/Equipment/LineEntity.php @@ -8,10 +8,7 @@ class LineEntity extends EquipmentEntity { const PK = LineModel::PK; const TITLE = LineModel::TITLE; - const STATUS_AVAILABLE = "available"; - const STATUS_OCCUPIED = "occupied"; - const STATUS_FORBIDDEN = "forbidden"; - const DEFAULT_STATUS = self::STATUS_AVAILABLE; + const DEFAULT_STATUS = STATUS['AVAIABLE']; public function getBandwith(): string { return $this->attributes['bandwith']; diff --git a/app/Entities/Equipment/PartEntity.php b/app/Entities/Equipment/PartEntity.php index cb238e4..33312b1 100644 --- a/app/Entities/Equipment/PartEntity.php +++ b/app/Entities/Equipment/PartEntity.php @@ -8,10 +8,7 @@ class PartEntity extends EquipmentEntity { const PK = PartModel::PK; const TITLE = PartModel::TITLE; - const STATUS_AVAILABLE = "available"; - const STATUS_OCCUPIED = "occupied"; - const STATUS_FORBIDDEN = "forbidden"; - const DEFAULT_STATUS = self::STATUS_AVAILABLE; + const DEFAULT_STATUS = STATUS['AVAIABLE']; public function getType(): string { diff --git a/app/Entities/Equipment/ServerEntity.php b/app/Entities/Equipment/ServerEntity.php index 0d4bd21..71a43cc 100644 --- a/app/Entities/Equipment/ServerEntity.php +++ b/app/Entities/Equipment/ServerEntity.php @@ -9,21 +9,7 @@ class ServerEntity extends EquipmentEntity { const PK = ServerModel::PK; const TITLE = ServerModel::TITLE; - const STATUS_AVAILABLE = "available"; - const STATUS_OCCUPIED = "occupied"; - const STATUS_FORBIDDEN = "forbidden"; - const DEFAULT_STATUS = self::STATUS_AVAILABLE; - public function setSwitchEntity(SwitchEntity|null $entity): void - { - $this->attributes['switchEntity'] = $entity; - } - public function getSwitchEntity(): SwitchEntity|null - { - if (!array_key_exists('switchEntity', $this->attributes)) { - return null; - } - return $this->attributes['switchEntity']; - } + const DEFAULT_STATUS = STATUS['AVAIABLE']; public function addServerPartEntity(string $partType, ServerPartEntity $entity): void { if (!array_key_exists('serverPartEntities', $this->attributes)) { @@ -51,36 +37,6 @@ class ServerEntity extends EquipmentEntity } return $this->attributes['serverPartEntities'][$partType]; } - public function addIPEntity(IPEntity $entity): void - { - if (!array_key_exists('ipEntities', $this->attributes)) { - $this->attributes['ipEntities'] = []; - } - $this->attributes['ipEntities'][] = $entity; - } - public function setIPEntities(array $ipEntities): void - { - $this->attributes['ipEntities'] = $ipEntities; - } - public function getIPEntities(): array - { - return $this->attributes['ipEntities'] ?? []; - } - public function addCSEntity(CSEntity $entity): void - { - if (!array_key_exists('csEntities', $this->attributes)) { - $this->attributes['csEntities'] = []; - } - $this->attributes['csEntities'] = $entity; - } - public function setCSEntities(array $csEntities): void - { - $this->attributes['csEntities'] = $csEntities; - } - public function getCSEntities(): array - { - return $this->attributes['csEntities'] ?? []; - } //기본기능용 public function getCode(): string { diff --git a/app/Entities/Equipment/ServerPartEntity.php b/app/Entities/Equipment/ServerPartEntity.php index 67e3010..78a3166 100644 --- a/app/Entities/Equipment/ServerPartEntity.php +++ b/app/Entities/Equipment/ServerPartEntity.php @@ -27,9 +27,9 @@ class ServerPartEntity extends EquipmentEntity return $this->getPartEntity() === null ? 0 : $this->getPartEntity()->getPrice(); } //기본기능용 - public function getPartInfoUID(): int + public function getPartUID(): int { - return $this->attributes['partinfo_uid']; + return $this->attributes['part_uid']; } public function getServerInfoUID(): int { diff --git a/app/Entities/Equipment/SwitchEntity.php b/app/Entities/Equipment/SwitchEntity.php index 8ed2a6c..6617f1e 100644 --- a/app/Entities/Equipment/SwitchEntity.php +++ b/app/Entities/Equipment/SwitchEntity.php @@ -8,10 +8,7 @@ class SwitchEntity extends EquipmentEntity { const PK = SwitchModel::PK; const TITLE = SwitchModel::TITLE; - const STATUS_AVAILABLE = "available"; - const STATUS_OCCUPIED = "occupied"; - const STATUS_FORBIDDEN = "forbidden"; - const DEFAULT_STATUS = self::STATUS_AVAILABLE; + const DEFAULT_STATUS = STATUS['AVAIABLE']; public function getCode(): string { diff --git a/app/Entities/MyLogEntity.php b/app/Entities/MyLogEntity.php index 3663ecb..7ccef09 100644 --- a/app/Entities/MyLogEntity.php +++ b/app/Entities/MyLogEntity.php @@ -9,9 +9,7 @@ class MyLogEntity extends CommonEntity { const PK = Model::PK; const TITLE = Model::TITLE; - const STATUS_SUCCESS = "success"; - const STATUS_FAILED = "fail"; - const DEFAULT_STATUS = self::STATUS_SUCCESS; + const DEFAULT_STATUS = STATUS['SUCCESS']; //공통부분 //Common Function } diff --git a/app/Entities/UserEntity.php b/app/Entities/UserEntity.php index e9fb2ec..740c60e 100644 --- a/app/Entities/UserEntity.php +++ b/app/Entities/UserEntity.php @@ -9,10 +9,7 @@ class UserEntity extends CommonEntity { const PK = Model::PK; const TITLE = Model::TITLE; - const STATUS_NORMAL = "normal"; - const STATUS_PAUSE = "pause"; - const STATUS_TERMINATED = "terminated"; - const DEFAULT_STATUS = self::STATUS_NORMAL; + const DEFAULT_STATUS = STATUS['NORMAL']; public function getID(): string { diff --git a/app/Entities/UserSNSEntity.php b/app/Entities/UserSNSEntity.php index dbfb405..4009709 100644 --- a/app/Entities/UserSNSEntity.php +++ b/app/Entities/UserSNSEntity.php @@ -9,10 +9,7 @@ class UserSNSEntity extends CommonEntity { const PK = Model::PK; const TITLE = Model::TITLE; - const STATUS_NORMAL = "normal"; - const STATUS_PAUSE = "pause"; - const STATUS_TERMINATED = "terminated"; - const DEFAULT_STATUS = self::STATUS_NORMAL; + const DEFAULT_STATUS = STATUS['NORMAL']; //Common Function public function getParent(): int|null { diff --git a/app/Helpers/Customer/ServiceHelper.php b/app/Helpers/Customer/ServiceHelper.php index 29d8270..ffd59df 100644 --- a/app/Helpers/Customer/ServiceHelper.php +++ b/app/Helpers/Customer/ServiceHelper.php @@ -138,7 +138,7 @@ class ServiceHelper extends CustomerHelper { switch ($action) { case 'modify': - $action = parent::getListButton($action, $viewDatas['entity']->getCode(), $viewDatas, $extras); + $action = parent::getListButton($action, $label ? $label : $viewDatas['entity']->getCode(), $viewDatas, $extras); break; case 'history': $extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras]; diff --git a/app/Helpers/Equipment/ServerHelper.php b/app/Helpers/Equipment/ServerHelper.php index 25b834a..87ac6e1 100644 --- a/app/Helpers/Equipment/ServerHelper.php +++ b/app/Helpers/Equipment/ServerHelper.php @@ -11,22 +11,6 @@ class ServerHelper extends EquipmentHelper parent::__construct(); $this->setTitleField(field: ServerModel::TITLE); } - private function getServerPartForm(string $field, mixed $value, array $viewDatas, array $extras, string $partType): string - { - $form = ""; - if (array_key_exists('entity', $viewDatas)) { - foreach ($viewDatas['entity']->getServerPartEntities($partType) as $serverPartEntity) { - //기존 입력화면에서 return 된것인지? - if ($value === null && $serverPartEntity !== null) { - $value = $serverPartEntity->getPartInfoUID(); - } - $form .= $this->form_dropdown_custom($field, $value, $viewDatas, $extras); - } - } else { - $form .= $this->form_dropdown_custom($field, $value, $viewDatas, $extras); - } - return $form; - } public function getFieldForm(string $field, mixed $value, array $viewDatas, array $extras = []): string { switch ($field) { @@ -66,56 +50,12 @@ class ServerHelper extends EquipmentHelper $extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' calender' : 'calender'; $form = form_input($field, $value ?? "", $extras); break; - case 'CPU': - $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'CPU'); - break; - case 'CPU_cnt': - $form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개"; - break; - case 'RAM': - $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'RAM',); - break; - case 'RAM_cnt': - $form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개"; - break; - case 'DISK': - $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DISK'); - break; - case 'DISK_cnt': - $form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개"; - break; - case 'DISK_extra': - $form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras); - break; - case 'OS': - $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'OS'); - break; - case 'OS_cnt': - $form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개"; - break; - case 'DB': - $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DB'); - break; - case 'DB_cnt': - $form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개"; - break; - case 'SOFTWARE': - $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'SOFTWARE'); - break; - case 'SOFTWARE_cnt': - $form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개"; - break; default: $form = parent::getFieldForm($field, $value, $viewDatas, $extras); break; } return $form; } - private function getServerPartView(string $field, mixed $value, array $viewDatas, array $extras): string - { - - return $value; - } public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null { switch ($field) { @@ -123,35 +63,6 @@ class ServerHelper extends EquipmentHelper case 'format_at': $value = $value ? date("Y-m-d", strtotime($value)) : ""; break; - case 'CPU': - case 'RAM': - case 'DISK': - case 'OS': - case 'DB': - case 'SOFTWARE': - $temps = []; - foreach ($viewDatas['entity']->getServerPartEntities($field) as $serverPartEntity) { - $modal = form_label( - ICONS['SETUP'], - $field, - [ - "data-src" => "/admin/equipment/serverpart/modify/{$serverPartEntity->getPK()}?ActionTemplate=popup", - "data-bs-toggle" => "modal", - "data-bs-target" => "#index_action_form", - "class" => "btn btn-sm btn-outline btn-circle", - "target" => "_self" - ] - ); - $temps[] = sprintf( - "%s%s%s %s", - $modal, - $serverPartEntity->getTitle(), - $serverPartEntity->getCnt() >= 1 ? "*" . $serverPartEntity->getCnt() . "개" : "", - $serverPartEntity->getExtra() ?? "" - ); - } - $value .= implode("
", $temps); - break; case 'ipinfo_uid': foreach ($viewDatas['entity']->getIPEntities() as $ipEntity) { $value .= sprintf("
%s%s %s
", $ipEntity->getTitle(), $ipEntity->getAmount()); @@ -176,17 +87,7 @@ class ServerHelper extends EquipmentHelper { switch ($action) { case 'modify': - if (!$this->getMyAuth()->isAccessRole(['security'])) { - $action = $viewDatas['entity']->getCode(); - } else { - $action = parent::getListButton($action, $label ? $label : $viewDatas['entity']->getCode(), $viewDatas, $extras); - } - break; - case 'create': - case 'delete': - case 'batchjob': - case 'batchjob_delete': - $action = !$this->getMyAuth()->isAccessRole(['security']) ? "" : parent::getListButton($action, $label, $viewDatas, $extras); + $action = parent::getListButton($action, $label ? $label : $viewDatas['entity']->getCode(), $viewDatas, $extras); break; case 'history': $extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras]; @@ -201,24 +102,6 @@ class ServerHelper extends EquipmentHelper ] ); break; - case 'CPU': - case 'RAM': - case 'DISK': - case 'OS': - case 'DB': - case 'SOFTWARE': - $extras = ["class" => "btn btn-sm btn-outline btn-circle", "target" => "_self", ...$extras]; - $action = form_label( - $label ? $label : ICONS['SETUP'], - $action, - [ - "data-src" => "/admin/equipment/serverpart?serverinfo_uid={$viewDatas['entity']->getPK()}&type={$action}&ActionTemplate=popup", - "data-bs-toggle" => "modal", - "data-bs-target" => "#index_action_form", - ...$extras - ] - ); - break; default: $action = parent::getListButton($action, $label, $viewDatas, $extras); break; diff --git a/app/Helpers/Equipment/ServerPartHelper.php b/app/Helpers/Equipment/ServerPartHelper.php index 178856b..c259f0a 100644 --- a/app/Helpers/Equipment/ServerPartHelper.php +++ b/app/Helpers/Equipment/ServerPartHelper.php @@ -11,12 +11,63 @@ class ServerPartHelper extends EquipmentHelper parent::__construct(); $this->setTitleField(field: ServerPartModel::TITLE); } + private function getServerPartForm(string $field, mixed $value, array $viewDatas, array $extras, string $partType): string + { + $form = ""; + if (array_key_exists('entity', $viewDatas)) { + foreach ($viewDatas['entity']->getServerPartEntities($partType) as $serverPartEntity) { + //기존 입력화면에서 return 된것인지? + if ($value === null && $serverPartEntity !== null) { + $value = $serverPartEntity->getPartInfoUID(); + } + $form .= $this->form_dropdown_custom($field, $value, $viewDatas, $extras); + } + } else { + $form .= $this->form_dropdown_custom($field, $value, $viewDatas, $extras); + } + return $form; + } public function getFieldForm(string $field, mixed $value, array $viewDatas, array $extras = []): string { switch ($field) { - case 'code': - // $extras['readonly'] = in_array($viewDatas['control']['action'], ['modify_form']) ? ' readonly' : ''; - $form = parent::getFieldForm($field, $value, $viewDatas, $extras); + case 'CPU': + $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'CPU'); + break; + case 'CPU_cnt': + $form = form_dropdown($field, SERVERPART['CNT_RANGE'], $value, $extras) . "개"; + break; + case 'RAM': + $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'RAM',); + break; + case 'RAM_cnt': + $form = form_dropdown($field, SERVERPART['CNT_RANGE'], $value, $extras) . "개"; + break; + case 'DISK': + $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DISK'); + break; + case 'DISK_cnt': + $form = form_dropdown($field, SERVERPART['CNT_RANGE'], $value, $extras) . "개"; + break; + case 'DISK_extra': + $form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras); + break; + case 'OS': + $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'OS'); + break; + case 'OS_cnt': + $form = form_dropdown($field, SERVERPART['CNT_RANGE'], $value, $extras) . "개"; + break; + case 'DB': + $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DB'); + break; + case 'DB_cnt': + $form = form_dropdown($field, SERVERPART['CNT_RANGE'], $value, $extras) . "개"; + break; + case 'SOFTWARE': + $form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'SOFTWARE'); + break; + case 'SOFTWARE_cnt': + $form = form_dropdown($field, SERVERPART['CNT_RANGE'], $value, $extras) . "개"; break; default: $form = parent::getFieldForm($field, $value, $viewDatas, $extras); @@ -24,4 +75,74 @@ class ServerPartHelper extends EquipmentHelper } return $form; } + + public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null + { + switch ($field) { + case 'CPU': + case 'RAM': + case 'DISK': + case 'OS': + case 'DB': + case 'SOFTWARE': + $temps = []; + foreach ($viewDatas['entity']->getServerPartEntities($field) as $serverPartEntity) { + $modal = form_label( + ICONS['SETUP'], + $field, + [ + "data-src" => "/admin/equipment/serverpart/modify/{$serverPartEntity->getPK()}?ActionTemplate=popup", + "data-bs-toggle" => "modal", + "data-bs-target" => "#index_action_form", + "class" => "btn btn-sm btn-outline btn-circle", + "target" => "_self" + ] + ); + $temps[] = sprintf( + "%s%s%s %s", + $modal, + $serverPartEntity->getTitle(), + $serverPartEntity->getCnt() >= 1 ? "*" . $serverPartEntity->getCnt() . "개" : "", + $serverPartEntity->getExtra() ?? "" + ); + } + $value .= implode("
", $temps); + break; + default: + $value = parent::getFieldView($field, $value, $viewDatas, $extras); + break; + } + if (is_array($value)) { + echo __METHOD__ . "에서 오류: {$field}의 값이 Array형태입니다"; + exit; + } + return $value; + } + public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string + { + switch ($action) { + case 'CPU': + case 'RAM': + case 'DISK': + case 'OS': + case 'DB': + case 'SOFTWARE': + $extras = ["class" => "btn btn-sm btn-outline btn-circle", "target" => "_self", ...$extras]; + $action = form_label( + $label ? $label : ICONS['SETUP'], + $action, + [ + "data-src" => "/admin/equipment/serverpart?serverinfo_uid={$viewDatas['entity']->getPK()}&type={$action}&ActionTemplate=popup", + "data-bs-toggle" => "modal", + "data-bs-target" => "#index_action_form", + ...$extras + ] + ); + break; + default: + $action = parent::getListButton($action, $label, $viewDatas, $extras); + break; + } + return $action; + } } diff --git a/app/Language/en/Customer/Account.php b/app/Language/en/Customer/Account.php index a78d36a..e482d07 100644 --- a/app/Language/en/Customer/Account.php +++ b/app/Language/en/Customer/Account.php @@ -21,7 +21,7 @@ return [ "농협" => "농협", ], "STATUS" => [ - 'deposit' => "입금", - "withdrawal" => "출금", + STATUS['DEPOSIT'] => "입금", + STATUS['WIDTHDRAWAL'] => "출금", ], ]; diff --git a/app/Language/en/Customer/Client.php b/app/Language/en/Customer/Client.php index 05ba280..a40c172 100644 --- a/app/Language/en/Customer/Client.php +++ b/app/Language/en/Customer/Client.php @@ -28,8 +28,8 @@ return [ "reseller" => "리셀러", ], "STATUS" => [ - 'normal' => "사용중", - "pause" => "일시정지", - "terminated" => "해지", + STATUS['NORMAL'] => "사용중", + STATUS['PAUSE'] => "일시정지", + STATUS['TERMINATED'] => "해지", ], ]; diff --git a/app/Language/en/Customer/Coupon.php b/app/Language/en/Customer/Coupon.php index 5696a6e..65eca76 100644 --- a/app/Language/en/Customer/Coupon.php +++ b/app/Language/en/Customer/Coupon.php @@ -11,7 +11,7 @@ return [ 'deleted_at' => "삭제일", ], "STATUS" => [ - 'deposit' => "추가", - "withdrawal" => "사용", + STATUS['DEPOSIT'] => "입금", + STATUS['WIDTHDRAWAL'] => "출금", ], ]; diff --git a/app/Language/en/Customer/Payment.php b/app/Language/en/Customer/Payment.php index a66722d..33db026 100644 --- a/app/Language/en/Customer/Payment.php +++ b/app/Language/en/Customer/Payment.php @@ -25,7 +25,7 @@ return [ "coupon" => "쿠폰", ], "STATUS" => [ - 'unpaid' => "미지급", - "paid" => "지급완료", + STATUS['UNPAID'] => "미지급", + STATUS['PAID'] => "지급완료", ], ]; diff --git a/app/Language/en/Customer/Point.php b/app/Language/en/Customer/Point.php index 15aba39..9c6e3b3 100644 --- a/app/Language/en/Customer/Point.php +++ b/app/Language/en/Customer/Point.php @@ -11,7 +11,7 @@ return [ 'deleted_at' => "삭제일", ], "STATUS" => [ - 'deposit' => "입금", - "withdrawal" => "출금", + STATUS['DEPOSIT'] => "입금", + STATUS['WIDTHDRAWAL'] => "출금", ], ]; diff --git a/app/Language/en/Customer/Service.php b/app/Language/en/Customer/Service.php index bfb3a06..cf4db95 100644 --- a/app/Language/en/Customer/Service.php +++ b/app/Language/en/Customer/Service.php @@ -43,8 +43,8 @@ return [ "colocation" => "코로케이션", ], "STATUS" => [ - 'normal' => "사용중", - "pause" => "일시정지", - "terminated" => "해지", + STATUS['NORMAL'] => "사용중", + STATUS['PAUSE'] => "일시정지", + STATUS['TERMINATED'] => "해지", ], ]; diff --git a/app/Language/en/Equipment/CS.php b/app/Language/en/Equipment/CS.php index e11fddc..b787085 100644 --- a/app/Language/en/Equipment/CS.php +++ b/app/Language/en/Equipment/CS.php @@ -21,9 +21,9 @@ return [ "VPC-CS" => "VPC-CS", "KT-CS" => "KT-CS", ], - "STATUS" => [ - 'available' => "사용가능", - 'occupied' => "서비스중", - 'forbidden' => "사용불가", + "STATUS" => [ + STATUS['AVAIABLE'] => "사용가능", + STATUS['OCCUPIED'] => "서비스중", + STATUS['FORBIDDEN'] => "사용불가", ], ]; diff --git a/app/Language/en/Equipment/IP.php b/app/Language/en/Equipment/IP.php index 8d990ef..70229f1 100644 --- a/app/Language/en/Equipment/IP.php +++ b/app/Language/en/Equipment/IP.php @@ -15,9 +15,9 @@ return [ 'created_at' => "작성일", 'deleted_at' => "삭제일", ], - "STATUS" => [ - 'available' => "사용가능", - 'occupied' => "서비스중", - 'forbidden' => "사용불가", + "STATUS" => [ + STATUS['AVAIABLE'] => "사용가능", + STATUS['OCCUPIED'] => "서비스중", + STATUS['FORBIDDEN'] => "사용불가", ], ]; diff --git a/app/Language/en/Equipment/Line.php b/app/Language/en/Equipment/Line.php index 1cc6fca..6e025af 100644 --- a/app/Language/en/Equipment/Line.php +++ b/app/Language/en/Equipment/Line.php @@ -17,9 +17,9 @@ return [ "normal" => "일반", "dedicated" => "전용", ], - "STATUS" => [ - 'available' => "사용가능", - 'occupied' => "서비스중", - 'forbidden' => "사용불가", + "STATUS" => [ + STATUS['AVAIABLE'] => "사용가능", + STATUS['OCCUPIED'] => "서비스중", + STATUS['FORBIDDEN'] => "사용불가", ], ]; diff --git a/app/Language/en/Equipment/Part.php b/app/Language/en/Equipment/Part.php index c533855..5919775 100644 --- a/app/Language/en/Equipment/Part.php +++ b/app/Language/en/Equipment/Part.php @@ -19,8 +19,8 @@ return [ "DB" => "데이터베이스", "SOFTWARE" => "소프트웨어", ], - "STATUS" => [ - 'available' => "사용가능", - 'forbidden' => "사용불가", + "STATUS" => [ + STATUS['AVAIABLE'] => "사용가능", + STATUS['FORBIDDEN'] => "사용불가", ], ]; diff --git a/app/Language/en/Equipment/Server.php b/app/Language/en/Equipment/Server.php index 58aac91..7ad356c 100644 --- a/app/Language/en/Equipment/Server.php +++ b/app/Language/en/Equipment/Server.php @@ -45,10 +45,10 @@ return [ "del" => "DELL", "etc" => "조립", ], - "STATUS" => [ - 'available' => "사용가능", - 'occupied' => "서비스중", - 'forbidden' => "사용불가", + "STATUS" => [ + STATUS['AVAIABLE'] => "사용가능", + STATUS['OCCUPIED'] => "서비스중", + STATUS['FORBIDDEN'] => "사용불가", ], "DISK_EXTRA" => [ 'RAID0' => "RAID0", diff --git a/app/Language/en/Equipment/ServerPart.php b/app/Language/en/Equipment/ServerPart.php index 9f74722..b573d07 100644 --- a/app/Language/en/Equipment/ServerPart.php +++ b/app/Language/en/Equipment/ServerPart.php @@ -2,7 +2,7 @@ return [ 'title' => "서버장비정보", 'label' => [ - 'partinfo_uid' => "부품정보", + 'part_uid' => "부품정보", 'clientinfo_uid' => "고객번호", 'serviceinfo_uid' => "서비스번호", 'serverinfo_uid' => "서버번호", diff --git a/app/Language/en/Equipment/Switch.php b/app/Language/en/Equipment/Switch.php index e6bbf89..236ef8a 100644 --- a/app/Language/en/Equipment/Switch.php +++ b/app/Language/en/Equipment/Switch.php @@ -11,9 +11,9 @@ return [ 'created_at' => "작성일", 'deleted_at' => "삭제일", ], - "STATUS" => [ - 'available' => "사용가능", - 'occupied' => "서비스중", - 'forbidden' => "사용불가", + "STATUS" => [ + STATUS['AVAIABLE'] => "사용가능", + STATUS['OCCUPIED'] => "서비스중", + STATUS['FORBIDDEN'] => "사용불가", ], ]; diff --git a/app/Language/en/MyLog.php b/app/Language/en/MyLog.php index 35b16de..c736760 100644 --- a/app/Language/en/MyLog.php +++ b/app/Language/en/MyLog.php @@ -12,7 +12,7 @@ return [ 'deleted_at' => "삭제일", ], "STATUS" => [ - 'success' => "성공", - "fail" => "실패", + STATUS['SUCCESS'] => "완료", + STATUS['FAILED'] => "실패", ], ]; diff --git a/app/Language/en/User.php b/app/Language/en/User.php index 32844d9..7c760ec 100644 --- a/app/Language/en/User.php +++ b/app/Language/en/User.php @@ -24,8 +24,8 @@ return [ "master" => "마스터", ], "STATUS" => [ - 'normal' => "사용중", - "pause" => "일시정지", - "terminated" => "해지", + STATUS['NORMAL'] => "사용중", + STATUS['PAUSE'] => "일시정지", + STATUS['TERMINATED'] => "해지", ], ]; diff --git a/app/Libraries/DBMigration/Process/ClientProcess.php b/app/Libraries/DBMigration/Process/ClientProcess.php index 83648c1..9388cd2 100644 --- a/app/Libraries/DBMigration/Process/ClientProcess.php +++ b/app/Libraries/DBMigration/Process/ClientProcess.php @@ -40,7 +40,7 @@ class ClientProcess implements MigrationProcessInterface $temps['account_balance'] = intval($row['Client_Money']); $temps['coupon_balance'] = 0; $temps['point_balance'] = 0; - $temps['status'] = UserEntity::STATUS_NORMAL; // Default status + $temps['status'] = UserEntity::DEFAULT_STATUS; // Default status $temps['updated_at'] = empty($row['Client_Renew_date']) ? NULL : $row['Client_Renew_date']; if (!empty($row['Client_Receive_date'])) { $temps['created_at'] = $row['Client_Receive_date']; diff --git a/app/Models/Customer/PaymentModel.php b/app/Models/Customer/PaymentModel.php index 8936f42..fd9ce02 100644 --- a/app/Models/Customer/PaymentModel.php +++ b/app/Models/Customer/PaymentModel.php @@ -73,7 +73,7 @@ class PaymentModel extends CustomerModel ->select("{$idx_field}, COUNT(*) as cnt") ->where('billing_at <', $dateTime) ->where('amount >', 0) - ->where('status', PaymentEntity::STATUS_UNPAID) + ->where('status', STATUS['UNPAID']) ->groupBy($idx_field) ->findAll(); //array_column($rows, 'cnt', 'serviceinfo_uid')는 serviceinfo_uid를 키로 하고 cnt를 값으로 하는 연관 배열을 생성합니다. diff --git a/app/Models/Equipment/ServerPartModel.php b/app/Models/Equipment/ServerPartModel.php index b3afd02..47394e7 100644 --- a/app/Models/Equipment/ServerPartModel.php +++ b/app/Models/Equipment/ServerPartModel.php @@ -6,14 +6,14 @@ use App\Entities\Equipment\ServerPartEntity; class ServerPartModel extends EquipmentModel { - const TABLE = "serverinfo_partinfo"; + const TABLE = "serverpartinfo"; const PK = "uid"; const TITLE = "uid"; protected $table = self::TABLE; protected $primaryKey = self::PK; protected $returnType = ServerPartEntity::class; protected $allowedFields = [ - "partinfo_uid", + "part_uid", "serverinfo_uid", "serviceinfo_uid", "type", @@ -33,7 +33,7 @@ class ServerPartModel extends EquipmentModel throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true)); } switch ($field) { - case "partinfo_uid": + case "part_uid": case "serverinfo_uid": case "cnt": case "amount": diff --git a/app/Services/Customer/AccountService.php b/app/Services/Customer/AccountService.php index 51f7d4d..f247773 100644 --- a/app/Services/Customer/AccountService.php +++ b/app/Services/Customer/AccountService.php @@ -48,7 +48,7 @@ class AccountService extends CustomerService throw new \Exception("{$formDatas['clientinfo_uid']}에 대한 고객정보를 찾을수 없습니다."); } $amount = intval($formDatas['amount']); - if ($formDatas['status'] === AccountEntity::STATUS_DEPOSIT) { //입금, 쿠폰추가 + if ($formDatas['status'] === AccountEntity::DEFAULT_STATUS) { //입금, 쿠폰추가 $entity = $this->getClientService()->deposit($entity, 'account_balance', $amount); } else { // 출금, 쿠폰사용 $entity = $this->getClientService()->withdrawal($entity, 'account_balance', $amount); diff --git a/app/Services/Customer/CouponService.php b/app/Services/Customer/CouponService.php index 50566b9..559b712 100644 --- a/app/Services/Customer/CouponService.php +++ b/app/Services/Customer/CouponService.php @@ -44,7 +44,7 @@ class CouponService extends CustomerService throw new \Exception("{$formDatas['clientinfo_uid']}에 대한 고객정보를 찾을수 없습니다."); } $cnt = intval($formDatas['cnt']); - if ($formDatas['status'] === CouponEntity::STATUS_DEPOSIT) { //입금, 쿠폰추가 + if ($formDatas['status'] === CouponEntity::DEFAULT_STATUS) { //입금, 쿠폰추가 $entity = $this->getClientService()->deposit($entity, 'coupon_balance', $cnt); } else { // 출금, 쿠폰사용 $entity = $this->getClientService()->withdrawal($entity, 'coupon_balance', $cnt); diff --git a/app/Services/Customer/PointService.php b/app/Services/Customer/PointService.php index ff2f984..e8442c7 100644 --- a/app/Services/Customer/PointService.php +++ b/app/Services/Customer/PointService.php @@ -43,7 +43,7 @@ class PointService extends CustomerService throw new \Exception("{$formDatas['clientinfo_uid']}에 대한 고객정보를 찾을수 없습니다."); } $amount = intval($formDatas['amount']); - if ($formDatas['status'] === PointEntity::STATUS_DEPOSIT) { //입금, 쿠폰추가 + if ($formDatas['status'] === PointEntity::DEFAULT_STATUS) { //입금, 쿠폰추가 $entity = $this->getClientService()->deposit($entity, 'point_balance', $amount); } else { // 출금, 쿠폰사용 $entity = $this->getClientService()->withdrawal($entity, 'point_balance', $amount); diff --git a/app/Services/Customer/ServiceService.php b/app/Services/Customer/ServiceService.php index 82f13cd..bca6194 100644 --- a/app/Services/Customer/ServiceService.php +++ b/app/Services/Customer/ServiceService.php @@ -219,7 +219,7 @@ class ServiceService extends CustomerService //기존 Server정보와 다른경우 사용가능상태로 변경 $serverEntity = $entity->getServerEntity(); if ($serverEntity !== null) { - $serverEntity = $this->getServerService()->disableService($serverEntity); + $serverEntity = $this->getServerService()->disableService($entity, $serverEntity); $entity->setServerEntity(null); } return $entity; @@ -231,7 +231,7 @@ class ServiceService extends CustomerService if (!$serverEntity) { throw new \Exception("{$formDatas['serverinfo_uid']}에 대한 서버정보를 찾을수 없습니다."); } - $serverEntity = $this->getServerService()->enableService($entity, $serverEntity, $formDatas); + $serverEntity = $this->getServerService()->enableService($entity, $serverEntity); $entity->setServerEntity($serverEntity); return $entity; } diff --git a/app/Services/Equipment/CSService.php b/app/Services/Equipment/CSService.php index 63a6b73..97665ea 100644 --- a/app/Services/Equipment/CSService.php +++ b/app/Services/Equipment/CSService.php @@ -61,23 +61,4 @@ class CSService extends EquipmentService $this->getModel()->orderBy('INET_ATON(ip)', 'ASC'); parent::setOrderBy($field, $value); } - - public function enableService(ServerEntity $serverEntity, CSEntity $entity): CSEntity - { - $formDatas = []; - $formDatas["clientinfo_uid"] = $serverEntity->getClientInfoUID(); - $formDatas["serviceinfo_uid"] = $serverEntity->getServiceInfoUID(); - $formDatas["serverinfo_uid"] = $serverEntity->getPK(); - $formDatas['status'] = CSEntity::STATUS_OCCUPIED; - return parent::modify($entity, $formDatas); - } - public function disableService(CSEntity $entity): CSEntity - { - $formDatas = []; - $formDatas["clientinfo_uid"] = null; - $formDatas["serviceinfo_uid"] = null; - $formDatas["serverinfo_uid"] = null; - $formDatas['status'] = CSEntity::STATUS_AVAILABLE; - return parent::modify($entity, $formDatas); - } } diff --git a/app/Services/Equipment/EquipmentService.php b/app/Services/Equipment/EquipmentService.php index fd5c536..b9f4f05 100644 --- a/app/Services/Equipment/EquipmentService.php +++ b/app/Services/Equipment/EquipmentService.php @@ -17,7 +17,6 @@ abstract class EquipmentService extends CommonService private ?ClientService $_clientService = null; private ?ServiceService $_serviceService = null; private ?ServerService $_serverService = null; - private ?SwitchService $_switchService = null; protected function __construct(Model $model) { parent::__construct($model); @@ -51,13 +50,6 @@ abstract class EquipmentService extends CommonService } return $this->_serverService; } - final public function getSwitchService(): SwitchService - { - if (!$this->_switchService) { - $this->_switchService = new SwitchService(); - } - return $this->_switchService; - } //기본기능 //FieldForm관련용 public function getFormOption(string $field, array $options = []): array @@ -75,9 +67,6 @@ abstract class EquipmentService extends CommonService case 'serverinfo_uid': $options = $this->getServerService()->getEntities(); break; - case 'switchinfo_uid': - $options = $this->getSwitchService()->getEntities(); - break; default: $options = parent::getFormOption($field, $options); break; diff --git a/app/Services/Equipment/IPService.php b/app/Services/Equipment/IPService.php index 74ea1ec..88f5223 100644 --- a/app/Services/Equipment/IPService.php +++ b/app/Services/Equipment/IPService.php @@ -95,7 +95,7 @@ class IPService extends EquipmentService "serverinfo_uid" => $serverEntity->getPK(), "clientinfo_uid" => $serverEntity->getClientInfoUID(), "serviceinfo_uid" => $serverEntity->getServiceInfoUID(), - "status" => IPEntity::STATUS_OCCUPIED + "status" => STATUS['OCCUPIED'] ]; return $temps; } @@ -122,23 +122,4 @@ class IPService extends EquipmentService $this->getModel()->orderBy('INET_ATON(ip)', 'ASC'); parent::setOrderBy($field, $value); } - - public function enableService(ServerEntity $serverEntity, IPEntity $entity): IPEntity - { - $formDatas = []; - $formDatas["clientinfo_uid"] = $serverEntity->getClientInfoUID(); - $formDatas["serviceinfo_uid"] = $serverEntity->getServiceInfoUID(); - $formDatas["serverinfo_uid"] = $serverEntity->getPK(); - $formDatas['status'] = IPEntity::STATUS_OCCUPIED; - return parent::modify($entity, $formDatas); - } - public function disableService(IPEntity $entity): IPEntity - { - $formDatas = []; - $formDatas["clientinfo_uid"] = null; - $formDatas["serviceinfo_uid"] = null; - $formDatas["serverinfo_uid"] = null; - $formDatas['status'] = IPEntity::STATUS_AVAILABLE; - return parent::modify($entity, $formDatas); - } } diff --git a/app/Services/Equipment/ServerPartService.php b/app/Services/Equipment/ServerPartService.php index 12b2fb6..0edbe1b 100644 --- a/app/Services/Equipment/ServerPartService.php +++ b/app/Services/Equipment/ServerPartService.php @@ -2,14 +2,22 @@ namespace App\Services\Equipment; +use App\Entities\Customer\ServiceEntity; +use App\Entities\Equipment\CSEntity; +use App\Entities\Equipment\IPEntity; use App\Entities\Equipment\ServerEntity; use App\Entities\Equipment\ServerPartEntity; +use App\Entities\Equipment\SwitchEntity; +use App\Helpers\Equipment\ServerPartHelper; use App\Models\Equipment\ServerPartModel; use App\Services\Equipment\EquipmentService; class ServerPartService extends EquipmentService { + private ?SwitchService $_switchService = null; private ?PartService $_partService = null; + private ?IPService $_ipService = null; + private ?CSService $_csService = null; public function __construct() { parent::__construct(new ServerPartModel()); @@ -20,7 +28,7 @@ class ServerPartService extends EquipmentService return [ "serverinfo_uid", "type", - "partinfo_uid", + "part_uid", "billing", "amount", "cnt", @@ -32,7 +40,7 @@ class ServerPartService extends EquipmentService return [ "serverinfo_uid", "type", - "partinfo_uid", + "part_uid", "billing", ]; } @@ -40,6 +48,13 @@ class ServerPartService extends EquipmentService { return ['billing', 'type', 'partinfo_uid']; } + final public function getSwitchService(): SwitchService + { + if (!$this->_switchService) { + $this->_switchService = new SwitchService(); + } + return $this->_switchService; + } final public function getPartService(): PartService { if (!$this->_partService) { @@ -47,6 +62,20 @@ class ServerPartService extends EquipmentService } return $this->_partService; } + final public function getIPService(): IPService + { + if (!$this->_ipService) { + $this->_ipService = new IPService(); + } + return $this->_ipService; + } + final public function getCSService(): CSService + { + if (!$this->_csService) { + $this->_csService = new CSService(); + } + return $this->_csService; + } //partEntity 정보 추가 protected function getEntity_process(mixed $entity): ServerPartEntity { @@ -62,6 +91,9 @@ class ServerPartService extends EquipmentService public function getFormOption(string $field, array $options = []): array { switch ($field) { + case 'SWITCH': + $options = $this->getSwitchService()->getEntities(); + break; case 'CPU': $options = $this->getPartService()->getEntities(['type' => 'CPU']); break; @@ -80,36 +112,53 @@ class ServerPartService extends EquipmentService case 'SOFTWARE': $options = $this->getPartService()->getEntities(['type' => 'SOFTWARE']); break; - case 'partinfo_uid': //수정때문에 전체가 필요 - $options = $this->getPartService()->getEntities(); + case 'IP': + $options = $this->getIPService()->getEntities(); break; - default: - $options = parent::getFormOption($field, $options); + case 'CS': + $options = $this->getCSService()->getEntities(); break; } return $options; } //서버별생성 - public function createByServer(ServerEntity $serverEntity, array $formDatas): ServerPartEntity + public function createByServer(ServerEntity $serverEntity, array $formDatas): ServerEntity { - foreach (SERVER['PARTTYPES'] as $partType) { - $serverPartFormDatas = []; - $serverPartFormDatas["partinfo_uid"] = $formDatas["{$partType}"]; - $serverPartFormDatas["serverinfo_uid"] = $serverEntity->getPK(); - $serverPartFormDatas["serviceinfo_uid"] = $serverEntity->getServiceInfoUID(); - $serverPartFormDatas["type"] = $partType; - $serverPartFormDatas["billing"] = array_key_exists("{$partType}_billing", $formDatas) ? $formDatas["{$partType}_billing"] : null; - $serverPartFormDatas["amount"] = array_key_exists("{$partType}_amount", $formDatas) ? $formDatas["{$partType}_amount"] : 0; - $serverPartFormDatas["cnt"] = array_key_exists("{$partType}_cnt", $formDatas) ? $formDatas["{$partType}_cnt"] : null; - $serverPartFormDatas["extra"] = array_key_exists("{$partType}_extra", $formDatas) ? $formDatas["{$partType}_extra"] : null; - $entity = parent::create($serverPartFormDatas); - //부품정보 정의 - $partEntity = $this->getPartService()->getEntity($entity->getPartInfoUID()); - if ($partEntity) { - $entity->setPartEntity($partEntity); + foreach (SERVERPART['PARTTYPES'] as $partType) { + if (array_key_exists($partType, $formDatas)) { + $serverPartFormDatas = []; + $serverPartFormDatas["part_uid"] = $formDatas[$partType]; + $serverPartFormDatas["serverinfo_uid"] = $serverEntity->getPK(); + $serverPartFormDatas["serviceinfo_uid"] = $serverEntity->getServiceInfoUID(); + $serverPartFormDatas["type"] = $partType; + $serverPartFormDatas["billing"] = null; + $serverPartFormDatas["amount"] = 0; + $serverPartFormDatas["cnt"] = array_key_exists("{$partType}_cnt", $formDatas) ? $formDatas["{$partType}_cnt"] : 1; + $serverPartFormDatas["extra"] = array_key_exists("{$partType}_extra", $formDatas) ? $formDatas["{$partType}_extra"] : null; + $entity = parent::create($serverPartFormDatas); + //부품정보 정의 + switch ($partType) { + case 'SWITCH': + $partService = $this->getSwitchService(); + break; + case 'IP': + $partService = $this->getIPService(); + break; + case 'CS': + $partService = $this->getCSService(); + break; + default: + $partService = $this->getPartService(); + break; + } + $partEntity = $partService->getEntity($entity->getPartUID()); + if (!$partEntity) { + throw new \Exception(__METHOD__ . "에서 오류:{$partType}의{$entity->getPartUID()}에 해닫하는 정보가 없습니다."); + } + $serverEntity->addServerPartEntity($partType, $partEntity); } } - return $entity; + return $serverEntity; } //서버별삭제 public function deleteByServer(ServerEntity $serverEntity): void @@ -120,17 +169,87 @@ class ServerPartService extends EquipmentService } } //서비스연결 - public function enableService(ServerEntity $serverEntity, ServerPartEntity $entity): ServerPartEntity + public function enableService(ServerEntity $serverEntity, ServerPartEntity $entity, array $formDatas): ServerPartEntity { - $formDatas = []; - $formDatas["serviceinfo_uid"] = $serverEntity->getServiceInfoUID(); - return parent::modify($entity, $formDatas); + //ServerPart 수정 + $formDatas["serverinfo_uid"] = $serverEntity->getPK(); + $entity = parent::modify($entity, $formDatas); + //각 파트서비스별 수정 + switch ($entity->getType()) { + case 'SWITCH': + $partService = $this->getSwitchService(); + $formDatas['status'] = STATUS['OCCUPIED'];; + break; + case 'IP': + $partService = $this->getIPService(); + $formDatas['status'] = STATUS['OCCUPIED'];; + break; + case 'CS': + $partService = $this->getCSService(); + $formDatas['status'] = STATUS['OCCUPIED'];; + break; + default: + $partService = $this->getPartService(); + break; + } + $partEntity = $partService->getEntity($entity->getPartUID()); + if (!$partEntity) { + throw new \Exception(__METHOD__ . "에서 오류:{$entity->getType()}의{$entity->getPartUID()}에 해닫하는 정보가 없습니다."); + } + $partEntity = $partService->modify($partEntity, $formDatas); + //파트설정 + $entity->setPartEntity($partEntity); + return $entity; } //서비스해지 - public function disableService(ServerPartEntity $entity): ServerPartEntity + public function disableService(ServerPartEntity $entity, array $formDatas = []): ServerPartEntity { - $formDatas = []; - $formDatas["serviceinfo_uid"] = null; - return parent::modify($entity, $formDatas); + //ServerPart 수정 + $entity = parent::modify($entity, $formDatas); + //각 파트서비스별 수정 + switch ($entity->getType()) { + case 'SWITCH': + $partService = $this->getSwitchService(); + $formDatas['status'] = STATUS['AVAILABLE']; + break; + case 'IP': + $partService = $this->getIPService(); + $formDatas['status'] = STATUS['AVAILABLE']; + break; + case 'CS': + $partService = $this->getCSService(); + $formDatas['status'] = STATUS['AVAILABLE']; + break; + default: + $partService = $this->getPartService(); + break; + } + $partEntity = $partService->getEntity($entity->getPartUID()); + if (!$partEntity) { + throw new \Exception(__METHOD__ . "에서 오류:{$entity->getType()}의{$entity->getPartUID()}에 해닫하는 정보가 없습니다."); + } + $partEntity = $partService->modify($partEntity, $formDatas); + //파트설정 + $entity->setPartEntity($partEntity); + return $entity; + } + public function show(int $serverinfo_uid): string + { + //서버파트연결용 + $viewDatas = [ + 'control' => [ + 'fields' => SERVERPART['PARTTYPES'], + 'filters' => SERVERPART['PARTTYPES'], + 'field_options' => [], + ], + ]; + foreach (SERVERPART['PARTTYPES'] as $partType) { + $viewDatas['control']['field_options'][$partType] = $this->getFormOption($partType); + } + $viewDatas['helper'] = new ServerPartHelper(); + $viewDatas['action'] = __FUNCTION__; + //기존 Entity 가져오기 + $viewDatas['entities'] = $this->getEntities(['serverinfo_uid' => $serverinfo_uid]); + return view('serverpart/' . __FUNCTION__, ['viewDatas' => $viewDatas]); } } diff --git a/app/Services/Equipment/ServerService.php b/app/Services/Equipment/ServerService.php index 6c6724a..fdb002e 100644 --- a/app/Services/Equipment/ServerService.php +++ b/app/Services/Equipment/ServerService.php @@ -10,8 +10,6 @@ use App\Services\Equipment\EquipmentService; class ServerService extends EquipmentService { private ?ServerPartService $_serverPartService = null; - private ?IPService $_ipService = null; - private ?CSService $_csService = null; public function __construct() { parent::__construct(new ServerModel()); @@ -85,76 +83,18 @@ class ServerService extends EquipmentService } return $this->_serverPartService; } - final public function getIPService(): IPService - { - if (!$this->_ipService) { - $this->_ipService = new IPService(); - } - return $this->_ipService; - } - final public function getCSService(): CSService - { - if (!$this->_csService) { - $this->_csService = new CSService(); - } - return $this->_csService; - } //partEntity 정보 추가 protected function getEntity_process(mixed $entity): ServerEntity { //부품연결정보 정의 - foreach (SERVER['PARTTYPES'] as $partType) { + foreach (SERVERPART['PARTTYPES'] as $partType) { foreach ($this->getServerPartService()->getEntities(['serverinfo_uid' => $entity->getPK(), 'type' => $partType]) as $serverPartEntity) { $entity->addServerPartEntity($partType, $serverPartEntity); } } - //Switch정보 정의 - $switchEntity = $this->getSwitchService()->getEntity(['serverinfo_uid' => $entity->getPK()]); - $entity->setSwitchEntity($switchEntity); - //IP정보 정의 - foreach ($this->getIPService()->getEntities(['serverinfo_uid' => $entity->getPK()]) as $ipEntity) { - $entity->addIPEntity($ipEntity); - } - //CS정보 정의 - foreach ($this->getCSService()->getEntities(['serverinfo_uid' => $entity->getPK()]) as $csEntity) { - $entity->addCSEntity($csEntity); - } return $entity; } //기본 기능부분 - public function getFormOption(string $field, array $options = []): array - { - switch ($field) { - case 'CPU': - $options = $this->getServerPartService()->getFormOption('CPU'); - break; - case 'RAM': - $options = $this->getServerPartService()->getFormOption('RAM'); - break; - case 'DISK': - $options = $this->getServerPartService()->getFormOption('DISK'); - break; - case 'OS': - $options = $this->getServerPartService()->getFormOption('OS'); - break; - case 'DB': - $options = $this->getServerPartService()->getFormOption('DB'); - break; - case 'SOFTWARE': - $options = $this->getServerPartService()->getFormOption('SOFTWARE'); - break; - case 'ipinfo_uid': //수정때문에 전체가 필요 - $options = $this->getIPService()->getEntities(); - break; - case 'csinfo_uid': //수정때문에 전체가 필요 - $options = $this->getCSService()->getEntities(); - break; - default: - $options = parent::getFormOption($field, $options); - break; - } - return $options; - } //FieldForm관련용 //create용 장비코드 마지막번호 가져오기 final public function getLastestCode(string $format, int $default): string @@ -200,73 +140,35 @@ class ServerService extends EquipmentService parent::setOrderBy($field, $value); } - public function enableService(ServiceEntity $serviceEntity, ServerEntity $entity, array $formDatas): ServerEntity + public function enableService(ServiceEntity $serviceEntity, ServerEntity $entity): ServerEntity { $formDatas = []; $formDatas["clientinfo_uid"] = $serviceEntity->getClientInfoUID(); $formDatas["serviceinfo_uid"] = $serviceEntity->getPK(); - $formDatas['status'] = ServerEntity::STATUS_OCCUPIED; + $formDatas['status'] = STATUS['OCCUPIED'];; $entity = parent::modify($entity, $formDatas); //ServerPart경우 서비스번호 설정 + $serverPartEntities = []; foreach ($this->getServerPartService()->getEntities(['serverinfo_uid' => $entity->getPK()]) as $serverPartEntity) { - $this->getServerPartService()->enableService($entity, $serverPartEntity); - } - //Switch경우 서비스중으로 설정 - if (array_key_exists('switchinfo_uid', $formDatas)) { - $switchEntity = $this->getSwitchService()->getEntity($formDatas['switchinfo_uid']); - if (!$switchEntity) { - throw new \Exception("{$formDatas['switchinfo_uid']}에 대한 스위치정보를 찾을수 없습니다."); - } - $switchEntity = $this->getSwitchService()->enableService($entity, $switchEntity); - $entity->setSwitchEntity($switchEntity); - } - //IP정보 서비스중으로 설정 - if (array_key_exists('ipinfo_uid', $formDatas)) { - $ipEntity = $this->getIPService()->getEntity($formDatas['ipinfo_uid']); - if (!$ipEntity) { - throw new \Exception("{$formDatas['ipinfo_uid']}에 대한 IP정보를 찾을수 없습니다."); - } - $ipEntity = $this->getIPService()->enableService($entity, $ipEntity); - $entity->addIPEntity($ipEntity); - } - //CS정보 서비스중으로 설정 - if (array_key_exists('csinfo_uid', $formDatas)) { - $csEntity = $this->getCSService()->getEntity($formDatas['csinfo_uid']); - if (!$csEntity) { - throw new \Exception("{$formDatas['csinfo_uid']}에 대한 CS정보를 찾을수 없습니다."); - } - $csEntity = $this->getCSService()->enableService($entity, $csEntity); - $entity->addCSEntity($csEntity); + $serverPartEntities[] = $this->getServerPartService()->enableService($entity, $serverPartEntity, $formDatas); } + $entity->setServerPartEntities($serverPartEntities); return $entity; } - public function disableService(ServerEntity $entity): ServerEntity + public function disableService(ServiceEntity $serviceEntity, ServerEntity $entity): ServerEntity { - //ServerPart경우 서비스번호 해지 - foreach ($this->getServerPartService()->getEntities(['serverinfo_uid' => $entity->getPK()]) as $serverPartEntity) { - $this->getServerPartService()->disableService($serverPartEntity); - } - //서비스 해지시 기존 Switch정보를 사용가능 상태로 변경 - $switchEntity = $entity->getSwitchEntity(); - if ($switchEntity !== null) { - $this->getSwitchService()->disableService($switchEntity); - $entity->setSwitchEntity(null); - } - //서비스 해지시 기존 IP정보를 사용가능 상태로 변경 - foreach ($entity->getIPEntities() as $ipEntity) { - $this->getIPService()->disableService($ipEntity); - } - $entity->setIPEntities([]); - //서비스 해지시 기존 CS정보를 사용가능 상태로 변경 - foreach ($entity->getCSEntities() as $csEntity) { - $this->getCSService()->disableService($csEntity); - } - $entity->setCSEntities([]); - $formDatas = []; $formDatas["clientinfo_uid"] = null; $formDatas["serviceinfo_uid"] = null; - $formDatas['status'] = ServerEntity::STATUS_AVAILABLE; - return parent::modify($entity, $formDatas); + $formDatas['old_clientinfo_uid'] = $serviceEntity->getClientInfoUID(); + $formDatas['status'] = STATUS['AVAILABLE']; + $entity = parent::modify($entity, $formDatas); + //ServerPart경우 서비스번호 해지 + $serverPartEntities = []; + foreach ($this->getServerPartService()->getEntities(['serverinfo_uid' => $entity->getPK()]) as $serverPartEntity) { + $serverPartEntities[] = $this->getServerPartService()->disableService($serverPartEntity); + } + $entity->setServerPartEntities($serverPartEntities); + return $entity; } } diff --git a/app/Services/Equipment/SwitchService.php b/app/Services/Equipment/SwitchService.php index 80eaa64..851679f 100644 --- a/app/Services/Equipment/SwitchService.php +++ b/app/Services/Equipment/SwitchService.php @@ -63,23 +63,4 @@ class SwitchService extends EquipmentService $this->getModel()->orderBy('code', 'ASC'); parent::setOrderBy($field, $value); } - - public function enableService(ServerEntity $serverEntity, SwitchEntity $entity): SwitchEntity - { - $formDatas = []; - $formDatas["clientinfo_uid"] = $serverEntity->getClientInfoUID(); - $formDatas["serviceinfo_uid"] = $serverEntity->getServiceInfoUID(); - $formDatas["serverinfo_uid"] = $serverEntity->getPK(); - $formDatas['status'] = SwitchEntity::STATUS_OCCUPIED; - return parent::modify($entity, $formDatas); - } - public function disableService(SwitchEntity $entity): SwitchEntity - { - $formDatas = []; - $formDatas["clientinfo_uid"] = null; - $formDatas["serviceinfo_uid"] = null; - $formDatas["serverinfo_uid"] = null; - $formDatas['status'] = SwitchEntity::STATUS_AVAILABLE; - return parent::modify($entity, $formDatas); - } } diff --git a/app/Views/admin/server/create_form.php b/app/Views/admin/server/create_form.php index 4410328..eaa9353 100644 --- a/app/Views/admin/server/create_form.php +++ b/app/Views/admin/server/create_form.php @@ -26,7 +26,7 @@ - + diff --git a/app/Views/admin/serverpart/show.php b/app/Views/admin/serverpart/show.php new file mode 100644 index 0000000..faaafbc --- /dev/null +++ b/app/Views/admin/serverpart/show.php @@ -0,0 +1,8 @@ +
getFieldLabel("{$partType}", lang("{$viewDatas['class_path']}.label.{$partType}"), $viewDatas) ?> diff --git a/app/Views/admin/server/index.php b/app/Views/admin/server/index.php index c75d424..def5451 100644 --- a/app/Views/admin/server/index.php +++ b/app/Views/admin/server/index.php @@ -69,13 +69,8 @@ getFieldView('status', $entity->status, $viewDatas) ?> + $entity->getPK()]) ?> - - - - - - diff --git a/app/Views/admin/server/index_org.php b/app/Views/admin/server/index_org.php index 6c89666..ddeeebc 100644 --- a/app/Views/admin/server/index_org.php +++ b/app/Views/admin/server/index_org.php @@ -39,7 +39,7 @@ diff --git a/app/Views/admin/server/view.php b/app/Views/admin/server/view.php index 59a0f5e..5891235 100644 --- a/app/Views/admin/server/view.php +++ b/app/Views/admin/server/view.php @@ -25,21 +25,21 @@
getListButton($partType, $partType, $viewDatas) ?>getFieldView($partType, "", $viewDatas) ?>
IP getFieldView("ipinfo_uid", "", $viewDatas) ?>getFieldView($field, $entity->$field, $viewDatas) ?> -
getFieldView($partType, "", $viewDatas) ?>
+
getFieldView($partType, "", $viewDatas) ?>
getFieldView("ipinfo_uid", "", $viewDatas) ?>
getFieldView("csinfo_uid", "", $viewDatas) ?>
- - - - - +
getFieldLabel("{$partType}", lang("{$viewDatas['class_path']}.label.{$partType}"), $viewDatas) ?> - getServerPartEntities($partType) as $serverPartEntity): ?> -
- getFieldView("{$partType}", $serverPartEntity->getPartInfoUID(), $viewDatas) ?> - getFieldView("{$partType}_cnt", $serverPartEntity->getCnt(), $viewDatas) ?> - getFieldView("{$partType}_extra", $serverPartEntity->getExtra(), $viewDatas) ?> -
- -
+ + + + + + + + + + + +
getListButton($partType, $partType, $viewDatas) ?>getFieldView($partType, "", $viewDatas) ?>
IPgetFieldView("ipinfo_uid", "", $viewDatas) ?>
CSgetFieldView("csinfo_uid", "", $viewDatas) ?>
+ + + + + + +
getListButton($partType, $partType, $viewDatas) ?>getFieldView($partType, "", $viewDatas) ?>
\ No newline at end of file diff --git a/app/Views/admin/service/index.php b/app/Views/admin/service/index.php index 64658f6..981b6a2 100644 --- a/app/Views/admin/service/index.php +++ b/app/Views/admin/service/index.php @@ -77,7 +77,7 @@ - + diff --git a/app/Views/admin/service/view.php b/app/Views/admin/service/view.php index d978c3c..6165930 100644 --- a/app/Views/admin/service/view.php +++ b/app/Views/admin/service/view.php @@ -26,7 +26,7 @@
getListButton($partType, $partType, $viewDatas) ?> getFieldView($partType, "", $viewDatas) ?> - +
getFieldLabel("{$partType}", lang("{$viewDatas['class_path']}.label.{$partType}"), $viewDatas) ?>