diff --git a/app/Services/Customer/ServiceService.php b/app/Services/Customer/ServiceService.php index 0367840..7767cd2 100644 --- a/app/Services/Customer/ServiceService.php +++ b/app/Services/Customer/ServiceService.php @@ -192,12 +192,11 @@ class ServiceService extends CustomerService throw new \Exception("서버가 지정되지 않았습니다."); } $entity = parent::create($formDatas); - $serverEntity = $this->setServer_process( + return $this->setServer_process( $entity, $formDatas['serverinfo_uid'], STATUS['OCCUPIED'] ); - return $entity->setServerEntity($serverEntity); } //수정 public function modify(mixed $entity, array $formDatas): ServiceEntity @@ -209,7 +208,7 @@ class ServiceService extends CustomerService if ($entity->getServerInfoUID() !== $formDatas['serverinfo_uid']) { $entity = $this->setServer_process( $entity, - $entity->getServerInfoUID(), + $entity->getServerEntity()->getPK(), STATUS['AVAILABLE'] ); } @@ -229,9 +228,9 @@ class ServiceService extends CustomerService public function delete(mixed $entity): ServiceEntity { //기존서버정보 사용가능으로 설정 - $this->setServer_process( + $entity = $this->setServer_process( $entity, - $entity->getServerInfoUID(), + $entity->getServerEntity()->getPK(), STATUS['AVAILABLE'] ); return parent::delete($entity);