dbms_init...1
This commit is contained in:
parent
d7c918893a
commit
1381aef94a
@ -75,11 +75,10 @@ abstract class CustomerController extends AdminController
|
|||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case 'clientinfo_uid':
|
case 'clientinfo_uid':
|
||||||
$temps = [];
|
$options = [];
|
||||||
foreach ($this->getClientService()->getEntities() as $entity) {
|
foreach ($this->getClientService()->getEntities() as $entity) {
|
||||||
$temps[$entity->getPK()] = $entity->getTitle();
|
$options[$entity->getPK()] = $entity->getTitle();
|
||||||
}
|
}
|
||||||
$options[$field] = $temps;
|
|
||||||
break;
|
break;
|
||||||
case 'SERVER':
|
case 'SERVER':
|
||||||
case 'CPU':
|
case 'CPU':
|
||||||
@ -90,12 +89,11 @@ abstract class CustomerController extends AdminController
|
|||||||
case 'DEFENCE':
|
case 'DEFENCE':
|
||||||
case 'SOFTWARE':
|
case 'SOFTWARE':
|
||||||
case 'DOMAIN':
|
case 'DOMAIN':
|
||||||
$temps = [];
|
$options = [];
|
||||||
// throw new \Exception(__FUNCTION__ . "에서 item_type이 지정되지 않았습니다.->{$item_type}");
|
// throw new \Exception(__FUNCTION__ . "에서 item_type이 지정되지 않았습니다.->{$item_type}");
|
||||||
foreach ($this->getEquipmentService($field)->getEntities() as $entity) {
|
foreach ($this->getEquipmentService($field)->getEntities() as $entity) {
|
||||||
$temps[$entity->getPK()] = $entity->getTitle();
|
$options[$entity->getPK()] = $entity->getTitle();
|
||||||
}
|
}
|
||||||
$options[$field] = $temps;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$options = parent::getFormFieldOption($field);
|
$options = parent::getFormFieldOption($field);
|
||||||
|
|||||||
@ -49,7 +49,7 @@ class ServiceController extends CustomerController
|
|||||||
{
|
{
|
||||||
switch ($this->getAction()) {
|
switch ($this->getAction()) {
|
||||||
case 'index':
|
case 'index':
|
||||||
$this->control = $this->_control;
|
$this->control = $this->getControlDatas();
|
||||||
$this->getHelper()->setViewDatas($this->getViewDatas());
|
$this->getHelper()->setViewDatas($this->getViewDatas());
|
||||||
$result = view($this->view_path . 'service' . DIRECTORY_SEPARATOR . $this->getAction(), ['viewDatas' => $this->getViewDatas()]);
|
$result = view($this->view_path . 'service' . DIRECTORY_SEPARATOR . $this->getAction(), ['viewDatas' => $this->getViewDatas()]);
|
||||||
break;
|
break;
|
||||||
@ -65,13 +65,15 @@ class ServiceController extends CustomerController
|
|||||||
//추가 Field작업 처리
|
//추가 Field작업 처리
|
||||||
$this->item_types = lang($this->getServiceItemService()->getClassName() . '.' . strtoupper('ITEM_TYPE'));
|
$this->item_types = lang($this->getServiceItemService()->getClassName() . '.' . strtoupper('ITEM_TYPE'));
|
||||||
foreach ($this->item_types as $field => $label) {
|
foreach ($this->item_types as $field => $label) {
|
||||||
$this->field_options = $this->getFormFieldOption($field, $this->field_options);
|
$this->setFilterFieldOption($field, $this->getFormFieldOption($field));
|
||||||
}
|
}
|
||||||
$entities = [];
|
$entities = [];
|
||||||
foreach (parent::index_process() as $entity) {
|
foreach (parent::index_process() as $entity) {
|
||||||
foreach ($this->item_types as $field => $label) {
|
foreach ($this->item_types as $field => $label) {
|
||||||
$itemEntities = $this->getServiceItemService()->getEntities(['item_type' => $field]);
|
$entity->setItemEntities(
|
||||||
$entity->setItemEntities($field, $itemEntities);
|
$field,
|
||||||
|
$this->getServiceItemService()->getEntities(['item_type' => $field])
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$entities[] = $entity;
|
$entities[] = $entity;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,7 +78,7 @@ class ServiceItemController extends CustomerController
|
|||||||
{
|
{
|
||||||
switch ($this->getAction()) {
|
switch ($this->getAction()) {
|
||||||
case 'index':
|
case 'index':
|
||||||
$this->control = $this->_control;
|
$this->control = $this->getControlDatas();
|
||||||
$this->getHelper()->setViewDatas($this->getViewDatas());
|
$this->getHelper()->setViewDatas($this->getViewDatas());
|
||||||
$result = view($this->view_path . 'popup' . DIRECTORY_SEPARATOR . $this->getAction(), ['viewDatas' => $this->getViewDatas()]);
|
$result = view($this->view_path . 'popup' . DIRECTORY_SEPARATOR . $this->getAction(), ['viewDatas' => $this->getViewDatas()]);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -66,6 +66,10 @@ abstract class CommonController extends BaseController
|
|||||||
return $this->_myLogService;
|
return $this->_myLogService;
|
||||||
}
|
}
|
||||||
//Index,FieldForm관련
|
//Index,FieldForm관련
|
||||||
|
final protected function getControlDatas(): array
|
||||||
|
{
|
||||||
|
return $this->_control;
|
||||||
|
}
|
||||||
final protected function setAction(string $action): void
|
final protected function setAction(string $action): void
|
||||||
{
|
{
|
||||||
$this->_control['action'] = $action;
|
$this->_control['action'] = $action;
|
||||||
@ -241,8 +245,7 @@ abstract class CommonController extends BaseController
|
|||||||
case 'login_form':
|
case 'login_form':
|
||||||
case 'index':
|
case 'index':
|
||||||
case 'view':
|
case 'view':
|
||||||
$this->control = $this->_control;
|
$this->control = $this->getControlDatas();
|
||||||
// dd($this->control);
|
|
||||||
$this->getHelper()->setViewDatas($this->getViewDatas());
|
$this->getHelper()->setViewDatas($this->getViewDatas());
|
||||||
$result = view($this->view_path . $this->getAction(), [
|
$result = view($this->view_path . $this->getAction(), [
|
||||||
'viewDatas' => $this->getViewDatas()
|
'viewDatas' => $this->getViewDatas()
|
||||||
|
|||||||
@ -12,12 +12,9 @@ class ServiceEntity extends CustomerEntity
|
|||||||
{
|
{
|
||||||
return $this->attributes[$type] ?? [];
|
return $this->attributes[$type] ?? [];
|
||||||
}
|
}
|
||||||
public function setItemEntities(string $type, array $partEntities): void
|
public function setItemEntities(string $type, array $itemEntities): void
|
||||||
{
|
{
|
||||||
if (!isset($this->attributes[$type])) {
|
$this->attributes[$type] = $itemEntities;
|
||||||
$this->attributes[$type] = [];
|
|
||||||
}
|
|
||||||
$this->attributes[$type] = $partEntities;
|
|
||||||
// $this->attributes[$type] = array_unique($this->attributes[$type], SORT_REGULAR);
|
// $this->attributes[$type] = array_unique($this->attributes[$type], SORT_REGULAR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,7 +59,13 @@ class ServiceHelper extends CustomerHelper
|
|||||||
case "DOMAIN":
|
case "DOMAIN":
|
||||||
$temps = ["<ol>"];
|
$temps = ["<ol>"];
|
||||||
foreach ($viewDatas['entity']->getItemEntities($field) as $itemEntity) {
|
foreach ($viewDatas['entity']->getItemEntities($field) as $itemEntity) {
|
||||||
$temps[] = "<li title=\"" . $itemEntity->getView_Price() . "\">" . $viewDatas['control']['filter_optons'][$field][$itemEntity->getItemUid()] . ' ' . $itemEntity->getView_BillingCycle() . ' ' . $itemEntity->getView_Sale() . "</li>";
|
$temps[] = sprintf(
|
||||||
|
"<li title=\"%s\">%s %s %s</li>",
|
||||||
|
$itemEntity->getView_Price(),
|
||||||
|
$viewDatas['control']['filter_optons'][$field][$itemEntity->getItemUid()],
|
||||||
|
$itemEntity->getView_BillingCycle(),
|
||||||
|
$itemEntity->getView_Sale()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$temps[] = "</ol>";
|
$temps[] = "</ol>";
|
||||||
$value = implode("", $temps);
|
$value = implode("", $temps);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user