dbms_init...1
This commit is contained in:
parent
3423de7cc3
commit
8a98a607f1
@ -568,6 +568,7 @@ CREATE TABLE `serviceinfo` (
|
|||||||
`user_uid` int(11) NOT NULL COMMENT '관리자정보',
|
`user_uid` int(11) NOT NULL COMMENT '관리자정보',
|
||||||
`switchinfo_uid` int(11) NOT NULL COMMENT 'switch코드',
|
`switchinfo_uid` int(11) NOT NULL COMMENT 'switch코드',
|
||||||
`codeinfo_uid` int(11) NOT NULL COMMENT 'server코드',
|
`codeinfo_uid` int(11) NOT NULL COMMENT 'server코드',
|
||||||
|
`code` varchar(20) DEFAULT NULL,
|
||||||
`location` varchar(20) DEFAULT NULL,
|
`location` varchar(20) DEFAULT NULL,
|
||||||
`type` varchar(20) NOT NULL,
|
`type` varchar(20) NOT NULL,
|
||||||
`raid` varchar(20) NOT NULL,
|
`raid` varchar(20) NOT NULL,
|
||||||
@ -578,6 +579,7 @@ CREATE TABLE `serviceinfo` (
|
|||||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||||
`deleted_at` timestamp NULL DEFAULT NULL,
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
||||||
PRIMARY KEY (`uid`),
|
PRIMARY KEY (`uid`),
|
||||||
|
UNIQUE KEY `UQ_code` (`code`),
|
||||||
KEY `FK_clientinfo_TO_serviceinfo` (`clientinfo_uid`),
|
KEY `FK_clientinfo_TO_serviceinfo` (`clientinfo_uid`),
|
||||||
KEY `FK_user_TO_serviceinfo` (`user_uid`),
|
KEY `FK_user_TO_serviceinfo` (`user_uid`),
|
||||||
CONSTRAINT `FK_clientinfo_TO_serviceinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
|
CONSTRAINT `FK_clientinfo_TO_serviceinfo` FOREIGN KEY (`clientinfo_uid`) REFERENCES `clientinfo` (`uid`),
|
||||||
@ -591,7 +593,7 @@ CREATE TABLE `serviceinfo` (
|
|||||||
|
|
||||||
LOCK TABLES `serviceinfo` WRITE;
|
LOCK TABLES `serviceinfo` WRITE;
|
||||||
/*!40000 ALTER TABLE `serviceinfo` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `serviceinfo` DISABLE KEYS */;
|
||||||
INSERT INTO `serviceinfo` VALUES (1,1,1,1,9,8,'tokyo','defence','RAID1','2025-07-22','2025-06-02','default','2025-06-30 02:36:42','2025-06-02 03:37:30',NULL),(2,2,3,1,8,6,'default','default','default','2025-07-18','2025-06-04','default','2025-06-26 04:15:32','2025-06-09 08:23:13',NULL),(3,4,4,1,6,7,'default','dedicated','RAID5','2025-07-14','2025-06-04','default','2025-06-30 02:36:21','2025-06-11 08:20:37',NULL),(4,5,7,1,5,4,'default','alternative','RAID1','2025-06-21','2025-06-19','default','2025-06-26 04:15:09','2025-06-20 01:03:04',NULL),(5,6,6,1,1,3,'tokyo','test','RAID5','2025-06-25','2025-06-20','default','2025-06-26 04:07:07','2025-06-20 04:45:04',NULL),(6,8,8,1,2,1,'default','test','RAID1','2025-07-26','2025-06-25','default','2025-06-26 04:06:56','2025-06-25 09:46:24',NULL);
|
INSERT INTO `serviceinfo` VALUES (1,1,1,1,9,8,'Test001','tokyo','defence','RAID1','2025-07-22','2025-06-02','default','2025-06-30 02:36:42','2025-06-02 03:37:30',NULL),(2,2,3,1,8,6,'Test002','default','default','default','2025-07-18','2025-06-04','default','2025-06-26 04:15:32','2025-06-09 08:23:13',NULL),(3,4,4,1,6,7,'Test003','default','dedicated','RAID5','2025-07-14','2025-06-04','default','2025-06-30 02:36:21','2025-06-11 08:20:37',NULL),(4,5,7,1,5,4,'Test004','default','alternative','RAID1','2025-06-21','2025-06-19','default','2025-06-26 04:15:09','2025-06-20 01:03:04',NULL),(5,6,6,1,1,3,'Test005','tokyo','test','RAID5','2025-06-25','2025-06-20','default','2025-06-26 04:07:07','2025-06-20 04:45:04',NULL),(6,8,8,1,2,1,'Test006','default','test','RAID1','2025-07-26','2025-06-25','default','2025-06-26 04:06:56','2025-06-25 09:46:24',NULL);
|
||||||
/*!40000 ALTER TABLE `serviceinfo` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `serviceinfo` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
@ -838,4 +840,4 @@ UNLOCK TABLES;
|
|||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2025-07-08 12:55:47
|
-- Dump completed on 2025-07-08 16:33:41
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
"settings": {
|
"settings": {
|
||||||
"width": 3000,
|
"width": 3000,
|
||||||
"height": 3000,
|
"height": 3000,
|
||||||
"scrollTop": -655.903,
|
"scrollTop": -1064.2363,
|
||||||
"scrollLeft": -1430.7592,
|
"scrollLeft": -958.7592,
|
||||||
"zoomLevel": 0.76,
|
"zoomLevel": 0.76,
|
||||||
"show": 511,
|
"show": 511,
|
||||||
"database": 4,
|
"database": 4,
|
||||||
@ -820,7 +820,7 @@
|
|||||||
"Vf3bNvvEPfu1zCs4rcHTU",
|
"Vf3bNvvEPfu1zCs4rcHTU",
|
||||||
"PLQrLZGFiiPQDZSYpU-Rc",
|
"PLQrLZGFiiPQDZSYpU-Rc",
|
||||||
"9DIj0WNLrGT8VCHZuRkCz",
|
"9DIj0WNLrGT8VCHZuRkCz",
|
||||||
"SGWWOOHjCF81V4O5tUiJu",
|
"1ZM86qoxmCcoKnqOpE2oj",
|
||||||
"uuDbJDSDQLey7Km1W9hlJ",
|
"uuDbJDSDQLey7Km1W9hlJ",
|
||||||
"Gb6fmS40Q3wvnvD1HMTqR",
|
"Gb6fmS40Q3wvnvD1HMTqR",
|
||||||
"FJtEzmrQUsMMbrWbzr8IR",
|
"FJtEzmrQUsMMbrWbzr8IR",
|
||||||
@ -850,6 +850,7 @@
|
|||||||
"O7aGU_LJxCO1NeNVWbB-J",
|
"O7aGU_LJxCO1NeNVWbB-J",
|
||||||
"PLQrLZGFiiPQDZSYpU-Rc",
|
"PLQrLZGFiiPQDZSYpU-Rc",
|
||||||
"9DIj0WNLrGT8VCHZuRkCz",
|
"9DIj0WNLrGT8VCHZuRkCz",
|
||||||
|
"1ZM86qoxmCcoKnqOpE2oj",
|
||||||
"SGWWOOHjCF81V4O5tUiJu",
|
"SGWWOOHjCF81V4O5tUiJu",
|
||||||
"uuDbJDSDQLey7Km1W9hlJ",
|
"uuDbJDSDQLey7Km1W9hlJ",
|
||||||
"Gb6fmS40Q3wvnvD1HMTqR",
|
"Gb6fmS40Q3wvnvD1HMTqR",
|
||||||
@ -874,7 +875,7 @@
|
|||||||
"color": ""
|
"color": ""
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"updateAt": 1750900805222,
|
"updateAt": 1751959972410,
|
||||||
"createAt": 1748485662214
|
"createAt": 1748485662214
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -7710,6 +7711,26 @@
|
|||||||
"updateAt": 1751945842697,
|
"updateAt": 1751945842697,
|
||||||
"createAt": 1751880475984
|
"createAt": 1751880475984
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"1ZM86qoxmCcoKnqOpE2oj": {
|
||||||
|
"id": "1ZM86qoxmCcoKnqOpE2oj",
|
||||||
|
"tableId": "B8haiEbPc1lRBWTv1g25G",
|
||||||
|
"name": "code",
|
||||||
|
"comment": "서비스코드",
|
||||||
|
"dataType": "VARCHAR(20)",
|
||||||
|
"default": "",
|
||||||
|
"options": 12,
|
||||||
|
"ui": {
|
||||||
|
"keys": 0,
|
||||||
|
"widthName": 60,
|
||||||
|
"widthComment": 62,
|
||||||
|
"widthDataType": 75,
|
||||||
|
"widthDefault": 60
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"updateAt": 1751959588755,
|
||||||
|
"createAt": 1751959574914
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relationshipEntities": {
|
"relationshipEntities": {
|
||||||
@ -7900,7 +7921,7 @@
|
|||||||
"columnIds": [
|
"columnIds": [
|
||||||
"NzxkmndrTbH7xb6fbnGV7"
|
"NzxkmndrTbH7xb6fbnGV7"
|
||||||
],
|
],
|
||||||
"x": 1457.1138999999998,
|
"x": 1451.1138999999998,
|
||||||
"y": 1057.9058,
|
"y": 1057.9058,
|
||||||
"direction": 2
|
"direction": 2
|
||||||
},
|
},
|
||||||
@ -7956,7 +7977,7 @@
|
|||||||
"columnIds": [
|
"columnIds": [
|
||||||
"f1hR1JRFHBHwiJSSX34gw"
|
"f1hR1JRFHBHwiJSSX34gw"
|
||||||
],
|
],
|
||||||
"x": 1457.1138999999998,
|
"x": 1451.1138999999998,
|
||||||
"y": 1173.9058,
|
"y": 1173.9058,
|
||||||
"direction": 2
|
"direction": 2
|
||||||
},
|
},
|
||||||
@ -7975,7 +7996,7 @@
|
|||||||
"columnIds": [
|
"columnIds": [
|
||||||
"N_yJVoCN4oUEDhYqdzApb"
|
"N_yJVoCN4oUEDhYqdzApb"
|
||||||
],
|
],
|
||||||
"x": 1197.1138999999998,
|
"x": 1194.1138999999998,
|
||||||
"y": 1463.9058,
|
"y": 1463.9058,
|
||||||
"direction": 8
|
"direction": 8
|
||||||
},
|
},
|
||||||
@ -8068,7 +8089,7 @@
|
|||||||
"columnIds": [
|
"columnIds": [
|
||||||
"Vf3bNvvEPfu1zCs4rcHTU"
|
"Vf3bNvvEPfu1zCs4rcHTU"
|
||||||
],
|
],
|
||||||
"x": 1197.1138999999998,
|
"x": 1194.1138999999998,
|
||||||
"y": 999.9058,
|
"y": 999.9058,
|
||||||
"direction": 4
|
"direction": 4
|
||||||
},
|
},
|
||||||
@ -8124,7 +8145,7 @@
|
|||||||
"columnIds": [
|
"columnIds": [
|
||||||
"PLQrLZGFiiPQDZSYpU-Rc"
|
"PLQrLZGFiiPQDZSYpU-Rc"
|
||||||
],
|
],
|
||||||
"x": 1457.1138999999998,
|
"x": 1451.1138999999998,
|
||||||
"y": 1289.9058,
|
"y": 1289.9058,
|
||||||
"direction": 2
|
"direction": 2
|
||||||
},
|
},
|
||||||
@ -8152,7 +8173,7 @@
|
|||||||
"columnIds": [
|
"columnIds": [
|
||||||
"9DIj0WNLrGT8VCHZuRkCz"
|
"9DIj0WNLrGT8VCHZuRkCz"
|
||||||
],
|
],
|
||||||
"x": 1457.1138999999998,
|
"x": 1451.1138999999998,
|
||||||
"y": 1405.9058,
|
"y": 1405.9058,
|
||||||
"direction": 2
|
"direction": 2
|
||||||
},
|
},
|
||||||
|
|||||||
@ -9,6 +9,10 @@ class ServiceEntity extends CustomerEntity
|
|||||||
{
|
{
|
||||||
const PK = ServiceModel::PK;
|
const PK = ServiceModel::PK;
|
||||||
const TITLE = ServiceModel::TITLE;
|
const TITLE = ServiceModel::TITLE;
|
||||||
|
public function getCode(): string
|
||||||
|
{
|
||||||
|
return $this->attributes['code'] ?? "null";
|
||||||
|
}
|
||||||
final public function getOwnerUID(): int
|
final public function getOwnerUID(): int
|
||||||
{
|
{
|
||||||
return intval($this->attributes['ownerinfo_uid']);
|
return intval($this->attributes['ownerinfo_uid']);
|
||||||
@ -25,10 +29,6 @@ class ServiceEntity extends CustomerEntity
|
|||||||
{
|
{
|
||||||
return $this->attributes['codeinfo_uid'];
|
return $this->attributes['codeinfo_uid'];
|
||||||
}
|
}
|
||||||
public function getTitle(): string
|
|
||||||
{
|
|
||||||
return "S" . $this->getPK();
|
|
||||||
}
|
|
||||||
public function getType(): string
|
public function getType(): string
|
||||||
{
|
{
|
||||||
return $this->attributes['type'];
|
return $this->attributes['type'];
|
||||||
|
|||||||
@ -157,6 +157,9 @@ class ServiceHelper extends CustomerHelper
|
|||||||
public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string
|
public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string
|
||||||
{
|
{
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
|
case 'modify':
|
||||||
|
$action = parent::getListButton($action, $viewDatas['entity']->getCode(), $viewDatas, $extras);
|
||||||
|
break;
|
||||||
case 'history':
|
case 'history':
|
||||||
$extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras];
|
$extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras];
|
||||||
$action = form_label(
|
$action = form_label(
|
||||||
|
|||||||
@ -5,7 +5,7 @@ return [
|
|||||||
'clientinfo_uid' => "고객",
|
'clientinfo_uid' => "고객",
|
||||||
'ownerinfo_uid' => "관리자",
|
'ownerinfo_uid' => "관리자",
|
||||||
'user_uid' => "작업자",
|
'user_uid' => "작업자",
|
||||||
'title' => "서비스명",
|
'code' => "서비스코드",
|
||||||
'type' => "서비스형식",
|
'type' => "서비스형식",
|
||||||
'location' => "위치",
|
'location' => "위치",
|
||||||
'switchinfo_uid' => "스위치코드",
|
'switchinfo_uid' => "스위치코드",
|
||||||
|
|||||||
@ -8,7 +8,7 @@ class ServiceModel extends CustomerModel
|
|||||||
{
|
{
|
||||||
const TABLE = "serviceinfo";
|
const TABLE = "serviceinfo";
|
||||||
const PK = "uid";
|
const PK = "uid";
|
||||||
const TITLE = "uid";
|
const TITLE = "code";
|
||||||
protected $table = self::TABLE;
|
protected $table = self::TABLE;
|
||||||
protected $primaryKey = self::PK;
|
protected $primaryKey = self::PK;
|
||||||
protected $returnType = ServiceEntity::class;
|
protected $returnType = ServiceEntity::class;
|
||||||
@ -16,10 +16,11 @@ class ServiceModel extends CustomerModel
|
|||||||
"clientinfo_uid",
|
"clientinfo_uid",
|
||||||
"ownerinfo_uid",
|
"ownerinfo_uid",
|
||||||
"user_uid",
|
"user_uid",
|
||||||
"type",
|
|
||||||
"location",
|
|
||||||
"switchinfo_uid",
|
"switchinfo_uid",
|
||||||
"codeinfo_uid",
|
"codeinfo_uid",
|
||||||
|
"code",
|
||||||
|
"type",
|
||||||
|
"location",
|
||||||
"raid",
|
"raid",
|
||||||
"billing_at",
|
"billing_at",
|
||||||
"start_at",
|
"start_at",
|
||||||
@ -43,6 +44,9 @@ class ServiceModel extends CustomerModel
|
|||||||
case "codeinfo_uid":
|
case "codeinfo_uid":
|
||||||
$rule = "required|numeric";
|
$rule = "required|numeric";
|
||||||
break;
|
break;
|
||||||
|
case "code":
|
||||||
|
$rule = "if_exist|trim|string";
|
||||||
|
break;
|
||||||
case "type":
|
case "type":
|
||||||
case "location":
|
case "location":
|
||||||
case "status":
|
case "status":
|
||||||
@ -61,4 +65,12 @@ class ServiceModel extends CustomerModel
|
|||||||
}
|
}
|
||||||
return $rule;
|
return $rule;
|
||||||
}
|
}
|
||||||
|
//Create용
|
||||||
|
protected function create_process(array $formDatas): ServiceEntity
|
||||||
|
{
|
||||||
|
$entity = parent::create_process($formDatas);
|
||||||
|
//고객코드 Code 자동 생성 후 수정
|
||||||
|
$code = 'S' . str_pad($entity->getPK(), 8, '0', STR_PAD_LEFT);
|
||||||
|
return $this->modify($entity, ['code' => $code]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,6 @@ use App\Services\UserService;
|
|||||||
|
|
||||||
abstract class CustomerService extends CommonService
|
abstract class CustomerService extends CommonService
|
||||||
{
|
{
|
||||||
private $_clientOptions = [];
|
|
||||||
private ?UserService $_userService = null;
|
private ?UserService $_userService = null;
|
||||||
private ?ClientService $_clientService = null;
|
private ?ClientService $_clientService = null;
|
||||||
private $_equipmentService = [];
|
private $_equipmentService = [];
|
||||||
@ -105,13 +104,6 @@ abstract class CustomerService extends CommonService
|
|||||||
}
|
}
|
||||||
return $this->_equipmentService[$key];
|
return $this->_equipmentService[$key];
|
||||||
}
|
}
|
||||||
final public function getClientOptions(): array
|
|
||||||
{
|
|
||||||
if ($this->_clientOptions === null) {
|
|
||||||
$this->_clientOptions = $this->getClientService()->getEntities();
|
|
||||||
}
|
|
||||||
return $this->_clientOptions;
|
|
||||||
}
|
|
||||||
//기본기능
|
//기본기능
|
||||||
//FieldForm관련용
|
//FieldForm관련용
|
||||||
public function getFormFieldOption(string $field, array $options = []): array
|
public function getFormFieldOption(string $field, array $options = []): array
|
||||||
@ -119,7 +111,7 @@ abstract class CustomerService extends CommonService
|
|||||||
switch ($field) {
|
switch ($field) {
|
||||||
case 'clientinfo_uid':
|
case 'clientinfo_uid':
|
||||||
case 'ownerinfo_uid':
|
case 'ownerinfo_uid':
|
||||||
$options = $this->getClientOptions();
|
$options = $this->getClientService()->getEntities();
|
||||||
break;
|
break;
|
||||||
case 'serviceinfo_uid':
|
case 'serviceinfo_uid':
|
||||||
$options = $this->getServiceService()->getEntities();
|
$options = $this->getServiceService()->getEntities();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user