From 17b57be1807edef5bea4fd5be536659601b57ece Mon Sep 17 00:00:00 2001 From: "choi.jh" Date: Thu, 2 Oct 2025 14:31:19 +0900 Subject: [PATCH] dbmsv3 init...1 --- app/Services/Customer/ServiceService.php | 6 ++++++ app/Services/Part/DISKService.php | 19 +------------------ 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/app/Services/Customer/ServiceService.php b/app/Services/Customer/ServiceService.php index 9a12dca..9706549 100644 --- a/app/Services/Customer/ServiceService.php +++ b/app/Services/Customer/ServiceService.php @@ -80,6 +80,12 @@ class ServiceService extends CustomerService { return ['site', 'location', 'clientinfo_uid', 'status']; } + final public function getBatchjobButtons(): array + { + return [ + 'batchjob' => '일괄 처리 ', + ]; + } public function getFormRule(string $action, string $field): string { if (is_array($field)) { diff --git a/app/Services/Part/DISKService.php b/app/Services/Part/DISKService.php index 4cb45b0..4088cf8 100644 --- a/app/Services/Part/DISKService.php +++ b/app/Services/Part/DISKService.php @@ -60,25 +60,8 @@ class DISKService extends PartService implements ServerPartInterface { switch ($action) { case 'create': - //부품정보가져오기 - $entity = $this->getEntity($serverPartEntity->getPartUID()); - if (!$entity) { - throw new \Exception("{$serverPartEntity->getPartUID()}에 해당하는 부품정보를 찾을수없습니다."); - } - //부품정보에 서버정보 설정 및 서비스,고객정보 정의 - if ($entity->getStock() < $serverPartEntity->getCnt()) { - throw new \Exception("현재 재고수[{$entity->getStock()}]보다 지정하신 갯수({$serverPartEntity->getCnt()})가 더 많습니다."); - } - $entity = parent::modify($entity, ['stock' => $entity->getStock() - $serverPartEntity->getCnt()]); - break; case 'modify': - //수정 전 부품연결정보관련 정보처리 갯수,파트가 달라졌을경우 (회수 -> 사용 처리) - //기존것 회수 처리 - if ($oldServerPartEntity->getCnt() != $serverPartEntity->getCnt() || $oldServerPartEntity->getPartUID() !== $serverPartEntity->getPartUID()) { - $this->setServerPart('delete', $oldServerPartEntity, $serverPartEntity, $serverPartDatas); - } - //신규것 사용처리 - $entity = $this->setServerPart('create', $oldServerPartEntity, $serverPartEntity, $serverPartDatas); + $entity = parent::setServerPart($action, $oldServerPartEntity, $serverPartEntity, $serverPartDatas); break; case 'delete': //반드시 oldServerPartEntity 사용해야함 //부품정보가져오기