dbms_init...1
This commit is contained in:
parent
4ad3a18494
commit
6a4d1fb792
@ -2,21 +2,15 @@
|
||||
|
||||
namespace App\Controllers\Admin\Customer;
|
||||
|
||||
use App\Helpers\Customer\ServiceHelper;
|
||||
use App\Services\Customer\ServiceService;
|
||||
use App\Services\Equipment\IpService;
|
||||
|
||||
use App\Services\Equipment\LineService;
|
||||
use App\Services\Equipment\ServerService;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
use App\Helpers\Customer\ServiceHelper;
|
||||
use App\Services\Customer\ServiceService;
|
||||
|
||||
class ServiceController extends CustomerController
|
||||
{
|
||||
private ?LineService $_lineService = null;
|
||||
private ?ServerService $_serverService = null;
|
||||
private ?IpService $_ipService = null;
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
@ -41,27 +35,6 @@ class ServiceController extends CustomerController
|
||||
// dd($this->_helper);
|
||||
return $this->_helper;
|
||||
}
|
||||
final public function getLineService(): LineService
|
||||
{
|
||||
if (!$this->_lineService) {
|
||||
$this->_lineService = new LineService();
|
||||
}
|
||||
return $this->_lineService;
|
||||
}
|
||||
final public function getServerService(): ServerService
|
||||
{
|
||||
if (!$this->_serverService) {
|
||||
$this->_serverService = new ServerService();
|
||||
}
|
||||
return $this->_serverService;
|
||||
}
|
||||
final public function getIpService(): IpService
|
||||
{
|
||||
if (!$this->_ipService) {
|
||||
$this->_ipService = new IpService();
|
||||
}
|
||||
return $this->_ipService;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
|
||||
// protected function create_process(): mixed
|
||||
@ -74,7 +47,7 @@ class ServiceController extends CustomerController
|
||||
protected function index_process(): array
|
||||
{
|
||||
$fields = [
|
||||
'fields' => ['clientinfo_uid', 'type', 'billing_at', 'rack', 'LINE', 'SERVER', 'IP', 'CPU', 'RAM', 'DISK', 'SOFTWARE', 'DEFENCE', 'start_at', 'status'],
|
||||
'fields' => ['clientinfo_uid', 'item_type', 'billing_at', 'rack', 'LINE', 'SERVER', 'IP', 'CPU', 'RAM', 'DISK', 'SOFTWARE', 'DEFENCE', 'start_at', 'status'],
|
||||
];
|
||||
$this->init('index', $fields);
|
||||
return parent::index_process();
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
9209
app/Database/erp2_2.vuerd.json
Normal file
9209
app/Database/erp2_2.vuerd.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@ return [
|
||||
'label' => [
|
||||
'clientinfo_uid' => "고객명",
|
||||
'rack' => "Rack",
|
||||
'type' => "종류",
|
||||
'item_type' => "종류",
|
||||
'billing_at' => "청구일",
|
||||
'start_at' => "개통일",
|
||||
'end_at' => "해지일",
|
||||
@ -19,15 +19,23 @@ return [
|
||||
'RAM' => "RAM",
|
||||
'DISK' => "DISK",
|
||||
'SOFTWARE' => "SOFTWARE",
|
||||
'DEFENCE' => "방어",
|
||||
'DEFENCE' => "방어(CS)",
|
||||
'DOMAIN' => "도메인",
|
||||
],
|
||||
'DEFAULTS' => [
|
||||
'type' => "hosting",
|
||||
'status' => 'default'
|
||||
],
|
||||
"TYPE" => [
|
||||
"hosting" => "서버호스팅",
|
||||
"colocation" => "코로케이션",
|
||||
"ITEM_TYPE" => [
|
||||
"LINE" => "회선",
|
||||
"IP" => "IP",
|
||||
"SERVER" => "서버",
|
||||
"CPU" => "CPU",
|
||||
"RAM" => "RAM",
|
||||
"DISK" => "DISK",
|
||||
"DEFENCE" => "방어(CS)",
|
||||
"SOFTWARE" => "소프트웨어",
|
||||
"DOMAIN" => "도메인",
|
||||
],
|
||||
"STATUS" => [
|
||||
'default' => "사용중",
|
||||
|
||||
@ -14,11 +14,9 @@ class ServiceModel extends CustomerModel
|
||||
protected $returnType = ServiceEntity::class;
|
||||
protected $allowedFields = [
|
||||
"clientinfo_uid",
|
||||
"rack",
|
||||
"type",
|
||||
"billing_at",
|
||||
"start_at",
|
||||
"end_at",
|
||||
"item_type",
|
||||
"item_uid",
|
||||
"title",
|
||||
"status",
|
||||
"updated_at"
|
||||
];
|
||||
@ -35,19 +33,10 @@ class ServiceModel extends CustomerModel
|
||||
case "clientinfo_uid":
|
||||
$rule = "required|numeric";
|
||||
break;
|
||||
case "rack":
|
||||
$rule = "required|trim|min_length[4]|max_length[20]";
|
||||
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
||||
break;
|
||||
case "type":
|
||||
case "item_type":
|
||||
case "status":
|
||||
$rule = "required|trim|string";
|
||||
break;
|
||||
case "billing_at":
|
||||
case "start_at":
|
||||
$rule = "required|valid_date";
|
||||
break;
|
||||
case "end_at":
|
||||
$rule = "if_exist|valid_date";
|
||||
default:
|
||||
$rule = parent::getFieldRule($action, $field);
|
||||
break;
|
||||
|
||||
@ -26,20 +26,18 @@ class ServiceService extends CustomerService
|
||||
{
|
||||
return [
|
||||
"clientinfo_uid",
|
||||
"type",
|
||||
"rack",
|
||||
"billing_at",
|
||||
"start_at",
|
||||
"end_at",
|
||||
"item_type",
|
||||
"item_uid",
|
||||
"title",
|
||||
"status",
|
||||
];
|
||||
}
|
||||
public function getFilterFields(): array
|
||||
{
|
||||
return ["clientinfo_uid", 'type', 'status'];
|
||||
return ["clientinfo_uid", 'item_type', 'status'];
|
||||
}
|
||||
public function getBatchJobFields(): array
|
||||
{
|
||||
return ['type', 'status'];
|
||||
return ['item_type', 'status'];
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user