dbmsv3 init...1
This commit is contained in:
parent
3b6557d55c
commit
5c62883b5d
@ -198,11 +198,7 @@ class ServerService extends EquipmentService implements ServiceInterface
|
|||||||
public function create(array $formDatas): ServerEntity
|
public function create(array $formDatas): ServerEntity
|
||||||
{
|
{
|
||||||
//서버정보 생성
|
//서버정보 생성
|
||||||
try {
|
$entity = parent::create($formDatas);
|
||||||
$entity = parent::create($formDatas);
|
|
||||||
} catch (\CodeIgniter\Database\Exceptions\DatabaseException $e) {
|
|
||||||
throw new \Exception(__METHOD__ . "오류발생: IP중복일 가능성이 있습니다.");
|
|
||||||
}
|
|
||||||
//서버의 Type별 서버파트정보등록(서버파트연결 자동등록용)
|
//서버의 Type별 서버파트정보등록(서버파트연결 자동등록용)
|
||||||
$entity = $this->getServerPartService()->setServer('create', $entity, []);
|
$entity = $this->getServerPartService()->setServer('create', $entity, []);
|
||||||
if ($entity->getIP() !== null) { //IP가 정의되어 있으면
|
if ($entity->getIP() !== null) { //IP가 정의되어 있으면
|
||||||
@ -216,11 +212,7 @@ class ServerService extends EquipmentService implements ServiceInterface
|
|||||||
//수정전 정보
|
//수정전 정보
|
||||||
$oldEntity = clone $entity; //반드시 clone 할것
|
$oldEntity = clone $entity; //반드시 clone 할것
|
||||||
//서버정보 수정
|
//서버정보 수정
|
||||||
try {
|
$entity = parent::modify($entity, $formDatas);
|
||||||
$entity = parent::modify($entity, $formDatas);
|
|
||||||
} catch (\CodeIgniter\Database\Exceptions\DatabaseException $e) {
|
|
||||||
throw new \Exception(__METHOD__ . "오류발생: IP중복일 가능성이 있습니다.");
|
|
||||||
}
|
|
||||||
//서비스가 연결되어 있고 대체서버가 아니면, 서비스정보수정(청구액수정)
|
//서비스가 연결되어 있고 대체서버가 아니면, 서비스정보수정(청구액수정)
|
||||||
if ($entity->getServiceInfoUID() !== null && $entity->getType() !== "alternative") {
|
if ($entity->getServiceInfoUID() !== null && $entity->getType() !== "alternative") {
|
||||||
$this->getServiceService()->setAmount($this->getServiceService()->getEntity($entity->getServiceInfoUID()));
|
$this->getServiceService()->setAmount($this->getServiceService()->getEntity($entity->getServiceInfoUID()));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user