# Business Logic — KKW00128SFLogic.actionFix() [312 LOC]

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

## 1. Role

### KKW00128SFLogic.actionFix()

This method is the "Confirm" (確定) button handler for the **Service Contract Update (eo Light Net)** screen. It is the final confirmation step where the customer reviews all proposed service contract changes before they are committed. The method performs validation guards, invokes backend service components to process the updates, and then handles post-processing branching based on the **operation division code** (`ido_div`): course change (00009), termination (00005), cancellation (00008), or recovery (00004).

The method handles four distinct service operation categories: **Course Change** (switching between service packages — e.g., moving between optical and cable, adding/removing bundles like Netflix), **Termination** (service cancellation), **Cancellation** (subscription cancellation, distinct from full service termination), and **Recovery** (restoring a previously cancelled/opshion-suspended service). Each category triggers specific post-service-error messages and DSL contract-consent checks.

The method implements a **gateway routing pattern** — pre-service validation blocks reject invalid requests early (returning false) based on operation-type-specific business rules (e.g., preventing course changes during ONU exchange work, preventing terminations when pre-opening is in progress). It then delegates the actual data updates to `invokeService()`, and finally applies operation-type-specific post-processing (discount CC auto-application checks, mail-sending error flags, recovery period validations, DSL contract-consent messaging).

This is the primary entry point for committing service contract modifications from the eo Light Net customer-facing confirmation screen. It is called after the user has reviewed their changes on a preceding confirmation screen and clicked the "Confirm" button to finalize registration.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["actionFix()"])

    START --> SETUP["Setup paramMap, inputMap, outputMap"]
    SETUP --> GETBEAN["Get service form bean"]
    GETBEAN --> CFMLIST["cfmListKKW00128SFBean() - Edit list box values"]
    CFMLIST --> CFMTBX["cfmTbxKKW00128SFBean() - Edit text box values"]
    CFMTBX --> MAPDBUPD["mapForDbUpd - Set FUNC_CODE_1 for confirm registration"]

    MAPDBUPD --> COURSECHK{ido_div == 00009? (Course change)}

    COURSECHK -->|Yes| COURSECHK1["Get kojiakSbtCd, kojiakStat"]
    COURSECHK1 --> ONUCHK{"ONU exchange 015 AND pre-opening 140-190?"}
    ONUCHK -->|Yes| COURSE_ERR["Display error: ONU exchange in progress / Course change is registration"]
    COURSE_ERR --> COURSE_RET1["Return false"]
    ONUCHK -->|No| COMMON_FLOW

    COURSECHK -->|No| COMMON_FLOW
    COMMON_FLOW --> CANCELCHK{ido_div == 00005 OR 00008? (Cancel/Termination)}

    CANCELCHK -->|Yes| SVCSTAT["Get service contract info and status"]
    SVCSTAT --> PREOPENCHK{svcKeiStat < 100? (Pre-opening)}
    PREOPENCHK -->|Yes| PRECHK["Get kojiakSbtCd, kojiakStat"]
    PRECHK --> ONUCHK2{"ONU exchange 015 AND pre-opening 140-190?"}
    ONUCHK2 -->|Yes| CANCEL_ERR["Display error: ONU exchange in progress / Cancel or termination"]
    CANCEL_ERR --> CANCEL_RET1["Return false"]
    ONUCHK2 -->|No| SVC_FLOW
    PREOPENCHK -->|No| SVC_FLOW

    CANCELCHK -->|No| SVC_FLOW
    SVC_FLOW["setServiceParameter(ido_div, paramMap)"] --> INVOKE["invokeService(paramMap, inputMap, outputMap)"]

    INVOKE --> ERRCHK{checkError?}
    ERRCHK -->|Error found| ERR_ROUTE["Set next screen to KKW00134"]
    ERR_ROUTE --> ERR_RET1["Return false"]
    ERRCHK -->|No error| AXCHECK["executeAxMRnkSjisho - AX related info"]

    AXCHECK --> AX_FAIL{executeAxMRnkSjisho failed?}
    AX_FAIL -->|Yes| AX_RET["Log DataBean dump, Return false"]
    AX_FAIL -->|No| DSPBEAN["dspTbxKKW00128SFBean - Set display values"]

    DSPBEAN --> SETNEXT["Set NEXT_SCREEN_ID to KKW00140"]
    SETNEXT --> SETSVCINFO["JKKWebCommon.setSvckeiInfo(this, svc_kei_dataMap)"]
    SETSVCINFO --> SUCCESS_MSG["Display message: Update (EKB4390--I)"]

    SUCCESS_MSG --> ISDOCOURSE{ido_div == 00009? (Course change)}

    ISDOCOURSE -->|Yes| DISCCHECK{"outputMap has KKSV020231CC?"}
    DISCCHECK -->|Yes| TAKNCHK{"taknKikiList has kksv0202flg?"}
    TAKNCHK -->|Yes| DISC_ERR["Display auto-exchange error (EKB9350--I)"]
    DISC_ERR --> NETCOURSE
    TAKNCHK -->|No| NETCOURSE

    NETCOURSE{"outputMap has KKSV020278CC?"} -->|Yes| NETERRCHK{is String or HashMap?}
    NETERRCHK -->|String == WA| NET_ERR["Display mail send error (EKB8090--I)"]
    NET_ERR --> NETCOURSE2
    NETERRCHK -->|HashMap| MAILCHK{mail_send_err_flg == 1?}
    MAILCHK -->|Yes| NET_ERR2["Display mail send error (EKB8090--I)"]
    MAILCHK -->|No| NETCOURSE2
    NETCOURSE2 -->|No| WRISECHK

    ISDOCOURSE -->|No| WRISECHK{isNeedWrisvcMsg(ido_div)?}

    WRISECHK -->|Yes| MSGPROCESS["Get msgList, setSessionMessage()"]
    MSGPROCESS --> OMRECOVER

    WRISECHK -->|No| OMRECOVER{"ido_div == 00004? (Recovery)"}

    OMRECOVER -->|Yes| KANOCHK{"KKSV0194124SC has kaifuku_kano_ymd_err == 1?"}
    KANOCHK -->|Yes| KANO_ERR["Display recovery period error (EKB3880--I)"]
    KANO_ERR --> KIKISKIP
    KANOCHK -->|No| KIKISKIP
    KIKISKIP{"KKSV0194128SC has kiki_connect_skip_info == 1?"} -->|Yes| SKIP_ERR["Display connection skip info (EKBE197--I)"]
    SKIP_ERR --> OM2019

    OMRECOVER -->|No| OM2019{"ido_div == 00005? (Termination)"}

    OM2019 -->|Yes| DSLCHK1{"kiki_rntai_kei_kkop_svc_dsl_cnsl_Flg == 1?"}
    DSLCHK1 -->|Yes| TERM_ERR["Display termination DSL error (EKBF390--I)"]
    DSLCHK1 -->|No| CANCELCHK2
    TERM_ERR --> CANCELCHK2

    CANCELCHK2{"ido_div == 00008? (Cancel)"} -->|Yes| DSLCHK2{"kiki_rntai_kei_kkop_svc_dsl_cnsl_Flg == 1?"}
    DSLCHK2 -->|Yes| CANCEL_ERR2["Display cancel DSL error (EKBF390--I)"]
    DSLCHK2 -->|No| FINAL_CHK
    CANCEL_ERR2 --> FINAL_CHK

    FINAL_CHK["checkSvcKeiNum()"] --> CHECKAD["checkAdchgRsv()"]
    CHECKAD --> LOGDB["Log DataBean dump"]
    LOGDB --> END_TRUE["Return true"]

    END_TRUE(["Return true"])
    AX_RET(["Return false"])
    ERR_RET1(["Return false"])
    CANCEL_RET1(["Return false"])
    COURSE_RET1(["Return false"])
```

### Pre-Service Validation Blocks (Gate Conditions)

| Condition | Branch Label | Business Meaning |
|-----------|-------------|------------------|
| `ido_div == 00009` | Course change guard | When a course change is being confirmed, reject if ONU exchange work is in progress and the project status is pre-opening (140-190) |
| `ido_div == 00005` or `00008` | Cancel/Termination guard | When termination or cancellation is confirmed, check if the service contract is still pre-opening (status < 100); if so and ONU exchange is in progress, reject |
| `checkError()` returns true | Service error detected | If the service invocation returned errors, route to error screen KKW00134 |
| `executeAxMRnkSjisho()` returns false | AX related info failure | If AX-related processing fails, log and abort |

### Post-Service Branches (ido_div Routing)

| ido_div | Branch Label | Post-Service Processing |
|---------|-------------|----------------------|
| `00009` | Course change | Check discount CC auto-application results (KKSV020231CC), auto-exchange flags (kksv0202flg), network course change mail errors (KKSV020278CC) |
| `00005` | Termination | Check DSL contract-consent flag for device bundle termination |
| `00008` | Cancellation | Check DSL contract-consent flag for device bundle cancellation |
| `00004` | Recovery | Check recovery period validity (kaifuku_kano_ymd_err) and device connection skip (kiki_connect_skip_info) |
| Other values | Service message routing | If `isNeedWrisvcMsg(ido_div)` is true, retrieve and set service messages from outputMap |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This method takes no method parameters. All input data is obtained from the service form bean and instance fields. |
| - | (instance) `ido_div` | String | **Operation division code** — classifies the type of service contract operation. Valid values: `00004` (Recovery), `00005` (Termination), `00008` (Cancellation), `00009` (Course Change). Drives all conditional branches in this method. |
| - | (instance) `sysid` | String | **System ID** — the system identifier used in AX-related processing. Passed to `executeAxMRnkSjisho()`. |
| - | (instance) `svc_kei_dataMap` | HashMap | **Service contract common header map** — a HashMap storing service contract header data. Updated via `JKKWebCommon.setSvckeiInfo()` to propagate the updated contract information to the next screen. |
| - | (instance) `popup_mode` | String | **Pop-up mode** — indicates whether the screen is displayed in pop-up mode. Read from session. |
| - | (instance) `cust_nm` | String | **Customer name** — name of the customer. Read from session. |
| - | (instance) `re_flg` | boolean | **Re-display flag** — indicates if data should be re-displayed. Read from session. |

## 4. CRUD Operations / Called Services / Internal Methods

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| CALL | `JCCBatCommon.invokeService` | (delegated) | - | Delegates to `JCCBatCommon.invokeService()` which routes to the actual SC/CBS based on `ido_div` in `paramMap` |
| CALL | `OneStopDataBeanAccessArray.getDataBean` | - | - | Reads service contract info from form bean via `EKK0081A010CBSMSG1LIST` key |
| CALL | `OneStopDataBeanAccess.getDataBeanArray` | - | - | Reads contract agreement details array from form bean |
| CALL | `OneStopDataBeanAccess.sendMessageString` | - | - | Reads form bean values: `KOJIAK_SBT_CD` (project type code), `KOJIAK_STAT` (project status), service contract status |
| CALL | `KKW00128SFLogic.cfmListKKW00128SFBean` | - | - | Edits list box data bean values for registration confirmation |
| CALL | `KKW00128SFLogic.cfmTbxKKW00128SFBean` | - | - | Edits text box data bean values for registration confirmation |
| CALL | `KKW00128SFLogic.mapForDbUpd` | - | - | Maps form bean data to input map with function code `FUNC_CODE_1` for confirm registration |
| CALL | `KKW00128SFLogic.setServiceParamater` | - | - | Sets service parameters from `ido_div` into `paramMap` for service invocation |
| CALL | `KKW00128SFLogic.checkError` | - | - | Checks if service invocation returned error conditions |
| CALL | `KKW00128SFLogic.isNeedWrisvcMsg` | - | - | Checks whether service message retrieval is needed for the given `ido_div` |
| CALL | `KKW00128SFLogic.getMsgList` | - | - | Retrieves service message list map based on `ido_div` and `outputMap` |
| CALL | `KKW00128SFLogic.checkSvcKeiNum` | - | - | Validates service contract number after processing |
| CALL | `KKW00128SFLogic.checkAdchgRsv` | - | - | Checks address change reservations (related to VA relocation equipment registration) |
| CALL | `JKKSvkeiUpdScreenUtil.executeAxMRnkSjisho` | - | - | Processes AX (AXIS/automation exchange) related information; returns false on failure |
| CALL | `JKKSetSessionMessage.setSessionMessage` | - | - | Sets messages into session for display (recovery message handling) |
| CALL | `JKKWebCommon.setSvckeiInfo` | - | - | Sets service contract common information into session for next screen (KKW00140) |
| CALL | `JCCWebCommon.setMessageInfo` | - | - | Sets informational/error messages to display for various post-service checks |
| - | `KKW00128SFLogic.dspTbxKKW00128SFBean` | - | - | Edits text box data bean values for display after successful update |
| - | `KKW00128SFLogic.dumpDatabean` | - | - | Dumps current DataBean state for logging |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKW00128SF (Service Contract Update eo Light Net) | Confirmation screen button "Fix" -> `KKW00128SFLogic.actionFix` | `invokeService` [C/R/U/D] Multiple service entities based on ido_div |
| 2 | Screen:KKW00128SF (via KKSV0059 mapping) | KKSV0059 (reference pull-down SCs) -> `KKW00128SFLogic` -> `actionFix` | SC pull-downs: KKSV005912SC, KKSV005913SC, etc. |
| 3 | Screen:KKW00128SF (via KKSV0194 mapping) | KKSV0194 (recovery) -> `KKW00128SFLogic.actionFix` | `KKSV0194124SC` [R] kaifuku_kano_ymd_err check, `KKSV0194128SC` [R] kiki_connect_skip_info check |
| 4 | Screen:KKW00128SF (via KKSV0195 mapping) | KKSV0195 (termination) -> `KKW00128SFLogic.actionFix` | `KKSV019501CC` [R] DSL contract-consent flag check |
| 5 | Screen:KKW00128SF (via KKSV0196 mapping) | KKSV0196 (cancellation) -> `KKW00128SFLogic.actionFix` | `trgt_data` [R] DSL contract-consent flag check |
| 6 | Screen:KKW00128SF (via KKSV0202 mapping) | KKSV0202 (course change) -> `KKW00128SFLogic.actionFix` | `KKSV020231CC` [R] wholesale CC map, `KKSV020278CC` [R] net course change mail |
| 7 | Screen:KKW00128SF (via KKSV0200 mapping) | KKSV0200 -> `KKW00128SFLogic.actionFix` | OPDB mapper references for data mapping |
| 8 | Screen:KKW00128SF (via KKSV0203+) | Various OPDB mappers | Reference SCs for pull-downs and data retrieval |

**Call chain entry point:** The method is invoked when the user clicks the "Confirm" (確定) button on the KKW00128SF registration confirmation screen. The screen is launched for service contract updates covering FTTH, Mail, ENUM, and other eo Light Net services. The `ido_div` instance field is set from the screen's operation context before this method is called.

## 6. Per-Branch Detail Blocks

### Block 1 — SETUP (L1313)

> Initialize HashMaps for parameter passing and service invocation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramMap = new HashMap<String, Object>()` // Parameter map [L1318] |
| 2 | SET | `inputMap = new HashMap<String, Object>()` // Input map [L1319] |
| 3 | SET | `outputMap = new HashMap<String, Object>()` // Output map [L1320] |
| 4 | CALL | `svcFormBean = super.getServiceFormBean()` // Get service form bean access [L1316] |
| 5 | SET | `paramBean = new X31SDataBeanAccess[]{svcFormBean}` // Param bean array [L1323-1326] |

### Block 2 — CONFIRMATION DATA EDITING (L1329-L1332)

> Edit bean values for registration confirmation display. Prepares list box and text box data for the confirm screen.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `cfmListKKW00128SFBean(svcFormBean)` // Edit list box values for registration [L1329] |
| 2 | CALL | `cfmTbxKKW00128SFBean(svcFormBean)` // Edit text box values for registration [L1332] |

### Block 3 — MAP FOR DB UPDATE (L1336)

> Set the function code for confirm registration. This marks the operation as a final confirm (FUNC_CODE_1).

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapForDbUpd(paramBean, inputMap, JKKCommonConst.FUNC_CODE_1)` // Set confirm registration mode [L1336] |

### Block 4 — COURSE CHANGE PRE-VALIDATION (IF) `(ido_div == 00009)` (L1339)

> When confirming a course change, prevent submission if the project is an ONU exchange in pre-opening status. This guard prevents data inconsistency during active ONU equipment swap operations.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JKKCommonConst.IDO_DIV_VALUE_00009.equals(ido_div)` // Course change check [L1339] |
| 2 | SET | `kojiakSbtCd = svcFormBean.sendMessageString(KKW00128SFConst.KOJIAK_SBT_CD, X31CWebConst.DATABEAN_GET_VALUE)` // Get project type code [L1344] |
| 3 | SET | `kojiakStat = svcFormBean.sendMessageString(KKW00128SFConst.KOJIAK_STAT, X31CWebConst.DATABEAN_GET_VALUE)` // Get project status [L1347] |

#### Block 4.1 — ONU EXCHANGE PRE-OPENING CHECK (IF) (L1351)

> If the project type is ONU exchange (015) AND the project status is in pre-opening range (140-190), reject the course change registration.

| # | Type | Code |
|---|------|------|
| 1 | IF | `kojiakSbtCd != null && "015".equals(kojiakSbtCd) && kojiakStat != null && "140".compareTo(kojiakStat) <= 0 && "190".compareTo(kojiakStat) >= 0` // ONU exchange 015, status 140-190 [L1351] |
| 2 | SET | `errMsg = {"ONU exchange in progress", "Course change is registration"}` // IT1-2023-0000062 modified message [L1355] |
| 3 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB5440__JW, errMsg)` // Set error message [L1356] |
| 4 | RETURN | `return false` // Abort — cannot change course during ONU exchange pre-opening [L1357] |

### Block 5 — CANCEL/TERMINATION PRE-VALIDATION (IF) `(00005 OR 00008)` (L1363)

> When confirming termination (00005) or cancellation (00008), check if the service contract is still in pre-opening state. If pre-opening and ONU exchange is in progress, reject.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JKKCommonConst.IDO_DIV_VALUE_00005.equals(ido_div) \|\| JKKCommonConst.IDO_DIV_VALUE_00008.equals(ido_div)` // Termination or cancellation [L1363] |
| 2 | SET | `svc_kei_Info = svcFormBean.getDataBeanArray(KKW00128SFConst.EKK0081A010CBSMSG1LIST)` // Get service contract agreement details [L1366] |
| 3 | SET | `svc_kei_subbean = svc_kei_Info.getDataBean(0)` // Get first row [L1367] |
| 4 | SET | `svcKeiStat = svc_kei_subbean.sendMessageString(KKW00128SFConst.SVC_KEI_STAT_03, X31CWebConst.DATABEAN_GET_VALUE)` // Get service contract status [L1369-1370] |

#### Block 5.1 — SERVICE CONTRACT PRE-OPENING CHECK (IF) `(svcKeiStat < 100)` (L1373)

> If the service contract status is less than 100 (pre-opening: service not yet live), check for ONU exchange in progress.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JKKCommonConst.SVC_KEI_STAT_100.compareTo(svcKeiStat) > 0` // Pre-opening: status < 100 [L1373] |
| 2 | SET | `kojiakSbtCd = svcFormBean.sendMessageString(KKW00128SFConst.KOJIAK_SBT_CD, X31CWebConst.DATABEAN_GET_VALUE)` // Get project type code [L1376] |
| 3 | SET | `kojiakStat = svcFormBean.sendMessageString(KKW00128SFConst.KOJIAK_STAT, X31CWebConst.DATABEAN_GET_VALUE)` // Get project status [L1377] |

##### Block 5.1.1 — ONU EXCHANGE GUARD (IF) (L1383)

> Same ONU exchange guard as Block 4.1. If project type is ONU exchange (015) and status is pre-opening (140-190), reject.

| # | Type | Code |
|---|------|------|
| 1 | IF | `kojiakSbtCd != null && "015".equals(kojiakSbtCd) && kojiakStat != null && "140".compareTo(kojiakStat) <= 0 && "190".compareTo(kojiakStat) >= 0` // ONU exchange 015, status 140-190 [L1383] |
| 2 | SET | `errMsg = {"ONU exchange in progress", "Cancel or termination"}` [L1387] |
| 3 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB5440__JW, errMsg)` [L1388] |
| 4 | RETURN | `return false` [L1389] |

### Block 6 — SERVICE PARAMETER SETTING AND INVOCATION (L1414-L1417)

> Set the service invocation parameter and execute the backend service. The `ido_div` value determines which SC/CBS chain is invoked for the actual data update.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setServiceParamater(ido_div, paramMap)` // Set service parameters from ido_div [L1414] |
| 2 | CALL | `invokeService(paramMap, inputMap, outputMap)` // Invoke backend service chain [L1417] |

### Block 7 — SERVICE ERROR CHECK (IF) (L1420)

> Check if the service invocation resulted in errors. If errors were found, route to the error screen (KKW00134).

| # | Type | Code |
|---|------|------|
| 1 | IF | `checkError(paramBean, outputMap)` // Check for service errors [L1420] |
| 2 | SET | `svcFormBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_ID, X31CWebConst.DATABEAN_SET_VALUE, JKKScreenConst.SCREEN_ID_KKW00134)` // Set next screen to error screen [L1423] |
| 3 | SET | `svcFormBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_NAME, X31CWebConst.DATABEAN_SET_VALUE, JKKScreenConst.SCREEN_NAME_KKW00134)` // Set next screen name [L1424] |
| 4 | RETURN | `return false` // Abort — error screen navigation [L1425] |

### Block 8 — AX RELATED INFO CHECK (IF) (L1429)

> Execute AX (automation exchange) related info processing. If it fails, log the DataBean state and abort.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!JKKSvkeiUpdScreenUtil.executeAxMRnkSjisho(ido_div, sysid, this)` // AX check failed [L1429] |
| 2 | CALL | `JSYwebLog.println(JSYwebLog.DataBean_Dump, getClass(), dumpDatabean(), null, null, null)` // Log DataBean state [L1432] |
| 3 | RETURN | `return false` // Abort — AX processing failed [L1434] |

### Block 9 — POST-SUCCESS PROCESSING (L1438)

> After successful service invocation and all validation passes: set display values, configure next screen, set service contract info, and display success message.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `dspTbxKKW00128SFBean(svcFormBean)` // Set display values for next screen [L1441] |
| 2 | SET | `commonBean = super.getCommonInfoBean()` // Get common info bean [L1444] |
| 3 | SET | `commonBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_ID, ..., JKKScreenConst.SCREEN_ID_KKW00140)` // Set next screen to KKW00140 [L1445-1446] |
| 4 | SET | `commonBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_NAME, ..., JKKScreenConst.SCREEN_NAME_KKW00140)` // Set next screen name [L1447-1448] |
| 5 | CALL | `JKKWebCommon.setSvckeiInfo(this, svc_kei_dataMap)` // Set service contract common info [L1451] |
| 6 | SET | `str = {"Update"}` // Success message label [L1454-1456] |
| 7 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB4390__I, str)` // Display "Update" message [L1457] |

### Block 10 — COURSE CHANGE POST-PROCESSING (IF) `(ido_div == 00009)` (L1460)

> After successful course change registration, check discount CC auto-application and network course change mail sending results.

| # | Type | Code |
|---|------|------|
| 1 | IF | `ido_div.equals(JKKCommonConst.IDO_DIV_VALUE_00009)` // Course change [L1460] |

#### Block 10.1 — DISCOUNT CC AUTO-APPLICATION CHECK (IF) (L1463)

> Check if wholesale CC (KKSV020231CC) map exists in output, then check for auto-exchange flags in home equipment list.

| # | Type | Code |
|---|------|------|
| 1 | IF | `outputMap.containsKey("KKSV020231CC")` // Wholesale CC map present [L1463] |
| 2 | SET | `buturyMap = (HashMap)outputMap.get("KKSV020231CC")` // Get wholesale CC map [L1466] |
| 3 | SET | `taknKikiList = (List)buturyMap.get("taknkiki_info_list")` // Get home equipment list [L1469] |

##### Block 10.1.1 — HOME EQUIPMENT AUTO-EXCHANGE CHECK (IF/FOR) (L1472)

> Iterate over home equipment list. If any item has `kksv0202flg` (auto-exchange flag), display auto-exchange error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `taknKikiList != null && taknKikiList.size() > 0` [L1472] |
| 2 | FOR | `for (int i = 0; i < taknKikiList.size(); i++)` [L1473] |
| 3 | SET | `taknKikiMap = taknKikiList.get(i)` // Get home equipment map [L1475] |
| 4 | IF | `taknKikiMap.containsKey("kksv0202flg")` // Auto-exchange flag present [L1478] |
| 5 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB9350__I)` // Display auto-exchange error [L1479] |
| 6 | EXEC | `break` // Exit loop [L1480] |

#### Block 10.2 — NETWORK COURSE CHANGE MAIL ERROR CHECK (IF) (L1483)

> Check if KKSV020278CC exists in output map. This handles mail sending error states for network course change registration.

| # | Type | Code |
|---|------|------|
| 1 | IF | `outputMap.containsKey("KKSV020278CC")` // KKSV020278CC present [L1483] |
| 2 | IF | `outputMap.get("KKSV020278CC") instanceof String` // OM-2019-0000915: String path [L1486] |
| 3 | SET | `returncd = (String)outputMap.get("KKSV020278CC")` [L1487] |
| 4 | IF | `"WA".equals(returncd)` // Return code is "WA" (warning) [L1488] |
| 5 | SET | `errMsg = {"Network course change registration completed", "Mail sending error state"}` [L1489] |
| 6 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB8090__I, errMsg)` [L1490] |
| 7 | ELSE | // HashMap path (OM-2019-0000915) [L1493] |
| 8 | SET | `kksv020278ccMap = (HashMap)outputMap.get("KKSV020278CC")` [L1494] |
| 9 | IF | `kksv020278ccMap != null` [L1495] |
| 10 | SET | `mail_send_err_flg = kksv020278ccMap.get("mail_send_err_flg")` [L1496] |
| 11 | IF | `mail_send_err_flg instanceof String` [L1497] |
| 12 | SET | `kksv020278ccStr = (String)mail_send_err_flg` [L1498] |
| 13 | IF | `"1".equals(kksv020278ccStr)` // Mail send error flag set [L1499] |
| 14 | SET | `errMsg = {"Network course change registration completed", "Mail sending error state"}` [L1500] |
| 15 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB8090__I, errMsg)` [L1501] |

### Block 11 — SERVICE MESSAGE ROUTING (IF) `isNeedWrisvcMsg(ido_div)` (L1509)

> If the operation type requires service messages to be retrieved and set in session (applies to recovery, termination, cancellation).

| # | Type | Code |
|---|------|------|
| 1 | IF | `isNeedWrisvcMsg(ido_div)` // Check if service message retrieval needed [L1509] |
| 2 | SET | `wrisvcMap = getMsgList(ido_div, outputMap)` // Get message list map [L1511] |
| 3 | IF | `wrisvcMap != null && wrisvcMap.containsKey("msg_list")` [L1514] |
| 4 | SET | `msgList = (ArrayList)wrisvcMap.get("msg_list")` // Extract message list [L1515] |
| 5 | CALL | `JKKSetSessionMessage.setSessionMessage(this, msgList)` // Set messages into session [L1517] |

### Block 12 — RECOVERY BRANCH (IF) `(ido_div == 00004)` (L1521)

> After a recovery operation (00004), check recovery period validity and device connection skip status.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JKKCommonConst.IDO_DIV_VALUE_00004.equals(ido_div)` // Recovery [L1521] |

#### Block 12.1 — RECOVERY PERIOD VALIDITY CHECK (IF) (L1524)

> Check if recovery is attempted outside the valid recovery period (kaifuku_kano_ymd_err == 1 means outside valid period).

| # | Type | Code |
|---|------|------|
| 1 | IF | `outputMap.containsKey("KKSV0194124SC")` // KKSV0194124SC present [L1524] |
| 2 | SET | `kaifukuKanoMap = (HashMap)outputMap.get("KKSV0194124SC")` [L1527] |
| 3 | IF | `kaifukuKanoMap != null && kaifukuKanoMap.size() > 0 && kaifukuKanoMap.containsKey("kaifuku_kano_ymd_err")` [L1529] |
| 4 | SET | `kaifukuKanoErr = (String)kaifukuKanoMap.get("kaifuku_kano_ymd_err")` [L1530] |
| 5 | IF | `kaifukuKanoErr != null && !"".equals(kaifukuKanoErr) && "1".equals(kaifukuKanoErr)` // Recovery period error [L1531] |
| 6 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB3880__I)` // Display recovery period error [L1533] |
| 7 | ELSE IF | `kaifukuKanoMap.size() == 0` // Empty map also treated as error [L1541] |
| 8 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB3880__I)` // Display recovery period error [L1543] |

#### Block 12.2 — DEVICE CONNECTION SKIP CHECK (IF) (L1547)

> Check if the device was skipped during connection (kiki_connect_skip_info == 1).

| # | Type | Code |
|---|------|------|
| 1 | IF | `outputMap.containsKey("KKSV0194128SC")` // KKSV0194128SC present [L1547] |
| 2 | SET | `kikiSkipMap = (HashMap)outputMap.get("KKSV0194128SC")` [L1550] |
| 3 | IF | `kikiSkipMap != null && kikiSkipMap.size() > 0 && kikiSkipMap.containsKey("kiki_connect_skip_info")` [L1552] |
| 4 | SET | `kikiSkipInfo = (String)kikiSkipMap.get("kiki_connect_skip_info")` [L1553] |
| 5 | IF | `kikiSkipInfo != null && !"".equals(kikiSkipInfo) && "1".equals(kikiSkipInfo)` // Device connection skipped [L1554] |
| 6 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKBE197__I)` // Display connection skip notification [L1556] |

### Block 13 — TERMINATION DSL CHECK (IF) `(ido_div == 00005)` (L1561)

> After termination (00005), check if device bundle contract was active. If so, display DSL contract-consent termination error message.

| # | Type | Code |
|---|------|------|
| 1 | IF | `ido_div.equals(JKKCommonConst.IDO_DIV_VALUE_00005)` // Termination [L1561] |
| 2 | IF | `outputMap.containsKey("KKSV019501CC")` // KKSV019501CC present [L1562] |
| 3 | SET | `kksv019501cc = (HashMap)outputMap.get("KKSV019501CC")` [L1563] |
| 4 | SET | `kiki_rntai_kei_kkop_svc_dsl_cnsl_Flg = (String)kksv019501cc.get("kiki_rntai_kei_kkop_svc_dsl_cnsl_Flg")` // DSL contract-consent flag [L1564] |
| 5 | IF | `"1".equals(kiki_rntai_kei_kkop_svc_dsl_cnsl_Flg)` // DSL contract active [L1565] |
| 6 | SET | `arg = {"Termination"}` [L1566] |
| 7 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKBF390__I, arg)` // Display DSL termination error [L1567] |

### Block 14 — CANCELLATION DSL CHECK (IF) `(ido_div == 00008)` (L1570)

> After cancellation (00008), check if device bundle contract was active. If so, display DSL contract-consent cancellation error message.

| # | Type | Code |
|---|------|------|
| 1 | IF | `ido_div.equals(JKKCommonConst.IDO_DIV_VALUE_00008)` // Cancellation [L1570] |
| 2 | IF | `outputMap.containsKey("trgt_data")` // Target data present [L1572] |
| 3 | SET | `kksv019601cc = (HashMap)outputMap.get("trgt_data")` [L1573] |
| 4 | SET | `kiki_rntai_kei_kkop_svc_dsl_cnsl_Flg = (String)kksv019601cc.get("kiki_rntai_kei_kkop_svc_dsl_cnsl_Flg")` // DSL contract-consent flag [L1574] |
| 5 | IF | `"1".equals(kiki_rntai_kei_kkop_svc_dsl_cnsl_Flg)` // DSL contract active [L1575] |
| 6 | SET | `arg = {"Cancellation"}` [L1576] |
| 7 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKBF390__I, arg)` // Display DSL cancellation error [L1577] |

### Block 15 — FINAL VALIDATION AND SUCCESS (L1581)

> Post-processing validation checks and successful return.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `checkSvcKeiNum(paramBean, outputMap, JKKCommonConst.FUNC_CODE_1)` // Validate service contract number [L1581] |
| 2 | CALL | `checkAdchgRsv(paramBean, outputMap, JKKCommonConst.FUNC_CODE_1)` // Check address change reservation [L1585] |
| 3 | CALL | `JSYwebLog.println(JSYwebLog.DataBean_Dump, getClass(), dumpDatabean(), null, null, null)` // Log final DataBean state [L1588] |
| 4 | RETURN | `return true` // Success — registration completed [L1590] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `actionFix` | Method | Confirmation screen "Fix" (確定) button handler — final registration step for service contract updates |
| `ido_div` | Field | **Operation division code** — classifies the type of service contract operation. Values: `00004` (Recovery), `00005` (Termination), `00008` (Cancellation), `00009` (Course Change) |
| `svc_kei_no` | Field | **Service contract number** — unique identifier for a service contract line item |
| `svc_kei_ucwk_no` | Field | **Service detail work number** — internal tracking ID for service contract modification processing |
| `kojiakSbtCd` | Field | **Project type code** — classifies the type of construction/maintenance project code (015 = ONU exchange) |
| `kojiakStat` | Field | **Project status** — current status of the construction project. Range 140-190 = pre-opening state (not yet live) |
| `svcKeiStat` | Field | **Service contract status** — current status of the service contract. Status < 100 = pre-opening (service not yet live) |
| `KOJIAK_SBT_CD` | Constant | **Project type code** key — used to retrieve project classification from the form bean |
| `KOJIAK_STAT` | Constant | **Project status** key — used to retrieve project status from the form bean |
| `EKK0081A010CBSMSG1LIST` | Constant | **Service contract agreement details** key — retrieves the service contract information array from the form bean |
| `SVC_KEI_STAT_03` | Constant | **Service contract status** key — retrieves the service contract status value from a data bean |
| `FUNC_CODE_1` | Constant | **Function code 1** — indicates confirm/registration mode (as opposed to inquiry or display mode) |
| `IDO_DIV_VALUE_00004` | Constant | **Recovery operation** — restoring a previously cancelled/suspended service |
| `IDO_DIV_VALUE_00005` | **Termination operation** — full service contract termination (解約) |
| `IDO_DIV_VALUE_00008` | **Cancellation operation** — subscription cancellation (キャンセル), distinct from full termination |
| `IDO_DIV_VALUE_00009` | **Course change operation** — switching between service packages/bundles |
| `SVC_KEI_STAT_100` | Constant | **Status 100** — threshold value separating pre-opening (< 100) from active service (>= 100) |
| KKSV020231CC | SC Code | **Wholesale CC** — wholesale contract charge calculation component. Returns `taknkiki_info_list` and `kksv0202flg` auto-exchange flag |
| KKSV020278CC | SC Code | **Net course change** — handles network course change registration. Returns `mail_send_err_flg` for mail sending status |
| KKSV0194124SC | SC Code | **Recovery period check** — validates if recovery is attempted within the valid recovery period. Returns `kaifuku_kano_ymd_err` |
| KKSV0194128SC | SC Code | **Device connection skip check** — checks if device connection was skipped. Returns `kiki_connect_skip_info` |
| KKSV019501CC | SC Code | **Termination DSL check** — returns `kiki_rntai_kei_kkop_svc_dsl_cnsl_Flg` for device bundle contract status |
| `trgt_data` | Key | **Target data** — output map key for cancellation processing, contains DSL contract-consent flag |
| `kaifuku_kano_ymd_err` | Field | **Recovery period error flag** — "1" indicates recovery attempted outside valid recovery period |
| `kiki_connect_skip_info` | Field | **Device connection skip info** — "1" indicates the device connection was skipped (phone number not added) |
| `kiki_rntai_kei_kkop_svc_dsl_cnsl_Flg` | Field | **Device bundle contract DSL consent flag** — "1" indicates a DSL device bundle contract is active, requiring additional consent messaging |
| `kksv0202flg` | Field | **Auto-exchange flag** — set when equipment was auto-exchanged during course change |
| `mail_send_err_flg` | Field | **Mail sending error flag** — "1" indicates an error occurred during notification mail sending |
| `taknkiki_info_list` | Field | **Home equipment list** — list of home equipment (settop boxes, modems, etc.) affected by the course change |
| `buturyMap` | Variable | **Logistics/CC map** — wholesale CC mapping result from KKSV020231CC |
| FTTH | Business term | **Fiber To The Home** — fiber-optic broadband internet service offered by K-Opticom |
| ONU | Business term | **Optical Network Unit** — fiber-optic customer-premises equipment. ONU exchange = replacing the optical modem |
| DSL | Business term | **Digital Subscriber Line** — broadband service over copper phone lines. Device bundle contracts are tied to DSL equipment |
| AX | Technical term | **AXIS** (automation exchange) — internal system for managing automated service provisioning workflows |
| CC | Technical term | **Contract Charge** — pricing/charge calculation component in K-Opticom's billing system |
| CBS | Technical term | **CBS** (Customer Billing System) — backend billing and service management system |
| SC | Technical term | **SC** (Service Component) — backend service layer component that handles business logic and data access |
| VA | Technical term | **Value Added** — value-added services (e.g., security, TV packages) that may require equipment registration |
| HGW | Business term | **Home Gateway** — K-Opticom's home gateway device. HGW exchange = replacing the home gateway equipment |
| Netflix | Business term | **Netflix streaming service** — optional content package that can be added to service bundles (Step 1-5 rollout) |
| MANSAI | Business term | **Full-service bundle** — comprehensive service package (MANSAI type) that includes internet, phone, and TV |
| eo Light Net | Business term | **eoひかりネット** (eo Light Net) — K-Opticom's brand for fiber-optic broadband services |
| KKW00134 | Screen | **Error screen** — displayed when service invocation errors occur during confirm processing |
| KKW00140 | Screen | **Service contract common screen** — displayed after successful service contract update |
| EKB5440__JW | Message | **ONU exchange in progress** error — displayed when course change or cancellation is attempted during ONU exchange pre-opening |
| EKB4390__I | Message | **Update success** informational message — displayed after successful service contract update |
| EKB9350__I | Message | **Auto-exchange error** — displayed when equipment was auto-exchanged during course change (outside automatic exchange target) |
| EKB8090__I | Message | **Mail send error** — displayed when notification mail sending fails during course change registration |
| EKB3880__I | Message | **Recovery period error** — displayed when recovery is attempted outside the valid recovery period |
| EKBE197__I | Message | **Connection skip info** — displayed when phone number addition was skipped during device connection in recovery |
| EKBF390__I | Message | **DSL contract-consent error** — displayed when device bundle contract is active during termination or cancellation |
| JKKWebBusinessLogic | Class | **Parent class** — base class for web business logic clusters providing common service invocation framework |
| JCCWebBusinessLogic | Class | **Immediate parent** — extends JKKWebBusinessLogic; provides JCC-layer common functionality |
| X31SDataBeanAccess | Class | **Service form bean accessor** — data bean access class for service screen form data |
| X31SDataBeanAccessArray | Class | **Array accessor** — array wrapper for service form data bean access |
