dbmsv2_init...1
This commit is contained in:
parent
174297e404
commit
2dc1419880
@ -369,9 +369,11 @@ define('LAYOUTS', [
|
|||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
//List의 Page당 갯수
|
define("SITES", [
|
||||||
define('DEFAULT_LIST_PERPAGE', $_ENV['LIST_PERPAGE'] ?? $_SERVER['LIST_PERPAGE'] ?? 20);
|
"prime" => "PRIME",
|
||||||
|
"itsolution" => "ITSOLUTION",
|
||||||
|
"gdidc" => "GDIDC",
|
||||||
|
]);
|
||||||
//STATUS
|
//STATUS
|
||||||
define("STATUS", [
|
define("STATUS", [
|
||||||
'AVAILABLE' => "available",
|
'AVAILABLE' => "available",
|
||||||
@ -390,6 +392,9 @@ define("STATUS_ICONS", [
|
|||||||
'AVAILABLE' => "",
|
'AVAILABLE' => "",
|
||||||
'NOT_AVAILABLE' => "x."
|
'NOT_AVAILABLE' => "x."
|
||||||
]);
|
]);
|
||||||
|
//List의 Page당 갯수
|
||||||
|
define('DEFAULT_LIST_PERPAGE', $_ENV['LIST_PERPAGE'] ?? $_SERVER['LIST_PERPAGE'] ?? 20);
|
||||||
|
|
||||||
//서버 관련
|
//서버 관련
|
||||||
define("SERVER", []);
|
define("SERVER", []);
|
||||||
//서비스 관련
|
//서비스 관련
|
||||||
|
|||||||
@ -100,7 +100,7 @@ class ClientController extends CustomerController
|
|||||||
if (!$entity instanceof ClientEntity) {
|
if (!$entity instanceof ClientEntity) {
|
||||||
throw new \Exception("{$uid}에 해당하는 고객정보를 찾을수 없습니다.");
|
throw new \Exception("{$uid}에 해당하는 고객정보를 찾을수 없습니다.");
|
||||||
}
|
}
|
||||||
$this->totalCounts = $this->getService()->getServiceService()->getTotalCountsByType(['clientinfo_uid' => $entity->getPK()]);
|
$this->totalCounts = $this->getService()->getServiceService()->getTotalCountsBySite(['clientinfo_uid' => $entity->getPK()]);
|
||||||
$this->totalAmounts = $this->getService()->getServiceService()->getTotalAmounts([
|
$this->totalAmounts = $this->getService()->getServiceService()->getTotalAmounts([
|
||||||
'clientinfo_uid' => $entity->getPK(),
|
'clientinfo_uid' => $entity->getPK(),
|
||||||
'status' => STATUS['AVAILABLE']
|
'status' => STATUS['AVAILABLE']
|
||||||
|
|||||||
@ -69,7 +69,7 @@ class Home extends AdminController
|
|||||||
$this->getService()->setFormRules();
|
$this->getService()->setFormRules();
|
||||||
$this->getService()->setFormOptions();
|
$this->getService()->setFormOptions();
|
||||||
//Total 서버 현황
|
//Total 서버 현황
|
||||||
$this->totalCounts = $this->getService()->getTotalCountsByType();
|
$this->totalCounts = $this->getService()->getTotalCountsBySite();
|
||||||
//interval을 기준으로 최근 신규 서비스정보 가져오기
|
//interval을 기준으로 최근 신규 서비스정보 가져오기
|
||||||
$this->interval = intval($this->request->getVar('interval') ?? SERVICE['NEW_INTERVAL']);
|
$this->interval = intval($this->request->getVar('interval') ?? SERVICE['NEW_INTERVAL']);
|
||||||
$this->newServiceEntities = $this->getService()->getEntitiesByNewService($this->interval);
|
$this->newServiceEntities = $this->getService()->getEntitiesByNewService($this->interval);
|
||||||
|
|||||||
@ -602,4 +602,4 @@ UNLOCK TABLES;
|
|||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2025-09-24 11:00:23
|
-- Dump completed on 2025-09-24 11:30:07
|
||||||
|
|||||||
@ -80,6 +80,9 @@ class ServiceHelper extends CustomerHelper
|
|||||||
$value = "<a href=\"/admin/customer/client/detail/{$value}\">" . $viewDatas['control']['field_optons'][$field][$value]->getTitle() . "</a>";
|
$value = "<a href=\"/admin/customer/client/detail/{$value}\">" . $viewDatas['control']['field_optons'][$field][$value]->getTitle() . "</a>";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'amount':
|
||||||
|
$value = number_format($value) . "원";
|
||||||
|
break;
|
||||||
case 'billing_at':
|
case 'billing_at':
|
||||||
if (array_key_exists('unPaids', $viewDatas)) {
|
if (array_key_exists('unPaids', $viewDatas)) {
|
||||||
if (array_key_exists($viewDatas['entity']->getPK(), $viewDatas['unPaids'])) {
|
if (array_key_exists($viewDatas['entity']->getPK(), $viewDatas['unPaids'])) {
|
||||||
|
|||||||
@ -35,6 +35,9 @@ class PaymentHelper extends CommonHelper
|
|||||||
$action = "";
|
$action = "";
|
||||||
break;
|
break;
|
||||||
case 'modify':
|
case 'modify':
|
||||||
|
if ($this->getMyAuth()->isAccessRole(['security'])) {
|
||||||
|
$action = parent::getListButton($action, $label, $viewDatas, $extras);
|
||||||
|
} else {
|
||||||
$oldBatchJobUids = old("batchjob_uids", null);
|
$oldBatchJobUids = old("batchjob_uids", null);
|
||||||
$oldBatchJobUids = is_array($oldBatchJobUids) ? $oldBatchJobUids : [$oldBatchJobUids];
|
$oldBatchJobUids = is_array($oldBatchJobUids) ? $oldBatchJobUids : [$oldBatchJobUids];
|
||||||
$action = form_checkbox([
|
$action = form_checkbox([
|
||||||
@ -44,8 +47,7 @@ class PaymentHelper extends CommonHelper
|
|||||||
"class" => "batchjobuids_checkboxs",
|
"class" => "batchjobuids_checkboxs",
|
||||||
"checked" => in_array($viewDatas['entity']->getPK(), $oldBatchJobUids)
|
"checked" => in_array($viewDatas['entity']->getPK(), $oldBatchJobUids)
|
||||||
]);
|
]);
|
||||||
if ($this->getMyAuth()->isAccessRole(['security'])) {
|
$action .= $label;
|
||||||
$action = parent::getListButton($action, $label, $viewDatas, $extras);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'delete':
|
case 'delete':
|
||||||
|
|||||||
@ -17,11 +17,7 @@ return [
|
|||||||
'created_at' => "등록일",
|
'created_at' => "등록일",
|
||||||
'deleted_at' => "삭제일",
|
'deleted_at' => "삭제일",
|
||||||
],
|
],
|
||||||
"SITE" => [
|
"SITE" => SITES,
|
||||||
"prime" => "PRIME",
|
|
||||||
"itsolution" => "ITSOLUTION",
|
|
||||||
"gdidc" => "GDIDC",
|
|
||||||
],
|
|
||||||
"ROLE" => [
|
"ROLE" => [
|
||||||
"user" => "일반회원",
|
"user" => "일반회원",
|
||||||
"vip" => "VIP회원",
|
"vip" => "VIP회원",
|
||||||
|
|||||||
@ -21,11 +21,7 @@ return [
|
|||||||
'created_at' => "신청일",
|
'created_at' => "신청일",
|
||||||
'deleted_at' => "삭제일",
|
'deleted_at' => "삭제일",
|
||||||
],
|
],
|
||||||
"SITE" => [
|
"SITE" => SITES,
|
||||||
"prime" => "PRIME",
|
|
||||||
"itsolution" => "ITSOLUTION",
|
|
||||||
"gdidc" => "GDIDC",
|
|
||||||
],
|
|
||||||
"LOCATION" => [
|
"LOCATION" => [
|
||||||
"chiba" => "치바",
|
"chiba" => "치바",
|
||||||
"tokyo" => "도쿄",
|
"tokyo" => "도쿄",
|
||||||
|
|||||||
@ -35,6 +35,7 @@ return [
|
|||||||
"STATUS" => [
|
"STATUS" => [
|
||||||
STATUS['AVAILABLE'] => "사용가능",
|
STATUS['AVAILABLE'] => "사용가능",
|
||||||
STATUS['OCCUPIED'] => "서비스중",
|
STATUS['OCCUPIED'] => "서비스중",
|
||||||
|
STATUS['TERMINATED'] => "서비스해지",
|
||||||
STATUS['FORBIDDEN'] => "사용불가",
|
STATUS['FORBIDDEN'] => "사용불가",
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -46,7 +46,8 @@ class ServerService extends ParentService implements ServiceInterface
|
|||||||
$formDatas = [];
|
$formDatas = [];
|
||||||
$formDatas['clientinfo_uid'] = null;
|
$formDatas['clientinfo_uid'] = null;
|
||||||
$formDatas['serviceinfo_uid'] = null;
|
$formDatas['serviceinfo_uid'] = null;
|
||||||
$formDatas['status'] = STATUS['AVAILABLE'];
|
$formDatas['format_at'] = date("Y-m-d");
|
||||||
|
$formDatas['status'] = STATUS['TERMINATED'];
|
||||||
$entity = $this->action_process($serviceEntity, $formDatas);
|
$entity = $this->action_process($serviceEntity, $formDatas);
|
||||||
//서비스정보 Entity에 서버정보 설정
|
//서비스정보 Entity에 서버정보 설정
|
||||||
return $serviceEntity->setServerEntity($entity);
|
return $serviceEntity->setServerEntity($entity);
|
||||||
|
|||||||
@ -59,8 +59,8 @@ class ServiceService extends CustomerService
|
|||||||
'type',
|
'type',
|
||||||
'clientinfo_uid',
|
'clientinfo_uid',
|
||||||
'serverinfo_uid',
|
'serverinfo_uid',
|
||||||
'billing_at',
|
|
||||||
'amount',
|
'amount',
|
||||||
|
'billing_at',
|
||||||
'status',
|
'status',
|
||||||
'start_at',
|
'start_at',
|
||||||
'updated_at',
|
'updated_at',
|
||||||
@ -144,36 +144,51 @@ class ServiceService extends CustomerService
|
|||||||
return $this->getEntities(sprintf("start_at >= NOW()-INTERVAL {$interval} DAY AND status = '%s'", $status));
|
return $this->getEntities(sprintf("start_at >= NOW()-INTERVAL {$interval} DAY AND status = '%s'", $status));
|
||||||
}
|
}
|
||||||
//서비스 방식에 따른 서비스별 Count
|
//서비스 방식에 따른 서비스별 Count
|
||||||
final public function getTotalCountsByType(array $where = []): array
|
final public function getTotalCountsBySite(array $where = []): array
|
||||||
{
|
{
|
||||||
$totalCounts = [
|
$rows = $this->getModel()->groupBy(['site', 'type'])->select("site,type,
|
||||||
'chiba_total' => 0,
|
|
||||||
'tokyo_total' => 0,
|
|
||||||
'all_total' => 0,
|
|
||||||
'normal' => ['chiba' => 0, 'tokyo' => 0, 'total' => 0],
|
|
||||||
'defence' => ['chiba' => 0, 'tokyo' => 0, 'total' => 0],
|
|
||||||
'dedicated' => ['chiba' => 0, 'tokyo' => 0, 'total' => 0],
|
|
||||||
'vpn' => ['chiba' => 0, 'tokyo' => 0, 'total' => 0],
|
|
||||||
'event' => ['chiba' => 0, 'tokyo' => 0, 'total' => 0],
|
|
||||||
'test' => ['chiba' => 0, 'tokyo' => 0, 'total' => 0],
|
|
||||||
'alternative' => ['chiba' => 0, 'tokyo' => 0, 'total' => 0],
|
|
||||||
];
|
|
||||||
$rows = $this->getModel()->groupBy('type')->select("type,
|
|
||||||
COUNT(CASE WHEN location = 'chiba' THEN 1 END) AS chiba,
|
COUNT(CASE WHEN location = 'chiba' THEN 1 END) AS chiba,
|
||||||
COUNT(CASE WHEN location = 'tokyo' THEN 1 END) AS tokyo,
|
COUNT(CASE WHEN location = 'tokyo' THEN 1 END) AS tokyo,
|
||||||
COUNT(CASE WHEN location IN ('chiba', 'tokyo') THEN 1 END) AS total")
|
COUNT(CASE WHEN location IN ('chiba', 'tokyo') THEN 1 END) AS summary")
|
||||||
->where($where)
|
->where($where)
|
||||||
->get()->getResult();
|
->get()->getResult();
|
||||||
foreach ($rows as $row) {
|
// dd($rows);
|
||||||
$totalCounts[$row->type] = [
|
$totalCounts = [
|
||||||
'chiba' => $row->chiba,
|
'normal' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||||
'tokyo' => $row->tokyo,
|
'defence' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||||
'total' => $row->total,
|
'dedicated' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||||
|
'vpn' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||||
|
'event' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||||
|
'test' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||||
|
'alternative' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0]
|
||||||
|
];
|
||||||
|
foreach ($rows as $row) {
|
||||||
|
// echo "site:{$row->site},type:{$row->type}";
|
||||||
|
if (!array_key_exists($row->site, $totalCounts)) {
|
||||||
|
$totalCounts[$row->site] = [
|
||||||
|
'chiba_summary' => 0,
|
||||||
|
'tokyo_summary' => 0,
|
||||||
|
'all_summary' => 0,
|
||||||
|
'normal' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||||
|
'defence' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||||
|
'dedicated' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||||
|
'vpn' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||||
|
'event' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||||
|
'test' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||||
|
'alternative' => ['chiba' => 0, 'tokyo' => 0, 'summary' => 0],
|
||||||
];
|
];
|
||||||
$totalCounts['chiba_total'] += $row->chiba;
|
|
||||||
$totalCounts['tokyo_total'] += $row->tokyo;
|
|
||||||
}
|
}
|
||||||
$totalCounts['all_total'] = $totalCounts['chiba_total'] + $totalCounts['tokyo_total'];
|
if (!array_key_exists($row->type, $totalCounts[$row->site])) {
|
||||||
|
$totalCounts[$row->site][$row->type] = [];
|
||||||
|
}
|
||||||
|
$totalCounts[$row->type]['chiba'] += $totalCounts[$row->site][$row->type]['chiba'] = $row->chiba;
|
||||||
|
$totalCounts[$row->type]['tokyo'] += $totalCounts[$row->site][$row->type]['tokyo'] = $row->tokyo;
|
||||||
|
$totalCounts[$row->type]['summary'] += $totalCounts[$row->site][$row->type]['summary'] = $row->summary;
|
||||||
|
$totalCounts[$row->site]['chiba_summary'] += $row->chiba;
|
||||||
|
$totalCounts[$row->site]['tokyo_summary'] += $row->tokyo;
|
||||||
|
$totalCounts[$row->site]['all_summary'] = $totalCounts[$row->site]['chiba_summary'] + $totalCounts[$row->site]['tokyo_summary'];
|
||||||
|
}
|
||||||
|
// dd($totalCounts);
|
||||||
return $totalCounts;
|
return $totalCounts;
|
||||||
}
|
}
|
||||||
//서비스별 총 금액
|
//서비스별 총 금액
|
||||||
@ -204,14 +219,14 @@ class ServiceService extends CustomerService
|
|||||||
if (!$entity instanceof ServiceEntity) {
|
if (!$entity instanceof ServiceEntity) {
|
||||||
throw new \Exception(__METHOD__ . "에서 오류발생:[{$uid}]에 대한 서비스정보를 찾을수 없습니다.");
|
throw new \Exception(__METHOD__ . "에서 오류발생:[{$uid}]에 대한 서비스정보를 찾을수 없습니다.");
|
||||||
}
|
}
|
||||||
$total_amount = $entity->getRack() + $entity->getLine() + $entity->getServerEntity()->getPrice(); //기본:상면비+회선비+서버금액(price)+서버파트연결(월비용)
|
$summary_amount = $entity->getRack() + $entity->getLine() + $entity->getServerEntity()->getPrice(); //기본:상면비+회선비+서버금액(price)+서버파트연결(월비용)
|
||||||
//해당 서비스(서버) 관련 결제방식(Billing)이 Month인 ServerPart 전체를 다시 검사하여 월청구액을 합산한다.
|
//해당 서비스(서버) 관련 결제방식(Billing)이 Month인 ServerPart 전체를 다시 검사하여 월청구액을 합산한다.
|
||||||
foreach ($this->getServerPartService()->getEntities(['serverinfo_uid' => $entity->getServerEntity()->getPK()]) as $serverPartEntity) {
|
foreach ($this->getServerPartService()->getEntities(['serverinfo_uid' => $entity->getServerEntity()->getPK()]) as $serverPartEntity) {
|
||||||
if ($serverPartEntity->getBilling() === PAYMENT['BILLING']['MONTH']) { //월비용일때만 적용
|
if ($serverPartEntity->getBilling() === PAYMENT['BILLING']['MONTH']) { //월비용일때만 적용
|
||||||
$total_amount += $serverPartEntity->getCaculatedAmount(); //단가*Cnt
|
$summary_amount += $serverPartEntity->getCaculatedAmount(); //단가*Cnt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $total_amount;
|
return $summary_amount;
|
||||||
}
|
}
|
||||||
//기본 기능부분
|
//기본 기능부분
|
||||||
//FieldForm관련용
|
//FieldForm관련용
|
||||||
|
|||||||
@ -21,7 +21,8 @@ class ServerPartService extends ParentService implements ServerInterface
|
|||||||
//create와 같은 작업임
|
//create와 같은 작업임
|
||||||
public function modifyServer(ServerEntity $serverEntity): ServerEntity
|
public function modifyServer(ServerEntity $serverEntity): ServerEntity
|
||||||
{
|
{
|
||||||
return $this->createServer($serverEntity);
|
//아무것도 하지 않음
|
||||||
|
return $serverEntity;
|
||||||
}
|
}
|
||||||
public function deleteServer(ServerEntity $serverEntity): ServerEntity
|
public function deleteServer(ServerEntity $serverEntity): ServerEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@ -7,7 +7,7 @@ use App\Entities\Equipment\ServerEntity;
|
|||||||
use App\Interfaces\Equipment\ServerInterface;
|
use App\Interfaces\Equipment\ServerInterface;
|
||||||
use App\Services\Customer\ServiceService as ParentService;
|
use App\Services\Customer\ServiceService as ParentService;
|
||||||
|
|
||||||
|
//서버가격이 변한경우 서비스의 가격을 변경하기 위함.
|
||||||
class ServiceService extends ParentService implements ServerInterface
|
class ServiceService extends ParentService implements ServerInterface
|
||||||
{
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
@ -29,17 +29,16 @@ class ServiceService extends ParentService implements ServerInterface
|
|||||||
//아무것도 하지 않음
|
//아무것도 하지 않음
|
||||||
return $serverEntity;
|
return $serverEntity;
|
||||||
}
|
}
|
||||||
//create와 같은 작업임
|
|
||||||
public function modifyServer(ServerEntity $serverEntity): ServerEntity
|
public function modifyServer(ServerEntity $serverEntity): ServerEntity
|
||||||
{
|
{
|
||||||
return $this->createServer($serverEntity);
|
$this->action_process($serverEntity);
|
||||||
|
return $serverEntity;
|
||||||
}
|
}
|
||||||
//create와 같은 작업임
|
|
||||||
public function deleteServer(ServerEntity $serverEntity): ServerEntity
|
public function deleteServer(ServerEntity $serverEntity): ServerEntity
|
||||||
{
|
{
|
||||||
if ($serverEntity->getServiceInfoUID() !== null || $serverEntity->getStatus() === STATUS['OCCUPIED']) {
|
if ($serverEntity->getServiceInfoUID() !== null || $serverEntity->getStatus() === STATUS['OCCUPIED']) {
|
||||||
throw new \Exception("서비스중이 서버는 삭제하실수 없습니다.");
|
throw new \Exception("서비스중이 서버는 삭제하실수 없습니다.");
|
||||||
}
|
}
|
||||||
return $this->createServer($serverEntity);
|
return $serverEntity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@ use App\Entities\PaymentEntity;
|
|||||||
use App\Interfaces\Equipment\ServerPartInterface;
|
use App\Interfaces\Equipment\ServerPartInterface;
|
||||||
use App\Services\PaymentService as ParentService;
|
use App\Services\PaymentService as ParentService;
|
||||||
|
|
||||||
//이 클래스는 일회성일때만 실행된다.
|
////서버연결정보 추가나 변경,삭제시 일회성일 경우 실행됨
|
||||||
class PaymentService extends ParentService implements ServerPartInterface
|
class PaymentService extends ParentService implements ServerPartInterface
|
||||||
{
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
@ -51,6 +51,10 @@ class PaymentService extends ParentService implements ServerPartInterface
|
|||||||
if (!$entity instanceof PaymentEntity) {
|
if (!$entity instanceof PaymentEntity) {
|
||||||
throw new \Exception(__METHOD__ . "에서 오류발생: 서버파트연결정보{$serverPartEntity->getPK()}]에 해당하는 결제정보를 찾을수 없습니다.");
|
throw new \Exception(__METHOD__ . "에서 오류발생: 서버파트연결정보{$serverPartEntity->getPK()}]에 해당하는 결제정보를 찾을수 없습니다.");
|
||||||
}
|
}
|
||||||
|
//미납상태확인
|
||||||
|
if ($entity->getStatus() !== STATUS['UNPAID']) {
|
||||||
|
throw new \Exception(__METHOD__ . "에서 오류발생: 완료된 결제는 수정이 불가합니다.");
|
||||||
|
}
|
||||||
//필수정보처리 후 FormData 가져오기
|
//필수정보처리 후 FormData 가져오기
|
||||||
$formDatas = $this->action_process($serverPartEntity);
|
$formDatas = $this->action_process($serverPartEntity);
|
||||||
//결제정보수정
|
//결제정보수정
|
||||||
|
|||||||
@ -7,7 +7,7 @@ use App\Entities\Equipment\ServerPartEntity;
|
|||||||
use App\Interfaces\Equipment\ServerPartInterface;
|
use App\Interfaces\Equipment\ServerPartInterface;
|
||||||
use App\Services\Customer\ServiceService as ParentService;
|
use App\Services\Customer\ServiceService as ParentService;
|
||||||
|
|
||||||
|
//서버연결정보 추가나 변경,삭제시 가격이 변한경우 서비스의 가격을 변경하기 위함.
|
||||||
class ServiceService extends ParentService implements ServerPartInterface
|
class ServiceService extends ParentService implements ServerPartInterface
|
||||||
{
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
|||||||
@ -299,8 +299,8 @@ class ServerPartService extends EquipmentService
|
|||||||
//삭제
|
//삭제
|
||||||
public function delete(mixed $entity): ServerPartEntity
|
public function delete(mixed $entity): ServerPartEntity
|
||||||
{
|
{
|
||||||
//선처리작업
|
$entity = parent::delete($entity);
|
||||||
$entity = $this->action_process($entity, __FUNCTION__ . 'ServerPart');
|
//서비스금액 관련때문에 후처리작업
|
||||||
return parent::delete($entity);
|
return $this->action_process($entity, __FUNCTION__ . 'ServerPart');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,6 @@ class ServerService extends EquipmentService
|
|||||||
"title",
|
"title",
|
||||||
"price",
|
"price",
|
||||||
"manufactur_at",
|
"manufactur_at",
|
||||||
"format_at",
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
public function getFormFilters(): array
|
public function getFormFilters(): array
|
||||||
@ -129,7 +128,6 @@ class ServerService extends EquipmentService
|
|||||||
//수정
|
//수정
|
||||||
public function modify(mixed $entity, array $formDatas): ServerEntity
|
public function modify(mixed $entity, array $formDatas): ServerEntity
|
||||||
{
|
{
|
||||||
$entity->getServerService()->deleteService($entity);
|
|
||||||
//서버정보 수정
|
//서버정보 수정
|
||||||
$entity = parent::modify($entity, $formDatas);
|
$entity = parent::modify($entity, $formDatas);
|
||||||
//후처리작업
|
//후처리작업
|
||||||
|
|||||||
@ -50,10 +50,10 @@
|
|||||||
서버정보<div class="float-end rounded border border-primary" style="cursor:pointer;" onclick="copyServerPartsToClipboard()">All COPY</div>
|
서버정보<div class="float-end rounded border border-primary" style="cursor:pointer;" onclick="copyServerPartsToClipboard()">All COPY</div>
|
||||||
</th>
|
</th>
|
||||||
<th class="index_head_short_column">
|
<th class="index_head_short_column">
|
||||||
<?= $viewDatas['service']->getHelper()->getListLabel('billing_at', lang("{$viewDatas['class_path']}.label.billing_at"), $viewDatas) ?>
|
<?= $viewDatas['service']->getHelper()->getListLabel('amount', lang("{$viewDatas['class_path']}.label.amount"), $viewDatas) ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="index_head_short_column">
|
<th class="index_head_short_column">
|
||||||
<?= $viewDatas['service']->getHelper()->getListLabel('amount', lang("{$viewDatas['class_path']}.label.amount"), $viewDatas) ?>
|
<?= $viewDatas['service']->getHelper()->getListLabel('billing_at', lang("{$viewDatas['class_path']}.label.billing_at"), $viewDatas) ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="index_head_short_column">
|
<th class="index_head_short_column">
|
||||||
<?= $viewDatas['service']->getHelper()->getListLabel('status', lang("{$viewDatas['class_path']}.label.status"), $viewDatas) ?>
|
<?= $viewDatas['service']->getHelper()->getListLabel('status', lang("{$viewDatas['class_path']}.label.status"), $viewDatas) ?>
|
||||||
@ -90,10 +90,10 @@
|
|||||||
]) ?>
|
]) ?>
|
||||||
</td>
|
</td>
|
||||||
<td nowrap>
|
<td nowrap>
|
||||||
<?= $viewDatas['service']->getHelper()->getFieldView('billing_at', $entity->billing_at, $viewDatas) ?>
|
<?= $viewDatas['service']->getHelper()->getFieldView('amount', $entity->amount, $viewDatas) ?>
|
||||||
</td>
|
</td>
|
||||||
<td nowrap>
|
<td nowrap>
|
||||||
<?= $viewDatas['service']->getHelper()->getFieldView('amount', $entity->amount, $viewDatas) ?>
|
<?= $viewDatas['service']->getHelper()->getFieldView('billing_at', $entity->billing_at, $viewDatas) ?>
|
||||||
</td>
|
</td>
|
||||||
<td nowrap>
|
<td nowrap>
|
||||||
<?= $viewDatas['service']->getHelper()->getFieldView('status', $entity->status, $viewDatas) ?>
|
<?= $viewDatas['service']->getHelper()->getFieldView('status', $entity->status, $viewDatas) ?>
|
||||||
|
|||||||
@ -9,7 +9,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||||
<table class="table table-bordered table-hover align-middle">
|
<table class="table table-bordered table-hover align-middle">
|
||||||
<thead>
|
|
||||||
<tr class="text-center">
|
<tr class="text-center">
|
||||||
<th rowspan="2">고객명</th>
|
<th rowspan="2">고객명</th>
|
||||||
<th colspan="2">일반</th>
|
<th colspan="2">일반</th>
|
||||||
@ -35,27 +34,25 @@
|
|||||||
<th>치바</th>
|
<th>치바</th>
|
||||||
<th>합계</th>
|
<th>합계</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
<?php foreach (SITES as $key => $label): ?>
|
||||||
<tbody>
|
|
||||||
<tr class="text-center">
|
<tr class="text-center">
|
||||||
<td>PRIME</td>
|
<td><?= $label ?></td>
|
||||||
<td><?= $viewDatas['totalCounts']['normal']['tokyo'] ?></td>
|
<td><?= $viewDatas['totalCounts'][$key]['normal']['tokyo'] ?></td>
|
||||||
<td><?= $viewDatas['totalCounts']['normal']['chiba'] ?></td>
|
<td><?= $viewDatas['totalCounts'][$key]['normal']['chiba'] ?></td>
|
||||||
<td><?= $viewDatas['totalCounts']['defence']['tokyo'] ?></td>
|
<td><?= $viewDatas['totalCounts'][$key]['defence']['tokyo'] ?></td>
|
||||||
<td><?= $viewDatas['totalCounts']['defence']['chiba'] ?></td>
|
<td><?= $viewDatas['totalCounts'][$key]['defence']['chiba'] ?></td>
|
||||||
<td><?= $viewDatas['totalCounts']['dedicated']['tokyo'] ?></td>
|
<td><?= $viewDatas['totalCounts'][$key]['dedicated']['tokyo'] ?></td>
|
||||||
<td><?= $viewDatas['totalCounts']['dedicated']['chiba'] ?></td>
|
<td><?= $viewDatas['totalCounts'][$key]['dedicated']['chiba'] ?></td>
|
||||||
<td><?= $viewDatas['totalCounts']['alternative']['tokyo'] ?></td>
|
<td><?= $viewDatas['totalCounts'][$key]['alternative']['tokyo'] ?></td>
|
||||||
<td><?= $viewDatas['totalCounts']['alternative']['chiba'] ?></td>
|
<td><?= $viewDatas['totalCounts'][$key]['alternative']['chiba'] ?></td>
|
||||||
<td><?= $viewDatas['totalCounts']['test']['tokyo'] ?></td>
|
<td><?= $viewDatas['totalCounts'][$key]['test']['tokyo'] ?></td>
|
||||||
<td><?= $viewDatas['totalCounts']['test']['chiba'] ?></td>
|
<td><?= $viewDatas['totalCounts'][$key]['test']['chiba'] ?></td>
|
||||||
<td><?= $viewDatas['totalCounts']['test']['total'] ?></td>
|
<td><?= $viewDatas['totalCounts'][$key]['test']['summary'] ?></td>
|
||||||
<td><?= $viewDatas['totalCounts']['tokyo_total'] ?></td>
|
<td><?= $viewDatas['totalCounts'][$key]['tokyo_summary'] ?></td>
|
||||||
<td><?= $viewDatas['totalCounts']['chiba_total'] ?></td>
|
<td><?= $viewDatas['totalCounts'][$key]['chiba_summary'] ?></td>
|
||||||
<td><?= $viewDatas['totalCounts']['all_total'] ?></td>
|
<td><?= $viewDatas['totalCounts'][$key]['all_summary'] ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
<?php endforeach ?>
|
||||||
<tfoot class="table-light fw-bold">
|
|
||||||
<tr class="text-center">
|
<tr class="text-center">
|
||||||
<td>총합계</td>
|
<td>총합계</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
@ -73,7 +70,6 @@
|
|||||||
<td>0</td>
|
<td>0</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="layout_footer"></div>
|
<div class="layout_footer"></div>
|
||||||
Loading…
Reference in New Issue
Block a user