dbms_primeidc_init...1

This commit is contained in:
최준흠 2025-04-11 09:11:33 +09:00
parent ccc8a8f180
commit ea6058d358
3 changed files with 14 additions and 5 deletions

View File

@ -21,6 +21,7 @@ class DashboardController extends ClientController
throw new \Exception("client_code 값이 정의되지 않았습니다."); throw new \Exception("client_code 값이 정의되지 않았습니다.");
} }
$client_code = $params['client_code']; $client_code = $params['client_code'];
//서비스위치별(치바,도쿄등)
$dashboard = []; $dashboard = [];
foreach (DBMS_SERVICE_SWITCHCODE as $district => $switchcodes) { foreach (DBMS_SERVICE_SWITCHCODE as $district => $switchcodes) {
$switchcode_begin = $switchcodes['begin']; $switchcode_begin = $switchcodes['begin'];
@ -31,10 +32,12 @@ class DashboardController extends ClientController
$switchcode_end $switchcode_end
); );
} //foreach } //foreach
//서비스라인별(일반,방어,전용,테스트,대체등)
foreach (DBMS_SERVICE_LINE as $service_line => $label) { foreach (DBMS_SERVICE_LINE as $service_line => $label) {
$dashboard[$service_line] = $this->getServiceService()->getServiceLineCountByClient($client_code, $service_line); $dashboard[$service_line] = $this->getServiceService()->getServiceLineCountByClient($client_code, $service_line);
} //foreach } //foreach
$dashboard['coupon'] = $this->getServiceService()->getCouponCountByClient($client_code); //서비스상태별(정상,정지,해지등)
$dashboard['coupon'] = intval($this->getServiceService()->getCouponCountByClient($client_code));
$this->dashboard = $dashboard; $this->dashboard = $dashboard;
$this->client_code = $client_code; $this->client_code = $client_code;
return $this->render(__FUNCTION__); return $this->render(__FUNCTION__);

View File

@ -85,7 +85,7 @@ class ServiceService extends CommonService
} //foreach } //foreach
return $temps; return $temps;
} }
//지역(치바,도쿄등)에 따른 사용자별용 서비스 카운트 //지역(치바,도쿄등)에 따른 사용자별용 서비스카운트
public function getDistrictCountByClient(string $client_code, string $switchcode_begin, string $switchcode_end): int public function getDistrictCountByClient(string $client_code, string $switchcode_begin, string $switchcode_end): int
{ {
$this->getModel()->where("client_code", "{$client_code}"); $this->getModel()->where("client_code", "{$client_code}");
@ -103,7 +103,7 @@ class ServiceService extends CommonService
// // echo "<BR>" . $this->getModel()->getLastQuery(); // // echo "<BR>" . $this->getModel()->getLastQuery();
// return $stmt->fetch(PDO::FETCH_ASSOC); // return $stmt->fetch(PDO::FETCH_ASSOC);
} }
//사용자별용 ServieLine별 카운트 //ServieLine(일반,방어,전용,테스트,대체등)에 따른 사용자용 서비스 카운트
public function getServiceLineCountByClient(string $client_code, string $service_line): int public function getServiceLineCountByClient(string $client_code, string $service_line): int
{ {
$this->getModel()->where("client_code", "{$client_code}"); $this->getModel()->where("client_code", "{$client_code}");
@ -111,7 +111,7 @@ class ServiceService extends CommonService
$this->getModel()->where("service_status", 'o'); $this->getModel()->where("service_status", 'o');
return $this->getCount(); return $this->getCount();
} }
//사용자별용 서비스 쿠폰 //사용자별용 서비스 쿠폰 카운트
public function getCouponCountByClient(string $client_code): int public function getCouponCountByClient(string $client_code): int
{ {
$this->getModel()->where("client_code", "{$client_code}"); $this->getModel()->where("client_code", "{$client_code}");

View File

@ -49,7 +49,13 @@
<tr> <tr>
<td><?= $this->dashboard['test'] ?></td> <td><?= $this->dashboard['test'] ?></td>
<td class=" "><?= $this->dashboard['substitution'] ?></td> <td class=" "><?= $this->dashboard['substitution'] ?></td>
<td onclick="location.href='/IdcCouponUseMK.cup?client_code=<?= $this->client_code ?>'" style="cursor: pointer;"><?= $this->dashboard['coupon'] ?></td> <td>>
<?php if (!$this->dashboard['coupon']) { ?>
<?= $this->dashboard['coupon'] ?>
<?php } else { ?>
<a href="/IdcCouponUseMK.cup?client_code=<?= $this->client_code ?>" style=" cursor: pointer;"><?= $this->dashboard['coupon'] ?></a>
<?php } ?>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>