# Business Logic — KKW00128SFLogic.actionUpdcfm() [505 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW00128SF.KKW00128SFLogic` |
| Layer | Controller / Web Business Logic (extends `JCCWebBusinessLogic`) |
| Module | `KKW00128SF` (Package: `eo.web.webview.KKW00128SF`) |

## 1. Role

### KKW00128SFLogic.actionUpdcfm()

The `actionUpdcfm` method is the central **confirmation-button handler** for the "Service Contract Update (eo Hikari Net)" screen (Screen ID: `KKW00128`). When a user clicks the "Registration Confirmation" button on the service contract update form, this method orchestrates the full business flow: it performs pre-service input validation, invokes the backend service layer to persist updated contract data, runs post-service business rule checks (including duplicate number validation, penalty checks, service date constraints, Netflix Premium conflicts, and ONU exchange restrictions), and finally presents success/error messages to the user with screen routing to the next step (typically Screen `KKW00134` — the shared service contract screen). The method supports **eight distinct operation modes** via the `ido_div` (displacement classification) field: normal update, termination, cancellation, service change, service information correction, registration information correction, and two special modes — each triggering unique validation and messaging logic. This method implements a **gate-and-dispatch pattern**: early-exit guards short-circuit on validation failures, while valid paths proceed through service invocation and multi-phase post-processing. It is the primary entry point invoked by the KKW00128 screen's confirmation action and serves as the coordination hub for downstream service components, mappers, and business rules across the K-Opticom customer contract system.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["actionUpdcfm Start"])

    INIT["Initialize maps, get form bean, clear map flag"]
    ONU["mapOnukknkjinfstku - ONU exchange info retrieval"]
    ERR1["updcfmErrCheck(svcFormBean)"]
    RETCHECK1{"Error check pass?"}

    SET["setServiceParamater(ido_div, paramMap)"]
    LIST["cfmListKKW00128SFBean(svcFormBean)"]
    TBX["cfmTbxKKW00128SFBean(svcFormBean)"]
    INVOKE["invokeService(paramMap, inputMap, outputMap)"]
    CHKNUM["checkSvcKeiNum(paramBean, outputMap, func_code 2)"]
    CHKERR["checkError(paramBean, outputMap)"]
    RETCHECK2{"Error check pass?"}
    CHKDUP["checkDbleMskmDslNo(paramBean, outputMap)"]

    CHKNET["chkNetflixPremiumOP(svcFormBean)"]
    CHKSPEED["chkSameSpeedCrsChg(svcFormBean)"]
    CHECKS["Run all validation checks (choki, kapkei, pcrs, adchg, svcdates, dslpre)"]
    DSP["dspTbxKKW00128SFBean(svcFormBean)"]
    HEADER["JKKWebCommon.setSvckeiInfo(this, svc_kei_dataMap)"]
    SUCCESS["Display: 'Updated' + ido_div-specific messages"]
    DUMP["JSYwebLog.println - DataBean dump"]
    RETTRUE["Return true"]
    RETFALSE["Revert screen, Return false"]

    START --> INIT
    INIT --> ONU
    ONU --> ERR1
    ERR1 --> RETCHECK1
    RETCHECK1 -- "fail" --> RETFALSE
    RETCHECK1 -- "pass" --> SET
    SET --> LIST
    LIST --> TBX
    TBX --> INVOKE
    INVOKE --> CHKNUM
    CHKNUM --> CHKERR
    CHKERR -- "error" --> RETCHECK2
    RETCHECK2 -- "fail" --> RETFALSE
    RETCHECK2 -- "pass" --> CHKDUP
    CHKDUP --> CHKSPEED
    CHKSPEED --> CHKNET
    CHKNET --> CHECKS
    CHECKS --> DSP
    DSP --> HEADER
    HEADER --> SUCCESS
    SUCCESS --> DUMP
    DUMP --> RETTRUE
```

**Additional condition branches within the main flow:**

```mermaid
flowchart TD
    START(["ido_div checks"])

    CSCH["CSCH_RSV_FLG check (ido_div=00005)"]
    CSCH_CHK{"cschRsvFlg == 1?"}
    CSCH_ERR["Error: Service change reserved + termination"]

    ONU_CHECK1["ido_div=00009: Check ONU exchange work status (sbtCd=015, stat 140-190)"]
    ONU_ERR1["Error: ONU exchange in progress / not registrable"]

    TERM_CANCEL["ido_div=00005 or 00008: Check svcKeiStat < 100 + ONU status"]
    TERM_ERR["Error: ONU exchange before activation / cancel or terminate"]

    RECOVERY["ido_div=00004: Recovery processing — valCdKkokuOputFlg, recovery reason T6, device reservation"]
    WARN["Display: Billing warning / recovery fee / device op reserved"]

    RMNUM["ido_div=00032 or 00033: Check invoice room number duplication + address check"]
    ADDR_WARN["Display: Address mismatch warning for mansion/meson types"]

    CORRECTION["ido_div=00033: Mansion/meson address consistency — building name vs parent name"]
    CONSIST["Display: Building name and parent name mismatch confirmation"]

    MAIL_ERR["ido_div=00009: Check KKSV020278CC — email notification failure"]
    AUTO_XG["ido_div=00009: Check KKSV020296CC — auto exchange error"]

    HGW["ido_div=00032 or 00033: Check HGW exchange prohibition flag"]
    HGW_ERR["Display: HGW exchange prohibited warning"]

    RET1["Return false (error)"]
    CONT["Continue flow"]

    START --> CSCH
    CSCH --> CSCH_CHK
    CSCH_CHK -- "true" --> CSCH_ERR
    CSCH_ERR --> RET1
    CSCH_CHK -- "false" --> ONU_CHECK1
    ONU_CHECK1 --> ONU_ERR1
    ONU_ERR1 --> RET1
    ONU_ERR1 --> CONT
    CONT --> TERM_CANCEL
    TERM_CANCEL --> TERM_ERR
    TERM_ERR --> RET1
    TERM_ERR --> CONT
    CONT --> RECOVERY
    RECOVERY --> WARN
    WARN --> RMNUM
    RMNUM --> ADDR_WARN
    ADDR_WARN --> CORRECTION
    CORRECTION --> CONSIST
    CONSIST --> MAIL_ERR
    MAIL_ERR --> AUTO_XG
    AUTO_XG --> HGW
    HGW --> HGW_ERR
    HGW_ERR --> RETTRUE["Continue to final processing (Return true)"]
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (implicit) `ido_div` | `String` | Displacement classification — an instance field indicating which operation mode the screen is running in (e.g., "00004"=Recovery, "00005"=Termination, "00008"=Cancellation, "00009"=Service Change, "00032"/"00033"=Information Correction/Registration Correction). Drives all conditional branches in the method. |
| - | `svcFormBean` (derived) | `X31SDataBeanAccess` | The service form data bean retrieved via `super.getServiceFormBean()`. Carries all form input values submitted by the user on the KKW00128 screen, including service contract details, address information, and validation flags. |
| - | `paramBean` (derived) | `X31SDataBeanAccess[]` | An array wrapping `svcFormBean`, used as the parameter envelope for service invocation and subsequent checks. |
| - | `paramMap` | `HashMap<String, Object>` | Input parameter map passed to `setServiceParamater` and then to `invokeService` for backend service processing. |
| - | `inputMap` / `outputMap` | `HashMap<String, Object>` | Input/output maps used in `invokeService`. `outputMap` carries results from backend services and is consumed by `checkError`, `checkDbleMskmDslNo`, and post-service validation blocks. |
| - | `svc_kei_dataMap` | `HashMap<String, Object>` | Instance field — the service contract shared header map, populated by `JKKWebCommon.setSvckeiInfo` and used across multiple screens. |

**External state / instance fields read:**
- `ido_div` — Displacement classification code driving branch logic
- `svc_kei_dataMap` — Service contract shared header map

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JCCBatCommon.invokeService` | JCCBatCommon | - | Invokes backend CBS service with paramMap/inputMap/outputMap |
| R | `OneStopDataBeanAccessArray.getDataBean` | OneStopDataBeanAccessArray | - | Reads data beans from form (e.g., penalty info, service contract info) |
| R | `OneStopDataBeanAccess.getDataBeanArray` | OneStopDataBeanAccess | - | Reads arrays of data beans (e.g., svc_kei_Info, pnlty_hassei_div_Info) |
| - | `OneStopDataBeanAccess.sendMessageString` | OneStopDataBeanAccess | - | Reads/writes string values from/to data beans |
| - | `OneStopDataBeanAccess.sendMessageBoolean` | OneStopDataBeanAccess | - | Reads boolean values from data beans |
| - | `KKKWebCommon.setSvckeiInfo` | JKKWebCommon | - | Sets service contract info into shared header map |
| - | `KKW00128SFLogic.cfmListKKW00128SFBean` | KKW00128SFLogic | - | Compiles list-type form beans for service registration |
| - | `KKW00128SFLogic.cfmTbxKKW00128SFBean` | KKW00128SFLogic | - | Compiles textbox-type form beans for service registration |
| - | `KKW00128SFLogic.checkAdchgRsv` | KKW00128SFLogic | - | Checks address change reservations |
| - | `KKW00128SFLogic.checkChokiWrib` | KKW00128SFLogic | - | Checks long-term contract discount agreement |
| - | `KKW00128SFLogic.checkDbleMskmDslNo` | KKW00128SFLogic | - | Checks duplicate masked DSL numbers |
| - | `KKW00128SFLogic.checkDslPreExec` | KKW00128SFLogic | - | Checks pre-execution cancellation status |
| - | `KKW00128SFLogic.checkError` | KKW00128SFLogic | - | Checks for errors from service invocation |
| - | `KKW00128SFLogic.checkKapKei` | KKW00128SFLogic | - | Checks indoor wiring status |
| - | `KKW00128SFLogic.checkPcrsCgWribCpAly` | KKW00128SFLogic | - | Checks PCRS cost reduction agreement |
| - | `KKW00128SFLogic.checkSvcEndYmd` | KKW00128SFLogic | - | Checks service end date |
| - | `KKW00128SFLogic.checkSvcKeiNum` | KKW00128SFLogic | - | Checks service contract count |
| - | `KKW00128SFLogic.checkSvcStaYmd` | KKW00128SFLogic | - | Checks service start date |
| - | `KKW00128SFLogic.checkSvcUseStaKiboYmd` | KKW00128SFLogic | - | Checks service usage start desired date |
| - | `KKW00128SFLogic.chkNetflixPremiumOP` | KKW00128SFLogic | - | Checks Netflix Premium subscription status |
| - | `KKW00128SFLogic.chkSameSpeedCrsChg` | KKW00128SFLogic | - | Checks same-speed cross-change (ANK-3987) |
| - | `KKW00128SFLogic.cfmTbxKKW00128SFBean` | KKW00128SFLogic | - | Compiles textbox beans |
| - | `KKW00128SFLogic.dspTbxKKW00128SFBean` | KKW00128SFLogic | - | Compiles display textbox beans |
| - | `KKW00128SFLogic.mapOnukknkjinfstku` | KKW00128SFLogic | - | Retrieves ONU exchange work information |
| - | `KKW00128SFLogic.updcfmErrCheck` | KKW00128SFLogic | - | Performs pre-service error validation |
| - | `KKW00128SFLogic.setServiceParamater` | KKW00128SFLogic | - | Sets service parameters into paramMap |
| - | `KKW00128SFLogic.getBigDecimal` (inferred) | KKW00128SFLogic | - | Reads BigDecimal values from beans |
| - | `KKW00128SFLogic.getBoolean` (inferred) | KKW00128SFLogic | - | Reads boolean values from beans |
| - | `KKW00128SFLogic.getString` (inferred) | KKW00128SFLogic | - | Reads string values from beans |
| - | `KKW00128SFLogic.getStringArray` (inferred) | KKW00128SFLogic | - | Reads string array values from beans |
| - | `KKW00128SFLogic.setSvckeiInfo` (inferred) | KKW00128SFLogic | - | Sets service contract info |
| - | `KKKWebCommon.setMessageInfo` | JCCWebCommon | - | Sets error/success message info for display |
| - | `KKSV0200_KKSV0200OPDBMapper.getKKSV020013SC` | KKSV0200 | - | Address validation mapper for service contract line details |
| R | `KKSV0202_KKSV0202OPDBMapper` (outputMap contains KKSV020298CC) | KKSV0202 | - | Reads location change correlation result from outputMap |
| R | `KKSV0202_KKSV0202OPDBMapper` (outputMap contains KKSV020292CC) | KKSV0202 | - | Reads VA termination mapping result |
| R | `KKSV0194_KKSV0194OPDBMapper` (outputMap contains KKSV0194137SC) | KKSV0194 | - | Reads device operation reservation result |
| R | `KKSV020031SC` (outputMap) | KKSV020031SC | - | Reads invoice room number count result |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKW00128 | `KKW00128SFArticle.actionExecute` -> `KKW00128SFLogic.actionUpdcfm` | `invokeService [U] Service Contract Update` |
| 2 | Screen:KKW00130 | `KKW00130SFLogic.actionExecute` -> `KKW00128SFLogic.actionUpdcfm` (via screen navigation) | `invokeService [U] Service Contract Update` |
| 3 | Screen:KKW00131 | `KKW00131SFLogic.setMessageInfoActionUpdcfm` -> `KKW00128SFLogic.actionUpdcfm` | `invokeService [U] Service Contract Update` |
| 4 | Screen:KKW04801 | `KKW04801SFLogic.actionUpdCfm` -> `KKW00128SFLogic.actionUpdcfm` (parallel logic) | `invokeService [U] Service Contract Update` |
| 5 | Mapper:KKSV0200 | `KKSV0200_KKSV0200OPDBMapper` -> (references) `KKW00128SFLogic` (imported for const access) | `getKKSV020013SC [R] Address check` |

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Local variable initialization (L772)

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramMap = new HashMap<String, Object>()` |
| 2 | SET | `inputMap = new HashMap<String, Object>()` |
| 3 | SET | `outputMap = new HashMap<String, Object>()` |
| 4 | SET | `svcFormBean = super.getServiceFormBean()` // Get service form bean |

**Block 2** — [SET] Clear map open flag (L781-784)

| # | Type | Code |
|---|------|------|
| 1 | SET | `MAP_OPEN_FLG` key set to `"0"` via `sendMessageString` // Clear map open flag for map display |

**Block 3** — [CALL] ONU exchange info retrieval (L789)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapOnukknkjinfstku(svcFormBean)` // Retrieve ONU exchange work info |

**Block 4** — [IF] Pre-service error check (L792)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `updcfmErrCheck(svcFormBean)` |
| 2 | IF | Result is `true` (error found) |

**Block 4.1** — [ELSE-IF BLOCK] Revert on error (L795-798)

| # | Type | Code |
|---|------|------|
| 1 | SET | `NEXT_SCREEN_ID` set to `SCREEN_ID_KKW00128` |
| 2 | SET | `NEXT_SCREEN_NAME` set to `SCREEN_NAME_KKW00128` |
| 3 | RETURN | `return false` |

**Block 5** — [CALL] Set service parameters (L803)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setServiceParamater(ido_div, paramMap)` // Set service parameter using displacement classification |

**Block 6** — [CALL] Compile list beans (L806)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `cfmListKKW00128SFBean(svcFormBean)` // Compile registration list value beans |

**Block 7** — [CALL] Compile textbox beans (L809)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `cfmTbxKKW00128SFBean(svcFormBean)` // Compile registration textbox value beans |

**Block 8** — [SET] Create parameter bean array (L814-817)

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean = { svcFormBean }` |

**Block 9** — [CALL] Invoke backend service (L842)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `invokeService(paramMap, inputMap, outputMap)` // Core service invocation |

**Block 10** — [CALL] Verify service contract count (L845)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `checkSvcKeiNum(paramBean, outputMap, JKKCommonConst.FUNC_CODE_2)` // FUNC_CODE_2 = Check only |

**Block 11** — [IF] Post-service error check (L851)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `checkError(paramBean, outputMap)` |
| 2 | IF | Result is `true` (error detected after service) |

**Block 11.1** — [ELSE-IF BLOCK] Revert on post-service error (L854-858)

| # | Type | Code |
|---|------|------|
| 1 | SET | `NEXT_SCREEN_ID` set to `SCREEN_ID_KKW00128` |
| 2 | SET | `NEXT_SCREEN_NAME` set to `SCREEN_NAME_KKW00128` |
| 3 | RETURN | `return false` |

**Block 12** — [IF] Location change correlation check (ido_div=00005 or 00008) (L864-875)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | Get `KKSV020298CC` from `outputMap` |
| 2 | IF | `kksv020298ccHash` contains `err_cd` and `err_cd == "1"` // Location change reservation exists |

**Block 12.1** — [IF BLOCK] Location change error (L870-874)

| # | Type | Code |
|---|------|------|
| 1 | SET | Message: `"Location change/registration (continuation) + Reserved + Service contract plan price change"` |
| 2 | RETURN | `return false` |

**Block 13** — [CALL] Check duplicate DSL number (L881)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `checkDbleMskmDslNo(paramBean, outputMap)` // Masked DSL number duplication check |

**Block 14** — [IF] Same-speed cross-change check (ido_div=00009) (L888-896)

| # | Type | Code |
|---|------|------|
| 1 | IF | `ido_div == JKKCommonConst.IDO_DIV_VALUE_00009` (Service Change) |
| 2 | EXEC | `chkSameSpeedCrsChg(svcFormBean)` |
| 3 | IF | Result is `true` (same speed cross-change detected) |

**Block 14.1** — [IF BLOCK] Same-speed message (L893-894)

| # | Type | Code |
|---|------|------|
| 1 | SET | Display `EKBF520__I` message // Business fee "None" notice |

**Block 15** — [IF] Netflix Premium check (ido_div=00009) (L902-911)

| # | Type | Code |
|---|------|------|
| 1 | IF | `ido_div == JKKCommonConst.IDO_DIV_VALUE_00009` (Service Change) |
| 2 | EXEC | `chkNetflixPremiumOP(svcFormBean)` |
| 3 | IF | Result is `true` (Netflix Premium already registered) |

**Block 15.1** — [IF BLOCK] Netflix Premium error (L907-910)

| # | Type | Code |
|---|------|------|
| 1 | SET | Message: `"Netflix Premium + Already registered + Service change"` |
| 2 | RETURN | `return false` |

**Block 16** — [IF] Recovery mode processing (ido_div=00004) (L913-975)

| # | Type | Code |
|---|------|------|
| 1 | IF | `ido_div == JKKCommonConst.IDO_DIV_VALUE_00004` (Recovery) |
| 2 | EXEC | Get `idoRsnCodeArray` from `HKTGI_IDO_RSN_CD` |
| 3 | IF | `idoRsnCodeArray != null && length > 0` |
| 4 | IF | `idoRsnCD == JKKCommonConst.IDO_RSN_CD_VALUE_T6` // Recovery reason code T6 |

**Block 16.1** — [IF BLOCK] Recovery fee message (L928)

| # | Type | Code |
|---|------|------|
| 1 | SET | Display `EKBF330__I` message // Recovery business fee notice |

**Block 16.2** — [IF] Billing warning flag (L933-940)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | Get `valCdKkokuOputFlg` from bean |
| 2 | IF | `valCdKkokuOputFlg == JKKCommonConst.FLG_ON` // Billing warning output flag is "1" |

**Block 16.2.1** — [IF BLOCK] Billing warning (L937-938)

| # | Type | Code |
|---|------|------|
| 1 | SET | Display `EKBB100--I` message // Billing warning output |

**Block 16.3** — [IF] Device operation reservation check (ANK-4287) (L944-954)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | Get `KKSV0194137SC` from `outputMap` |
| 2 | IF | `kikiOpRsvFlg == "1"` // Device operation (router) reservation exists |

**Block 16.3.1** — [IF BLOCK] Device reservation message (L950-951)

| # | Type | Code |
|---|------|------|
| 1 | SET | Display `EKBF760__I` message // Router function reservation notice |

**Block 17** — [IF] Invoice room number + address check (ido_div=00032 or 00033) (L963-1005)

| # | Type | Code |
|---|------|------|
| 1 | IF | `ido_div == JKKCommonConst.IDO_DIV_VALUE_00032` (Info Correction) OR `00033` (Reg Correction) |
| 2 | EXEC | Get `KKSV020031SC` from `outputMap` |
| 3 | IF | `EKK0251B505CBSMsg1List` exists and `cnt != 0` // Room number duplicate found |

**Block 17.1** — [IF BLOCK] Room number duplicate error (L974-980)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | Get `seikyusYoRmNo` from bean |
| 2 | SET | Display `EKBA550__Q` with room number // Invoice room number duplicate error |

**Block 17.2** — [CALL] Address check mapper (L987-994)

| # | Type | Code |
|---|------|------|
| 1 | SET | `mapper = new KKSV0200_KKSV0200OPDBMapper()` |
| 2 | CALL | `mapper.getKKSV020013SC(paramBean, outputMap)` // Address lower-level check |
| 3 | EXEC | Get `kisn_ad_chk_flg` from bean |
| 4 | IF | `kisn_ad_chk_flg != null && !""` |

**Block 17.2.1** — [IF BLOCK] Address warning (L999-1003)

| # | Type | Code |
|---|------|------|
| 1 | SET | Display `EKBD290__Q` with `"Usage place address"` // Usage place address error |

**Block 18** — [CALL] Core validation checks (L1009-1036)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `checkChokiWrib()` // Long-term discount check |
| 2 | CALL | `checkKapKei()` // Indoor wiring check |
| 3 | CALL | `checkPcrsCgWribCpAly(paramBean, outputMap)` // PCRS cost reduction agreement check |
| 4 | CALL | `checkAdchgRsv(paramBean, outputMap, JKKCommonConst.FUNC_CODE_2)` // Address change reservation check |
| 5 | CALL | `checkSvcStaYmd()` // Service start date check |
| 6 | CALL | `checkSvcUseStaKiboYmd()` // Service start desired date check |
| 7 | CALL | `checkSvcEndYmd()` // Service end date check |
| 8 | CALL | `checkDslPreExec(outputMap, ido_div, JKKCommonConst.FUNC_CODE_2)` // Pre-execution cancellation check |

**Block 19** — [CALL] Display bean compilation (L1041)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `dspTbxKKW00128SFBean(svcFormBean)` // Compile display value beans |

**Block 20** — [SET] Set next screen header (L1044-1048)

| # | Type | Code |
|---|------|------|
| 1 | SET | `commonBean = super.getCommonInfoBean()` |
| 2 | SET | `NEXT_SCREEN_ID` set to `SCREEN_ID_KKW00134` |
| 3 | SET | `NEXT_SCREEN_NAME` set to `SCREEN_NAME_KKW00134` |

**Block 21** — [CALL] Set service contract header (L1051)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JKKWebCommon.setSvckeiInfo(this, svc_kei_dataMap)` |

**Block 22** — [IF] Service status post-check (L1056-1069)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | Get `svc_kei_Info` from `paramBean[0].getDataBeanArray(EKK0081A010CBSMSG1LIST)` |
| 2 | EXEC | Get `svc_kei_stat_h` from first data bean |
| 3 | IF | `(svc_kei_stat_h == "100" or 00005 or 00008)` |
| 4 | IF | `"100" compareTo svc_kei_stat_h > 0` // Service contract status before activation |

**Block 22.1** — [IF BLOCK] Pre-activation warning (L1064-1065)

| # | Type | Code |
|---|------|------|
| 1 | SET | Display `EKBD670--I` message // Service before activation notice |

**Block 23** — [IF] VA (multifunction router) termination mapping (L1072-1094)

| # | Type | Code |
|---|------|------|
| 1 | IF | `outputMap` contains `KKSV020292CC` |
| 2 | EXEC | Get `trgt_data_list` from `kikiopMap` |
| 3 | FOR | Iterate `r` from 0 to `kikiopList.size()` |
| 4 | IF | `VA_FLG == "1"` // VA (multifunction router) termination flag set |

**Block 23.1** — [IF BLOCK] VA termination message (L1087-1089)

| # | Type | Code |
|---|------|------|
| 1 | SET | Message: `"Service change + Multifunction router exchange + VA termination"` |
| 2 | EXEC | `break` loop |

**Block 24** — [SET] Display success message (L1099-1102)

| # | Type | Code |
|---|------|------|
| 1 | SET | `str = { "Update" }` |
| 2 | SET | Display `EKB0370__I` with `"Update"` // General success message |

**Block 25** — [IF] Additional messages for specific modes (L1104-1110)

| # | Type | Code |
|---|------|------|
| 1 | IF | `ido_div == "00004"` (Recovery) OR `"00005"` (Termination) OR `"00008"` (Cancel) OR `"00009"` (Service Change) |

**Block 25.1** — [IF BLOCK] Additional message (L1107-1108)

| # | Type | Code |
|---|------|------|
| 1 | SET | Display `EKBA350__I` message |

**Block 26** — [IF] Service info correction — Mansion/Meson type address check (L1113-1141)

| # | Type | Code |
|---|------|------|
| 1 | IF | `ido_div == JKKCommonConst.IDO_DIV_VALUE_00033` (Service Info Correction) |
| 2 | EXEC | Get `svcFlg` from bean |
| 3 | IF | `svcFlg == "2"` (Mansion) OR `"3"` (Meson) OR `"4"` (Mansion/Meson) |
| 4 | EXEC | Get `useplaceAdrttm` (building name) and `oyaUseplaceAdrttm` (parent mansion name) |
| 5 | IF | Both names are non-null and non-empty |
| 6 | IF | `useplaceAdrttm != oyaUseplaceAdrttm` (names don't match) |

**Block 26.1** — [IF BLOCK] Name mismatch confirmation (L1136-1138)

| # | Type | Code |
|---|------|------|
| 1 | SET | Message: `"Building name: {useplaceAdrttm}, Parent mansion name: {oyaUseplaceAdrttm}"` |
| 2 | SET | Display `EKB7860__Q` // Confirmation message for address mismatch |

**Block 27** — [IF] Service change — Email address error (ido_div=00009) (L1146-1165)

| # | Type | Code |
|---|------|------|
| 1 | IF | `ido_div == JKKCommonConst.IDO_DIV_VALUE_00009` (Service Change) |
| 2 | IF | `outputMap` contains `KKSV020278CC` |
| 3 | IF | `kksv020278ccStr == "WA"` (Warning) |

**Block 27.1** — [IF BLOCK] Email notification failure (L1153-1155)

| # | Type | Code |
|---|------|------|
| 1 | SET | Message: `"Active email address + Does not exist, cannot send notification + Service change"` |
| 2 | SET | Display `EKBA880__Q` |

**Block 28** — [IF] Service change — Auto exchange CC error (ANK-3412) (L1163-1178)

| # | Type | Code |
|---|------|------|
| 1 | IF | `ido_div == JKKCommonConst.IDO_DIV_VALUE_00009` |
| 2 | IF | `outputMap` contains `KKSV020296CC` |
| 3 | IF | `err_cd == "1"` // Auto exchange not possible |

**Block 28.1** — [IF BLOCK] Exchange error + return (L1169-1175)

| # | Type | Code |
|---|------|------|
| 1 | SET | Display `EKBF280-KW` // Auto exchange error |
| 2 | RETURN | `return false` |

**Block 29** — [IF] HGW exchange prohibition flag check (ANK-4516) (L1182-1206)

| # | Type | Code |
|---|------|------|
| 1 | IF | `ido_div == JKKCommonConst.IDO_DIV_VALUE_00032` OR `00033` |
| 2 | EXEC | Get `svc_kei_kaisen_ucwk_Info` from `getDataBeanArray(EKK0241B001CBSMSG1LIST)` |
| 3 | EXEC | Get `hgw_kkn_ffg` (HGW exchange prohibition flag) from bean |
| 4 | EXEC | Get `disp_hgw_kkn_flg` (display flag) from bean |
| 5 | IF | `"1" equals hgw_kkn_ffg` != `disp_hgw_kkn_flg` AND `disp_hgw_kkn_flg` is true |

**Block 29.1** — [IF BLOCK] HGW prohibition warning (L1202-1203)

| # | Type | Code |
|---|------|------|
| 1 | SET | Display `EKBF920--Q` // HGW exchange prohibited flag inconsistency |

**Block 30** — [CALL] Log dump + return (L1209-1211)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JSYwebLog.println(JSYwebLog.DataBean_Dump, getClass(), dumpDatabean(), null, null, null)` |
| 2 | RETURN | `return true` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `ido_div` | Field | Displacement classification — determines the type of operation: "00004"=Recovery, "00005"=Termination, "00008"=Cancellation, "00009"=Service Change, "00032"/"00033"=Information/Registration Correction |
| `svc_kei_no` | Field | Service contract number — unique identifier for a service contract in the K-Opticom system |
| `svc_kei_ucwk_no` | Field | Service detail work number — internal tracking ID for service contract line items |
| `svc_kei_stat` | Field | Service contract status — indicates the lifecycle stage of a service contract (e.g., 100=Active, <100=Pre-activation) |
| `FUNC_CODE_2` | Constant | Function code value "2" — means "Check only" mode for validation operations |
| `FLG_ON` | Constant | Flag value representing "on" / enabled state (typically "1") |
| `EKK0081A010CBSMSG1LIST` | Constant | Data bean array key for service contract information list |
| `EKK0241B001CBSMSG1LIST` | Constant | Data bean array key for service contract line details (HGW exchange info) |
| `PNLTY_HASSEI_DIV_LIST` | Constant | Penalty generation classification data bean array key |
| `CSCH_RSV_FLG` | Constant | Service change reservation flag — indicates if a service change is pending/reserved |
| `KOJIAK_SBT_CD` | Constant | Construction project type code — classifies the type of construction work |
| `KOJIAK_STAT` | Constant | Construction project status — tracks progress of construction work |
| `MSKMSHO_DTL_NO` | Constant | Application form detail number — tracking ID for application forms |
| `VAL_CD_KKOKU_OPUT_FLG` | Constant | Validation code full output flag — controls whether billing warnings are displayed |
| `SEIKYUS_YO_RM_NO` | Field | Invoice room number — room number used for billing invoices |
| `HGW_KKN_FFG` | Field | HGW (Home Gateway) exchange prohibition flag — indicates whether HGW device exchange is prohibited |
| `DSp_HGW_KKN_FFG` | Field | Display HGW exchange prohibition flag — UI flag for showing HGW exchange status |
| `VA_FLG` | Field | VA (Value-Added / Multifunction Router) flag — indicates VA device termination status |
| T6 | Constant | Recovery reason code — specific reason code for service recovery operations |
| ONU | Acronym | Optical Network Unit — fiber optic termination device at customer premises |
| HGW | Acronym | Home Gateway — residential gateway device for broadband service |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband service |
| PCRS | Acronym | Price Reduction System — discount/agreement system for service pricing |
| Netflix Premium | Business term | Netflix Premium streaming service — offered as an add-on to K-Opticom internet plans |
| 10GE-PON | Business term | 10-Gigabit Ethernet Passive Optical Network — high-speed fiber access technology |
| eo Hikari Net | Business term | K-Opticom's fiber optic internet service brand |
| CSCH | Acronym | Service Change — abbreviation for service plan/modification operations |
| DSL | Acronym | Digital Subscriber Line — broadband over copper line technology |
| VA | Acronym | Value-Added device — typically refers to multifunction routers or set-top boxes provided by K-Opticom |
| KKSV0200 | Screen | Service contract update (eo Hikari) screen — main contract update screen |
| KKW00128 | Screen | Service contract update confirmation screen — the confirmation screen where actionUpdcfm is triggered |
| KKW00134 | Screen | Shared service contract screen — the next screen after successful update |
