# Business Logic — JKKTelnoInfoAddCC.executeInitKkw00148() [355 LOC]

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

## 1. Role

### JKKTelnoInfoAddCC.executeInitKkw00148()

This method performs the **initial display data acquisition** for the Number Portability Information Registration screen (番号ポータビリティ情報登録画面初期表示情報取得処理). When a user opens the number portability registration page, this method orchestrates all backend service calls to gather the comprehensive set of data needed to render the form, including porting-related information, telecommunications provider lists, code management lookups, and temporary payment details. It handles both new number portability registrations and changes arising from address relocation (住所変更・登録対応), as well as simultaneous number porting (同時番ポ対応) scenarios.

The method follows a **delegation and aggregation pattern**: it prepares input maps through a telInfoMapper, dispatches each request to the integration layer via `callSvcInter()`, converts the returned CAANMsg responses into HashMap lists, and stores all results into the target data map keyed by screen output constants. Conditional logic gates certain service calls (e.g., porting work agreements, temporary financial settings) based on whether the customer already holds a service contract number, whether porting is enabled on their line, and the specific porting work status codes.

Its **role in the larger system** is as the primary screen-coordination hub for KKSV0092 (the number portability information registration initial display operation). It is called by the BPM operation class `KKSV0092OPOperation`, deployed as the `KKSV0092Flow` stateless session bean. The method does not perform direct database access; all data retrieval flows through the service integration layer.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["executeInitKkw00148(handle, param, fixedText)"])
    INIT["init(param, fixedText)"]
    GET_TRGT["trgtData = param.getData(fixedText)"]
    GET_SVC_KEI_NO["svcKeiNo = trgtData.get(SVC_KEI_NO)"]
    GET_SVC_KEI_UCWK_NO["svcKeiUcwkNo = trgtData.get(SVC_KEI_UCWK_NO)"]
    GET_IDO_DIV["idoDiv = trgtData.get(IDO_DIV)"]

    CHECK_SVC_NO["svcKeiNo != null AND not empty?"]
    CALL_ETU0021["Call ETU0021B010SC: Same-Number Porting List"]
    PUT_ETU0021["Store ETU0021B010CBSMsg1List to trgtData"]
    SET_NULL["Set ETU0021B010CBSMSG1LIST to null"]

    CALL_ETU0051["Call ETU0051B010SC: Telecom Provider List"]
    PUT_ETU0051["Store ETU0051B010CBSMsg1List to trgtData"]

    GET_TSJGS_CD["tsjgs_cd = trgtData.get(TSJGS_CD)"]
    CALL_ETU0131["Call ETU0131B010SC: Telecom Provider Location List"]
    PUT_ETU0131["Store ETU0131B010CBSMsg1List to trgtData"]

    CODE_MGMT_1["Call EZM0171B010SC: Code Mgmt CD00346"]
    PUT_CODE1["Store CD00346 results to trgtData"]

    CODE_MGMT_2["Call EZM0171B010SC: Code Mgmt CD00426"]
    PUT_CODE2["Store CD00426 results to trgtData"]

    CODE_MGMT_3["Call EZM0171B010SC: Code Mgmt CD01508"]
    PUT_CODE3["Store CD01508 results to trgtData"]

    CODE_MGMT_4["Call EZM0171B010SC: Code Mgmt CD01578"]
    PUT_CODE4["Store CD01578 results to trgtData"]

    CODE_MGMT_5["Call EZM0171B010SC: Code Mgmt CD01832"]
    PUT_CODE5["Store CD01832 results to trgtData"]

    CODE_MGMT_6["Call EZM0171B010SC: Code Mgmt CD01837"]
    PUT_CODE6["Store CD01837 results to trgtData"]

    CODE_MGMT_7["Call EZM0171B010SC: Code Mgmt CD01833"]
    PUT_CODE7["Store CD01833 results to trgtData"]

    CODE_MGMT_8["Call EZM0171B010SC: Code Mgmt CD00002"]
    PUT_CODE8["Store CD00002 results to trgtData"]

    CHECK_UCWK["svcKeiUcwkNo != null?"]

    CALL_EKK0161["Call EKK0161A010SC: Service Contract Detail EO"]
    GET_PREV["Get prev svcKeiUcwkNo from result"]
    GET_AFCHG["Get after-change flag from result"]

    CALL_EKK0191["Call EKK0191A010SC: Service Contract Detail EO"]
    PUT_EKK0191["Store EKK0191A010CBSMsg1List to trgtData"]

    GET_TELNO["Get telno from result"]
    GET_BMPUM["Get bmpUm from result"]

    CHECK_BMP["bmpUm == UM_ARI (1)?"]

    CALL_ETU0011B["Call ETU0011B018SC: Porting Work List (Add)"]
    PUT_ETU0011A["Call ETU0011A010SC: Porting Work Agreement"]
    PUT_ETU0011A_R["Store ETU0011A010CBSMsg1List to trgtData"]

    CALL_ETU0011C["Call ETU0011B018SC: Porting Work List (Cancel)"]
    PUT_ETU0011C["Call ETU0011A010SC: Porting Work Agreement"]
    PUT_ETU0011C_R["Store ETU0011A010CBSMsg1List_haishi to trgtData"]

    CALL_EKK0081["Call EKK0081A010SC: Service Contract Agreement"]
    JUDGE_BMP_DSL["Call judgeBmpDsl for cancellation flag"]
    JUDGE_ADD_BMP["Call judgeAddBmp for addition check"]

    CALL_EKK1021C["Call EKK1021C011SC: Temporary Payment Check"]
    GET_TMP_PAY["Get tmpPayPrcNoBmpJmte"]

    CHECK_TMP["tmpPayPrcNoBmpJmte not empty?"]

    CALL_EKK1021B["Call EKK1021B001SC: Temp Financial Settings (10%)"]
    FALLBACK["Call EKK1021B001SC (8% fallback)"]
    PUT_EKK1021B["Store EKK1021B001CBSMsg1List to trgtData"]

    CHECK_BMP_TR["idoDiv == HTELBMPINFOCHGE (00045) AND bmpUm == UM_ARI (1)?"]

    GET_BMP_KOJI["Get porting work list from trgtData"]
    CHECK_BMP_K["bmpKojiList not empty?"]
    GET_STAT["Get bmpKojiStat"]
    GET_CD01508["Get cd01508List from trgtData"]
    BUILD_ALLOW["Build allowCdList from bmpKojiStat + isAddBmp"]
    FILTER_CODES["Remove cd01508 entries not in allowCdList"]

    CALL_EKK0241["Call EKK0241B001SC: Service Contract Line List"]
    PUT_EKK0241["Store EKK0241B001CBSMsg1List to trgtData"]

    RETURN(["Return param"])

    START --> INIT --> GET_TRGT --> GET_SVC_KEI_NO --> GET_SVC_KEI_UCWK_NO --> GET_IDO_DIV
    GET_SVC_KEI_NO --> CHECK_SVC_NO
    CHECK_SVC_NO -- Yes --> CALL_ETU0021 --> PUT_ETU0021
    CHECK_SVC_NO -- No --> SET_NULL
    SET_NULL --> CALL_ETU0051 --> PUT_ETU0051
    PUT_ETU0021 --> CALL_ETU0051
    PUT_ETU0051 --> GET_TSJGS_CD --> CALL_ETU0131 --> PUT_ETU0131
    PUT_ETU0131 --> CODE_MGMT_1 --> PUT_CODE1
    PUT_CODE1 --> CODE_MGMT_2 --> PUT_CODE2
    PUT_CODE2 --> CODE_MGMT_3 --> PUT_CODE3
    PUT_CODE3 --> CODE_MGMT_4 --> PUT_CODE4
    PUT_CODE4 --> CODE_MGMT_5 --> PUT_CODE5
    PUT_CODE5 --> CODE_MGMT_6 --> PUT_CODE6
    PUT_CODE6 --> CODE_MGMT_7 --> PUT_CODE7
    PUT_CODE7 --> CODE_MGMT_8 --> PUT_CODE8
    PUT_CODE8 --> CHECK_UCWK
    CHECK_UCWK -- Yes --> CALL_EKK0161 --> GET_PREV --> GET_AFCHG
    GET_AFCHG --> CALL_EKK0191 --> PUT_EKK0191
    PUT_EKK0191 --> GET_TELNO --> GET_BMPUM --> CHECK_BMP
    CHECK_BMP -- Yes --> CALL_ETU0011B --> PUT_ETU0011A --> PUT_ETU0011A_R
    PUT_ETU0011A_R --> CALL_ETU0011C --> PUT_ETU0011C --> PUT_ETU0011C_R
    PUT_ETU0011C_R --> CALL_EKK0081
    CHECK_BMP -- No --> CALL_EKK0081
    CALL_EKK0081 --> JUDGE_BMP_DSL --> JUDGE_ADD_BMP
    JUDGE_ADD_BMP --> CALL_EKK1021C --> GET_TMP_PAY --> CHECK_TMP
    CHECK_TMP -- Yes --> CALL_EKK1021B --> FALLBACK --> PUT_EKK1021B
    CHECK_TMP -- No --> CHECK_BMP_TR
    PUT_EKK1021B --> CHECK_BMP_TR
    CHECK_BMP_TR -- Yes --> GET_BMP_KOJI --> CHECK_BMP_K --> GET_STAT --> GET_CD01508 --> BUILD_ALLOW --> FILTER_CODES
    CHECK_BMP_TR -- No --> CALL_EKK0241
    CHECK_BMP_K -- No --> CALL_EKK0241
    FILTER_CODES --> CALL_EKK0241 --> PUT_EKK0241 --> RETURN
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session context object carrying session manager and database connection information; used for all `callSvcInter()` dispatches to the service integration layer |
| 2 | `param` | `IRequestParameterReadWrite` | Request/response parameter object holding the model data group and control map. It is initialized by `init()`, read to extract `trgtData` (target HashMap), and populated with all retrieved service result lists. Returned to the caller as the updated payload |
| 3 | `fixedText` | `String` | User-assignable string that serves as the key to retrieve the target HashMap from `param`. All screen data for this operation is stored under this key in the parameter map |

### Instance Fields / External State Read

| Field | Source Class | Business Description |
|-------|-------------|---------------------|
| `telInfoMapper` | `JKKTelnoInfoAddCC` | Internal mapper object that builds input maps for service calls via methods like `editInMsgETU0021B010`, `editInMsgEZM0171B010`, etc. |

## 4. CRUD Operations / Called Services

### Direct Method Calls from Code

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `telInfoMapper.editInMsgETU0021B010` | ETU0021B010SC | KK_T_DUANITEN (Same-number porting master) | Prepares input map for same-number porting list query by service contract number |
| R | `callSvcInter` (ETU0021) | ETU0021B010SC | KK_T_DUANITEN | Retrieves same-number porting history list for the given service contract |
| R | `telInfoMapper.editInMsgETU0051B010` | ETU0051B010SC | M_M_TSJGS (Telecom provider master) | Prepares input map for telecom provider list query |
| R | `callSvcInter` (ETU0051) | ETU0051B010SC | M_M_TSJGS | Retrieves the list of all telecommunications providers for display |
| R | `telInfoMapper.editInMsgETU0131B010` | ETU0131B010SC | M_M_TSJGS (Telecom provider location) | Prepares input map for telecom provider location list query |
| R | `callSvcInter` (ETU0131) | ETU0131B010SC | M_M_TSJGS | Retrieves telecom provider branch/location list for the given provider code |
| R | `telInfoMapper.editInMsgEZM0171B010` | EZM0171B010SC | M_M_CODE (Code management master) | Prepares input map for code management list query (called 8 times with different CD codes) |
| R | `callSvcInter` (EZM0171) | EZM0171B010SC | M_M_CODE | Retrieves code list for the given code management category (8 separate calls for CD00346, CD00426, CD01508, CD01578, CD01832, CD01837, CD01833, CD00002) |
| R | `telInfoMapper.editInMsgEKK0161A010` | EKK0161A010SC | KK_T_SVC_KEI_UCWK (Service contract detail) | Prepares input map for service contract detail EO (eo光電話) query by service contract detail number |
| R | `callSvcInter` (EKK0161) | EKK0161A010SC | KK_T_SVC_KEI_UCWK | Retrieves service contract detail EO information including previous detail number and after-change flag |
| R | `telInfoMapper.editInMsgEKK0191A010` | EKK0191A010SC | KK_T_SVC_KEI_UCWK (Service contract detail EO) | Prepares input map for service contract detail EO query |
| R | `callSvcInter` (EKK0191) | EKK0191A010SC | KK_T_SVC_KEI_UCWK | Retrieves service contract detail EO including phone number and porting presence flag |
| R | `telInfoMapper.editInMsgETU0011B018` | ETU0011B018SC | KK_T_BMP_KOJI (Porting work master) | Prepares input map for porting work list query (called twice: for addition type and cancellation type) |
| R | `callSvcInter` (ETU0011B) | ETU0011B018SC | KK_T_BMP_KOJI | Retrieves porting work records by service contract number, phone number, and request reason code |
| R | `telInfoMapper.editInMsgETU0011A010` | ETU0011A010SC | KK_T_BMP_KOJI (Porting work agreement) | Prepares input map for porting work agreement query |
| R | `callSvcInter` (ETU0011A) | ETU0011A010SC | KK_T_BMP_KOJI | Retrieves porting work agreement details by porting work number |
| R | `telInfoMapper.editInMsgEKK0081A010` | EKK0081A010SC | KK_T_SVC_KEI_AGREEMENT (Service contract agreement) | Prepares input map for service contract agreement query |
| R | `callSvcInter` (EKK0081) | EKK0081A010SC | KK_T_SVC_KEI_AGREEMENT | Retrieves service contract agreement data for VA deregistration judgment |
| - | `judgeBmpDsl` | - | - | Determines porting cancellation display flag based on contract status |
| - | `judgeAddBmp` | - | - | Determines whether this is an additional number porting operation (not a migration) |
| R | `telInfoMapper.editInMsgEKK1021C011` | EKK1021C011SC | KK_T_TMP_PAY_PRC (Temporary payment procedure) | Prepares input map for temporary payment procedure check |
| R | `callSvcInter` (EKK1021C) | EKK1021C011SC | KK_T_TMP_PAY_PRC | Checks temporary payment procedure details, returns tmpPayPrcNoBmpJmte |
| R | `telInfoMapper.editInMsgEKK1021B001` | EKK1021B001SC | KK_T_TEMP_PAY_SET (Temporary financial settings) | Prepares input map for temporary financial settings list query |
| R | `callSvcInter` (EKK1021B) | EKK1021B001SC | KK_T_TEMP_PAY_SET | Retrieves temporary financial settings list; if empty at 10%, falls back to 8% |
| R | `telInfoMapper.editInMsgEKK0241B001` | EKK0241B001SC | KK_T_SVC_KEI_UCWK (Service contract line item) | Prepares input map for service contract line item list query |
| R | `callSvcInter` (EKK0241) | EKK0241B001SC | KK_T_SVC_KEI_UCWK | Retrieves service contract line item list for the given service contract number |
| - | `JACBatCommon.isNull` | - | - | Null check utility |
| - | `JCCBPCommon.getOpeDate` | JCCBPCommon | - | Retrieves current operation date |
| - | `chkCAANMsgToMap` | - | - | Converts CAANMsg response to HashMap list |
| - | `getRsltMsgListValue` | - | - | Extracts a specific field value from a CAANMsg list result |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0092 | `KKSV0092Flow.run` -> `KKSV0092OPOperation.run` -> `KKSV009201CC` -> `JKKTelnoInfoAddCC.executeInitKkw00148` | `ETU0021B010SC [R] KK_T_DUANITEN`, `ETU0051B010SC [R] M_M_TSJGS`, `ETU0131B010SC [R] M_M_TSJGS`, `EZM0171B010SC [R] M_M_CODE`, `EKK0161A010SC [R] KK_T_SVC_KEI_UCWK`, `EKK0191A010SC [R] KK_T_SVC_KEI_UCWK`, `ETU0011B018SC [R] KK_T_BMP_KOJI`, `ETU0011A010SC [R] KK_T_BMP_KOJI`, `EKK0081A010SC [R] KK_T_SVC_KEI_AGREEMENT`, `EKK1021C011SC [R] KK_T_TMP_PAY_PRC`, `EKK1021B001SC [R] KK_T_TEMP_PAY_SET`, `EKK0241B001SC [R] KK_T_SVC_KEI_UCWK` |

**Caller Details:**
- `KKSV0092Flow` - Stateless session bean deployed as EJB with mapped name "KKSV0092"
- `KKSV0092OPOperation` - BPM operation class that configures the CCRequestBroker targeting `JKKTelnoInfoAddCC.executeInitKkw00148` with CC target name `KKSV009201CC`
- This is the sole entry point calling this method (the only caller found across the codebase)

## 6. Per-Branch Detail Blocks

### Block 1 — INIT (L758)
Initialize the parameter and fixedText.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `init(param, fixedText)` // Standard initialization of param with fixedText |

### Block 2 — EXTRACT TRGT DATA (L761-768)
Extract target data HashMap and key identifiers from the parameter map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `trgtData = (HashMap)param.getData(fixedText)` // Target data map for this operation |
| 2 | SET | `idoDiv = (String)trgtData.get(IDO_DIV)` // Displacement area: process category code [-> "ido_div"] |
| 3 | SET | `svcKeiNo = (String)trgtData.get(SVC_KEI_NO)` // Service contract number [-> "svc_kei_no"] |
| 4 | SET | `svcKeiUcwkNo = (String)trgtData.get(SVC_KEI_UCWK_NO)` // Service contract detail number [-> "svc_kei_ucwk_no"] |

### Block 3 — IF svcKeiNo not empty (Same-Number Porting List) (L772)

> Retrieves the same-number porting history list if the customer has an existing service contract number.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapETU0021B010 = telInfoMapper.editInMsgETU0021B010(param, svcKeiNo)` // Build input map with svcKeiNo |
| 2 | CALL | `outMapETU0021B010 = callSvcInter(handle, param, inMapETU0021B010)` // Dispatch to ETU0021B010SC |
| 3 | SET | `trgtData.put(ETU0021B010CBSMSG1LIST, chgCAANMsgToMap(outMapETU0021B010, ETU0021B010CBSMsg.ETU0021B010CBSMSG1LIST))` // Store result list |

**Block 3.1 — ELSE svcKeiNo empty** (L779)

| # | Type | Code |
|---|------|------|
| 1 | SET | `trgtData.put(ETU0021B010CBSMSG1LIST, null)` // No porting history for new customers |

### Block 4 — TELECOM PROVIDER LIST (L785-788)
Retrieve the list of all telecom providers for the screen dropdown.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapETU0051B010 = telInfoMapper.editInMsgETU0051B010(param)` // Build input map |
| 2 | CALL | `outMapETU0051B010 = callSvcInter(handle, param, inMapETU0051B010)` // Dispatch to ETU0051B010SC |
| 3 | SET | `trgtData.put(ETU0051B010CBSMSG1LIST, chgCAANMsgToMap(outMapETU0051B010, ETU0051B010CBSMsg.ETU0051B010CBSMSG1LIST))` // Store provider list |

### Block 5 — TELECOM PROVIDER LOCATION LIST (L793-799)

> Retrieves telecom provider branch locations. Requires the `tsjgs_cd` (telecom provider code) from trgtData.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tsjgs_cd = (String)trgtData.get(TSJGS_CD)` // Telecom provider code [-> "tsjgs_cd"] |
| 2 | SET | `inMapETU0131B010 = telInfoMapper.editInMsgETU0131B010(param, tsjgs_cd)` // Build input map |
| 3 | CALL | `outMapETU0131B010 = callSvcInter(handle, param, inMapETU0131B010)` // Dispatch to ETU0131B010SC |
| 4 | SET | `trgtData.put(ETU0131B010CBSMSG1LIST, chgCAANMsgToMap(outMapETU0131B010, ETU0131B010CBSMsg.ETU0131B010CBSMSG1LIST))` // Store location list |

### Block 6 — CODE MANAGEMENT LIST: CD00346 (Temporary Financial Settings Code) (L805-809)

> Retrieves temporary financial settings codes (一時金設定コード).

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapEZM0171B010 = telInfoMapper.editInMsgEZM0171B010(param, "CD00346")` // Code management with CD00346 |
| 2 | CALL | `outMapEZM0171B010 = callSvcInter(handle, param, inMapEZM0171B010)` // Dispatch to EZM0171B010SC |
| 3 | SET | `trgtData.put(EZM0171B010CBSMSG1LIST_CD00346, chgCAANMsgToMap(outMapEZM0171B010, EZM0171B010CBSMsg.EZM0171B010CBSMSG1LIST))` // Store result |

### Block 7 — CODE MANAGEMENT LIST: CD00426 (Porting Work Preferred Date-Hold Flag) (L814-817)

> Retrieves the porting work preferred date-hold flag codes (番ポ工事希望年月日保留フラグ).

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapEZM0171B010 = telInfoMapper.editInMsgEZM0171B010(param, "CD00426")` // Reuse inMap variable |
| 2 | CALL | `outMapEZM0171B010 = callSvcInter(handle, param, inMapEZM0171B010)` // Dispatch to EZM0171B010SC |
| 3 | SET | `trgtData.put(EZM0171B010CBSMSG1LIST_CD00426, chgCAANMsgToMap(outMapEZM0171B010, EZM0171B010CBSMsg.EZM0171B010CBSMSG1LIST))` // Store result |

### Block 8 — CODE MANAGEMENT LIST: CD01508 (Porting Processing Category Code) (L822-826)

> Retrieves porting processing category codes (番ポ処理区分コード). This list is later used to filter allowed display codes in Block 17.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapEZM0171B010 = telInfoMapper.editInMsgEZM0171B010(param, "CD01508")` |
| 2 | CALL | `outMapEZM0171B010 = callSvcInter(handle, param, inMapEZM0171B010)` |
| 3 | SET | `trgtData.put(EZM0171B010CBSMSG1LIST_CD01508, chgCAANMsgToMap(outMapEZM0171B010, EZM0171B010CBSMsg.EZM0171B010CBSMSG1LIST))` |

### Block 9 — CODE MANAGEMENT LIST: CD01578 (Simultaneous Work Judgment Code) (ANK-1450-00-00) (L832-836)

> Retrieves simultaneous work judgment codes (同時工事判定コード). Added for simultaneous number porting support (同時番ポ対応).

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapEZM0171B010 = telInfoMapper.editInMsgEZM0171B010(param, "CD01578")` |
| 2 | CALL | `outMapEZM0171B010 = callSvcInter(handle, param, inMapEZM0171B010)` |
| 3 | SET | `trgtData.put(EZM0171B010CBSMSG1LIST_CD01578, chgCAANMsgToMap(outMapEZM0171B010, EZM0171B010CBSMsg.EZM0171B010CBSMSG1LIST))` |

### Block 10 — CODE MANAGEMENT LIST: CD01832 (Work Execution Method Code) (ANK-4494-00-00) (L842-846)

> Retrieves work execution method codes (工事実施方法コード). Added for two-way number porting support (双方向番ポ対応).

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapEZM0171B010 = telInfoMapper.editInMsgEZM0171B010(param, "CD01832")` |
| 2 | CALL | `outMapEZM0171B010 = callSvcInter(handle, param, inMapEZM0171B010)` |
| 3 | SET | `trgtData.put(EZM0171B010CBSMSG1LIST_CD01832, chgCAANMsgToMap(outMapEZM0171B010, EZM0171B010CBSMsg.EZM0171B010CBSMSG1LIST))` |

### Block 11 — CODE MANAGEMENT LIST: CD01837 (Estimated Switch Time Zone - Disconnected Work) (ANK-4494-00-00 STEP2) (L852-856)

> Retrieves estimated switch time zone codes for disconnected work (想定切替時間帯コード: 無連携工事).

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapEZM0171B010 = telInfoMapper.editInMsgEZM0171B010(param, "CD01837")` |
| 2 | CALL | `outMapEZM0171B010 = callSvcInter(handle, param, inMapEZM0171B010)` |
| 3 | SET | `trgtData.put(EZM0171B010CBSMSG1LIST_CD01837, chgCAANMsgToMap(outMapEZM0171B010, EZM0171B010CBSMsg.EZM0171B010CBSMSG1LIST))` |

### Block 12 — CODE MANAGEMENT LIST: CD01833 (Estimated Switch Time Zone - Separate Connection Work) (ANK-4494-00-00 STEP2) (L861-865)

> Retrieves estimated switch time zone codes for separate connection work (想定切替時間帯コード: 個別連携工事).

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapEZM0171B010 = telInfoMapper.editInMsgEZM0171B010(param, "CD01833")` |
| 2 | CALL | `outMapEZM0171B010 = callSvcInter(handle, param, inMapEZM0171B010)` |
| 3 | SET | `trgtData.put(EZM0171B010CBSMSG1LIST_CD01833, chgCAANMsgToMap(outMapEZM0171B010, EZM0171B010CBSMsg.EZM0171B010CBSMSG1LIST))` |

### Block 13 — CODE MANAGEMENT LIST: CD00002 (Present/Absent) (ANK-4685-00-00) (L871-875)

> Retrieves present/absent codes (有無) for two-way number porting STEP 3.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapEZM0171B010 = telInfoMapper.editInMsgEZM0171B010(param, "CD00002")` |
| 2 | CALL | `outMapEZM0171B010 = callSvcInter(handle, param, inMapEZM0171B010)` |
| 3 | SET | `trgtData.put(EZM0171B010CBSMSG1LIST_CD00002, chgCAANMsgToMap(outMapEZM0171B010, EZM0171B010CBSMsg.EZM0171B010CBSMSG1LIST))` |

### Block 14 — IF svcKeiUcwkNo not null (Service Contract Detail Processing) (L879)

> When a service contract detail number is set, this block retrieves detailed contract information including phone number, porting status, previous contract detail number, and after-change-ongoing flag.

#### Block 14.1 — EKK0161A010: Service Contract Detail EO (L884)

> Retrieves service contract detail EO (eo光電話) information for the given detail number. Uses current operation date and FUNC_CD_2 ("2" = function code 2).

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapEKK0161A010 = telInfoMapper.editInMsgEKK0161A010(param, svcKeiUcwkNo, null, JCCBPCommon.getOpeDate(null), FUNC_CD_2)` // FUNC_CD_2 = "2" |
| 2 | CALL | `outMapEKK0161A010 = callSvcInter(handle, param, inMapEKK0161A010)` |
| 3 | SET | `kzkmtSvcKeiUcwkNo = getRsltMsgListValue(outMapEKK0161A010, ..., KEIZK_MT_SVC_KEI_UCWK_NO)` // Previous contract detail number |
| 4 | SET | `kzmAfChgChuFlg = getRsltMsgListValue(outMapEKK0161A010, ..., KEIZK_AF_KEI_CHGECHU_FLG)` // After-change ongoing flag |

#### Block 14.2 — EKK0191A010: Service Contract Detail EO (L890-893)

> Retrieves service contract detail EO to get phone number and porting presence flag.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapEKK0191A010 = telInfoMapper.editInMsgEKK0191A010(param, svcKeiUcwkNo)` |
| 2 | CALL | `outMapEKK0191A010 = callSvcInter(handle, param, inMapEKK0191A010)` |
| 3 | SET | `trgtData.put(EKK0191A010CBSMSG1LIST, chgCAANMsgToMap(outMapEKK0191A010, EKK0191A010CBSMsg.EKK0191A010CBSMSG1LIST))` |
| 4 | SET | `telno = getRsltMsgListValue(outMapEKK0191A010, ..., TELNO)` // Phone number |
| 5 | SET | `bmpUm = getRsltMsgListValue(outMapEKK0191A010, ..., BMP_UM)` // Porting presence: "1" = porting available |

#### Block 14.3 — IF bmpUm equals UM_ARI (Porting Work Processing) (L898)

> When porting is enabled on the line (bmpUm == "1"), retrieve porting work records for both addition and cancellation.

**Block 14.3.1 — ETU0011B018: Porting Work List (Addition) (L904-907)**

> Retrieves porting work list for addition types: ITEN ("1": single item) + UPD ("2": update), comma-separated.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapETU0011B018 = telInfoMapper.editInMsgETU0011B018(param, svcKeiNo, telno, BMP_IRAI_NAIYO_CD_ITEN + "," + BMP_IRAI_NAIYO_CD_UPD, svcKeiUcwkNo)` // Request reasons: "1,2" |
| 2 | CALL | `outMapETU0011B018 = callSvcInter(handle, param, inMapETU0011B018)` |

**Block 14.3.1.1 — IF porting work list has records** (L909)

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltMsgETU0011B018List = outMapETU0011B018.getCAANMsgList(ETU0011B018CBSMsg.ETU0011B018CBSMSG1LIST)` |
| 2 | IF | `rsltMsgETU0011B018List != null && length > 0` |
| 3 | SET | `inMapETU0011A010 = telInfoMapper.editInMsgETU0011A010(param, getRsltMsgListValue(outMapETU0011B018, ..., BMP_KOJI_NO))` // Use BMP_KOJI_NO from first record |
| 4 | CALL | `outMapETU0011A010 = callSvcInter(handle, param, inMapETU0011A010)` |
| 5 | SET | `trgtData.put(ETU0011A010CBSMSG1LIST, chgCAANMsgToMap(outMapETU0011A010, ...))` // Store addition work agreement |

**Block 14.3.2 — ETU0011B018: Porting Work List (Cancellation) (L918)**

> Retrieves porting work list for cancellation type: DEL ("3": delete).

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapETU0011B018 = telInfoMapper.editInMsgETU0011B018(param, svcKeiNo, telno, BMP_IRAI_NAIYO_CD_DEL, svcKeiUcwkNo)` // Request reason: "3" |
| 2 | CALL | `outMapETU0011B018 = callSvcInter(handle, param, inMapETU0011B018)` |
| 3 | SET | `rsltMsgETU0011B018List = outMapETU0011B018.getCAANMsgList(ETU0011B018CBSMsg.ETU0011B018CBSMSG1LIST)` |

**Block 14.3.2.1 — IF cancellation porting work list has records** (L922)

| # | Type | Code |
|---|------|------|
| 1 | IF | `rsltMsgETU0011B018List != null && length > 0` |
| 2 | SET | `inMapETU0011A010 = telInfoMapper.editInMsgETU0011A010(param, getRsltMsgListValue(outMapETU0011B018, ..., BMP_KOJI_NO))` |
| 3 | CALL | `outMapETU0011A010 = callSvcInter(handle, param, inMapETU0011A010)` |
| 4 | SET | `trgtData.put(ETU0011A010CBSMSG1LIST_HAISHI, chgCAANMsgToMap(outMapETU0011A010, ...))` // Store cancellation work agreement |

#### Block 14.4 — VA Deregistration Judgment (ANK-1429-00-00) (L934)

> Retrieves service contract agreement data and determines the porting cancellation display flag for VA (Virtual AP) deregistration handling during address relocation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapEKK0081A010 = telInfoMapper.editInMsgEKK0081A010(param, svcKeiNo)` |
| 2 | CALL | `outMapEKK0081A010 = callSvcInter(handle, param, inMapEKK0081A010)` |
| 3 | SET | `bmpDslTranflg = judgeBmpDsl(handle, param, outMapEKK0081A010, kzmAfChgChuFlg)` // Porting cancellation judgment flag |
| 4 | SET | `isAddBmp = judgeAddBmp(handle, param, svcKeiUcwkNo, outMapEKK0161A010)` // Addition porting judgment (modified from earlier version - ANK-1723-00-00) |

#### Block 14.5 — EKK1021C011: Temporary Payment Procedure Check (ANK-1429-00-00) (L942)

> Retrieves temporary payment procedure number for phone-number-assignment fee (porting fee), which classifies as "光電話・番ポ追加" (Fiber Phone + Number Porting Addition).

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapEKK1021C011 = telInfoMapper.editInMsgEKK1021C011(param, trgtData, outMapEKK0081A010, IDO_DIV_HTELNOADD, BMP_UM_ARI, null)` // IDO_DIV_HTELNOADD="00041", BMP_UM_ARI="1" |
| 2 | CALL | `outMapEKK1021C011 = callSvcInter(handle, param, inMapEKK1021C011)` |
| 3 | SET | `tmpPayPrcNoBmpJmte = convNullToBlank(getRsltMsgListValue(outMapEKK1021C011, ..., TMP_PAY_PRC_NO))` // Temporary payment procedure number |

#### Block 14.6 — IF tmpPayPrcNoBmpJmte not empty (Temporary Financial Settings) (L948)

> Retrieves temporary financial settings list. If the 10% fee yields no results, falls back to 8% fee.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapEKK1021B001 = telInfoMapper.editInMsgEKK1021B001(param, svcKeiNo, svcKeiUcwkNo, tmpPayPrcNoBmpJmte)` // Search with 10% fee |
| 2 | CALL | `outMapEKK1021B001 = callSvcInter(handle, param, inMapEKK1021B001)` |
| 3 | SET | `EKK1021B001List = chgCAANMsgToMap(outMapEKK1021B001, EKK1021B001CBSMsg.EKK1021B001CBSMSG1LIST)` |

**Block 14.6.1 — IF result is empty, fallback to 8%** (ANK-3636-00-00) (L951)

> If the 10% porting fee procedure yields 0 results, search with 8% fee by replacing "2" with "1" in the procedure number.

| # | Type | Code |
|---|------|------|
| 1 | IF | `EKK1021B001List == null || EKK1021B001List.size() == 0` |
| 2 | SET | `tmpPayPrcNoBmpJmte_8persent = tmpPayPrcNoBmpJmte.replaceFirst("2", "1")` // Replace first char "2" with "1" for 8% |
| 3 | SET | `inMapEKK1021B001 = telInfoMapper.editInMsgEKK1021B001(param, svcKeiNo, svcKeiUcwkNo, tmpPayPrcNoBmpJmte_8persent)` |
| 4 | CALL | `outMapEKK1021B001 = callSvcInter(handle, param, inMapEKK1021B001)` |

| # | Type | Code |
|---|------|------|
| 4 | SET | `trgtData.put(EKK1021B001CBSMSG1LIST, chgCAANMsgToMap(outMapEKK1021B001, ...))` // Store temporary financial settings result |

### Block 15 — IF bmpInfoChange processing (Screen Code Filtering) (OT-2013-0000311, L960)

> When the displacement area is "HTELBMPINFOCHGE" (00045) AND porting is available, determine which porting processing categories to display based on the current porting work status. This block filters the CD01508 code list to show only applicable processing categories.

#### Block 15.1 — IF bmpKojiList not empty (L967)

| # | Type | Code |
|---|------|------|
| 1 | SET | `bmpKojiList = (ArrayList)trgtData.get(ETU0011A010CBSMSG1LIST)` // Porting work agreement list |
| 2 | SET | `allowCdList = new ArrayList<String>()` // Allowed processing category code list |
| 3 | SET | `bmpKojiMap = bmpKojiList.get(0)` // Get first record |
| 4 | SET | `bmpKojiStat = (String)bmpKojiMap.get(ETU0011A010CBSMsg1List.BMP_KOJI_STAT)` // Porting work status code |
| 5 | SET | `cd01508List = (ArrayList)trgtData.get(EZM0171B010CBSMSG1LIST_CD01508)` // Porting processing category codes |

#### Block 15.1.1 — IF Porting Cancellation (番ポ解約) (L1013)

> Condition: isAddBmp AND (bmpKojiStat >= "032" OR bmpKojiStat == "041").
> If the work status is "Work Execution Request Complete" (032) or higher, or "SOD Issuance Cancelled" (041), add code 90 (BMP_TEL_DSL) to allow list.

| # | Type | Code |
|---|------|------|
| 1 | IF | `isAddBmp && bmpDslTranflg && (bmpKojiStat.compareTo(KOJI_JISSI_IRIZM("032")) >= 0 || bmpKojiStat.equals(SOD_HAKKOZM_TEISI("041")))` |
| 2 | SET | `allowCdList.add(BMP_TRAN_SKBT_CD_BMP_TEL_DSL("90"))` // Porting cancellation code |

#### Block 15.1.2 — IF Number Change (番号切替) (L1023)

> Condition: isAddBmp AND (bmpKojiStat == "031" OR "032").
> If the work status is "Work Execution Request Received" (031) or "Work Execution Request Complete" (032), add code 62 (NO_SWCH) to allow list.

| # | Type | Code |
|---|------|------|
| 1 | IF | `isAddBmp && (bmpKojiStat.equals(KOJI_JISSI_IRIMCHI("031")) || bmpKojiStat.equals(KOJI_JISSI_IRIZM("032")))` |
| 2 | SET | `allowCdList.add(BMP_TRAN_SKBT_CD_NO_SWCH("62"))` // Number change code |

#### Block 15.1.3 — IF Service Suspension (利用停止) (L1031)

> Condition: !isAddBmp AND bmpKojiStat == "040".
> If NOT an addition porting and the status is "SOD Issued" (040), add code 71 (USE_STP) to allow list.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!isAddBmp && bmpKojiStat.equals(SOD_HAKKOZM("040"))` |
| 2 | SET | `allowCdList.add(BMP_TRAN_SKBT_CD_USE_STP("71"))` // Service suspension code |

#### Block 15.1.4 — IF Service Suspension Release (利用停止解除) (L1039)

> Condition: !isAddBmp AND (bmpKojiStat == "032" OR "041" OR "031").
> If NOT an addition porting and status is at "Work Execution Request Complete" (032), "SOD Issued" (041), or "Work Execution Request Received" (031), add code 61 (USE_STP_RLS) to allow list.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!isAddBmp && (bmpKojiStat.equals(KOJI_JISSI_IRIZM("032")) || bmpKojiStat.equals(SOD_HAKKOZM_TEISI("041")) || bmpKojiStat.equals(KOJI_JISSI_IRIMCHI("031")))` |
| 2 | SET | `allowCdList.add(BMP_TRAN_SKBT_CD_USE_STP_RLS("61"))` // Service suspension release code |

#### Block 15.1.5 — Filter cd01508List (L1050)

> Remove entries from cd01508List that are not in the allowCdList. Iterates in reverse order to safely remove elements.

| # | Type | Code |
|---|------|------|
| 1 | FOR | `i = cd01508List.size() - 1; i >= 0; i--` |
| 2 | SET | `cd01508Info = cd01508List.get(i)` |
| 3 | SET | `cdDiv = (String)cd01508Info.get(EZM0171B010CBSMsg1List.CD_DIV)` |
| 4 | IF | `!allowCdList.contains(cdDiv)` |
| 5 | EXEC | `cd01508List.remove(i)` |

### Block 16 — EKK0241B001: Service Contract Line Item List (ANK-2309-00-00) (L1057)

> Retrieves service contract line item list. Conditionally called if svcKeiNo is not empty.

| # | Type | Code |
|---|------|------|
| 1 | IF | `svcKeiNo != null && !svcKeiNo.isEmpty()` |
| 2 | SET | `inMapEKK0241B001 = telInfoMapper.editInMsgEKK0241B001(param, svcKeiNo)` |
| 3 | CALL | `outMapEKK0241B001 = callSvcInter(handle, param, inMapEKK0241B001)` |
| 4 | SET | `trgtData.put(EKK0241B001CBSMSG1LIST, chgCAANMsgToMap(outMapEKK0241B001, ...))` |

**Block 16.1 — ELSE** (L1064)

| # | Type | Code |
|---|------|------|
| 1 | SET | `trgtData.put(EKK0241B001CBSMSG1LIST, null)` |

### Block 17 — RETURN (L1069)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return param` // Return the fully populated parameter object |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `executeInitKkw00148` | Method | Number portability information registration screen initial display data acquisition processing |
| `KKSV0092` | Screen | Number Portability Information Registration Initial Display — the screen that displays the portability registration form |
| KKSV009201CC | CC Target | Contract-level CC name configured in the BPM operation broker |
| `KKKTelnoInfoAddCC` | Class | Telno Info Add CC — number portability information registration coordination class |
| `ido_div` | Field | Displacement area / process category code — indicates the type of business operation being performed |
| `IDO_DIV_HTELNOADD` | Constant | Process category code "00041" — Phone Number Addition (光電話・番号追加) |
| `IDO_DIV_HTELBMPINFOCHGE` | Constant | Process category code "00045" — Phone Number Porting Info Change (光電話・番ポ情報変更) |
| `svc_kei_no` | Field | Service contract number — the primary contract identifier for a customer's service |
| `svc_kei_ucwk_no` | Field | Service contract detail number — internal tracking ID for a specific service contract line item |
| `bmp_um` | Field | Porting presence — whether porting is available on this line ("1" = available, UM_ARI) |
| `bmp_dsl_tranflg` | Field | Porting cancellation display flag — determines whether to show porting cancellation and number change options |
| `is_add_bmp` | Field | Addition porting flag — true when this is a new number porting (not a migration from another provider) |
| `telno` | Field | Phone number — the customer's current telephone number |
| `tsjgs_cd` | Field | Telecom provider code — identifies the telecommunications carrier |
| `kzkmtSvcKeiUcwkNo` | Field | Previous contract detail number — the service contract detail number before a change |
| `kzmAfChgChuFlg` | Field | After-change ongoing flag — indicates whether the contract change is currently in progress |
| `tmpPayPrcNoBmpJmte` | Field | Temporary payment procedure number for porting fee — identifies the fee structure for phone-number-assignment fee |
| `BMP_IRAI_NAIYO_CD_ITEN` | Constant | Request reason code "1" — Single item (一時金設定) |
| `BMP_IRAI_NAIYO_CD_UPD` | Constant | Request reason code "2" — Update (更新) |
| `BMP_IRAI_NAIYO_CD_DEL` | Constant | Request reason code "3" — Delete/Cancel (取消) |
| `BMP_UM_ARI` | Constant | Porting available code "1" — Indicates porting is present/enabled on the line |
| `BMP_KOJI_STAT_KOJI_JISSI_IRIMCHI` | Constant | Porting work status "031" — Work Execution Request Received (工事実施依頼済み) |
| `BMP_KOJI_STAT_KOJI_JISSI_IRIZM` | Constant | Porting work status "032" — Work Execution Request Complete (工事実施依頼済み) |
| `BMP_KOJI_STAT_SOD_HAKKOZM` | Constant | Porting work status "040" — SOD Issued (SOD発行済み) |
| `BMP_KOJI_STAT_SOD_HAKKOZM_TEISI` | Constant | Porting work status "041" — SOD Issuance Cancelled (SOD発行停止) |
| `BMP_TRAN_SKBT_CD_BMP_TEL_DSL` | Constant | Processing category code "90" — Porting Cancellation (番ポ解約) |
| `BMP_TRAN_SKBT_CD_NO_SWCH` | Constant | Processing category code "62" — Number Change (番号切替) |
| `BMP_TRAN_SKBT_CD_USE_STP` | Constant | Processing category code "71" — Service Suspension (利用停止) |
| `BMP_TRAN_SKBT_CD_USE_STP_RLS` | Constant | Processing category code "61" — Service Suspension Release (利用停止解除) |
| `EZM0171B010SC` | SC | Code Management Service — retrieves lists of coded values from M_M_CODE master table |
| `ETU0021B010SC` | SC | Same-Number Porting List Service — retrieves history of same-number porting records from KK_T_DUANITEN |
| `ETU0051B010SC` | SC | Telecom Provider List Service — retrieves all telecommunications providers from M_M_TSJGS |
| `ETU0131B010SC` | SC | Telecom Provider Location List Service — retrieves branch/location info for a given telecom provider from M_M_TSJGS |
| `ETU0011B018SC` | SC | Porting Work List Service — retrieves porting work records from KK_T_BMP_KOJI by contract number |
| `ETU0011A010SC` | SC | Porting Work Agreement Service — retrieves porting work agreement details from KK_T_BMP_KOJI |
| `EKK0081A010SC` | SC | Service Contract Agreement Service — retrieves service contract agreement data from KK_T_SVC_KEI_AGREEMENT |
| `EKK0161A010SC` | SC | Service Contract Detail EO Service — retrieves service contract detail information for eo光電話 from KK_T_SVC_KEI_UCWK |
| `EKK0191A010SC` | SC | Service Contract Detail EO Service (retrieval) — retrieves phone number and porting flag from KK_T_SVC_KEI_UCWK |
| `EKK0241B001SC` | SC | Service Contract Line Item List Service — retrieves contract line items from KK_T_SVC_KEI_UCWK |
| `EKK1021B001SC` | SC | Temporary Financial Settings List Service — retrieves temporary payment settings from KK_T_TEMP_PAY_SET |
| `EKK1021C011SC` | SC | Temporary Payment Procedure Check Service — checks and retrieves temporary payment procedure details from KK_T_TMP_PAY_PRC |
| `FUNC_CD_2` | Constant | Function code "2" — used to specify service contract detail EO query type |
| SOD | Acronym | Service Order Data — telecom service order document issued by the port-in carrier |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service (eo光電話) |
| 番ポ (バンポ) | Acronym | 番号ポータビリティ (Number Portability) — allows customers to keep their phone number when changing carriers |
| 同時番ポ | Acronym | 同時番号ポータビリティ (Simultaneous Number Porting) — number porting that occurs simultaneously with other service changes |
| VA | Acronym | Virtual Access — virtual device/service provisioning in the K-Opticom system |
| CAANMsg | Type | Common Application ANswer Message — the message object returned from service component calls |
| callSvcInter | Method | Service integration dispatch — sends input maps to the appropriate SC and returns CAANMsg results |
| telInfoMapper | Class/Field | Telno Info Mapper — internal helper that builds input maps for various service calls |
| M_M_CODE | Table | Master Message Code — code management master table storing categorized code lists |
| M_M_TSJGS | Table | Master Message Telecom Service Provider — telecom provider master table |
| KK_T_DUANITEN | Table | K-Opticom Table: Same-Number Porting — same-number porting history master table |
| KK_T_BMP_KOJI | Table | K-Opticom Table: Porting Work — porting work master table |
| KK_T_SVC_KEI_UCWK | Table | K-Opticom Table: Service Contract Detail — service contract detail information table |
| KK_T_SVC_KEI_AGREEMENT | Table | K-Opticom Table: Service Contract Agreement — service contract agreement table |
| KK_T_TEMP_PAY_SET | Table | K-Opticom Table: Temporary Payment Settings — temporary financial settings table |
| KK_T_TMP_PAY_PRC | Table | K-Opticom Table: Temporary Payment Procedure — temporary payment procedure table |