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", [
|
define("SERVERPART", [
|
||||||
"CNT_RANGE" => array_combine(range(1, 10), range(1, 10)),
|
"CNT_RANGE" => array_combine(range(1, 10), range(1, 10)),
|
||||||
|
"STOCK_PARTTYPES" => ['CPU', 'RAM', 'DISK'],
|
||||||
"SERVER_PARTTYPES" => ['CPU', 'RAM', 'DISK', 'ETC'],
|
"SERVER_PARTTYPES" => ['CPU', 'RAM', 'DISK', 'ETC'],
|
||||||
"SERVICE_PARTTYPES" => ['SWITCH', 'IP', 'OS', 'SOFTWARE', 'CS', 'ETC'],
|
"SERVICE_PARTTYPES" => ['SWITCH', 'IP', 'OS', 'SOFTWARE', 'CS', 'ETC'],
|
||||||
"ALL_PARTTYPES" => ['CPU', 'RAM', 'DISK', 'OS', 'DB', 'SOFTWARE', 'SWITCH', 'IP', '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);
|
return $this->getEntity_process($entity);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$message = sprintf(
|
$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__,
|
__FUNCTION__,
|
||||||
$this->getModel()->getLastQuery(),
|
$this->getModel()->getLastQuery(),
|
||||||
$e->getMessage()
|
$e->getMessage()
|
||||||
@ -196,7 +196,7 @@ abstract class CommonService
|
|||||||
return $entities;
|
return $entities;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$message = sprintf(
|
$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__,
|
__FUNCTION__,
|
||||||
$this->getModel()->getLastQuery(),
|
$this->getModel()->getLastQuery(),
|
||||||
$e->getMessage()
|
$e->getMessage()
|
||||||
|
|||||||
@ -15,11 +15,15 @@
|
|||||||
<?= $this->include("{$viewDatas['layout']}/welcome/banner"); ?>
|
<?= $this->include("{$viewDatas['layout']}/welcome/banner"); ?>
|
||||||
<div class="row align-items-start mt-3">
|
<div class="row align-items-start mt-3">
|
||||||
<div class="col-8">
|
<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"); ?>
|
<?= $this->include("{$viewDatas['layout']}/welcome/new_service"); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<?= $this->include("{$viewDatas['layout']}/welcome/user_history"); ?>
|
<?= $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"); ?>
|
<?= $this->include("{$viewDatas['layout']}/welcome/stock"); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -8,6 +8,6 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
<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>
|
||||||
<div class="layout_footer"></div>
|
<div class="layout_footer"></div>
|
||||||
@ -8,68 +8,6 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||||
<table class="table table-bordered table-hover align-middle">
|
<?= view_cell("\App\Cells\Customer\ServiceCell::totalCountDashboard") ?>
|
||||||
<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>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="layout_footer"></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,13 +1,3 @@
|
|||||||
<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">
|
<table class="table table-bordered table-hover align-middle">
|
||||||
<tr class="text-center">
|
<tr class="text-center">
|
||||||
<th rowspan="2">고객명</th>
|
<th rowspan="2">고객명</th>
|
||||||
@ -71,5 +61,3 @@
|
|||||||
<td>0</td>
|
<td>0</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
<div class="layout_footer"></div>
|
|
||||||
Loading…
Reference in New Issue
Block a user