dbmsv3 init...1

This commit is contained in:
choi.jh 2025-10-23 08:51:45 +09:00
parent 2bbf2a5704
commit aa749599c2
4 changed files with 28 additions and 28 deletions

File diff suppressed because one or more lines are too long

View File

@ -196,13 +196,15 @@ class ServiceService extends CustomerService
// exit;
return $caculatedAmount;
}
public function setAmount(int $uid): serviceEntity
public function setAmount(int $uid): PaymentEntity
{
$entity = $this->getEntity($uid);
if (!$entity instanceof ServiceEntity) {
throw new \Exception(__METHOD__ . "에서 오류발생: [{$uid}]에 대한 서비스정보를 찾을수 없습니다.");
}
return parent::modify($entity, ['amount' => $this->getCaculatedAmount($entity)]);;
parent::modify($entity, ['amount' => $this->getCaculatedAmount($entity)]);;
//결제정보 수정
return $this->getPaymentService()->modifyService($entity);
}
//기본 기능부분
//FieldForm관련용
@ -229,7 +231,7 @@ class ServiceService extends CustomerService
//지정된 서버정보에 서비스 설정
$serverEntity = $this->getServerService()->setService($entity, $entity->getServerInfoUID());
//서비스 총금액 설정
$entity = $this->setAmount($entity->getUID());
$paymentEntity = $this->setAmount($entity->getPK());
//결제정보 등록
$paymentEntity = $this->getPaymentService()->createService($entity);
//추가 필수정보 수정용
@ -257,9 +259,7 @@ class ServiceService extends CustomerService
//지정된 서버정보에 서비스 설정
$serverEntity = $this->getServerService()->setService($entity, $entity->getServerInfoUID());
//서비스 총금액 설정
$entity = $this->setAmount($entity->getUID());
//결제정보 수정
$paymentEntity = $this->getPaymentService()->modifyService($entity);
$paymentEntity = $this->setAmount($entity->getPK());
//추가 필수정보 수정용
$entity = parent::modify($entity, [
'serverinfo_id' => $serverEntity->getPK(),

View File

@ -309,7 +309,7 @@ class ServerPartService extends EquipmentService implements ServerInterface
throw new \Exception(__METHOD__ . "에서 오류발생: 서비스정보가 정의된 후에만 가능합니다.");
}
//서비스 금액만 재계산변경
$this->getServiceService()->setAmount($this->getServiceService()->getEntity($entity->getServiceInfoUID()));
$this->getServiceService()->setAmount($entity->getServiceInfoUID());
break;
case PAYMENT['BILLING']['ONETIME']: //일회성일때만 처리
$paymentEntity = $this->getPaymentService()->createServerPart($entity);
@ -353,7 +353,7 @@ class ServerPartService extends EquipmentService implements ServerInterface
case PAYMENT['BILLING']['MONTH']: //월별과금일때만 처리
if ($entity->getServiceInfoUID() !== null) { //서비스가 정의되어 있으면
//서비스 금액만 재계산변경
$this->getServiceService()->setAmount($this->getServiceService()->getEntity($entity->getServiceInfoUID()));
$this->getServiceService()->setAmount($entity->getServiceInfoUID());
}
break;
case PAYMENT['BILLING']['ONETIME']: //일회성일때만 처리

View File

@ -21,7 +21,6 @@ class CSService extends PartService
public function getFormFields(): array
{
return [
"serverinfo_uid",
"type",
"ip",
"accountid",