dbmsv3 init...1

This commit is contained in:
choi.jh 2025-10-31 12:25:18 +09:00
parent c680bb7c3b
commit c15f8d1dfb
11 changed files with 430 additions and 92 deletions

View File

@ -395,6 +395,10 @@ define("STATUS_ICONS", [
]);
//List의 Page당 갯수
define('DEFAULT_LIST_PERPAGE', $_ENV['LIST_PERPAGE'] ?? $_SERVER['LIST_PERPAGE'] ?? 20);
//서비스 관련
define("SERVICE", [
"NEW_INTERVAL" => $_ENV['SERVICE_NEW_INTERVAL'] ?? $_SERVER['SERVICE_NEW_INTERVAL'] ?? 7,
]);
//서버 관련
define("SERVER", [
"TYPES" => [
@ -408,10 +412,44 @@ define("SERVER", [
"OURS" => 'ours',
"COLOCATION" => 'colocation'
],
]);
//서비스 관련
define("SERVICE", [
"NEW_INTERVAL" => $_ENV['SERVICE_NEW_INTERVAL'] ?? $_SERVER['SERVICE_NEW_INTERVAL'] ?? 7,
"CHASSISES" => [
"HP DL360 GEN6B" => "HP DL360 Gen6 B",
"HP DL360 GEN7C" => "HP DL360 Gen7 C",
"HP DL360 GEN7D" => "HP DL360 Gen7 D",
"HP DL360 GEN8D" => "HP DL360 Gen8 D",
"HP DL360 GEN8E" => "HP DL360 Gen8 E",
"HP DL360 GEN9E" => "HP DL360 Gen9 E",
"HP DL360 GEN10" => "HP DL360 Gen10",
"Hitach HA3000" => "Hitach HA3000",
"DESKTOP I5-9" => "데탑 I5 9세대",
"DESKTOP I5-10" => "데탑 I5 10세대",
"DESKTOP I5-12" => "데탑 I5 12세대",
"DESKTOP I7-9" => "데탑 I5 9세대",
"DESKTOP I7-10" => "데탑 I5 10세대",
"DESKTOP I7-12" => "데탑 I5 12세대",
"MINI I5-12" => "Mini I5 12세대",
"VPC" => "아마존-VPN",
"KCS" => "KT-VPN",
],
"STOCKS" => [
"HP DL360 GEN6B" => 100,
"HP DL360 GEN7C" => 100,
"HP DL360 GEN7D" => 100,
"HP DL360 GEN8D" => 100,
"HP DL360 GEN8E" => 100,
"HP DL360 GEN9E" => 100,
"HP DL360 GEN10" => 100,
"Hitach HA3000" => 100,
"DESKTOP I5-9" => 100,
"DESKTOP I5-10" => 100,
"DESKTOP I5-12" => 100,
"DESKTOP I7-9" => 100,
"DESKTOP I7-10" => 100,
"DESKTOP I7-12" => 100,
"MINI I5-12" => 100,
"VPC" => 100,
"KCS" => 100,
]
]);
//서버파트 관련
define("SERVERPART", [

View File

@ -60,7 +60,7 @@ class ServerController extends EquipmentController
}
$this->ips = $ips;
$switchs = [];
foreach ($this->getService()->getSwitchService()->getEntities(['status' => STATUS['AVAILABLE']]) as $switchEntity) {
foreach ($this->getService()->getSWITCHService()->getEntities(['status' => STATUS['AVAILABLE']]) as $switchEntity) {
$switchs[] = $switchEntity->getTitle();
}
$this->switchs = $switchs;

View File

@ -4,8 +4,8 @@
"settings": {
"width": 3000,
"height": 3000,
"scrollTop": -1918.7873,
"scrollLeft": -382,
"scrollTop": -1662.7873,
"scrollLeft": -566.8263,
"zoomLevel": 0.79,
"show": 511,
"database": 4,
@ -291,9 +291,11 @@
"hPz83FX0cU7HIyVRRr5sl",
"3fZMQ9qB1DO8y44eJRKdt",
"6fnpnhwe9G-y5QQ1j30W9",
"jwUR4xeCWn9uuxvaLZtN6",
"34psXzS7RLX0sWXZyDGGf",
"I8DumSwkLWz-Ve5_vc0uE",
"m77kSp3scTgMhInPBjsc3",
"DGNtNG8gI3Ohbzo1xgDKb",
"4t01_53QawHcw0lfY4zDm",
"jnDePNx6_yIPBt4qYZguP",
"UYIPZF2zMJcIZoTNYWUTH",
@ -336,15 +338,15 @@
"aY2pn1J3VHF_qV5XFM_zf"
],
"ui": {
"x": 1086.7498,
"y": 1832.4788,
"x": 1213.3322,
"y": 2331.2131,
"zIndex": 2,
"widthName": 60,
"widthComment": 60,
"color": ""
},
"meta": {
"updateAt": 1760573684145,
"updateAt": 1761880902085,
"createAt": 1745819764137
}
},
@ -929,15 +931,15 @@
"IMTeN4-Evbpr5MMraE__C"
],
"ui": {
"x": 2001.6042,
"y": 2348.1309,
"x": 2039.5788,
"y": 2451.9284,
"zIndex": 4514,
"widthName": 76,
"widthComment": 74,
"color": ""
},
"meta": {
"updateAt": 1758500931857,
"updateAt": 1761878682327,
"createAt": 1755476453282
}
},
@ -1141,6 +1143,46 @@
"updateAt": 1761814795909,
"createAt": 1760931280848
}
},
"VzfUvLDzW5b3ZrhKlIrfL": {
"id": "VzfUvLDzW5b3ZrhKlIrfL",
"name": "chassisinfo",
"comment": "서버새시",
"columnIds": [
"JgUEq02zcFTwgZldn5mBt",
"PiB4FqYOU02I2AhCb_JNe",
"AS6mHxF1-xAitruwRnpre",
"ix-I1N0Eg7qb7KwHNpwQ7",
"naVsFjtKb6dbAbBn0qYdI",
"ErmXPGoyV64-_E9K77iPH",
"utAR9OGAp4PTfrt74IR9i",
"jCXXvi0tqZ2F9wl3JNmcO",
"waKMTDocanXcM2qgHDc-6"
],
"seqColumnIds": [
"JgUEq02zcFTwgZldn5mBt",
"PiB4FqYOU02I2AhCb_JNe",
"AS6mHxF1-xAitruwRnpre",
"ix-I1N0Eg7qb7KwHNpwQ7",
"2OKdz2h6LxojZlRriUvbv",
"naVsFjtKb6dbAbBn0qYdI",
"ErmXPGoyV64-_E9K77iPH",
"utAR9OGAp4PTfrt74IR9i",
"jCXXvi0tqZ2F9wl3JNmcO",
"waKMTDocanXcM2qgHDc-6"
],
"ui": {
"x": 624.0507,
"y": 2017.4523,
"zIndex": 5389,
"widthName": 60,
"widthComment": 60,
"color": ""
},
"meta": {
"updateAt": 1761878649688,
"createAt": 1761876372961
}
}
},
"tableColumnEntities": {
@ -9743,6 +9785,246 @@
"updateAt": 1761814907315,
"createAt": 1761814742080
}
},
"2OKdz2h6LxojZlRriUvbv": {
"id": "2OKdz2h6LxojZlRriUvbv",
"tableId": "VzfUvLDzW5b3ZrhKlIrfL",
"name": "uid",
"comment": "새시정보",
"dataType": "INT",
"default": "",
"options": 11,
"ui": {
"keys": 1,
"widthName": 60,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1761876761651,
"createAt": 1761876450912
}
},
"PiB4FqYOU02I2AhCb_JNe": {
"id": "PiB4FqYOU02I2AhCb_JNe",
"tableId": "VzfUvLDzW5b3ZrhKlIrfL",
"name": "title",
"comment": "",
"dataType": "VARCHAR(50)",
"default": "",
"options": 12,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 75,
"widthDefault": 60
},
"meta": {
"updateAt": 1761876450912,
"createAt": 1761876450912
}
},
"AS6mHxF1-xAitruwRnpre": {
"id": "AS6mHxF1-xAitruwRnpre",
"tableId": "VzfUvLDzW5b3ZrhKlIrfL",
"name": "price",
"comment": "기본금액",
"dataType": "INT",
"default": "0",
"options": 8,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1761876450913,
"createAt": 1761876450913
}
},
"ix-I1N0Eg7qb7KwHNpwQ7": {
"id": "ix-I1N0Eg7qb7KwHNpwQ7",
"tableId": "VzfUvLDzW5b3ZrhKlIrfL",
"name": "used",
"comment": "사용",
"dataType": "INT",
"default": "0",
"options": 8,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1761876450913,
"createAt": 1761876450913
}
},
"naVsFjtKb6dbAbBn0qYdI": {
"id": "naVsFjtKb6dbAbBn0qYdI",
"tableId": "VzfUvLDzW5b3ZrhKlIrfL",
"name": "stock",
"comment": "재고",
"dataType": "INT",
"default": "0",
"options": 8,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1761876450913,
"createAt": 1761876450913
}
},
"ErmXPGoyV64-_E9K77iPH": {
"id": "ErmXPGoyV64-_E9K77iPH",
"tableId": "VzfUvLDzW5b3ZrhKlIrfL",
"name": "status",
"comment": "",
"dataType": "VARCHAR(20)",
"default": "'available'",
"options": 8,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 75,
"widthDefault": 60
},
"meta": {
"updateAt": 1761876450913,
"createAt": 1761876450913
}
},
"utAR9OGAp4PTfrt74IR9i": {
"id": "utAR9OGAp4PTfrt74IR9i",
"tableId": "VzfUvLDzW5b3ZrhKlIrfL",
"name": "updated_at",
"comment": "",
"dataType": "TIMESTAMP",
"default": "",
"options": 0,
"ui": {
"keys": 0,
"widthName": 62,
"widthComment": 60,
"widthDataType": 65,
"widthDefault": 60
},
"meta": {
"updateAt": 1761876450913,
"createAt": 1761876450913
}
},
"jCXXvi0tqZ2F9wl3JNmcO": {
"id": "jCXXvi0tqZ2F9wl3JNmcO",
"tableId": "VzfUvLDzW5b3ZrhKlIrfL",
"name": "created_at",
"comment": "",
"dataType": "TIMESTAMP",
"default": "CURRENT_TIMESTAMP",
"options": 8,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 65,
"widthDefault": 122
},
"meta": {
"updateAt": 1761876450913,
"createAt": 1761876450913
}
},
"waKMTDocanXcM2qgHDc-6": {
"id": "waKMTDocanXcM2qgHDc-6",
"tableId": "VzfUvLDzW5b3ZrhKlIrfL",
"name": "deleted_at",
"comment": "",
"dataType": "TIMESTAMP",
"default": "",
"options": 0,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 65,
"widthDefault": 60
},
"meta": {
"updateAt": 1761876450913,
"createAt": 1761876450913
}
},
"DGNtNG8gI3Ohbzo1xgDKb": {
"id": "DGNtNG8gI3Ohbzo1xgDKb",
"tableId": "B4qGh3KZsXHQ3_4EOgwJZ",
"name": "uid",
"comment": "새시정보",
"dataType": "INT",
"default": "",
"options": 11,
"ui": {
"keys": 1,
"widthName": 60,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1761878648562,
"createAt": 1761878648561
}
},
"JgUEq02zcFTwgZldn5mBt": {
"id": "JgUEq02zcFTwgZldn5mBt",
"tableId": "VzfUvLDzW5b3ZrhKlIrfL",
"name": "uid",
"comment": "새시정보",
"dataType": "INT",
"default": "",
"options": 11,
"ui": {
"keys": 1,
"widthName": 60,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1761878649367,
"createAt": 1761878649367
}
},
"jwUR4xeCWn9uuxvaLZtN6": {
"id": "jwUR4xeCWn9uuxvaLZtN6",
"tableId": "B4qGh3KZsXHQ3_4EOgwJZ",
"name": "chassisinfo_uid",
"comment": "새시정보",
"dataType": "INT",
"default": "",
"options": 8,
"ui": {
"keys": 0,
"widthName": 81,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1761878702799,
"createAt": 1761878666655
}
}
},
"relationshipEntities": {
@ -10148,8 +10430,8 @@
"columnIds": [
"RITMHZcQAJ7KvtxkTtMv-"
],
"x": 1581.7498,
"y": 1832.4788,
"x": 1460.8322,
"y": 2331.2131,
"direction": 4
},
"end": {
@ -10176,8 +10458,8 @@
"columnIds": [
"RITMHZcQAJ7KvtxkTtMv-"
],
"x": 1746.7498,
"y": 2107.4788,
"x": 1873.3322,
"y": 2441.2131,
"direction": 2
},
"end": {
@ -10185,9 +10467,9 @@
"columnIds": [
"GtBqjKsmtYWvsd0fckBc0"
],
"x": 1897.1286,
"y": 2127.0561,
"direction": 1
"x": 2166.1286,
"y": 2219.0561,
"direction": 8
},
"meta": {
"updateAt": 1756086147218,
@ -10213,9 +10495,9 @@
"columnIds": [
"4iRyOhmW3b7kbiZT8lQyY"
],
"x": 1746.7498,
"y": 1887.4788,
"direction": 2
"x": 1625.8322,
"y": 2331.2131,
"direction": 4
},
"meta": {
"updateAt": 1755653818593,
@ -10241,8 +10523,8 @@
"columnIds": [
"JRdeV7n53lb1iSmmYnhHX"
],
"x": 1251.7498,
"y": 1832.4788,
"x": 1295.8322,
"y": 2331.2131,
"direction": 4
},
"meta": {
@ -10288,8 +10570,8 @@
"columnIds": [
"RITMHZcQAJ7KvtxkTtMv-"
],
"x": 1086.7498,
"y": 2052.4788,
"x": 1213.3322,
"y": 2551.2131,
"direction": 1
},
"end": {
@ -10316,8 +10598,8 @@
"columnIds": [
"RITMHZcQAJ7KvtxkTtMv-"
],
"x": 1746.7498,
"y": 2217.4788,
"x": 1873.3322,
"y": 2661.2131,
"direction": 2
},
"end": {
@ -10325,8 +10607,8 @@
"columnIds": [
"IbWdZlEEF70bGqUDkU5ub"
],
"x": 2001.6042,
"y": 2624.1309,
"x": 2039.5788,
"y": 2727.9284,
"direction": 1
},
"meta": {
@ -10437,8 +10719,8 @@
"columnIds": [
"eu4eV0U7BRaP7Zk-oyBhV"
],
"x": 2150.1041999999998,
"y": 2348.1309,
"x": 2188.0788000000002,
"y": 2451.9284,
"direction": 4
},
"meta": {
@ -10494,7 +10776,7 @@
"q_IaRBb367b9mgGozh6jB"
],
"x": 1897.1286,
"y": 1943.0561,
"y": 2035.0561,
"direction": 1
},
"meta": {
@ -10549,8 +10831,8 @@
"columnIds": [
"nlrS7pAK108Hen0g1_yRG"
],
"x": 2001.6042,
"y": 2440.1309,
"x": 2039.5788,
"y": 2543.9284,
"direction": 1
},
"meta": {
@ -10605,8 +10887,8 @@
"columnIds": [
"Fo9A9MajgfwBYecToLCoW"
],
"x": 2447.1041999999998,
"y": 2348.1309,
"x": 2485.0788000000002,
"y": 2451.9284,
"direction": 4
},
"meta": {
@ -10624,9 +10906,9 @@
"columnIds": [
"RITMHZcQAJ7KvtxkTtMv-"
],
"x": 1746.7498,
"y": 1997.4788,
"direction": 2
"x": 1790.8322,
"y": 2331.2131,
"direction": 4
},
"end": {
"tableId": "B8haiEbPc1lRBWTv1g25G",
@ -10641,6 +10923,34 @@
"updateAt": 1758513283349,
"createAt": 1758513283349
}
},
"0HEBB3TiJBligRvECnviO": {
"id": "0HEBB3TiJBligRvECnviO",
"identification": false,
"relationshipType": 8,
"startRelationshipType": 2,
"start": {
"tableId": "VzfUvLDzW5b3ZrhKlIrfL",
"columnIds": [
"JgUEq02zcFTwgZldn5mBt"
],
"x": 1121.0507,
"y": 2153.4523,
"direction": 2
},
"end": {
"tableId": "B4qGh3KZsXHQ3_4EOgwJZ",
"columnIds": [
"jwUR4xeCWn9uuxvaLZtN6"
],
"x": 1213.3322,
"y": 2679.2131,
"direction": 1
},
"meta": {
"updateAt": 1761878666655,
"createAt": 1761878666655
}
}
},
"indexEntities": {},

View File

@ -30,25 +30,7 @@ return [
SERVER['TYPES']["OURS"] => "자사용",
SERVER['TYPES']["COLOCATION"] => "코로케이션",
],
"TITLE" => [
"HP DL360 GEN6B" => "HP DL360 Gen6 B",
"HP DL360 GEN7C" => "HP DL360 Gen7 C",
"HP DL360 GEN7D" => "HP DL360 Gen7 D",
"HP DL360 GEN8D" => "HP DL360 Gen8 D",
"HP DL360 GEN8E" => "HP DL360 Gen8 E",
"HP DL360 GEN9E" => "HP DL360 Gen9 E",
"HP DL360 GEN10" => "HP DL360 Gen10",
"Hitach HA3000" => "Hitach HA3000",
"DESKTOP I5-9" => "데탑 I5 9세대",
"DESKTOP I5-10" => "데탑 I5 10세대",
"DESKTOP I5-12" => "데탑 I5 12세대",
"DESKTOP I7-9" => "데탑 I5 9세대",
"DESKTOP I7-10" => "데탑 I5 10세대",
"DESKTOP I7-12" => "데탑 I5 12세대",
"MINI I5-12" => "Mini I5 12세대",
"VPC" => "아마존-VPN",
"KCS" => "KT-VPN",
],
"TITLE" => SERVER['CHASSISES'],
"STATUS" => [
STATUS['AVAILABLE'] => "사용가능",
STATUS['OCCUPIED'] => "서비스중",

View File

@ -288,7 +288,7 @@ class ServerPartService extends EquipmentService implements ServerPartInterface
$this->getServerService(),
$this->getPaymentService(),
$this->getIPService(),
$this->getSwitchService(),
$this->getSWITCHService(),
$this->getMylogService()
);
return $processor->create($formDatas);
@ -302,7 +302,7 @@ class ServerPartService extends EquipmentService implements ServerPartInterface
$this->getServerService(),
$this->getPaymentService(),
$this->getIPService(),
$this->getSwitchService(),
$this->getSWITCHService(),
$this->getMylogService()
);
return $processor->modify($entity, $formDatas);
@ -316,7 +316,7 @@ class ServerPartService extends EquipmentService implements ServerPartInterface
$this->getServerService(),
$this->getPaymentService(),
$this->getIPService(),
$this->getSwitchService(),
$this->getSWITCHService(),
$this->getMylogService()
);
return $processor->delete($entity);

View File

@ -43,7 +43,6 @@ class ServerService extends EquipmentService implements ServerInterface
return [
"type",
"os",
"title",
"status"
];
}
@ -70,7 +69,7 @@ class ServerService extends EquipmentService implements ServerInterface
'serviceinfo_uid',
'type',
"os",
"title",
"chassis",
'status'
];
}
@ -92,7 +91,7 @@ class ServerService extends EquipmentService implements ServerInterface
}
return $this->_ipService;
}
final public function getSwitchService(): SWITCHService
final public function getSWITCHService(): SWITCHService
{
if (!$this->_switchService) {
$this->_switchService = new SWITCHService();
@ -167,9 +166,10 @@ class ServerService extends EquipmentService implements ServerInterface
{
$builder = $this->getModel()->select('title,COUNT(*) AS cnt')->groupBy('title')->builder();
// echo $builder->getCompiledSelect(false); //초기화 없이 SQL만 보고 싶을 때: getCompiledSelect(false) ← 꼭 false!
$rows = $builder->get()->getResult();
if (!count($rows)) {
return [];
// dd($builder->get()->getResult());
$rows = [];
foreach ($builder->get()->getResult() as $row) {
$rows[$row->title] = $row->cnt;
}
return $rows;
}
@ -249,7 +249,7 @@ class ServerService extends EquipmentService implements ServerInterface
$this->getServiceService(),
$this->getServerPartService(),
$this->getIPService(),
$this->getSwitchService(),
$this->getSWITCHService(),
$this->getMylogService()
);
return $processor->create($formDatas);
@ -263,7 +263,7 @@ class ServerService extends EquipmentService implements ServerInterface
$this->getServiceService(),
$this->getServerPartService(),
$this->getIPService(),
$this->getSwitchService(),
$this->getSWITCHService(),
$this->getMylogService()
);
return $processor->modify($entity, $formDatas);
@ -277,7 +277,7 @@ class ServerService extends EquipmentService implements ServerInterface
$this->getServiceService(),
$this->getServerPartService(),
$this->getIPService(),
$this->getSwitchService(),
$this->getSWITCHService(),
$this->getMylogService()
);
return $processor->delete($entity);

View File

@ -25,7 +25,7 @@ abstract class PartService extends CommonService implements PartInterface
}
//부품정보에 서버정보 설정 및 서비스,고객정보 정의
if ($entity->getAvailable() < $serverPartEntity->getCnt()) {
throw new \Exception("현재 재고수[{$entity->getAvailable()}]보다 지정하신 갯수({$serverPartEntity->getCnt()})가 더 많습니다.");
throw new \Exception("현재 사용가능 갯수[{$entity->getAvailable()}]보다 지정하신 갯수({$serverPartEntity->getCnt()})가 더 많습니다.");
}
return $this->getModel()->modify($entity, ['used' => $entity->getUsed() + $serverPartEntity->getCnt()]);
}

View File

@ -10,9 +10,9 @@
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
<table class="table table-bordered table-striped">
<tr>
<th class="text-center" width="30%">사용 서버</th>
<th class="text-center" width="30%">메모리 재고</th>
<th class="text-center" width="40%">저장장치 재고</th>
<th class="text-center" width="33%">사용 서버</th>
<th class="text-center" width="33%">메모리 재고</th>
<th class="text-center">저장장치 재고</th>
</tr>
<tr>
<td><?= view_cell("\App\Cells\Equipment\ServerCell::stock") ?></td>

View File

@ -1,14 +1,15 @@
<table class="table table-bordered table-hover table-striped">
<tr>
<th class="text-center">항목</th>
<th class="text-center">사용수</th>
<th class="text-center">재고수</th>
<th class="text-center">포맷대기</th>
<th class="text-center text-nowrap" width="13%">사용</th>
<th class="text-center text-nowrap" width="13%">가능</th>
<th class="text-center text-nowrap" width="13%">포맷</th>
<th class="text-center text-nowrap" width="15%">총재고</th>
</tr>
<?php foreach ($partCellDatas['entities'] as $entity): ?>
<?php $partCellDatas['entity'] = $entity; ?>
<tr>
<td class="text-end" nowrap>
<td class="text-end text-nowrap">
<?=
form_label(
$entity->getTitle(),
@ -22,9 +23,10 @@
);
?>
</td>
<td class="text-center" nowrap width="20%"><?= $entity->getUsed() ?></td>
<td class="text-center" nowrap width="20%"><?= $entity->getAvailable() ?></td>
<td nowrap width="20%"><?= $partCellDatas['service']->getHelper()->getFieldView('format', $entity->format, $partCellDatas) ?></td>
<td class="text-center text-nowrap" 저장장치 재고><?= $entity->getUsed() ?></td>
<td class="text-center text-nowrap"><?= $entity->getAvailable() ?></td>
<td class="text-center text-nowrap"><?= $partCellDatas['service']->getHelper()->getFieldView('format', $entity->format, $partCellDatas) ?></td>
<td class="text-center text-nowrap"><?= $entity->getStock() ?></td>
</tr>
<?php endforeach ?>
</table>

View File

@ -1,13 +1,14 @@
<table class="table table-bordered table-hover table-striped">
<tr>
<th class="text-center">항목</th>
<th class="text-center">사용수</th>
<th class="text-center">재고수</th>
<th class="text-center text-nowrap" width="13%">사용</th>
<th class="text-center text-nowrap" width="13%">가능</th>
<th class="text-center text-nowrap" width="17%">총재고</th>
</tr>
<?php foreach ($partCellDatas['entities'] as $entity): ?>
<?php $partCellDatas['entity'] = $entity; ?>
<tr>
<td class="text-end" nowrap>
<td class="text-end text-nowrap">
<?=
form_label(
$entity->getTitle(),
@ -21,8 +22,9 @@
);
?>
</td>
<td class="text-center" nowrap width="30%"><?= $entity->getUsed() ?></td>
<td class="text-center" nowrap width="30%"><?= $entity->getAvailable() ?></td>
<td class="text-center text-nowrap"><?= $entity->getUsed() ?></td>
<td class="text-center text-nowrap"><?= $entity->getAvailable() ?></td>
<td class="text-center text-nowrap"><?= $entity->getStock() ?></td>
</tr>
<?php endforeach ?>
</table>

View File

@ -1,12 +1,16 @@
<table class="table table-bordered table-hover table-striped">
<tr>
<th class="text-center">항목</th>
<th class="text-center">갯수</th>
<th class="text-center text-nowrap" width="18%">사용</th>
<th class="text-center text-nowrap" width="18%">가능</th>
<th class="text-center text-nowrap" width="18%">총재고</th>
</tr>
<?php foreach ($partCellDatas['rows'] as $row): ?>
<?php foreach (SERVER['CHASSISES'] as $key => $label): ?>
<tr>
<td class="text-end" nowrap><?= $row->title ?></td>
<td class="text-center" nowrap width="30%"><?= $row->cnt ?></td>
<td class="text-end text-nowrap"><?= $label ?></td>
<td class="text-center text-nowrap"><?= array_key_exists($key, $partCellDatas['rows']) ? $partCellDatas['rows'][$key] : 0 ?></td>
<td class="text-center text-nowrap"><?= array_key_exists($key, $partCellDatas['rows']) ? SERVER['STOCKS'][$key] - $partCellDatas['rows'][$key] : SERVER['STOCKS'][$key] ?></td>
<td class="text-center text-nowrap"><?= SERVER['STOCKS'][$key] ?></td>
</tr>
<?php endforeach ?>
</table>