# Business Logic — JKKKddiKeishaInfoCC.setNetKeiSmartValueMskmKh() [159 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKKddiKeishaInfoCC` |
| Layer | CC/Common Component |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKKddiKeishaInfoCC.setNetKeiSmartValueMskmKh()

This method determines whether a KDDI customer is eligible to apply for **Smart Value** ( スマートバリュー) — a bundled discount service offered by KDDI for customers who combine their internet and mobile phone contracts. It acts as the central eligibility router: it first checks whether the customer has an active internet (net Kei / ネット契約) contract, and if so, evaluates the customer's housing type, billing structure, and service contract status to determine if Smart Value application is **permitted** (KK_MSKM_PSB_NET) or **rejected** (KK_MSKM_FL_NET), along with the specific rejection reason and a customer-facing guidance message. If no internet contract exists, it records a rejection reason and looks up a human-readable code description from the code management system. The method delegates final contract state persistence to `setNetKeiyakuJotai()` and then calls `getSmartValueMskmKhMap()` to retrieve the full Smart Value eligibility result set, which it finally flattens into `ccMsg` output parameters (`out_prmt9`, `out_prmt10`, `out_prmt11`) for the calling screen. This method is a shared common component utility invoked from `getKddiKeishaInfo()` and `getSmartValueMskmKh()` within the same class, serving the KDDI customer information reference screen.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setNetKeiSmartValueMskmKh"])
    
    START --> CHECK_NET{"isNetKei check"}
    
    CHECK_NET -->|"true"| NET_YES["netCnt = 1"]
    CHECK_NET -->|"false"| NET_NO["netCnt = 0"]
    
    NET_YES --> CHECK_MANSION{"isMansionPrvt check"}
    
    CHECK_MANSION -->|"true"| MANSION_BRANCH["Mansion Private branch"]
    CHECK_MANSION -->|"false"| CHECK_JURYOSEI{"isJuryosei check"}
    
    MANSION_BRANCH --> M_SET["Set mansion prvt map values"]
    
    CHECK_JURYOSEI -->|"true"| JURYOSEI_BRANCH["Volume-based branch"]
    CHECK_JURYOSEI -->|"false"| OTHER_BRANCH["Other net status branch"]
    
    JURYOSEI_BRANCH --> J_SET["Set volume-based map values"]
    
    OTHER_BRANCH --> GET_KJ["Get kjKrCnclFlg from isSvcKeiKariCnclFrg"]
    GET_KJ --> CHECK_STAT{"SVC_KEI_STAT == 020"}
    
    CHECK_STAT -->|"true"| STAT020["Stat 020 branch"]
    CHECK_STAT -->|"false"| CHECK_STAT2{"SVC_KEI_STAT == 030"}
    
    STAT020 --> CHECK_SHOSA{"isShosaOK and kjKrCnclFlg != 1"}
    
    CHECK_SHOSA -->|"true"| SHOSA_OK["Set KK_MSKM_PSB_NET"]
    CHECK_SHOSA -->|"false"| SHOSA_NG["Shosa NG branch"]
    
    SHOSA_NG --> CHECK_KRCN1{"kjKrCnclFlg == 1"}
    
    CHECK_KRCN1 -->|"true"| KRCN1["Set KK_MSKM_FL_NET with KRCN reason"]
    CHECK_KRCN1 -->|"false"| DSL_NG["Set KK_MSKM_FL_NET with DSL reason"]
    
    CHECK_STAT2 -->|"true"| STAT030["Stat 030 branch"]
    CHECK_STAT2 -->|"false"| CHECK_CANCEL{"isSvcKeiStatusCancel check"}
    
    STAT030 --> CHECK_KRCN2{"kjKrCnclFlg == 1"}
    
    CHECK_KRCN2 -->|"true"| KRCN2["Set KK_MSKM_FL_NET with KRCN reason"]
    CHECK_KRCN2 -->|"false"| PSB030["Set KK_MSKM_PSB_NET"]
    
    CHECK_CANCEL -->|"true"| CANCEL_BRANCH["Cancel branch"]
    CHECK_CANCEL -->|"false"| CHECK_PAUSE{"isSvcKeiStatusPause check"}
    
    CANCEL_BRANCH --> C_SET["Set KK_MSKM_FL_NET with DSL reason"]
    
    CHECK_PAUSE -->|"true"| PAUSE_BRANCH["Pause/Suspension branch"]
    CHECK_PAUSE -->|"false"| CHECK_KEIYAKU{"isSvcKeiStatusKeiyaku check"}
    
    PAUSE_BRANCH --> P_SET["Set KK_MSKM_FL_NET with PSE reason"]
    
    CHECK_KEIYAKU -->|"true"| KEIYAKU_BRANCH["Contract Active branch"]
    CHECK_KEIYAKU -->|"false"| NON_BRANCH["No contract branch"]
    
    KEIYAKU_BRANCH --> K_SET["Set KK_MSKM_PSB_NET"]
    
    NON_BRANCH --> NON_SET["Set KK_MSKM_FL_NET with NON reason and netCnt=0"]
    
    M_SET --> POST_NET["setNetKeiyakuJotai
ccMsg.put netknsu=1"]
    J_SET --> POST_NET
    SHOSA_OK --> POST_NET
    KRCN1 --> POST_NET
    DSL_NG --> POST_NET
    KRCN2 --> POST_NET
    PSB030 --> POST_NET
    C_SET --> POST_NET
    P_SET --> POST_NET
    K_SET --> POST_NET
    NON_SET --> POST_NET
    
    POST_NET --> MERGE["_"]
    
    NET_NO --> EZM_CALL["getEZM0171A010 for code name lookup"]
    EZM_CALL --> EZM_SET["Set NON values
ccMsg.put out_prmt12 and netknsu=0"]
    
    EZM_SET --> MERGE
    
    MERGE --> GET_MSKM["getSmartValueMskmKhMap"]
    GET_MSKM --> FINAL_PUT["Set out_prmt9, out_prmt10, out_prmt11 on ccMsg"]
    FINAL_PUT --> END(["Return void"])
```

**CRITICAL — Constant Resolution:**

| Constant | Resolved Value | Business Meaning | Source |
|----------|---------------|-----------------|--------|
| `KK_MSKM_PSB_NET` | `"KK_MSKM_PSB_NET"` | Application possible (Internet) | JKKKddiKeishaInfoCC.java |
| `KK_MSKM_FL_NET` | `"KK_MSKM_FL_NET"` | Application not possible (Internet) | JKKKddiKeishaInfoCC.java |
| `KK_MKM_FL_RSN_N_PRVT` | `"KK_MKM_FL_RSN_N_PRVT"` | Rejection reason: Internet / Private housing | JKKKddiKeishaInfoCC.java |
| `KK_MKM_FL_RSN_N_JRY` | `"KK_MKM_FL_RSN_N_JRY"` | Rejection reason: Internet / Volume-based pricing | JKKKddiKeishaInfoCC.java |
| `KK_MKM_FL_RSN_N_DSL` | `"KK_MKM_FL_RSN_N_DSL"` | Rejection reason: Internet / Cancelled | JKKKddiKeishaInfoCC.java |
| `KK_MKM_FL_RSN_N_PSE` | `"KK_MKM_FL_RSN_N_PSE"` | Rejection reason: Internet / Suspended (mid-term) | JKKKddiKeishaInfoCC.java |
| `KK_MKM_FL_RSN_N_NON` | `"KK_MKM_FL_RSN_N_NON"` | Rejection reason: Internet / No contract | JKKKddiKeishaInfoCC.java |
| `KK_MKM_FL_RSN_N_KRCN` | `"KK_MKM_FL_RSN_N_KRCN"` | Rejection reason: Internet / Work provisional cancel | JKKKddiKeishaInfoCC.java |
| `KK_CUST_GUIDE_N_PRVT` | `"KK_CUST_GUIDE_N_PRVT"` | Customer guidance: Internet / Private housing | JKKKddiKeishaInfoCC.java |
| `KK_CUST_GUIDE_N_JRY` | `"KK_CUST_GUIDE_N_JRY"` | Customer guidance: Internet / Volume-based pricing | JKKKddiKeishaInfoCC.java |
| `KK_CUST_GUIDE_N_DSL` | `"KK_CUST_GUIDE_N_DSL"` | Customer guidance: Internet / Cancelled | JKKKddiKeishaInfoCC.java |
| `KK_CUST_GUIDE_N_PSE` | `"KK_CUST_GUIDE_N_PSE"` | Customer guidance: Internet / Suspended (mid-term) | JKKKddiKeishaInfoCC.java |
| `KK_CUST_GUIDE_N_NON` | `"KK_CUST_GUIDE_N_NON"` | Customer guidance: Internet / No contract | JKKKddiKeishaInfoCC.java |
| `KK_CUST_GUIDE_N_KRCN` | `"KK_CUST_GUIDE_N_KRCN"` | Customer guidance: Internet / Work provisional cancel | JKKKddiKeishaInfoCC.java |
| `KEY_NET_MSKM_FL` | `"KEY_NET_MSKM_FL"` | Map key: Internet application eligibility | JKKKddiKeishaInfoCC.java |
| `KEY_NET_MSKM_RSN` | `"KEY_NET_MSKM_RSN"` | Map key: Internet application rejection reason | JKKKddiKeishaInfoCC.java |
| `KEY_NET_GUIDE` | `"KEY_NET_GUIDE"` | Map key: Internet customer guidance message | JKKKddiKeishaInfoCC.java |
| `SVC_KEI_STAT` | field in EKK0251B005CBSMsg1List | Service contract status code | EKK0251B005CBSMsg1List.java |
| `SVC_KEI_NO` | field in EKK0251B005CBSMsg1List | Service contract number | EKK0251B005CBSMsg1List.java |
| `CD_DIV_NM` | field in EZM0171A010CBSMsg1List | Code classification name | EZM0171A010CBSMsg1List.java |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database session handle used for all service component calls. Carries the transaction context, connection info, and security identity for the current screen operation. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object wrapping the screen input. Used to retrieve `ccMsg` data via `param.getData(fixedText)` and to pass output data back to the calling screen layer. |
| 3 | `fixedText` | `String` | Fixed text key / parameter name used to locate the specific data map within `param`. It identifies which named data block (e.g., a screen-specific request key) to read from and write to. |
| 4 | `ccMsg` | `HashMap<String, Object>` | Common component message map — the shared data structure between this common component and the calling screen. It receives the Smart Value eligibility result: `netknsu` (internet contract existence flag), `out_prmt9` (application eligibility flag), `out_prmt10` (rejection reason code), `out_prmt11` (customer guidance code), and `out_prmt12` (human-readable code name for no-contract case). |
| 5 | `svcKeiData` | `CAANMsg` | Service contract data message object containing the customer's current service contract details, including service contract status (`SVC_KEI_STAT`), service contract number (`SVC_KEI_NO`), and other service-level fields. Used by `isNetKei()`, `isMansionPrvt()`, `isJuryosei()`, and the status-check branches. |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JBSbatFUCaseFileRnkData.getString` | JBSbatFUCaseFileRnkData | - | Calls `getString` in `JBSbatFUCaseFileRnkData` |
| R | `JBSbatFUMoveNaviData.getString` | JBSbatFUMoveNaviData | - | Calls `getString` in `JBSbatFUMoveNaviData` |
| R | `JBSbatZMAdDataSet.getString` | JBSbatZMAdDataSet | - | Calls `getString` in `JBSbatZMAdDataSet` |
| R | `JKKKddiKeishaInfoCC.getEZM0171A010` | JKKKddiKeishaInfoCC | - | Calls `getEZM0171A010` in `JKKKddiKeishaInfoCC` — looks up code name for `CD01536` (code classification name management) |
| R | `JKKKddiKeishaInfoCC.getNullToStr` | JKKKddiKeishaInfoCC | - | Utility: converts null to empty string for safe display |
| R | `JKKKddiKeishaInfoCC.getSmartValueMskmKhMap` | JKKKddiKeishaInfoCC | - | Calls `getSmartValueMskmKhMap` in `JKKKddiKeishaInfoCC` — retrieves full Smart Value application eligibility map based on `workParamKeyMap` |
| - | `JKKKddiKeishaInfoCC.isJuryosei` | JKKKddiKeishaInfoCC | - | Checks if the service contract uses volume-based pricing (従量制) |
| - | `JKKKddiKeishaInfoCC.isMansionPrvt` | JKKKddiKeishaInfoCC | - | Checks if the customer's residence is a private mansion (マンション・プライベート) |
| - | `JKKKddiKeishaInfoCC.isNetKei` | JKKKddiKeishaInfoCC | - | Checks whether the customer has an active internet contract (ネット契約) |
| - | `JKKKddiKeishaInfoCC.isShosaOK` | JKKKddiKeishaInfoCC | - | Checks whether inspection review has been completed (照会OK / inspection OK) |
| - | `JKKKddiKeishaInfoCC.isSvcKeiKariCnclFrg` | JKKKddiKeishaInfoCC | - | Checks for work provisional cancel flag (工事仮キャンセルフラグ) — added v31.00.00 for ST-hardwave compatibility |
| - | `JKKKddiKeishaInfoCC.isSvcKeiStatusCancel` | JKKKddiKeishaInfoCC | - | Checks if service contract status indicates cancellation (解約) |
| - | `JKKKddiKeishaInfoCC.isSvcKeiStatusKeiyaku` | JKKKddiKeishaInfoCC | - | Checks if service contract status indicates contract execution / service in progress (締結済み／サービス提供中) |
| - | `JKKKddiKeishaInfoCC.isSvcKeiStatusPause` | JKKKddiKeishaInfoCC | - | Checks if service contract status indicates suspension (休止・中断中) |
| - | `JKKKddiKeishaInfoCC.setNetKeiyakuJotai` | JKKKddiKeishaInfoCC | - | Sets the internet contract state (ネット契約状態設定) on the parameter data |
| R | `JESC0101B010TPMA.getString` | JESC0101B010TPMA | - | Calls `getString` in `JESC0101B010TPMA` |
| R | `JESC0101B020TPMA.getString` | JESC0101B020TPMA | - | Calls `getString` in `JESC0101B020TPMA` |

The method does not directly perform database CRUD operations. All persistence is delegated through called common components (`setNetKeiyakuJotai`, `getSmartValueMskmKhMap`, `getEZM0171A010`). The method is primarily a **Read** and data-routing pattern — it reads service contract data from `svcKeiData`, performs eligibility logic, and writes routing results into `ccMsg` and `workParamKeyMap`.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `JKKKddiKeishaInfoCC.getKddiKeishaInfo()` (CC) | `JKKKddiKeishaInfoCC.getKddiKeishaInfo()` → `JKKKddiKeishaInfoCC.setNetKeiSmartValueMskmKh()` | `getNullToStr [R]`, `getSmartValueMskmKhMap [R]`, `getEZM0171A010 [R]`, `setNetKeiyakuJotai [-]`, `isJuryosei [-]`, `isMansionPrvt [-]`, `isNetKei [-]`, `isShosaOK [-]`, `isSvcKeiKariCnclFrg [-]`, `isSvcKeiStatusCancel [-]`, `isSvcKeiStatusKeiyaku [-]`, `isSvcKeiStatusPause [-]` |
| 2 | `JKKKddiKeishaInfoCC.getSmartValueMskmKh()` (CC) | `JKKKddiKeishaInfoCC.getSmartValueMskmKh()` → `JKKKddiKeishaInfoCC.setNetKeiSmartValueMskmKh()` | `getNullToStr [R]`, `getSmartValueMskmKhMap [R]`, `getEZM0171A010 [R]`, `setNetKeiyakuJotai [-]`, `isJuryosei [-]`, `isMansionPrvt [-]`, `isNetKei [-]`, `isShosaOK [-]`, `isSvcKeiKariCnclFrg [-]`, `isSvcKeiStatusCancel [-]`, `isSvcKeiStatusKeiyaku [-]`, `isSvcKeiStatusPause [-]` |

No direct screen (KKSV*) or batch entry points are found within the call graph. Both callers are internal common component methods within `JKKKddiKeishaInfoCC`, indicating this method is a shared internal utility used by the broader KDDI customer information retrieval workflow.

## 6. Per-Branch Detail Blocks

**Block 1** — [IF] `(isNetKei(svcKeiData))` — "When there is an internet contract" (ネットの場合) (L1979)

This is the top-level branch: determines if the customer has an active internet contract.

| # | Type | Code |
|---|------|------|
| 1 | SET | `netCnt = "1"` // Internet contract exists flag (ネット存在件数) |
| 2 | EXEC | `isMansionPrvt(handle, param, fixedText, ccMsg, svcKeiData)` // Check if housing is private mansion (ネット状態がマンション(プライベート)の場合) |

**Block 1.1** — [IF] `(isMansionPrvt(...))` — Mansion Private branch (ネット状態がマンション(プライベート)の場合) (L1984)

The customer lives in a private mansion type housing, which has a specific Smart Value eligibility rule.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workParamKeyMap.put(KEY_NET_MSKM_FL, KK_MSKM_FL_NET)` // Application not possible (申込不可) — [-> KK_MSKM_FL_NET="KK_MSKM_FL_NET"] |
| 2 | SET | `workParamKeyMap.put(KEY_NET_MSKM_RSN, KK_MKM_FL_RSN_N_PRVT)` // Rejection reason: Private housing (申込不可理由：ネット・プライベート) — [-> KK_MKM_FL_RSN_N_PRVT="KK_MKM_FL_RSN_N_PRVT"] |
| 3 | SET | `workParamKeyMap.put(KEY_NET_GUIDE, KK_CUST_GUIDE_N_PRVT)` // Customer guidance: Private housing (お客様への案内：ネット・プライベート) — [-> KK_CUST_GUIDE_N_PRVT="KK_CUST_GUIDE_N_PRVT"] |

**Block 1.2** — [ELSE-IF] `(isJuryosei(svcKeiData))` — Volume-based pricing branch (ネット状態が従量制の場合) (L1994)

The customer uses a volume-based (従量制) billing structure.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workParamKeyMap.put(KEY_NET_MSKM_FL, KK_MSKM_FL_NET)` // Application not possible — [-> KK_MSKM_FL_NET="KK_MSKM_FL_NET"] |
| 2 | SET | `workParamKeyMap.put(KEY_NET_MSKM_RSN, KK_MKM_FL_RSN_N_JRY)` // Rejection reason: Volume-based (申込不可理由：ネット・従量制) — [-> KK_MKM_FL_RSN_N_JRY="KK_MKM_FL_RSN_N_JRY"] |
| 3 | SET | `workParamKeyMap.put(KEY_NET_GUIDE, KK_CUST_GUIDE_N_JRY)` // Customer guidance: Volume-based (お客様への案内：ネット・従量制) — [-> KK_CUST_GUIDE_N_JRY="KK_CUST_GUIDE_N_JRY"] |

**Block 1.3** — [ELSE] — Other net status branch (ネット状態が上記以外) (L2005)

This is the complex fallback branch that handles all remaining contract statuses not covered by mansion or volume-based checks.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kjKrCnclFlg = isSvcKeiKariCnclFrg(handle, param, fixedText, svcKeiData)` // Get work provisional cancel flag (工事仮キャンセル情報を取得) [-> ANK-3136-00-00 2017/12/04 ADD] |
| 2 | EXEC | Check: `SVC_KEI_STAT == "020"` — Inspection Complete (照会済) [EKK0251B005CBSMsg1List.SVC_KEI_STAT] |

**Block 1.3.1** — [IF] `(SVC_KEI_STAT == "020")` — Inspection Complete (照会済) (L2015)

When the service contract status is "020" (Inspection Complete), check whether inspection review is OK and whether there is a work provisional cancel.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiNo = getNullToStr(svcKeiData.getString(EKK0251B005CBSMsg1List.SVC_KEI_NO))` // Service contract number (サービス契約番号) |
| 2 | EXEC | Check: `isShosaOK(handle, param, fixedText, svcKeiNo) && !"1".equals(kjKrCnclFlg)` // Inspection OK AND no provisional cancel (照会OK かつ 工事仮キャンセルフラグが"1"以外) [MOD: ANK-3136-00-00 2017/12/04] |

**Block 1.3.1.1** — [IF] `(isShosaOK(...) && !kjKrCnclFlg == "1")` — Inspection OK (照会OKの場合) (L2021)

Smart Value application is **permitted** because inspection has passed and no provisional cancel is in effect.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workParamKeyMap.put(KEY_NET_MSKM_FL, KK_MSKM_PSB_NET)` // Application possible (申込可能：ネット) — [-> KK_MSKM_PSB_NET="KK_MSKM_PSB_NET"] |

**Block 1.3.1.2** — [ELSE] — Shosa NG (Shosa Not OK) (L2024)

Inspection review did not pass. Further branch on whether there is a work provisional cancel flag.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | Check: `kjKrCnclFlg == "1"` (工事仮キャンセルフラグ) |

**Block 1.3.1.2.1** — [IF] `(kjKrCnclFlg == "1")` — Work provisional cancel present (L2033)

| # | Type | Code |
|---|------|------|
| 1 | SET | `workParamKeyMap.put(KEY_NET_MSKM_FL, KK_MSKM_FL_NET)` // Not possible (申込不可) — [-> KK_MSKM_FL_NET] |
| 2 | SET | `workParamKeyMap.put(KEY_NET_MSKM_RSN, KK_MKM_FL_RSN_N_KRCN)` // Rejection: Work provisional cancel (申込不可理由：ネット・仮キャンセル) — [-> KK_MKM_FL_RSN_N_KRCN="KK_MKM_FL_RSN_N_KRCN"] |
| 3 | SET | `workParamKeyMap.put(KEY_NET_GUIDE, KK_CUST_GUIDE_N_KRCN)` // Guidance: Work provisional cancel (お客様への案内：ネット・仮キャンセル) — [-> KK_CUST_GUIDE_N_KRCN="KK_CUST_GUIDE_N_KRCN"] |

**Block 1.3.1.2.2** — [ELSE] — No work provisional cancel, inspection failed (L2040)

| # | Type | Code |
|---|------|------|
| 1 | SET | `workParamKeyMap.put(KEY_NET_MSKM_FL, KK_MSKM_FL_NET)` // Not possible — [-> KK_MSKM_FL_NET] |
| 2 | SET | `workParamKeyMap.put(KEY_NET_MSKM_RSN, KK_MKM_FL_RSN_N_DSL)` // Rejection: Cancelled (申込不可理由：ネット・解約) — [-> KK_MKM_FL_RSN_N_DSL="KK_MKM_FL_RSN_N_DSL"] |
| 3 | SET | `workParamKeyMap.put(KEY_NET_GUIDE, KK_CUST_GUIDE_N_DSL)` // Guidance: Cancelled (お客様への案内：ネット・解約) — [-> KK_CUST_GUIDE_N_DSL="KK_CUST_GUIDE_N_DSL"] |

**Block 1.3.2** — [ELSE-IF] `(SVC_KEI_STAT == "030")` — Contracted (締結済) (L2055) [ANSK-3136-00-00 2017/12/04 ADD]

When service contract status is "030" (Contracted), check provisional cancel flag.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | Check: `kjKrCnclFlg == "1"` |

**Block 1.3.2.1** — [IF] `(kjKrCnclFlg == "1")` — Work provisional cancel present (L2059)

| # | Type | Code |
|---|------|------|
| 1 | SET | `workParamKeyMap.put(KEY_NET_MSKM_FL, KK_MSKM_FL_NET)` // Not possible — [-> KK_MSKM_FL_NET] |
| 2 | SET | `workParamKeyMap.put(KEY_NET_MSKM_RSN, KK_MKM_FL_RSN_N_KRCN)` // Rejection: Work provisional cancel (申込不可理由：ネット・仮キャンセル) — [-> KK_MKM_FL_RSN_N_KRCN="KK_MKM_FL_RSN_N_KRCN"] |
| 3 | SET | `workParamKeyMap.put(KEY_NET_GUIDE, KK_CUST_GUIDE_N_KRCN)` // Guidance: Work provisional cancel (お客様への案内：ネット・仮キャンセル) — [-> KK_CUST_GUIDE_N_KRCN="KK_CUST_GUIDE_N_KRCN"] |

**Block 1.3.2.2** — [ELSE] — No provisional cancel, status 030 (L2064)

Smart Value application is **permitted** for contracted status without provisional cancel.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workParamKeyMap.put(KEY_NET_MSKM_FL, KK_MSKM_PSB_NET)` // Application possible (申込可能：ネット) — [-> KK_MSKM_PSB_NET="KK_MSKM_PSB_NET"] |

**Block 1.3.3** — [ELSE-IF] `(isSvcKeiStatusCancel(svcKeiData))` — Cancelled branch (サービス契約ステータスが「解約」「キャンセル」の場合) (L2073)

The service contract has been cancelled.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workParamKeyMap.put(KEY_NET_MSKM_FL, KK_MSKM_FL_NET)` // Not possible — [-> KK_MSKM_FL_NET] |
| 2 | SET | `workParamKeyMap.put(KEY_NET_MSKM_RSN, KK_MKM_FL_RSN_N_DSL)` // Rejection: Cancelled (申込不可理由：ネット・解約) — [-> KK_MKM_FL_RSN_N_DSL="KK_MKM_FL_RSN_N_DSL"] |
| 3 | SET | `workParamKeyMap.put(KEY_NET_GUIDE, KK_CUST_GUIDE_N_DSL)` // Guidance: Cancelled (お客様への案内：ネット・解約) — [-> KK_CUST_GUIDE_N_DSL="KK_CUST_GUIDE_N_DSL"] |

**Block 1.3.4** — [ELSE-IF] `(isSvcKeiStatusPause(svcKeiData))` — Pause/Suspension branch (サービス契約ステータスが「休止・中断中」かつ、休止中断コードが「02」以外の場合) (L2082)

The service contract is suspended (not in the specific code "02" exception case).

| # | Type | Code |
|---|------|------|
| 1 | SET | `workParamKeyMap.put(KEY_NET_MSKM_FL, KK_MSKM_FL_NET)` // Not possible — [-> KK_MSKM_FL_NET] |
| 2 | SET | `workParamKeyMap.put(KEY_NET_MSKM_RSN, KK_MKM_FL_RSN_N_PSE)` // Rejection: Suspended (申込不可理由：ネット・休止中) — [-> KK_MKM_FL_RSN_N_PSE="KK_MKM_FL_RSN_N_PSE"] |
| 3 | SET | `workParamKeyMap.put(KEY_NET_GUIDE, KK_CUST_GUIDE_N_PSE)` // Guidance: Suspended (お客様への案内：ネット・休止中) — [-> KK_CUST_GUIDE_N_PSE="KK_CUST_GUIDE_N_PSE"] |

**Block 1.3.5** — [ELSE-IF] `(isSvcKeiStatusKeiyaku(svcKeiData))` — Contract/Active branch (サービス契約ステータスが「締結済」、「サービス提供中」、「停止中」、かつ、休止中断コードが「02」以外の場合) (L2091)

The service contract is active (contracted, service in progress, or stopped — but not suspended).

| # | Type | Code |
|---|------|------|
| 1 | SET | `workParamKeyMap.put(KEY_NET_MSKM_FL, KK_MSKM_PSB_NET)` // Application possible (申込可能：ネット) — [-> KK_MSKM_PSB_NET="KK_MSKM_PSB_NET"] |

**Block 1.3.6** — [ELSE] — No contract / Other branch (上記以外の場合は、ネット契約なしとみなす) (L2097)

None of the recognized statuses matched — treat as if there is no internet contract.

| # | Type | Code |
|---|------|------|
| 1 | SET | `netCnt = "0"` // No internet contract (ネット契約なし) |
| 2 | SET | `workParamKeyMap.put(KEY_NET_MSKM_FL, KK_MSKM_FL_NET)` // Not possible — [-> KK_MSKM_FL_NET] |
| 3 | SET | `workParamKeyMap.put(KEY_NET_MSKM_RSN, KK_MKM_FL_RSN_N_NON)` // Rejection: No contract (申込不可理由：ネット・契約無) — [-> KK_MKM_FL_RSN_N_NON="KK_MKM_FL_RSN_N_NON"] |
| 4 | SET | `workParamKeyMap.put(KEY_NET_GUIDE, KK_CUST_GUIDE_N_NON)` // Guidance: No contract (お客様への案内：ネット・契約無) — [-> KK_CUST_GUIDE_N_NON="KK_CUST_GUIDE_N_NON"] |

**Block 1.4** — Post-net-yes processing (ネットの契約状態設定) (L2104)

After all branching within the internet-contract branch, persist the contract state and record the existence flag.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setNetKeiyakuJotai(handle, param, fixedText, ccMsg, svcKeiData)` // Set internet contract state (ネットの契約状態設定) |
| 2 | SET | `ccMsg.put("netknsu", netCnt)` // Write internet contract existence flag (ネット存在件数の設定) |

**Block 2** — [ELSE] — No internet contract (ネットなしの場合) (L2109)

The customer has no active internet contract. Set default rejection values and look up the human-readable code name for the code classification.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workParamKeyMap.put(KEY_NET_MSKM_FL, KK_MSKM_FL_NET)` // Not possible (申込不可：ネット) — [-> KK_MSKM_FL_NET="KK_MSKM_FL_NET"] |
| 2 | SET | `workParamKeyMap.put(KEY_NET_MSKM_RSN, KK_MKM_FL_RSN_N_NON)` // Rejection: No contract (申込不可理由：ネット・契約無) — [-> KK_MKM_FL_RSN_N_NON="KK_MKM_FL_RSN_N_NON"] |
| 3 | SET | `workParamKeyMap.put(KEY_NET_GUIDE, KK_CUST_GUIDE_N_NON)` // Guidance: No contract (お客様への案内：ネット・契約無) — [-> KK_CUST_GUIDE_N_NON="KK_CUST_GUIDE_N_NON"] |
| 4 | CALL | `cAANMsgCdNmKanri = getEZM0171A010(handle, param, fixedText, "CD01536", "000")` // Code name management lookup (コード名称管理一意照会) |
| 5 | SET | `ccMsg.put("out_prmt12", getNullToStr(cAANMsgCdNmKanri.getString(EZM0171A010CBSMsg1List.CD_DIV_NM)))` // Human-readable code name from code management |
| 6 | SET | `ccMsg.put("netknsu", "0")` // No internet contract (ネット存在件数=0) |

**Block 3** — Post-branch processing (ネット契約のスマートバリュー申込可否情報を取得) (L2118)

Regardless of whether the customer has an internet contract, retrieve the full Smart Value application eligibility result set.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `netMskmMap = getSmartValueMskmKhMap(handle, param, fixedText, ccMsg, workParamKeyMap)` // Get Smart Value eligibility map (スマートバリュー申込可否情報を取得) |
| 2 | SET | `ccMsg.put("out_prmt9", getNullToStr(netMskmMap.get(KEY_NET_MSKM_FL)))` // Application eligibility flag (申込可否フラグ) |
| 3 | SET | `ccMsg.put("out_prmt10", getNullToStr(netMskmMap.get(KEY_NET_MSKM_RSN)))` // Rejection reason code (申込不可理由) |
| 4 | SET | `ccMsg.put("out_prmt11", getNullToStr(netMskmMap.get(KEY_NET_GUIDE)))` // Customer guidance code (お客様案内) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `netCnt` | Field | Internet contract existence count flag — "1" if customer has an internet contract, "0" if not |
| `kjKrCnclFlg` | Field | Work provisional cancel flag — "1" if a work provisional cancel (工事仮キャンセル) is in effect; added in v31.00.00 (ANK-3136-00-00) for ST-hardwave compatibility |
| `SVC_KEI_STAT` | Field | Service contract status code — e.g., "020" = inspection complete (照会済), "030" = contracted (締結済) |
| `SVC_KEI_NO` | Field | Service contract number — unique identifier for a service contract line |
| `KK_MSKM_PSB_NET` | Constant | Application possible (Internet) — the bundled Smart Value discount can be applied |
| `KK_MSKM_FL_NET` | Constant | Application not possible (Internet) — the bundled Smart Value discount cannot be applied |
| `KK_MKM_FL_RSN_N_PRVT` | Constant | Rejection reason: Internet / Private housing — Smart Value not applicable for private mansion residents |
| `KK_MKM_FL_RSN_N_JRY` | Constant | Rejection reason: Internet / Volume-based pricing — Smart Value not applicable for volume-billed accounts |
| `KK_MKM_FL_RSN_N_DSL` | Constant | Rejection reason: Internet / Cancelled — Smart Value not applicable for cancelled contracts |
| `KK_MKM_FL_RSN_N_PSE` | Constant | Rejection reason: Internet / Suspended (mid-term) — Smart Value not applicable for suspended accounts |
| `KK_MKM_FL_RSN_N_NON` | Constant | Rejection reason: Internet / No contract — Smart Value not applicable when no internet contract exists |
| `KK_MKM_FL_RSN_N_KRCN` | Constant | Rejection reason: Internet / Work provisional cancel — Smart Value not applicable when a work provisional cancel is pending (v5.00.14 added) |
| `KK_CUST_GUIDE_N_PRVT` | Constant | Customer guidance message code: Private housing |
| `KK_CUST_GUIDE_N_JRY` | Constant | Customer guidance message code: Volume-based pricing |
| `KK_CUST_GUIDE_N_DSL` | Constant | Customer guidance message code: Cancelled |
| `KK_CUST_GUIDE_N_PSE` | Constant | Customer guidance message code: Suspended (mid-term) |
| `KK_CUST_GUIDE_N_NON` | Constant | Customer guidance message code: No contract |
| `KK_CUST_GUIDE_N_KRCN` | Constant | Customer guidance message code: Work provisional cancel (v5.00.14 added) |
| `netknsu` | Field | ccMsg key for net existence status — "1" = internet contract exists, "0" = does not exist |
| `out_prmt9` | Field | ccMsg key for Smart Value application eligibility flag |
| `out_prmt10` | Field | ccMsg key for Smart Value application rejection reason code |
| `out_prmt11` | Field | ccMsg key for Smart Value customer guidance message code |
| `out_prmt12` | Field | ccMsg key for human-readable code name (when no internet contract) — looked up from code management table `CD01536` |
| Smart Value (スマートバリュー) | Business term | KDDI's bundled discount service for combining internet and mobile phone contracts |
| ネット契約 (Net Kei Yakuzoku) | Business term | Internet contract — the broadband/fiber connection service contracted with KDDI |
| 工事仮キャンセル (Koji Kari Cancel) | Business term | Work provisional cancel — a temporary cancellation flag set during field work, affecting eligibility decisions |
| 照会済 (Shoukai-zumi) | Business term | Inspection Complete — service contract status code "020", indicating the contract has been inspected and is awaiting final processing |
| 締結済 (Teiketsu-zumi) | Business term | Contracted — service contract status code "030", indicating the contract has been formally executed |
| 休止・中断中 (Shuushi / Chudan-chuu) | Business term | Suspended / Mid-term interruption — service is temporarily halted |
| 従量制 (Juryousei) | Business term | Volume-based pricing — billing based on actual usage rather than a flat rate |
| マンション・プライベート (Mansion Prvt) | Business term | Private mansion housing type — a residential building classification that affects Smart Value eligibility |
| CD01536 | Constant | Code classification key for code name management — used to look up human-readable descriptions for status codes |
