dbmsv2_init...1
This commit is contained in:
parent
173858e229
commit
5bdd84ea19
31
app/Cells/Equipment/PartCell.php
Normal file
31
app/Cells/Equipment/PartCell.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Cells\Equipment;
|
||||
|
||||
use App\Services\Equipment\PartService;
|
||||
|
||||
class PartCell extends EquipmentCell
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(new PartService());
|
||||
}
|
||||
|
||||
public function parttable(array $params): string
|
||||
{
|
||||
$this->getService()->setAction(__FUNCTION__);
|
||||
$this->getService()->setFormFields();
|
||||
$this->getService()->setFormFilters();
|
||||
$this->getService()->setFormRules();
|
||||
$this->getService()->setFormOptions();
|
||||
$types = array_key_exists('types', $params) ? $params['types'] : SERVERPART['STOCK_PARTTYPES'];
|
||||
$template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
|
||||
return view('cells/part/' . $template, [
|
||||
'partCellDatas' => [
|
||||
'control' => $this->getService()->getControlDatas(),
|
||||
'service' => $this->getService(),
|
||||
'entities' => $this->getService()->getEntities("type IN (" . "'" . implode("','", $types) . "'" . ")"),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
@ -404,6 +404,7 @@ define("SERVICE", [
|
||||
//서버파트 관련
|
||||
define("SERVERPART", [
|
||||
"CNT_RANGE" => array_combine(range(1, 10), range(1, 10)),
|
||||
"STOCK_PARTTYPES" => ['CPU', 'RAM', 'DISK'],
|
||||
"SERVER_PARTTYPES" => ['CPU', 'RAM', 'DISK', 'ETC'],
|
||||
"SERVICE_PARTTYPES" => ['SWITCH', 'IP', 'OS', 'SOFTWARE', 'CS', 'ETC'],
|
||||
"ALL_PARTTYPES" => ['CPU', 'RAM', 'DISK', 'OS', 'DB', 'SOFTWARE', 'SWITCH', 'IP', 'CS', 'ETC'],
|
||||
|
||||
@ -159,7 +159,7 @@ abstract class CommonService
|
||||
return $this->getEntity_process($entity);
|
||||
} catch (\Exception $e) {
|
||||
$message = sprintf(
|
||||
"\n------%s SQL오류-----<BR>\n%s<BR>\n%s<BR>\n------------------------------\n",
|
||||
"\n------%s SQL오류-----<BR>\n%s\n%s\n------------------------------\n",
|
||||
__FUNCTION__,
|
||||
$this->getModel()->getLastQuery(),
|
||||
$e->getMessage()
|
||||
@ -196,7 +196,7 @@ abstract class CommonService
|
||||
return $entities;
|
||||
} catch (\Exception $e) {
|
||||
$message = sprintf(
|
||||
"\n------%s SQL오류-----<BR>\n%s<BR>\n%s<BR>\n------------------------------\n",
|
||||
"\n------%s SQL오류-----<BR>\n%s\n%s\n------------------------------\n",
|
||||
__FUNCTION__,
|
||||
$this->getModel()->getLastQuery(),
|
||||
$e->getMessage()
|
||||
|
||||
@ -15,11 +15,15 @@
|
||||
<?= $this->include("{$viewDatas['layout']}/welcome/banner"); ?>
|
||||
<div class="row align-items-start mt-3">
|
||||
<div class="col-8">
|
||||
<?= view_cell("\App\Cells\Customer\ServiceCell::totalCountDashboard") ?>>
|
||||
<?= $this->include("{$viewDatas['layout']}/welcome/total_service"); ?>
|
||||
<?= $this->include("{$viewDatas['layout']}/welcome/new_service"); ?>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<?= $this->include("{$viewDatas['layout']}/welcome/user_history"); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row align-items-start mt-3">
|
||||
<div class="col">
|
||||
<?= $this->include("{$viewDatas['layout']}/welcome/stock"); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -8,6 +8,6 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||
준비중....
|
||||
<?= view_cell("\App\Cells\Equipment\PartCell::parttable", ['types' => SERVERPART['STOCK_PARTTYPES']]) ?>
|
||||
</div>
|
||||
<div class="layout_footer"></div>
|
||||
@ -8,68 +8,6 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||
<table class="table table-bordered table-hover align-middle">
|
||||
<tr class="text-center">
|
||||
<th rowspan="2">고객명</th>
|
||||
<th colspan="2">일반</th>
|
||||
<th colspan="2">방어</th>
|
||||
<th colspan="2">전용</th>
|
||||
<th colspan="2">대체</th>
|
||||
<th colspan="3">테스트</th>
|
||||
<th colspan="3">합계</th>
|
||||
</tr>
|
||||
<tr class="text-center">
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>합계</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>합계</th>
|
||||
</tr>
|
||||
<?php foreach (SITES as $key => $label): ?>
|
||||
<tr class="text-center">
|
||||
<td><?= $label ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$key]['normal']['tokyo'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$key]['normal']['chiba'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$key]['defence']['tokyo'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$key]['defence']['chiba'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$key]['dedicated']['tokyo'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$key]['dedicated']['chiba'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$key]['alternative']['tokyo'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$key]['alternative']['chiba'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$key]['test']['tokyo'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$key]['test']['chiba'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$key]['test']['summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$key]['tokyo_summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$key]['chiba_summary'] ?></td>
|
||||
<td><?= $viewDatas['totalCounts'][$key]['all_summary'] ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
<tr class="text-center">
|
||||
<td>총합계</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?= view_cell("\App\Cells\Customer\ServiceCell::totalCountDashboard") ?>
|
||||
</div>
|
||||
<div class="layout_footer"></div>
|
||||
11
app/Views/cells/part/parttable.php
Normal file
11
app/Views/cells/part/parttable.php
Normal file
@ -0,0 +1,11 @@
|
||||
<table class="index_table data table table-bordered table-hover table-striped" data-rtc-resizable-table="reisze_table">
|
||||
<?php $cnt = 0 ?>
|
||||
<?php foreach ($partCellDatas['entities'] as $entity): ?>
|
||||
<?php $partCellDatas['entity'] = $entity; ?>
|
||||
<?php foreach (['title', 'stock'] as $field): ?>
|
||||
<td><?= $partCellDatas['service']->getHelper()->getFieldView($field, $entity->$field, $partCellDatas) ?></td>
|
||||
<?php endforeach ?>
|
||||
</tr>
|
||||
<?php $cnt++ ?>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
@ -1,75 +1,63 @@
|
||||
<div class="layout_header">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<span class="nav-item navbar-brand" aria-current="page">
|
||||
<h4> <?= ICONS['CHART'] ?> 전체 서비스 현황 </h4>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||
<table class="table table-bordered table-hover align-middle">
|
||||
<tr class="text-center">
|
||||
<th rowspan="2">고객명</th>
|
||||
<th colspan="2">일반</th>
|
||||
<th colspan="2">방어</th>
|
||||
<th colspan="2">전용</th>
|
||||
<th colspan="2">대체</th>
|
||||
<th colspan="3">테스트</th>
|
||||
<th colspan="3">합계</th>
|
||||
</tr>
|
||||
<tr class="text-center">
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>합계</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>합계</th>
|
||||
</tr>
|
||||
<?php foreach (SITES as $key => $label): ?>
|
||||
<tr class="text-center">
|
||||
<td><?= $label ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['normal']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['normal']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['defence']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['defence']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['dedicated']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['dedicated']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['alternative']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['alternative']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['test']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['test']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['test']['summary'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['tokyo_summary'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['chiba_summary'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['all_summary'] ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
<tr class="text-center">
|
||||
<td>총합계</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="layout_footer"></div>
|
||||
<table class="table table-bordered table-hover align-middle">
|
||||
<tr class="text-center">
|
||||
<th rowspan="2">고객명</th>
|
||||
<th colspan="2">일반</th>
|
||||
<th colspan="2">방어</th>
|
||||
<th colspan="2">전용</th>
|
||||
<th colspan="2">대체</th>
|
||||
<th colspan="3">테스트</th>
|
||||
<th colspan="3">합계</th>
|
||||
</tr>
|
||||
<tr class="text-center">
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>합계</th>
|
||||
<th>도쿄</th>
|
||||
<th>치바</th>
|
||||
<th>합계</th>
|
||||
</tr>
|
||||
<?php foreach (SITES as $key => $label): ?>
|
||||
<tr class="text-center">
|
||||
<td><?= $label ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['normal']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['normal']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['defence']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['defence']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['dedicated']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['dedicated']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['alternative']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['alternative']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['test']['tokyo'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['test']['chiba'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['test']['summary'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['tokyo_summary'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['chiba_summary'] ?></td>
|
||||
<td><?= $serviceCellDatas['totalCounts'][$key]['all_summary'] ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
<tr class="text-center">
|
||||
<td>총합계</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
</table>
|
||||
Loading…
Reference in New Issue
Block a user