# Business Logic — JKKSvkeiShosaChkCC.getSvcSbtCd() [38 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKSvkeiShosaChkCC` |
| Layer | CC / Common Component (Shared validation and processing utility) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKSvkeiShosaChkCC.getSvcSbtCd()

The `getSvcSbtCd` method is a routing/dispatch utility that determines the **service type code** (service category) based on a combination of the service code and the pricing group code. It is a core decision point in the e-Customer Core System's service contract verification workflow — every service contract record iterated during the `chkSvkeiShosa` (service item check) process passes through this method to classify the service before running dimension-specific validation rules.

The method handles five distinct **service categories**: (1) eo Hikari Net (fiber-optic broadband for home/maison/mansion types), (2) eo Hikari ADSL (ADSL broadband via eAccess or Flets), (3) eo Mobile (mobile/Wi-Fi services), (4) eo Hikari Telephone (fiber-optic voice service), and (5) eo Hikari TV (fiber-optic television service). It implements a **two-level dispatch pattern**: first branching on the top-level service code (network vs. telephone vs. TV), then further decomposing the network category by pricing group to distinguish between broadband sub-types (home fiber, ADSL, mobile).

As a **private shared utility** within the `JKKSvkeiShosaChkCC` component, this method plays a critical supporting role in the larger service contract verification system. It is invoked by `chkSvkeiShosa`, the main verification entry point that validates all active service contracts against business rules. By returning a normalized integer service type code, it enables downstream verification logic to branch on service category without repeating the complex service-code-to-pricing-group mapping. This centralized routing ensures consistency across all verification screens that handle multiple service types.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["getSvcSbtCd(svcCd, prcGrpCd)"])
    INIT["Set svcSbtCd = SVC_SBT_CD_HNET 1"]

    COND_SVC["svcCd equals SVC_CD_NET?"]

    COND_HOME["prcGrpCd equals HOME/MEZON/MANS?"]
    HOME_BR["svcSbtCd = SVC_SBT_CD_HNET 1"]

    COND_ADSL["prcGrpCd equals EACCESS/FU?"]
    ADSL_BR["svcSbtCd = SVC_SBT_CD_ADSL 5"]

    MOBA_BR["svcSbtCd = SVC_SBT_CD_MOBA 4"]

    COND_TEL["svcCd equals SVC_CD_TEL?"]
    TEL_BR["svcSbtCd = SVC_SBT_CD_HTEL 3"]

    HTV_BR["svcSbtCd = SVC_SBT_CD_HTV 2"]

    RETURN["Return svcSbtCd"]

    START --> INIT
    INIT --> COND_SVC

    COND_SVC -- "Yes: Network svcCd" --> COND_HOME
    COND_SVC -- "No: Other svcCd" --> COND_TEL

    COND_HOME -- "true" --> HOME_BR
    COND_HOME -- "false" --> COND_ADSL
    COND_ADSL -- "true" --> ADSL_BR
    COND_ADSL -- "false" --> MOBA_BR

    COND_TEL -- "true" --> TEL_BR
    COND_TEL -- "false" --> HTV_BR

    HOME_BR --> RETURN
    ADSL_BR --> RETURN
    MOBA_BR --> RETURN
    TEL_BR --> RETURN
    HTV_BR --> RETURN
```

**CRITICAL -- Constant Resolution:**

| Constant | Resolved Value | Business Meaning | Source Location |
|----------|---------------|-----------------|-----------------|
| `SVC_CD_NET` | `"01"` | Network service code (Internet broadband) | `JKKSvkeiShosaChkCC.java:129` |
| `SVC_CD_TEL` | `"02"` | Telephone service code (Voice) | `JKKSvkeiShosaChkCC.java:132` |
| `PRC_GRP_CD_HOME` | `"02"` | eo Hikari Net -- Home type residential | `JKKSvkeiShosaChkCC.java:138` |
| `PRC_GRP_CD_MEZON` | `"03"` | eo Hikari Net -- Maison type (mid-rise apartments) | `JKKSvkeiShosaChkCC.java:141` |
| `PRC_GRP_CD_MANS` | `"04"` | eo Hikari Net -- Mansion type (large condominiums) | `JKKSvkeiShosaChkCC.java:144` |
| `PRC_GRP_CD_EACCESS` | `"05"` | eo ADSL -- eAccess provider | `JKKSvkeiShosaChkCC.java:147` |
| `PRC_GRP_CD_FU` | `"06"` | eo ADSL -- Flets provider | `JKKSvkeiShosaChkCC.java:150` |
| `PRC_GRP_CD_WIFI` | `"07"` | eo Mobile -- Wi-Fi (also mapped to EM/WiMAX under same value) | `JKKSvkeiShosaChkCC.java:153` |
| `SVC_SBT_CD_HNET` | `1` | eo Hikari Net (fiber broadband) | `JKKSvkeiShosaChkCC.java:162` |
| `SVC_SBT_CD_HTV` | `2` | eo Hikari TV (fiber television) | `JKKSvkeiShosaChkCC.java:165` |
| `SVC_SBT_CD_HTEL` | `3` | eo Hikari Telephone (fiber voice) | `JKKSvkeiShosaChkCC.java:168` |
| `SVC_SBT_CD_MOBA` | `4` | eo Mobile (mobile/Wi-Fi service) | `JKKSvkeiShosaChkCC.java:171` |
| `SVC_SBT_CD_ADSL` | `5` | eo ADSL (ADSL broadband) | `JKKSvkeiShosaChkCC.java:174` |

**Branch Summary:**

| # | Branch Path | Condition | Resulting Service Type | Business Description |
|---|-------------|-----------|----------------------|---------------------|
| 1 | Network -> Home/Maison/Mansion | `svcCd = "01"` AND pricing group in {02, 03, 04} | `SVC_SBT_CD_HNET` (1) -- eo光ネット (eo Hikari Net) | Fiber-optic broadband for residential premises |
| 2 | Network -> ADSL | `svcCd = "01"` AND pricing group in {05, 06} | `SVC_SBT_CD_ADSL` (5) -- eoADSL | Legacy ADSL broadband via eAccess or Flets providers |
| 3 | Network -> Default | `svcCd = "01"` AND pricing group not in any above | `SVC_SBT_CD_MOBA` (4) -- eoモバイル (eo Mobile) | Mobile/Wi-Fi services (catch-all for network type) |
| 4 | Telephone | `svcCd = "02"` | `SVC_SBT_CD_HTEL` (3) -- eo光電話 (eo Hikari Telephone) | Fiber-optic voice telephone service |
| 5 | Other (Default) | `svcCd` is neither "01" nor "02" | `SVC_SBT_CD_HTV` (2) -- eo光TV (eo Hikari TV) | Fiber-optic television service (includes TV and other services like HS) |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `svcCd` | `String` | **Service Code** -- identifies the top-level service category. Values: `"01"` = Network (Internet broadband), `"02"` = Telephone (Voice), `"03"` = TV. This is the primary dispatch key that determines which major service family the record belongs to. Passed from the service contract agreement verification result (`EKK0081A010CBSMsg1List.SVC_CD`). |
| 2 | `prcGrpCd` | `String` | **Pricing Group Code** -- further classifies the service within its family. For network services, values distinguish between Home (`"02"`), Maison (`"03"`), Mansion (`"04"`), eAccess ADSL (`"05"`), and Flets ADSL (`"06"`). For telephone and TV, this parameter is present but not consulted. Passed from the service contract agreement verification result (`EKK0081A010CBSMsg1List.PRC_GRP_CD`). |

**No instance fields or external state** are read by this method. It is a pure function -- the output depends solely on the two input parameters, making it deterministic and testable in isolation.

## 4. CRUD Operations / Called Services

This method performs **no external operations**. It is a pure in-memory classification routine with no method calls to other services, CBS (Common Business Service) components, or database access layers.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| (None) | -- | -- | -- | This method contains zero external calls. It is a self-contained constant-based routing dispatch that classifies service types in memory. |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Class: `JKKSvkeiShosaChkCC` (Common Component) | `chkSvkeiShosa` iterates service contracts -> calls `getSvcSbtCd(svcCd, prcGrpCd)` at L779 | (No terminal CRUD from this method -- it returns a classification code to its caller) |

**Call Chain Detail:** The method is called directly from `chkSvkeiShosa` (the service item check verification entry point within the same class). In that context, it is invoked after the service contract agreement verification CBS (`EKK0081A010SC`) returns results containing `SVC_CD` and `PRC_GRP_CD` fields. The returned service type code is stored in the local variable `svcSbtCd` and used by subsequent conditional branches in `chkSvkeiShosa` for dimension-specific checks.

## 6. Per-Branch Detail Blocks

**Block 1** -- [DEFAULT INITIALIZATION] `(L1354)`

> Initialize the return variable with a default service type code (eo Hikari Net). This ensures a valid default is always set before conditional branching.

| # | Type | Code |
|---|------|------|
| 1 | SET | `int svcSbtCd = SVC_SBT_CD_HNET;` // Initialize default to eo Hikari Net (1) [-> SVC_SBT_CD_HNET=1] |

**Block 2** -- [IF] `(svcCd.equals(SVC_CD_NET))` `(L1356) [SVC_CD_NET="01"]`

> First-level dispatch: check whether the service code indicates a Network (Internet broadband) service.

| # | Type | Code |
|---|------|------|
| 1 | COND | `if (svcCd.equals(SVC_CD_NET))` // Network service? [-> SVC_CD_NET="01"] |

**Block 2.1** -- [IF nested] `(prcGrpCd equals HOME/MEZON/MANS)` `(L1358) [PRC_GRP_CD_HOME="02", PRC_GRP_CD_MEZON="03", PRC_GRP_CD_MANS="04"]`

> Network sub-type: classify as eo Hikari Net when the pricing group is Home, Maison, or Mansion type.

| # | Type | Code |
|---|------|------|
| 1 | COND | `if (prcGrpCd.equals(PRC_GRP_CD_HOME))` // Home type? [-> PRC_GRP_CD_HOME="02"] |
| 2 | COND | `|| prcGrpCd.equals(PRC_GRP_CD_MEZON)` // Or Maison type? [-> PRC_GRP_CD_MEZON="03"] |
| 3 | COND | `|| prcGrpCd.equals(PRC_GRP_CD_MANS)` // Or Mansion type? [-> PRC_GRP_CD_MANS="04"] |
| 4 | SET | `svcSbtCd = SVC_SBT_CD_HNET;` // eo光ネット (eo Hikari Net) [-> SVC_SBT_CD_HNET=1] |

**Block 2.2** -- [ELSE-IF nested] `(prcGrpCd equals EACCESS/FU)` `(L1366) [PRC_GRP_CD_EACCESS="05", PRC_GRP_CD_FU="06"]`

> Network sub-type: classify as eo ADSL when the pricing group is eAccess or Flets.

| # | Type | Code |
|---|------|------|
| 1 | COND | `else if (prcGrpCd.equals(PRC_GRP_CD_EACCESS))` // eAccess ADSL? [-> PRC_GRP_CD_EACCESS="05"] |
| 2 | COND | `|| prcGrpCd.equals(PRC_GRP_CD_FU)` // Or Flets ADSL? [-> PRC_GRP_CD_FU="06"] |
| 3 | SET | `svcSbtCd = SVC_SBT_CD_ADSL;` // eoADSL [-> SVC_SBT_CD_ADSL=5] |

**Block 2.3** -- [ELSE nested] `(default network)` `(L1372)`

> Network sub-type: classify as eo Mobile for any other pricing group not covered by Home/Maison/Mansion/ADSL. This serves as a catch-all for mobile/Wi-Fi services (including WiMAX under the same pricing group code "07").

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcSbtCd = SVC_SBT_CD_MOBA;` // eoモバイル (eo Mobile) [-> SVC_SBT_CD_MOBA=4] |

**Block 3** -- [ELSE-IF] `(svcCd.equals(SVC_CD_TEL))` `(L1376) [SVC_CD_TEL="02"]`

> Second-level dispatch: check whether the service code indicates a Telephone (Voice) service.

| # | Type | Code |
|---|------|------|
| 1 | COND | `else if (svcCd.equals(SVC_CD_TEL))` // Telephone service? [-> SVC_CD_TEL="02"] |
| 2 | SET | `svcSbtCd = SVC_SBT_CD_HTEL;` // eo光電話 (eo Hikari Telephone) [-> SVC_SBT_CD_HTEL=3] |

**Block 4** -- [ELSE] `(default)` `(L1380)`

> Default fallback: classify as eo Hikari TV when the service code is neither Network nor Telephone. This covers TV service (`"03"`) and any other remaining service codes (e.g., HS/home shopping at `"04"`).

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcSbtCd = SVC_SBT_CD_HTV;` // eo光TV (eo Hikari TV) [-> SVC_SBT_CD_HTV=2] |

**Block 5** -- [RETURN] `(L1383)`

> Return the classified service type code to the caller.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return svcSbtCd;` // Return the classified service type code |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svcCd` | Field | Service Code -- top-level service category identifier. `"01"` = Network (Internet), `"02"` = Telephone (Voice), `"03"` = TV |
| `prcGrpCd` | Field | Pricing Group Code -- secondary classification within a service family, used to distinguish service types (Home fiber, ADSL, mobile, etc.) |
| `svcSbtCd` | Field | Service Type Code -- normalized integer classification result (1=HNet, 2=HTV, 3=HTel, 4=MOBA, 5=ADSL) |
| `SVC_CD_NET` | Constant | Service Code for Network/Internet -- value `"01"` |
| `SVC_CD_TEL` | Constant | Service Code for Telephone -- value `"02"` |
| `SVC_SBT_CD_HNET` | Constant | Service Type Code: eo Hikari Net (fiber-optic broadband) -- value `1` |
| `SVC_SBT_CD_HTV` | Constant | Service Type Code: eo Hikari TV (fiber-optic television) -- value `2` |
| `SVC_SBT_CD_HTEL` | Constant | Service Type Code: eo Hikari Telephone (fiber-optic voice) -- value `3` |
| `SVC_SBT_CD_MOBA` | Constant | Service Type Code: eo Mobile (mobile/Wi-Fi service) -- value `4` |
| `SVC_SBT_CD_ADSL` | Constant | Service Type Code: eo ADSL (legacy ADSL broadband) -- value `5` |
| `PRC_GRP_CD_HOME` | Constant | Pricing Group Code: eo Hikari Net Home type (residential house) -- value `"02"` |
| `PRC_GRP_CD_MEZON` | Constant | Pricing Group Code: eo Hikari Net Maison type (mid-rise apartment) -- value `"03"` |
| `PRC_GRP_CD_MANS` | Constant | Pricing Group Code: eo Hikari Net Mansion type (large condominium) -- value `"04"` |
| `PRC_GRP_CD_EACCESS` | Constant | Pricing Group Code: eo ADSL via eAccess provider -- value `"05"` |
| `PRC_GRP_CD_FU` | Constant | Pricing Group Code: eo ADSL via Flets provider -- value `"06"` |
| eo光ネット (eo Hikari Net) | Business term | Fujitsu's fiber-optic broadband internet service for residential premises |
| eo光電話 (eo Hikari Telephone) | Business term | Fujitsu's fiber-optic voice telephone service bundled with broadband |
| eo光TV (eo Hikari TV) | Business term | Fujitsu's fiber-optic digital television service |
| eoADSL | Business term | Fujitsu's legacy ADSL broadband service, available through eAccess or Flets providers |
| eoモバイル (eo Mobile) | Business term | Fujitsu's mobile/Wi-Fi wireless service offering |
| chkSvkeiShosa | Method | Service item verification check -- the main verification entry point that iterates service contracts and calls `getSvcSbtCd` for classification |
| EKK0081A010CBSMsg | Entity/Class | Service contract agreement verification CBS message -- contains SVC_CD and PRC_GRP_CD fields passed to this method |
| JKKStrConst | Class | Common string constant definitions shared across the e-Customer Core System |
| AbstractCommonComponent | Class | Base class for all common components in the BP (Business Process) framework |
