# Business Logic — JKKTelnoInfoAddCC.executeInitKkw00147() [286 LOC]

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

## 1. Role

### JKKTelnoInfoAddCC.executeInitKkw00147()

This method implements the **initial display data retrieval process for the Telephone Number Information Registration Screen** (電話番号情報登録画面初期表示情報取得処理). It is the primary entry point that gathers all prerequisite data needed to render the telephone number information registration screen in the K-Opticom customer service system.

The method handles **two main business operation categories**: (1) Standard initialization when a service contract detail number (`svcKeiUcwkNo`) exists — retrieving service contract details, port work status, forward routing settings, temporary fee information, and continuation contract data; and (2) The **HTLNOADD** (光電話・番号追加 / Fiber Phone & Number Addition) variant, triggered when `idoDiv` equals `"00041"`, which performs additional processing for new fiber phone number additions including equipment provisioning checks, VA (Virtual Access) port analysis, and ONU replacement work determination.

The method implements a **delegation and routing pattern**: it initializes common fields via `init()`, then routes to a suite of mapper-constructed input maps and service component invocations (`callSvcInter`). Each invocation retrieves a specific data domain (code lists, service contracts, port work, forwarding settings, temporary fees, equipment, work proposals) and stores results back to the parameter data map under named keys. The method also delegates to the private helper `getKikiInfo()` for device information retrieval (contract-changing VA equipment) and to `bolOnuKokanKoji()` for ONU replacement work determination.

This is a **shared screen-initialization component** called by the KKSV0064 screen operation class. It is not a CRUD boundary itself but serves as a data aggregation orchestrator that coordinates multiple SC (Service Component) calls to prepare the complete view model for the telephone number registration screen.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["executeInitKkw00147"])
    
    START --> INIT["init param fixedText"]
    INIT --> GET_DATA["Get trgtData from param getData fixedText"]
    
    GET_DATA --> FETCH_FIELDS["Fetch svcKeiNo svcKeiUcwkNo idoDiv from trgtData"]
    FETCH_FIELDS --> EZM01425["EZM0171B010 - Code name list CD01425 forward request"]
    EZM01425 --> EZM1281["EZM0171B010 - Code name list CD01281 forward judgment"]
    EZM1281 --> CHECK_SVC_UCWK{Is svcKeiUcwkNo present}
    
    CHECK_SVC_UCWK -->|Yes| EKK0191A10["EKK0191A010 - Service contract detail eo fiber phone"]
    EKK0191A10 --> EXTRACT_TEL["Extract telno bmpUm from EKK0191A010"]
    EXTRACT_TEL --> CHECK_BMP{Is bmpUm equal 1 port present}
    
    CHECK_BMP -->|Yes| ETU0011B18["ETU0011B018 - Port work list port application type"]
    ETU0011B18 --> CHECK_ETU_RES{ETU0011B018 result present}
    CHECK_ETU_RES -->|Yes| ETU0011A10["ETU0011A010 - Port work agreement"]
    ETU0011A10 --> PUT_ETU_A["Put ETU0011A010 to trgtData"]
    CHECK_ETU_RES -->|No| ETU0021B17["ETU0021B017 - Forward list service contract detail 2"]
    PUT_ETU_A --> ETU0021B17
    
    CHECK_BMP -->|No| ETU0021B17
    ETU0021B17 --> EKK0241["EKK0241B001 - Service contract line item list"]
    EKK0241 --> EKK1021["EKK1021B004 - Temporary fee setting list"]
    EKK1021 --> EKK0161["EKK0161A010 - Service contract agreement"]
    EKK0161 --> CHECK_EKK161{Is EKK0161A010 result not null}
    
    CHECK_EKK161 -->|Yes| EXTRACT_CON["Extract kzkMtSvcKeiUcwkNo kzkAfKeiChgFlg"]
    EXTRACT_CON --> CHECK_CHG{Is kzkAfKeiChgFlg equal 1 changing}
    
    CHECK_CHG -->|Yes| EKK0351MT["EKK0351B002 - Option service list service contract number"]
    EKK0351MT --> PUT_0351_MT["Put EKK0351B002 to trgtData KZKMT key"]
    PUT_0351_MT --> EKK0351SK["EKK0351B002 - Option service for continuity check"]
    EKK0351SK --> PUT_0351_SZ["Put EKK0351B002 list size KZKSK key"]
    
    CHECK_CHG -->|No| GET_KIKI_N
    PUT_0351_SZ --> GET_KIKI_N
    GET_KIKI_N["getKikiInfo get device info"]
    
    CHECK_EKK161 -->|No| GET_KIKI_N
    CHECK_SVC_UCWK -->|No| CHECK_IDO
    
    GET_KIKI_N --> CHECK_IDO{Is idoDiv equal 00041 HTELNOADD}
    
    CHECK_IDO -->|Yes| EKK0191B01["EKK0191B001 - Service contract detail eo fiber phone list"]
    EKK0191B01 --> LOOP_SVC1["Loop: Find svcKeiUcwkNo skip cancelled and rescinded"]
    LOOP_SVC1 --> CHECK_SVC1{Is svcKeiUcwkNo_1 found}
    
    CHECK_SVC1 -->|Yes| EKK0191A10_1["EKK0191A010 - Service contract detail eo fiber phone"]
    EKK0191A10_1 --> EXTRACT_VA["Extract VA_KIKI_CHG_NO"]
    EXTRACT_VA --> EKK0341["EKK0341B002 - Equipment provision service contract list"]
    EKK0341 --> LOOP_KIKI["Loop: Check for VA1 port flag"]
    LOOP_KIKI --> NOTVA1{Has non VA1 device}
    
    NOTVA1 -->|Yes| SET_NOTVA1["Set notVa1PortFlg true"]
    NOTVA1 -->|No| EKK0081["EKK0081A010 - Service contract agreement"]
    SET_NOTVA1 --> EKK0081
    
    EKK0081 --> EXT_SYSID["Extract sysid"]
    EXT_SYSID --> EKK0251["EKK0251B003 - Service contract line item in use"]
    EKK0251 --> EXT_Kaisen["Extract svcKeiKaisenUcwkNo"]
    EXT_Kaisen --> BOL_ONU["bolOnuKokanKoji determine ONU replacement work"]
    BOL_ONU --> CHECK_ONU{onuKokanKojiFlg AND notVa1PortFlg}
    
    CHECK_ONU -->|Yes| SET_ONU["Put onuKokanKojiFlg 1 to trgtData"]
    SET_ONU --> EKU0011["EKU0011B030 - Work proposal list compound search"]
    CHECK_ONU -->|No| EKU0011
    
    EKU0011 --> LOOP_KOJIAK["Loop: Check kojiakStat skip completed 200 and 900"]
    LOOP_KOJIAK --> PUT_CHEGE["Put onu_chege_check_kojiak_no"]
    
    CHECK_SVC1 -->|No| END_RET
    PUT_CHEGE --> END_RET
    END_RET["Return param"]
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session manager handle carrying session context (user authentication, locale, transaction state) for invoking remote service components via `callSvcInter` and `callSC`. |
| 2 | `param` | `IRequestParameterReadWrite` | Parameter object containing a model group data map and control map. Used as the read/write conduit for retrieving business data (via `getData(fixedText)`) and writing back all retrieved results (via `trgtData.put(...)`). The returned object carries the complete view model for the screen. |
| 3 | `fixedText` | `String` | User-assignable string used as the map key for retrieving/storing business data within `param`. Typically identifies the data grouping name (e.g., `"KKSV006401CC"`) for screen data scoping. |

**Instance fields / external state read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `telInfoMapper` | `JKKTelnoInfoAddMapperCC` | Mapper component used to construct input parameter maps for service component invocations. Provides methods like `editInMsgEKK0191A010`, `editInMsgEZM0171B010`, etc. |
| `scCall` | Unknown (SC call handler) | Service Component call handler used for direct SC invocations (e.g., `callSC` for EKU0011B030). |
| `isNull(Object)` | inherited utility | Null-check utility (inherited from base class, delegates to `JACBatCommon.isNull`). |
| `chgCAANMsgToMap(...)` | inherited utility | Converts a CAANMsg response to a HashMap for view model storage. |
| `getRsltMsgListValue(...)` | inherited utility | Extracts a typed value from a CAANMsg result list by message list name and field name. |
| `callSvcInter(...)` | inherited utility | Invokes a Service Component through the session handle with message routing. |
| `callSC(...)` | inherited utility | Directly invokes a Service Component by SC name for SC-level calls. |

## 4. CRUD Operations / Called Services

### Pre-computed evidence from code analysis graph:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `editInMsgEZM0171B010` + `callSvcInter` | EZM0171B010SC | Code master (CD01425: forward request control code) | Retrieves code name list for CD01425 (同番転送依頼制御コード / Same Number Forwarding Request Control Code) |
| R | `editInMsgEZM0171B010` + `callSvcInter` | EZM0171B010SC | Code master (CD01281: forward judgment code) | Retrieves code name list for CD01281 (同番転送判定コード / Same Number Forwarding Judgment Code) |
| R | `editInMsgEKK0191A010` + `callSvcInter` | EKK0191A010SC | KK_T_SVC_KEI_UCWK (Service contract detail table) | Retrieves service contract detail for eo fiber phone by svcKeiUcwkNo; extracts telephone number (TELNO) and port number flag (BMP_UM) |
| R | `editInMsgETU0011B018` + `callSvcInter` | ETU0011B018SC | KK_T_BMP_KOJI (Port work table) | Retrieves port work list filtered by application types: ITEN (1: installation) and UPD (2: update), by svcKeiNo, telno, svcKeiUcwkNo |
| R | `editInMsgETU0011A010` + `callSvcInter` | ETU0011A010SC | KK_T_BMP_KOJI (Port work table) | Retrieves port work agreement details by BMP_KOJI_NO |
| R | `editInMsgETU0021B017` + `callSvcInter` | ETU0021B017SC | KK_T_DOHANITEN (Forward routing table) | Retrieves forwarding list (2) by svcKeiUcwkNo |
| R | `editInMsgEKK0241B001` + `callSvcInter` | EKK0241B001SC | KK_T_SVC_KEI (Service contract table) | Retrieves service contract line item list by svcKeiNo |
| R | `editInMsgEKK1021B004` + `callSvcInter` | EKK1021B004SC | KK_T_ICJKN_SETTE (Temporary fee setting table) | Retrieves temporary fee (一時金) setting list by svcKeiNo and svcKeiUcwkNo |
| R | `editInMsgEKK0161A010` + `callSvcInter` | EKK0161A010SC | KK_T_SVC_KEI_UCWK (Service contract detail table) | Retrieves service contract agreement with continuation data (FUNC_CD_1); extracts continuation source service detail number and post-change flag |
| R | `editInMsgEKK0351B002` + `callSvcInter` | EKK0351B002SC | KK_T_KKOP_SVC_KEI (Equipment provision service contract table) | Retrieves option service list by svcKeiNo, kzkMtSvcKeiUcwkNo, and OP_SVC_CD_DSP code |
| R | `editInMsgEKK0351B002` + `callSvcInter` | EKK0351B002SC | KK_T_KKOP_SVC_KEI (Equipment provision service contract table) | Retrieves option service list for continuity check to compare old vs new change data |
| R | `editInMsgEKK0191B001` + `callSvcInter` | EKK0191B001SC | KK_T_SVC_KEI_UCWK (Service contract detail table) | Retrieves service contract detail list for eo fiber phone by svcKeiNo; used in HTELNOADD branch to find alternative contract detail number |
| R | `editInMsgEKK0191A010` + `callSvcInter` | EKK0191A010SC | KK_T_SVC_KEI_UCWK (Service contract detail table) | Retrieves service contract detail for eo fiber phone (HTELNOADD variant) to get VA device change number |
| R | `editInMsgEKK0341B002` + `callSvcInter` | EKK0341B002SC | KK_T_KKTK_SVC_KEI (Equipment provision service contract table) | Retrieves equipment provision service contract list by svcKeiNo; checks for VA1 port device flags (C004+C05, C024, C025) |
| R | `editInMsgEKK0081A010` + `callSvcInter` | EKK0081A010SC | KK_T_SVC_KEI (Service contract table) | Retrieves service contract agreement; extracts SYSID |
| R | `editInMsgEKK0251B003` + `callSvcInter` | EKK0251B003SC | KK_T_SVC_KEI_KAISEN (Service contract line item continuation table) | Retrieves in-use service contract line item list by svcKeiNo |
| R | `callSC` (EKU0011B030) | EKU0011B030SC | KK_T_KOJIAK_ANKEN (Work proposal table) | Retrieves work proposal list via compound search with service contract number and work proposal subtype codes |
| - | `callSvcInter` (EKK0161A010 via getKikiInfo) | EKK0341B002SC | KK_T_KKTK_SVC_KEI (Equipment provision service contract table) | Retrieves equipment list in getKikiInfo helper for contract-changing VA equipment analysis |
| R | `callSvcInter` (EKK2811B010 via getKikiInfo) | EKK2811B010SC | KK_T_KKOP_SVC_KEI (Equipment operation service contract table) | Retrieves equipment operation service contract list for multi-function device analysis |
| - | `getKikiInfo` helper | Multiple | Multiple | Delegates device info retrieval for contract-changing VA equipment |
| - | `bolOnuKokanKoji` helper | Multiple | Multiple | Determines if ONU replacement work is needed |
| - | `findZ1OrderBeenSentSvcKeiUcwk` | JKKHakkoSODCC | - | Checks if Z1 order has been sent (used in getKikiInfo) |
| - | `chgCAANMsgToMap` | inherited | - | Converts CAANMsg to HashMap |
| - | `getRsltMsgListValue` | inherited | - | Extracts field value from CAANMsg result list |
| - | `callSvcInter` | inherited | - | Service component invocation bridge |
| - | `callSC` | inherited | - | Direct SC invocation bridge |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0064 | `KKSV0064OPOperation` (CCRequestBroker: `"com.fujitsu.futurity.bp.custom.common.JKKTelnoInfoAddCC"`, `"executeInitKkw00147"`, `"KKSV006401CC"`) -> `JKKTelnoInfoAddCC.executeInitKkw00147(handle, param, fixedText)` | `editInMsgEZM0171B010 [R] KK_T_CODE (CD01425, CD01281)`, `editInMsgEKK0191A010 [R] KK_T_SVC_KEI_UCWK`, `editInMsgETU0011B018 [R] KK_T_BMP_KOJI`, `editInMsgETU0011A010 [R] KK_T_BMP_KOJI`, `editInMsgETU0021B017 [R] KK_T_DOHANITEN`, `editInMsgEKK0241B001 [R] KK_T_SVC_KEI`, `editInMsgEKK1021B004 [R] KK_T_ICJKN_SETTE`, `editInMsgEKK0161A010 [R] KK_T_SVC_KEI_UCWK`, `editInMsgEKK0351B002 [R] KK_T_KKOP_SVC_KEI`, `editInMsgEKK0191B001 [R] KK_T_SVC_KEI_UCWK`, `editInMsgEKK0341B002 [R] KK_T_KKTK_SVC_KEI`, `editInMsgEKK0081A010 [R] KK_T_SVC_KEI`, `editInMsgEKK0251B003 [R] KK_T_SVC_KEI_KAISEN`, `EKU0011B030 [R] KK_T_KOJIAK_ANKEN` |

**Note:** The only caller found is `KKSV0064OPOperation` — the BPM operation class for the KKSV0064 screen (Telephone Number Information Registration Screen). The `KKSV006401CC` CCRequestBroker instance configures the invocation with target class `JKKTelnoInfoAddCC`, method `executeInitKkw00147`, and CC group name `KKSV006401CC`.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET / EXEC] `(Initialization and data extraction)` (L205)

> Initializes the request and extracts core business identifiers from the parameter data map.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `init(param, fixedText)` // Initialize common fields |
| 2 | SET | `trgtData = param.getData(fixedText)` // Get business data map keyed by fixedText |
| 3 | SET | `svcKeiNo = (String)trgtData.get(JKKTelnoInfoAddConstCC.SVC_KEI_NO)` // Service contract number [-> SVC_KEI_NO="svc_kei_no"] |
| 4 | SET | `svcKeiUcwkNo = (String)trgtData.get(JKKTelnoInfoAddConstCC.SVC_KEI_UCWK_NO)` // Service contract detail number [-> SVC_KEI_UCWK_NO="svc_kei_ucwk_no"] |
| 5 | SET | `idoDiv = (String)trgtData.get(JKKTelnoInfoAddConstCC.IDO_DIV)` // Movement type classification [-> IDO_DIV="ido_div"] |

**Block 2** — [EXEC] `(Code name list retrieval for forward request - CD01425)` (L225)

> Retrieves the code name list for CD01425 (Same Number Forwarding Request Control Code), used to populate the forward request dropdown on the registration screen.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMapEZM0171B010 = telInfoMapper.editInMsgEZM0171B010(param, "CD01425")` // Build input map for code name list CD01425 |
| 2 | CALL | `outMapEZM0171B010 = callSvcInter(handle, param, inMapEZM0171B010)` // Execute EZM0171B010SC |
| 3 | SET | `trgtData.put(EZM0171B010CBSMSG1LIST_CD01425, chgCAANMsgToMap(outMapEZM0171B010, ...))` // Store result |

**Block 3** — [EXEC] `(Code name list retrieval for forward judgment - CD01281)` (L231)

> Retrieves the code name list for CD01281 (Same Number Forwarding Judgment Code), used to populate the forward judgment dropdown.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMapEZM0171B010 = telInfoMapper.editInMsgEZM0171B010(param, "CD01281")` // Build input map for code name list CD01281 |
| 2 | CALL | `outMapEZM0171B010 = callSvcInter(handle, param, inMapEZM0171B010)` // Execute EZM0171B010SC |
| 3 | SET | `trgtData.put(EZM0171B010CBSMSG1LIST_CD01281, chgCAANMsgToMap(outMapEZM0171B010, ...))` // Store result |

**Block 4** — [IF] `(svcKeiUcwkNo is present)` `(IDO_DIV_HTELNOADD="00041")` (L235)

> If a service contract detail number is set, executes the standard initialization flow: retrieves service contract detail, port work status, forwarding lists, temporary fee settings, and continuation contract data.

**Block 4.1** — [EXEC] `(Service contract detail retrieval)` (L241)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMapEKK0191A010 = telInfoMapper.editInMsgEKK0191A010(param, svcKeiUcwkNo)` // Build input map |
| 2 | CALL | `outMapEKK0191A010 = callSvcInter(handle, param, inMapEKK0191A010)` // Execute EKK0191A010SC |
| 3 | SET | `trgtData.put(EKK0191A010CBSMSG1LIST, chgCAANMsgToMap(...))` // Store result |

**Block 4.2** — [SET] `(Extract telephone number and port flag)` (L246)

| # | Type | Code |
|---|------|------|
| 1 | SET | `telno = getRsltMsgListValue(outMapEKK0191A010, ..., TELNO)` // Extract telephone number |
| 2 | SET | `bmpUm = getRsltMsgListValue(outMapEKK0191A010, ..., BMP_UM)` // Extract port number flag |

**Block 5** — [IF] `(bmpUm equals UM_ARI="1")` `(L249)`

> If a port number is present, retrieves port work information.

**Block 5.1** — [EXEC] `(Port work list retrieval)` (L253)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMapETU0011B018 = telInfoMapper.editInMsgETU0011B018(param, svcKeiNo, telno, BMP_IRAI_NAIYO_CD_ITEN="1" + "," + BMP_IRAI_NAIYO_CD_UPD, svcKeiUcwkNo)` // Build input for port work list |
| 2 | CALL | `outMapETU0011B018 = callSvcInter(handle, param, inMapETU0011B018)` // Execute ETU0011B018SC |

**Block 5.2** — [IF] `(ETU0011B018 result array length > 0)` (L258)

> If port work results exist, retrieves port work agreement details.

**Block 5.2.1** — [EXEC] `(Port work agreement retrieval)` (L260)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMapETU0011A010 = telInfoMapper.editInMsgETU0011A010(param, getRsltMsgListValue(..., BMP_KOJI_NO))` // Build input by BMP_KOJI_NO |
| 2 | CALL | `outMapETU0011A010 = callSvcInter(handle, param, inMapETU0011A010)` // Execute ETU0011A010SC |
| 3 | SET | `trgtData.put(ETU0011A010CBSMSG1LIST, chgCAANMsgToMap(...))` // Store result |

**Block 6** — [EXEC] `(Forward list - service contract detail 2)` (L271)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMapETU0021B017 = telInfoMapper.editInMsgETU0021B017(param, svcKeiUcwkNo)` // Build input map |
| 2 | CALL | `outMapETU0021B017 = callSvcInter(handle, param, inMapETU0021B017)` // Execute ETU0021B017SC |
| 3 | SET | `trgtData.put(ETU0021B017CBSMSG1LIST, chgCAANMsgToMap(...))` // Store result |

**Block 7** — [EXEC] `(Service contract line item list)` (L277)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMapEKK0241B001 = telInfoMapper.editInMsgEKK0241B001(param, svcKeiNo)` // Build input map |
| 2 | CALL | `outMapEKK0241B001 = callSvcInter(handle, param, inMapEKK0241B001)` // Execute EKK0241B001SC |
| 3 | SET | `trgtData.put(EKK0241B001CBSMSG1LIST, chgCAANMsgToMap(...))` // Store result |

**Block 8** — [EXEC] `(Temporary fee setting list)` (L284)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMapEKK1021B004 = telInfoMapper.editInMsgEKK1021B004(param, svcKeiNo, svcKeiUcwkNo)` // Build input map |
| 2 | CALL | `outMapEKK1021B004 = callSvcInter(handle, param, inMapEKK1021B004)` // Execute EKK1021B004SC |
| 3 | SET | `trgtData.put(EKK1021B004CBSMSG1LIST, chgCAANMsgToMap(...))` // Store result |

**Block 9** — [EXEC] `(Service contract agreement)` (L291)

> Retrieves service contract agreement data including continuation contract change information. Uses FUNC_CD_1 for standard processing.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMapEKK0161A010 = telInfoMapper.editInMsgEKK0161A010(param, svcKeiUcwkNo, getRsltMsgListValue(outMapEKK0191A010, ..., GENE_ADD_DTM), null, JPCModelConstant.FUNC_CD_1)` // Build input map with continuation post-contract change flag |
| 2 | CALL | `outMapEKK0161A010 = callSvcInter(handle, param, inMapEKK0161A010)` // Execute EKK0161A010SC |

**Block 10** — [IF] `(outMapEKK0161A010 is not null)` (L304)

> When service contract agreement result exists, processes continuation contract change data.

**Block 10.1** — [SET] `(Extract continuation data)` (L307)

| # | Type | Code |
|---|------|------|
| 1 | SET | `kzkMtSvcKeiUcwkNo = getRsltMsgListValue(outMapEKK0161A010, ..., KEIZK_MT_SVC_KEI_UCWK_NO)` // Continuation source service detail number |
| 2 | SET | `kzkAfKeiChgFlg = getRsltMsgListValue(outMapEKK0161A010, ..., KEIZK_AF_KEI_CHGECHU_FLG)` // Post-change contract change flag |

**Block 11** — [IF] `(kzkAfKeiChgFlg equals "1")` `(L314)`

> When post-contract-change processing is in progress, retrieves option service data for both the continuation source and the current contract detail number.

**Block 11.1** — [EXEC] `(Option service list - continuation source)` (L317)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMapEKK0351B002 = telInfoMapper.editInMsgEKK0351B002(param, svcKeiNo, kzkMtSvcKeiUcwkNo, OP_SVC_CD_DSP="B022")` // Build input with option service display code |
| 2 | CALL | `outMapEKK0351B002 = callSvcInter(handle, param, inMapEKK0351B002)` // Execute EKK0351B002SC |
| 3 | SET | `trgtData.put(EKK0351B002CBSMSG1LIST_KZKMT, chgCAANMsgToMap(...))` // Store with KZKMT suffix |

**Block 11.2** — [EXEC] `(Option service list - continuity check)` (L328)

> Retrieves option service data for the current svcKeiUcwkNo to compare with old change data (ANK-1855-00-00: number change during merger/acquisition).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMapEKK0351B002_2 = telInfoMapper.editInMsgEKK0351B002(param, svcKeiNo, svcKeiUcwkNo, null)` // Build input without option code filter |
| 2 | CALL | `outMapEKK0351B002_2 = callSvcInter(handle, param, inMapEKK0351B002_2)` // Execute EKK0351B002SC |
| 3 | SET | `opList = outMapEKK0351B002_2.getCAANMsgList(...)` // Get result array |
| 4 | SET | `trgtData.put(EKK0351B002CBSMsg1ListSize_KZKSK, String.valueOf(opList.length))` // Store list size |

**Block 12** — [EXEC] `(Device information retrieval)` (L343)

> Calls the private `getKikiInfo()` helper to retrieve device information, with conditional logic based on idoDiv.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `getKikiInfo(handle, param, fixedText, outMapEKK0191A010, svcKeiNo, svcKeiUcwkNo, trgtData, idoDiv)` // Retrieve device info |

**Block 13** — [IF] `(idoDiv equals IDO_DIV_HTELNOADD="00041")` `(L355)`

> HTELNOADD (光電話・番号追加 / Fiber Phone & Number Addition) branch. Triggered when the movement type is new fiber phone number addition. This branch handles a different flow from the standard initialization, finding alternative service contracts and performing equipment provisioning analysis.

**Block 13.1** — [SET] `(Initialize variable)` (L358)

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiUcwkNo_1 = ""` // Alternative service detail number |

**Block 13.2** — [EXEC] `(Service contract detail list retrieval)` (L362)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMapEKK0191B001 = telInfoMapper.editInMsgEKK0191B001(param, JPCModelConstant.FUNC_CD_1, svcKeiNo)` // Build input map |
| 2 | CALL | `outMapEKK0191B001 = callSvcInter(handle, param, inMapEKK0191B001)` // Execute EKK0191B001SC |

**Block 13.3** — [FOR] `(Iterate over EKK0191B001 result list)` (L365)

> Iterates through service contract detail records to find one that is NOT cancelled/rescinded and differs from the current svcKeiUcwkNo.

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltMsgEKK0191B001 = rsltMsgEKK0191B001List[i]` // Get current record |
| 2 | SET | `tmpSvcKeiUcwkStat = rsltMsgEKK0191B001.getString(SVC_KEI_UCWK_STAT)` // Get status |
| 3 | SET | `tmpSvcKeiUcwkNo = rsltMsgEKK0191B001.getString(SVC_KEI_UCWK_NO)` // Get detail number |

**Block 13.4** — [IF] `(NOT SVC_KEI_STAT_910 AND NOT SVC_KEI_STAT_920 AND NOT equal to svcKeiUcwkNo)` `(L375)`

> Skips cancelled (910) and rescinded (920) status records, and skips the current svcKeiUcwkNo. The first matching record becomes the alternative detail number.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiUcwkNo_1 = tmpSvcKeiUcwkNo` // Found alternative detail number |

**Block 14** — [IF] `(svcKeiUcwkNo_1 is NOT null/blank)` `(L385)`

> When an alternative service contract detail number was found.

**Block 14.1** — [SET] `(Initialize flag)` (L387)

| # | Type | Code |
|---|------|------|
| 1 | SET | `notVa1PortFlg = false` // VA1 port detection flag |

**Block 14.2** — [EXEC] `(Service contract detail retrieval)` (L390)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMapEKK0191A010 = telInfoMapper.editInMsgEKK0191A010(param, svcKeiUcwkNo_1)` // Build input by alternative detail number |
| 2 | CALL | `outMapEKK0191A010 = callSvcInter(handle, param, inMapEKK0191A010)` // Execute EKK0191A010SC |
| 3 | SET | `tgKikiChgNo = getRsltMsgListValue(..., VA_KIKI_CHG_NO)` // Extract VA device change number |

**Block 14.3** — [EXEC] `(Equipment provision service contract list)` (L398)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMapEKK0341B002 = telInfoMapper.editInMsgEKK0341B002(param, svcKeiNo, "12")` // Build input with parameter "12" |
| 2 | CALL | `outMapEKK0341B002 = callSvcInter(handle, param, inMapEKK0341B002)` // Execute EKK0341B002SC |

**Block 14.4** — [FOR] `(Iterate over equipment provision results)` (L402)

> Iterates through equipment provision records to check for VA1 port device flags.

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltMsgEKK0341B002 = rsltMsgEKK0341B002List[i]` // Get record |
| 2 | SET | `kktkSvcCd = rsltMsgEKK0341B002.getString(KKTK_SVC_CD)` // Equipment provision service code |
| 3 | SET | `kktkPcrsCd = rsltMsgEKK0341B002.getString(PCRS_CD)` // Equipment price course code |

**Block 14.4.1** — [IF] `(kktkSvcCd equals "C024" AND kktkSvcKeiStat equals "010")` `(L412)`

> #85215: Skip multi-function devices that have been received (status "010").

| # | Type | Code |
|---|------|------|
| 1 | SET | `kktkSvcKeiStat = rsltMsgEKK0341B002.getString(KKTK_SVC_KEI_STAT)` // Get service contract status |
| 2 | EXEC | `continue` // Skip this record |

**Block 14.4.2** — [IF] `("C004" equals kktkSvcCd AND "C05" equals kktkPcrsCd) OR "C024" OR "C025"` `(L420)`

> Checks for VA1 port device: C004+C05 = fiber phone VA with C05 course, or C024 (multi-function), or C025.

| # | Type | Code |
|---|------|------|
| 1 | SET | `notVa1PortFlg = true` // Confirmed VA1 port device exists |

**Block 14.5** — [EXEC] `(Service contract agreement)` (L430)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMapEKK0081A010 = telInfoMapper.editInMsgEKK0081A010(param, svcKeiNo)` // Build input map |
| 2 | CALL | `outMapEKK0081A010 = callSvcInter(handle, param, inMapEKK0081A010)` // Execute EKK0081A010SC |
| 3 | SET | `sysid = getRsltMsgListValue(..., SYSID)` // Extract SYSID |

**Block 14.6** — [EXEC] `(Service contract line item list - in use)` (L437)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMapEKK0251B003 = telInfoMapper.editInMsgEKK0251B003(param, svcKeiNo)` // Build input map |
| 2 | CALL | `outMapEKK0251B003 = callSvcInter(handle, param, inMapEKK0251B003)` // Execute EKK0251B003SC |
| 3 | SET | `svcKeiKaisenUcwkNo = getRsltMsgListValue(..., SVC_KEI_KAISEN_UCWK_NO)` // Extract continuation detail number |

**Block 14.7** — [CALL] `(ONU replacement work determination)` (L440)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `onuKokanKojiFlg = bolOnuKokanKoji(handle, param, trgtData, fixedText, sysid, svcKeiNo, svcKeiKaisenUcwkNo)` // Determine ONU replacement work needed |

**Block 15** — [IF] `(onuKokanKojiFlg AND NOT notVa1PortFlg)` `(L443)`

> When ONU replacement work is needed AND there is no VA1 port device (or VA device is absent). This condition indicates the ONU replacement work flag should be set for screen display.

| # | Type | Code |
|---|------|------|
| 1 | SET | `trgtData.put(onuKokanKojiFlg, "1")` // Set ONU replacement work flag |

**Block 16** — [EXEC] `(Work proposal list - compound search)` (L449)

> Retrieves work proposal records filtered by new installation (NEWESTA), TK/DSL, and plan change reduction codes. Used to check if there are in-progress work proposals.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eku0011b030In = {{TEMPLATEID, TEMPLATE_ID_EKU0011B030}, {FUNC_CODE, FUNC_CD_1}, {KEY_SVC_KEI_NO, svcKeiNo}, {KEY_KOJIAK_SBT_CD, CD00577_NEWESTA + "," + CD00577_TK_DSL + "," + CD00577_PLAN_CHG_SHYO_CHG}}` // Build compound search parameters |
| 2 | CALL | `eku0011b030MsgList = callSC(handle, scCall, param, fixedText, eku0011b030In).getCAANMsgList(...)` // Execute EKU0011B030SC |

**Block 17** — [FOR] `(Iterate over work proposal results)` (L462)

> Iterates through work proposal records to find any that are NOT completed (200) or suspended (900), indicating active in-progress work.

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltMsgEKU0011B030 = eku0011b030MsgList[i]` // Get record |
| 2 | SET | `kojiakStat = JKKStringUtil.nullToBlank(rsltMsgEKU0011B030.getString(KOJIAK_STAT))` // Get work proposal status |

**Block 17.1** — [IF] `(kojiakStat NOT equals CD00474_KJ_FIN_ZM AND NOT equals CD00474_900)` `(L466)`

> If work proposal status is not completed (200) or 900, it is considered in-progress. Store the work proposal number and break.

| # | Type | Code |
|---|------|------|
| 1 | SET | `trgtData.put(onu_chege_check_kojiak_no, JKKStringUtil.nullToBlank(rsltMsgEKU0011B030.getString(KOJIAK_NO)))` // Store work proposal number |
| 2 | EXEC | `break` // Stop iteration |

**Block 18** — [RETURN] `(Return parameter)` (L476)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return param` // Return the populated parameter object with all view model data |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_no` | Field | Service Contract Number — the primary identifier for a customer's service contract line |
| `svc_kei_ucwk_no` | Field | Service Contract Detail Number — internal tracking ID for a specific service contract detail/variant within a service contract line |
| `ido_div` | Field | Movement Type Classification — indicates the type of contract modification being performed (e.g., address change, number addition, cancellation) |
| `bmp_um` | Field | Port Number Presence Flag — indicates whether a port number is assigned ("1" = present / 有, "0" or blank = absent / 無) |
| `telno` | Field | Telephone Number — the customer's telephone number |
| `bmp_koji_no` | Field | Port Work Number — internal identifier for a port (number portability) work order |
| `kzkAfKeiChgFlg` | Field | Post-Change Contract Change Flag — indicates whether a contract change is in progress ("1" = changing / 変更中) |
| `kzkMtSvcKeiUcwkNo` | Field | Continuation Source Service Detail Number — the service detail number of the original contract before a continuation/migration |
| `kktkSvcCd` | Field | Equipment Provision Service Code — classifies the type of equipment (e.g., "C004" = fiber phone VA, "C024" = multi-function, "C025" = additional multi-function) |
| `kktkPcrsCd` | Field | Equipment Price Course Code — classifies the pricing course of equipment (e.g., "C05" = VA1 port course) |
| `notVa1PortFlg` | Field | Non-VA1 Port Device Flag — indicates whether a device other than VA1 port exists |
| `onuKokanKojiFlg` | Field | ONU Replacement Work Flag — indicates whether an ONU (Optical Network Unit) replacement work is needed |
| `kojiakStat` | Field | Work Proposal Status — status of a work proposal (e.g., "200" = completed/完了, "900" = suspended/保留) |
| `VA` | Acronym | Virtual Access — Fujitsu's managed home networking service that provides remote support for customer equipment |
| `ONU` | Acronym | Optical Network Unit — the terminal equipment at the customer premises for fiber-optic service delivery |
| `VA1` | Business term | VA1 Port — the first port/interface of a VA-managed device (typically the primary telephone port) |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service offered by K-Opticom |
| ENUM | Business term | Enumerate — telephone numbering service (often grouped with FTTH as "FTTH+ENUM") |
| HTELNOADD | Constant | 光電話・番号追加 (Fiber Phone & Number Addition) — movement type code "00041" for new fiber phone number addition |
| HTELNOINFOCHGE | Constant | 光電話・電話番号情報変更 (Fiber Phone & Telephone Number Information Change) — movement type code "00048" for changing telephone number information |
| IDO_DIV | Constant | Movement Type Classification — the master classification for all contract modification types |
| KKTK_SVC_CD_HTEL_VA | Constant | Equipment Provision Service Code for Fiber Phone VA — value "C004" |
| UM_ARI | Constant | Port Number Present — value "1", indicating a port number exists |
| SVC_KEI_STAT_910 | Constant | Service Contract Status: Cancelled — value "910" |
| SVC_KEI_STAT_920 | Constant | Service Contract Status: Rescinded — value "920" |
| BMP_IRAI_NAIYO_CD_ITEN | Constant | Port work application type: Installation (single) — value "1" |
| OP_SVC_CD_DSP | Constant | Option Service Display Code — value "B022" |
| FUNC_CD_1 | Constant | Function Code: Standard/Normal — used for regular processing mode |
| KKSV0064 | Screen | Telephone Number Information Registration Screen — the customer service screen where operators register and modify telephone number information |
| KKSV006401CC | CC | Controller Component group name for KKSV0064 screen initialization |
| EZM0171B010 | SC | Code Name List Inquiry SC — retrieves master code lists by code division number |
| EKK0191A010 | SC | Service Contract Detail (eo Fiber Phone) Agreement SC — retrieves service contract detail information |
| EKK0191B001 | SC | Service Contract Detail (eo Fiber Phone) List SC — retrieves a list of service contract details |
| EKK0161A010 | SC | Service Contract Agreement SC — retrieves service contract agreement data including continuation info |
| EKK0241B001 | SC | Service Contract Line Item List SC — retrieves service contract line items |
| EKK0341B002 | SC | Equipment Provision Service Contract List SC — retrieves equipment provision service records |
| EKK0351B002 | SC | Option Service List SC — retrieves option service records for a service contract |
| ETU0011A010 | SC | Port Work Agreement SC — retrieves port work agreement details |
| ETU0011B018 | SC | Port Work List SC — retrieves port work records by application type |
| ETU0021B017 | SC | Forward List SC — retrieves same-number forwarding information |
| EKK0081A010 | SC | Service Contract Agreement SC — retrieves primary service contract data |
| EKK0251B003 | SC | Service Contract Line Item List (In Use) SC — retrieves active line item records |
| EKK1021B004 | SC | Temporary Fee Setting List SC — retrieves temporary fee (one-time charge) settings |
| EKU0011B030 | SC | Work Proposal List (Compound Search) SC — retrieves work proposals with compound filter conditions |
| EKK2811B010 | SC | Equipment Operation Service Contract SC — retrieves equipment operation service records for multi-function device analysis |
| JKKHakkoSODCC | Component | Service Order Data (SOD) issuance CC — handles SOD order generation and status checks |
| CAANMsg | Type | Common Application Architecture Network message — the inter-component message type used for service component communication |
