dbmsv3 init...1

This commit is contained in:
choi.jh 2025-10-03 17:21:19 +09:00
parent 5c62883b5d
commit 6b7f5fd265
2 changed files with 13 additions and 6 deletions

View File

@ -211,6 +211,10 @@ class ServerService extends EquipmentService implements ServiceInterface
{ {
//수정전 정보 //수정전 정보
$oldEntity = clone $entity; //반드시 clone 할것 $oldEntity = clone $entity; //반드시 clone 할것
//ip값이 없으면 null처리
if (array_key_exists('ip', $formDatas) && !$formDatas['ip']) {
$formDatas['ip'] = null;
}
//서버정보 수정 //서버정보 수정
$entity = parent::modify($entity, $formDatas); $entity = parent::modify($entity, $formDatas);
//서비스가 연결되어 있고 대체서버가 아니면, 서비스정보수정(청구액수정) //서비스가 연결되어 있고 대체서버가 아니면, 서비스정보수정(청구액수정)

View File

@ -174,6 +174,8 @@ class IPService extends PartService implements ServerInterface
if (!array_key_exists('status', $formDatas)) { if (!array_key_exists('status', $formDatas)) {
throw new \Exception(__METHOD__ . ":{$action}에서 오류발생: IP상태가 설정되지 않았습니다."); throw new \Exception(__METHOD__ . ":{$action}에서 오류발생: IP상태가 설정되지 않았습니다.");
} }
//공백 값이 아니면
if (!$serverPartEntity->getPartUID()) {
//IP정보가져오기 //IP정보가져오기
$entity = $this->getEntity($serverPartEntity->getPartUID()); $entity = $this->getEntity($serverPartEntity->getPartUID());
if (!$entity instanceof IPEntity) { if (!$entity instanceof IPEntity) {
@ -181,6 +183,7 @@ class IPService extends PartService implements ServerInterface
} }
//IP정보 수정 //IP정보 수정
$entity = parent::modify($entity, $formDatas); $entity = parent::modify($entity, $formDatas);
}
break; break;
case 'delete': //반드시 serverPartEntity 사용해야함 case 'delete': //반드시 serverPartEntity 사용해야함
$formDatas = []; $formDatas = [];