dbmsv4 init...3
This commit is contained in:
parent
397c9b4f78
commit
7083471fbb
@ -155,8 +155,7 @@ class ServiceService extends CustomerService
|
||||
}
|
||||
//생성폼에는 없는 필수항목 지정용(code)
|
||||
$formDatas['code'] = $formDatas['site'] . "_s" . uniqid();
|
||||
//정의된 서버로 서비스금액 계산
|
||||
$formDatas['amount'] = $this->getCalculatedAmount($formDatas['rack'], $formDatas['line'], $formDatas['sale'], $formDatas['serverinfo_uid']);
|
||||
$formDatas['amount'] = 0; //임시정의 후 Update
|
||||
//서비스 생성
|
||||
$entity = parent::create_process($formDatas);
|
||||
if (!$entity instanceof ServiceEntity) {
|
||||
@ -176,19 +175,20 @@ class ServiceService extends CustomerService
|
||||
$oldEntity = clone $entity;
|
||||
//수정폼에는 없는 필수항목 지정용(code)
|
||||
$formDatas['code'] = $entity->getCode();
|
||||
//정의된 서버로 서비스금액 계산
|
||||
$formDatas['amount'] = $this->getCalculatedAmount($formDatas['rack'], $formDatas['line'], $formDatas['sale'], $formDatas['serverinfo_uid']);
|
||||
$formDatas['amount'] = 0; //임시정의 후 Update
|
||||
//서비스 수정
|
||||
$entity = parent::modify_process($entity, $formDatas);
|
||||
if (!$entity instanceof ServiceEntity) {
|
||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생:Return Type은 ServiceEntity만 가능");
|
||||
}
|
||||
//기존 서비스용 결제비용 과 신규 서버스용으로 결제비용이 다르면 수정
|
||||
service('paymentservice')->modifyByService($oldEntity, $entity);
|
||||
//서버정보 연결 신규서버로 변경
|
||||
if ($oldEntity->getServerInfoUid() !== $entity->getServerInfoUid()) {
|
||||
service('equipment_serverservice')->modifyByService($oldEntity, $entity);
|
||||
}
|
||||
//서비스비용 설정
|
||||
$entity = $this->updateAmount($entity);
|
||||
//기존 서비스용 결제비용 과 신규 서버스용으로 결제비용이 다르면 수정
|
||||
service('paymentservice')->modifyByService($oldEntity, $entity);
|
||||
return $entity;
|
||||
}
|
||||
//List 검색용
|
||||
|
||||
Loading…
Reference in New Issue
Block a user