# Business Logic — JKKOpSvcHktgiUpdCC.copyOption() [1047 LOC]

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

## 1. Role

### JKKOpSvcHktgiUpdCC.copyOption()

This method implements the **option succession processing** (オプション引継処理) for the K-Opticom customer backbone system. It handles the transfer of optional service contracts (e.g., Mail access, My Homepage, Internet Security, Norton Premium, Remote Support) from a predecessor (original/transfer-out) service contract to a successor (new/transfer-in) service contract during a contract succession (引継) business event. The method serves as a **shared utility** within the `JKKOpSvcHktgiUpdCC` component, invoked by the main service processing entry point `opSvcHktgiUpd()`. It implements a **routing/dispatch design pattern** — iterating through each optional service contract in the predecessor and, depending on the service code, executing cancellation on the old side and registration on the new side. It handles multiple service categories: Internet access options (B001 Mail, B002 My Homepage, B020 Dual Access), security services (B131 Sagisystem/SagiWall, B132 Norton Premium), and remote support (B021 Remote Support Plus). Additionally, it performs conflict detection on service contract timestamps, charge determination for paid/non-paid services, Security Pack succession, SOD (Service Order Data) generation, instruction book dispatch, and work order creation.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["copyOption(params)"])

    START --> GET_USER_DATA["Get user data and opSvcKeiList from param"]

    GET_USER_DATA --> INIT_VARS["Initialize inputMap, arrays, lists"]

    INIT_VARS --> SET_WORKMAP["Set workMap fields:
- hikiMotoSysid
- hikiSakiSysid
- hikiMotoSvcKeiNo
- hikiSakiSvcKeiNo
- hikiSakiSvcKeiStat
- aplyYmd"]

    SET_WORKMAP --> GET_SEIKY["Get hikiMotoSeikyKeiNo and hikiSakiSeikyKeiNo"]

    GET_SEIKY --> CALL_HIKIMOTO_SVC["callEKK0081A010 - Previous contract agreement check"]

    CALL_HIKIMOTO_SVC --> CALL_HIKISAKI_SVC["callEKK0081A010 - Next contract agreement check"]

    CALL_HIKISAKI_SVC --> CALL_EKK0161["callEKK0161B004 - Next contract details lookup"]

    CALL_EKK0161 --> CALL_HIKIMOTO_MYHP["callEKK0361B001 - Previous opSvc contract list for MyHome"]

    CALL_HIKIMOTO_MYHP --> CALL_HIKISAKI_DSL["callEKK0361B001 - Next opSvc contract list for DSL"]

    CALL_HIKISAKI_DSL --> CHECK_FAMIPACK["Call EKK0451B001 - Discount service contract list"]

    CHECK_FAMIPACK --> SECUPACK_CHK["Check secuPackFlg from userData"]

    SECUPACK_CHK --> CONFLICT_CHK["Check last update timestamp conflict"]

    CONFLICT_CHK --> INET_CHECK["Scan options: Check for InetSigwl B131, Norton B132, Remote B021"]

    INET_CHECK --> SECURITY_PACK_SECTION["Security Pack section"]

    SECURITY_PACK_SECTION --> SEQPACK_CONDITION{"secuPackFlg=\"1\" OR
Remote target=\"1\" OR
(Svc status active AND
(Sub-option status active))"}

    SEQPACK_CONDITION -- Yes --> PREPARE_SEQPACK["Prepare seqpackTrgtData for JKKSecurityPackOperateCC"]

    PREPARE_SEQPACK --> EXECUTE_SEQPACK["Execute JKKSecurityPackOperateCC.execute"]

    EXECUTE_SEQPACK --> UPDATE_TIMESTAMPS["Update last update timestamps"]

    UPDATE_TIMESTAMPS --> OPTION_LOOP_START["Option iteration loop"]

    OPTION_LOOP_START --> OPTION_LOOP_CHECK{"More options?"}

    OPTION_LOOP_CHECK -- Yes --> GET_OP_INFO["getOpSvcKeiInfo - Get option service contract info"]

    GET_OP_INFO --> CHECK_SERVICE_CD{"Service code check"}

    CHECK_SERVICE_CD -- B131 (Inet) --> SET_INET["Set inetsgwlTgFlg=\"1\""]

    CHECK_SERVICE_CD -- B132 (Norton) --> SET_NORTON["Set ntfmlprmTgFlg=\"1\""]

    CHECK_SERVICE_CD -- B021 (Remote) --> SET_REMOTE["Set rmtsprtTgFlg=\"1\""]

    CHECK_SERVICE_CD -- Other --> CHRG_CHECK{"Svc status 020/030/100?"}

    CHRG_CHECK -- Yes --> CHARGE_JDG["Run HiChrgJdgUtil for charge determination"]

    CHARGE_JDG --> SET_CHRG_FLG["Set sagiHikakinFlg / nortonHikakinFlg"]

    SET_CHRG_FLG --> PROCESS_CANCEL_ADD["Process cancel + add for this option"]

    SET_INET --> PROCESS_CANCEL_ADD
    SET_NORTON --> PROCESS_CANCEL_ADD
    SET_REMOTE --> PROCESS_CANCEL_ADD
    SET_CHRG_FLG --> PROCESS_CANCEL_ADD

    PROCESS_CANCEL_ADD --> OPTION_LOOP_CHECK

    OPTION_LOOP_CHECK -- No --> SOD_PROCESS{"sodCcInputList size > 0?"}

    SOD_PROCESS -- Yes --> EXECUTE_SOD["Execute JKKHakkoSODCC.hakkoSOD"]

    EXECUTE_SOD --> SJISHO_CHECK{"Hikisaki lists not empty?"}

    SJISHO_CHECK -- Yes --> CALL_SJISHO["Call sjishoCC - Instruction book processing"]

    SJISHO_CHECK -- No --> WORK_ORDCHK{"idoDiv != 00019 AND
Mobile check pass?"}

    CALL_SJISHO --> WORK_ORDCHK

    WORK_ORDCHK -- Yes --> WORK_ORDERS["Check work orders, call KojiAnken CC"]

    WORK_ORDCHK -- No --> END_METHOD(["Return"])

    WORK_ORDERS --> END_METHOD

    START --> END_METHOD
```

**CRITICAL — Constant Resolution:**
- `OP_SVC_CD_EMAIL = "B001"` (Option Service Code — Mail Access)
- `OP_SVC_CD_MYHOMEPAGE = "B002"` (Option Service Code — My Homepage)
- `OP_SVC_CD_SAGIWALL = "B131"` (Option Service Code — Sagisystem/SagiWall Internet Security)
- `OP_SVC_CD_NORTON = "B132"` (Option Service Code — Norton Premium Security)
- `OP_SVC_CD_RMTSPRT_PLUS = "B021"` (Option Service Code — Remote Support Plus)
- `SVC_KEI_STAT_010 = "010"` (Service Contract Status — Ordered/Pending)
- `SVC_KEI_STAT_020 = "020"` (Service Contract Status — Agreed)
- `SVC_KEI_STAT_030 = "030"` (Service Contract Status — Contracted)
- `SVC_KEI_STAT_100 = "100"` (Service Contract Status — Service In Progress)
- `SVC_KEI_STAT_910 = "910"` (Service Contract Status — Terminated/Canceled)
- `SVC_KEI_STAT_920 = "920"` (Service Contract Status — Cancellation Completed)
- `DSL_SBT_FLG_OP_SVC_KEI_DSL` — Flag indicating option service is DSL-based
- `AGING_EXEC_KBN_KIHK` — Aging recovery execution key (Aging recovery flag)

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session management handle carrying database connection, transaction context, and system-level metadata required for all CBS (Business Support System) service component invocations |
| 2 | `param` | `IRequestParameterReadWrite` | Business data read/write interface used to retrieve user data, set processed results, and pass parameters between service components and screen layers |
| 3 | `mskmDtlNo` | `String` | Application detail number (申込明細番号) — unique identifier for the application/contract detail line item being processed; used in SOD generation, work order creation, and opt-in email settings |
| 4 | `workMap` | `HashMap<String, Object>` | Work area map carrying intermediate business state across method calls within the same transaction — stores predecessor/successor SYSID, service contract numbers, dates, option service codes, and status values accumulated during processing |

**Instance fields and external state read:**
- `this.fixedText` — User-defined text string used as a key to retrieve user data from `param.getData()`
- `sakiLastUpdDtm` — Next-side last update datetime (instance field set from `userData.get(USER_DATA_KEY_HIKISAKI_LAST_UPD_DTM)`)
- `motoLastUpdDtm` — Previous-side last update datetime (instance field set from `userData.get(USER_DATA_KEY_HIKIMOTO_LAST_UPD_DTM)`)
- `this.mapper` — Template mapper component for editing inbound messages (used for `editInMsgEKK0361C040`, `editInMsgEKK0411C050`, `editInMsgEKK0021A010`, `editInMsgEKU0011B030`)

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `callEKK0081A010` (x2) | EKK0081A010SC | KK_T_SVC_KEI (Service Contract master) | Retrieves service contract agreement check info for both predecessor and successor contracts (contract status, SYSID, last update timestamp, charge code, processing group code) |
| R | `callEKK0161B004` | EKK0161B004SC | KK_T_OPSVKEI_ISP (Option Service Contract ISP) | Retrieves next-side option service contract details including generated/addition datetime |
| R | `runSc(handle, param, EKK0361B001, inputMap)` (x2) | EKK0361B001SC | KK_T_OPSVKEI_ISP (Option Service Contract ISP) | Lists option service contracts for ISP — called for both previous (for My Homepage reference) and successor sides |
| R | `runSc(handle, param, EKK0451B001, inputMap)` | EKK0451B001SC | KK_T_WRIB_SVC_KEI (Discount Service Contract) | Lists discount service contracts to determine whether Family Pack / Security Pack / Premium Pack exists |
| R | `getOpSvcKeiInfo` | EKK0351A010SC / EKK0361A010SC / EKK0401B001SC | KK_T_OP_SVC_KEI (Option Service Contract), KK_T_SBOP_SVC_KEI (Sub-option Service Contract) | Retrieves complete option service contract info including status, code, and sub-option details for each iteration |
| C | `dslOption` | EKK0361C080SC / EKK0351C220SC / EKK0351C240SC / EKK0351C250SC / EKK0351C270SC | KK_T_OP_SVC_KEI, KK_T_SBOP_SVC_KEI | Cancels option service contract on predecessor side (ISP, agreement, sub-option cleanup, aging recovery with KIHK flag) |
| C | `hikisakiDslOption` | EKK0361C080SC / EKK0351C220SC / EKK0351C240SC / EKK0351C250SC | Cancels option service contract on successor side for DSL-type options (Mail, My Homepage) |
| C | `addMyHomePage` | EKK0361C010SC / EKK0361C030SC | KK_T_OP_SVC_KEI (Option Service Contract), KK_T_MHP_INFO (My Homepage info) | Creates new My Homepage option contract when predecessor is cancelled |
| C | `addOption` | EKK0361C010SC / EKK0361C030SC / EKK0141C040SC / EKK0011D020SC | KK_T_OP_SVC_KEI, KK_T_OPSVKEI_ISP, KK_T_MLAD | Registers new option service contract on successor side with all sub-option and ISP details |
| C | `addOdrSet` | EKK0011D020SC | KK_T_ODR_HAKKO_JOKEN (Order Generation Exceptions) | Registers order setting data for email options |
| U | `opSvcKeiStatUp` | EKK0351C080SC | KK_T_OP_SVC_KEI (Option Service Contract) | Updates option service contract status after add/cancel processing |
| U | `runSc(handle, param, EKK0361C040, inputMap)` | EKK0361C040SC | KK_T_OPSVKEI_ISP (Option Service Contract ISP) | Starts option service contract for ISP (sets start date, immediate or next month) |
| C/U | `runSc(handle, param, EKK0411C050, inputMap)` | EKK0411C050SC | KK_T_SBOP_SVC_KEI (Sub-option Service Contract) | Starts sub-option service contract for ISP (activates antivirus, firewall, etc.) |
| U | `kaihkOptinm` | EKK0021C060SC | KK_T_OPT_INM_EMAIL (Opt-in Email settings) | Restores opt-in email settings when predecessor and successor share the same SYSID |
| C | `addOptinm` | EKK0021C060SC | KK_T_OPT_INM_EMAIL (Opt-in Email settings) | Creates new opt-in email settings when predecessor and successor have different SYSIDs |
| D | `dslOptinm` | EKK0021C060SC | KK_T_OPT_INM_EMAIL (Opt-in Email settings) | Deactivates opt-in email settings on predecessor side when SYSIDs differ |
| U | `runSc(handle, param, EKK0021A010, inputMap)` | EKK0021A010SC | KK_T_MSKM (Application master) | Retrieves application agreement info in work order section |
| C | `executeKojiAnken` | EKU0011B030SC / EKK0021A010SC | KK_T_WORK_ORDER (Work Order), KK_T_MSKM (Application master) | Creates work order for service content changes when work orders exist on successor side |
| U | `runSc(handle, param, EKU0011B030, inputMap)` | EKU0011B030SC | KK_T_WORK_ORDER (Work Order) | Queries work orders for the successor service contract |
| U | `runSc(handle, param, EKK0161B004, inputMap)` | EKK0161B004SC | KK_T_OPSVKEI_ISP | Retrieves option service contract details (called internally) |
| U | `sjishoCC` | - | - | Dispatches instruction books for cancelled options that need to be retained |
| - | `JKKHakkoSODCC.hakkoSOD` | EKK0011D020SC / EKK0141A010SC / EKK0141B002SC / EKK0141B005SC | KK_T_ODR_HAKKO_JOKEN (Order Generation Exceptions), KK_T_SVC_KAI (Service Change) | Generates SOD (Service Order Data) for all options processed in this succession |
| - | `JKKSecurityPackOperateCC.execute` | - | - | Processes security pack (SagiWall, Norton Premium, Remote Support Plus) succession with add/cancel operations |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: `JKKOpSvcHktgiUpdCC.opSvcHktgiUpd()` | `opSvcHktgiUpd()` -> `copyOption()` | `hakkoSOD [C] KK_T_ODR_HAKKO_JOKEN`, `setData [U] KK_T_OP_SVC_KEI`, `editInMsgEKK0021A010 [U] KK_T_MSKM`, `executeKojiAnken [C] KK_T_WORK_ORDER`, `runSc [R] KK_T_SVC_KEI` |

**Notes:** No screen/batch entry points (KKSV*) were found within 8 hops of this method. It is exclusively called as an internal CBS component method by `opSvcHktgiUpd()`. The terminal operations cover the full lifecycle: reading service contract info, creating/canceling option contracts, updating statuses, generating SODs for order fulfillment, and dispatching work orders.

## 6. Per-Branch Detail Blocks

### Data Preparation Phase

**Block 1** — [EXEC] `(user data retrieval)` (L1400)

> Retrieves user data and option service contract list from param.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param.getData(this.fixedText)` // Retrieve user data map |
| 2 | EXEC | `userData.get(OP_SVC_KEI_LIST)` // Get option service contract list |
| 3 | SET | `inputMap = new HashMap<String, Object>()` // Initialize input map |
| 4 | SET | `retMsgs = null` // Initialize return message array |
| 5 | SET | `retHikiSakiDslEKK0361B001 = null` // Next DSL opSvc list |
| 6 | SET | `retHikiMotoMyHpEKK0361B001 = null` // Previous MyHome opSvc list |
| 7 | SET | `retHikiMotoEKK0351A010 = null` // Previous opSvc agreement |
| 8 | SET | `retHikiMotoEKK0361A010 = null` // Previous opSvc ISP |
| 9 | SET | `retHikiMotoEKK0401B001 = null` // Previous sub-option list |
| 10 | SET | `hikiMotoOpSvcKeiB001Sjisho = new ArrayList<String>()` // Previous B001 sjisho list |
| 11 | SET | `hikiSakiOpSvcKeiB001Sjisho = new ArrayList<String>()` // Next B001 sjisho list |
| 12 | SET | `hikiMotoOpSvcKeiB002Sjisho = new ArrayList<String>()` // Previous B002 sjisho list |
| 13 | SET | `hikiSakiOpSvcKeiB002Sjisho = new ArrayList<String>()` // Next B002 sjisho list |
| 14 | SET | `sodCcInputList = new ArrayList<Map<String, Object>>()` // SOD input list |

### WorkMap Population Phase

**Block 2** — [EXEC] `(set predecessor/successor fields)` (L1448)

> Sets key predecessor and successor identifiers into the workMap for downstream methods.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setHikiMotoSysid(workMap, userData)` // Set predecessor SYSID |
| 2 | CALL | `setHikiSakiSysid(workMap, userData)` // Set successor SYSID |
| 3 | CALL | `setHikiMotoSvcKeiNo(workMap, userData)` // Set predecessor service contract number |
| 4 | CALL | `setHikiSakiSvcKeiNo(workMap, userData)` // Set successor service contract number |
| 5 | CALL | `setHikiSakiSvcKeiStat(workMap, userData)` // Set successor service contract status |
| 6 | CALL | `setAplyYmd(workMap, userData)` // Set application date (YYYYMMDD) |
| 7 | SET | `hikiSakiSvcKeiNo = getHikiSakiSvcKeiNo(workMap)` // Read successor SVC kei no |
| 8 | SET | `hikiSakiSvcKeiStat = getHikiSakiSvcKeiStat(workMap)` // Read successor status |
| 9 | SET | `hikiMotoSeikyKeiNo = getSeikyKeiNo(..., getHikiMotoSvcKeiNo(workMap))` // Get predecessor billing contract number |
| 10 | SET | `hikiSakiSeikyKeiNo = getSeikyKeiNo(..., getHikiSakiSvcKeiNo(workMap))` // Get successor billing contract number |
| 11 | SET | `sakiLastUpdDtm = (String)userData.get(USER_DATA_KEY_HIKISAKI_LAST_UPD_DTM)` // Set last update dtm |
| 12 | SET | `motoLastUpdDtm = (String)userData.get(USER_DATA_KEY_HIKIMOTO_LAST_UPD_DTM)` // Set last update dtm |

### Agreement Check Phase

**Block 3** — [EXEC] `(predecessor agreement check)` (L1472)

> Performs service contract agreement check (引元サービス契約合意照会) for the predecessor contract.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `callEKK0081A010(handle, param, getHikiMotoSvcKeiNo(workMap))` // Predecessor agreement check |
| 2 | SET | `setHikiMotoSvcKeiStat(workMap, retHikiMotoEKK0081A010[0].getString(EKK0081A010CBSMsg1List.SVC_KEI_STAT))` // Set predecessor status |
| 3 | SET | `setHikiMotoPcrsCd(workMap, retHikiMotoEKK0081A010[0].getString(EKK0081A010CBSMsg1List.PCRS_CD))` // Set predecessor charge code |
| 4 | SET | `setHikiMotoSvkeiGeneAddDtm(workMap, retHikiMotoEKK0081A010[0].getString(EKK0081A010CBSMsg1List.GENE_ADD_DTM))` // Set predecessor generated datetime |

**Block 4** — [EXEC] `(successor agreement check)` (L1482)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `callEKK0081A010(handle, param, getHikiSakiSvcKeiNo(workMap))` // Successor agreement check |

**Block 5** — [EXEC] `(successor details lookup)` (L1491)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `callEKK0161B004(handle, param, workMap)` // Successor option contract details |

**Block 6** — [EXEC] `(previous opSvc list for MyHome)` (L1498)

> Retrieves option service contracts list for predecessor (ISP type). Used for My Homepage cross-reference.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inputMap.put(JCMConstants.FUNC_CODE_KEY, JPCModelConstant.FUNC_CD_1)` // Set func code |
| 2 | SET | `inputMap.put(EKK0361B001CBSMsg.KEY_SVC_KEI_NO, getHikiMotoSvcKeiNo(workMap))` // Set predecessor SVC kei no |
| 3 | CALL | `runSc(handle, param, EKK0361B001, inputMap)` // Previous opSvc contract list (ISP) |

**Block 7** — [EXEC] `(next opSvc list for DSL)` (L1508)

> Retrieves option service contracts list for successor (ISP type). Used for filtering active options.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inputMap.put(JCMConstants.FUNC_CODE_KEY, JPCModelConstant.FUNC_CD_1)` // Set func code |
| 2 | SET | `inputMap.put(EKK0361B001CBSMsg.KEY_SVC_KEI_NO, hikiSakiSvcKeiNo)` // Set successor SVC kei no |
| 3 | CALL | `runSc(handle, param, EKK0361B001, inputMap)` // Next opSvc contract list (ISP) |

### Successor Option Filter Phase

**Block 8** — [FOR] `(iterate successor opSvc list for filtering)` (L1520)

> Iterates through the successor's option service contracts. Skips terminated/cancelled ones (910, 920). Collects valid Mail (B001) and My Homepage (B002) contract numbers for later cancellation on the successor side.

| # | Type | Code |
|---|------|------|
| 1 | SET | `hikiSakiOpSvcKeiListB001 = new ArrayList<String>()` // B001 list |
| 2 | SET | `hikiSakiOpSvcKeiListB002 = new ArrayList<String>()` // B002 list |
| 3 | SET | `hikiSakiOpSvcKeiStatListB002 = new ArrayList<String>()` // B002 status list |
| 4 | FOR | `for(int i = 0; i < retHikiSakiDslEKK0361B001.length; i++)` |
| 5 | SET | `opSvcKeiStat = retHikiSakiDslEKK0361B001[i].getString(EKK0361B001CBSMsg1List.OP_SVC_KEI_STAT)` |

**Block 8.1** — [IF] `(SVC_KEI_STAT_910 = "910" (Terminated) OR SVC_KEI_STAT_920 = "920" (Cancellation Completed))` (L1531)

> Skips options that are already terminated or have cancellation completed.

| # | Type | Code |
|---|------|------|
| 1 | IF | `SVC_KEI_STAT_910.equals(opSvcKeiStat) || SVC_KEI_STAT_920.equals(opSvcKeiStat)` |
| 2 | EXEC | `continue;` // Skip terminated/cancelled options |

**Block 8.2** — [IF] `(OP_SVC_CD_EMAIL = "B001")` (L1537)

> For Mail access options: if `mlad` is empty, retain the contract number for successor cancellation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `opSvcCd = retHikiSakiDslEKK0361B001[i].getString(EKK0361B001CBSMsg1List.OP_SVC_CD)` |
| 2 | IF | `OP_SVC_CD_EMAIL.equals(opSvcCd)` |
| 3 | SET | `mlad = retHikiSakiDslEKK0361B001[i].getString(EKK0361B001CBSMsg1List.MLAD)` // Mail address |
| 4 | IF | `mlad == null || "".equals(mlad)` |
| 5 | SET | `hikiSakiOpSvcKeiListB001.add(...)` // Retain contract number |

**Block 8.3** — [IF] `(OP_SVC_CD_MYHOMEPAGE = "B002")` (L1548)

> For My Homepage options: if `urlAccount` is empty, retain the contract number and status for successor cancellation.

| # | Type | Code |
|---|------|------|
| 2 | IF | `OP_SVC_CD_MYHOMEPAGE.equals(opSvcCd)` |
| 3 | SET | `urlAccount = retHikiSakiDslEKK0361B001[i].getString(EKK0361B001CBSMsg1List.URL_ACCOUNT)` |
| 4 | IF | `urlAccount == null || "".equals(urlAccount)` |
| 5 | SET | `hikiSakiOpSvcKeiListB002.add(...)` // Retain contract number |
| 6 | SET | `hikiSakiOpSvcKeiStatListB002.add(...)` // Retain status |

**Block 8.4** — [ELSE] (default: other option types, no action)

> For other option types (SagiWall, Norton, etc.), no action is taken in this filter loop — they are handled in the main option iteration.

### Discount Service Check Phase

**Block 9** — [EXEC] `(Family Pack / Security Pack check)` (L1560)

> Calls the discount service contract list CBS (EKK0451B001) to determine whether Family Pack, Security Pack, or Premium Pack subscriptions exist on the successor side.

| # | Type | Code |
|---|------|------|
| 1 | SET | `famiPackAri = false` // Family pack existence flag |
| 2 | SET | `inputMap.put(EKK0451B001CBSMsg.KEY_SVC_KEI_NO, hikiSakiSvcKeiNo)` |
| 3 | CALL | `runSc(handle, param, EKK0451B001, inputMap)` // Discount service list |
| 4 | FOR | `for(int i=0; i<retMsgs.length; i++)` |
| 5 | SET | `wribSvcCd = retMsgs[i].getString(EKK0451B001CBSMsg1List.WRIB_SVC_CD)` |

**Block 9.1** — [IF] `(WRIB_SVC_CD_FP_WRIB = "Family Pack" OR WRIB_SVC_CD_SP_WRIB = "Security Pack" OR WRIB_SVC_CD_PP_WRIB = "Premium Pack")` (L1583)

> If any of the three pack types are found, check their status. Only set famiPackAri=true if status is NOT terminated (910) or cancelled (920).

| # | Type | Code |
|---|------|------|
| 1 | IF | `WRIB_SVC_CD_FP_WRIB.equals(wribSvcCd) \|\| WRIB_SVC_CD_SP_WRIB.equals(wribSvcCd) \|\| WRIB_SVC_CD_PP_WRIB.equals(wribSvcCd)` |
| 2 | SET | `wribSvcKeiStat = retMsgs[i].getString(EKK0451B001CBSMsg1List.WRIB_SVC_KEI_STAT)` |
| 3 | IF | `!SVC_KEI_STAT_910.equals(wribSvcKeiStat) && !SVC_KEI_STAT_920.equals(wribSvcKeiStat)` |
| 4 | SET | `famiPackAri = true` // Pack exists and is active |

### Security Pack Flag Phase

**Block 10** — [EXEC] `(security pack choice flag determination)` (L1602)

> Determines whether the user has selected a security pack option for succession. Reads from `userData.get("option_pack_choice")`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `secuPackFlg = "0"` // Default no security pack |
| 2 | IF | `userData.get("option_pack_choice") == null` |
| 3 | SET | `secuPackFlg = "0"` // No choice made |
| 4 | IF | `userData.get("option_pack_choice") != null` |
| 5 | SET | `sequPackUm = (Boolean)userData.get("option_pack_choice")` |
| 6 | IF | `sequPackUm == true` |
| 7 | SET | `secuPackFlg = "1"` // Security pack selected |
| 8 | ELSE | `secuPackFlg = "0"` // Security pack not selected |

### Timestamp Conflict Detection Phase

**Block 11** — [EXEC] `(concurrent modification check)` (L1620)

> Compares last update timestamps between what was captured at the start of the transaction and what the CBS just returned. If they differ, a concurrent modification has occurred — an error is thrown.

| # | Type | Code |
|---|------|------|
| 1 | SET | `hikimoto_last_upd_dtm = retHikiMotoEKK0081A010[0].getString(EKK0081A010CBSMsg1List.LAST_UPD_DTM)` |
| 2 | SET | `hikisaki_last_upd_dtm = retHikiSakiEKK0081A010[0].getString(EKK0081A010CBSMsg1List.LAST_UPD_DTM)` |
| 3 | IF | `!hikimoto_last_upd_dtm.equals(motoLastUpdDtm) || !hikisaki_last_upd_dtm.equals(sakiLastUpdDtm)` |
| 4 | SET | `userData.put("tran_rslt_cd", "1")` // Mark as error |
| 5 | EXEC | `setExceptionErr(param, userData, "EKK0081A010", "key_svc_kei_no_err")` |
| 6 | RETURN | `throw new CCException(SC_ERROR_STRING, new Exception())` // Abort processing |

### Internet/Security Target Flag Detection Phase

**Block 12** — [EXEC] `(pre-scan option service codes)` (L1638)

> Iterates through all predecessor option services once to set target flags for Internet Security (B131), Norton Premium (B132), and Remote Support (B021).

| # | Type | Code |
|---|------|------|
| 1 | SET | `inetsgwlTgFlg = ""` // InetSigwl target flag |
| 2 | SET | `ntfmlprmTgFlg = ""` // Norton target flag |
| 3 | SET | `rmtsprtTgFlg = "0"` // Remote support target flag |
| 4 | FOR | `for(int opIdx = 0; opIdx < opSvcKeiList.size(); opIdx++)` |
| 5 | SET | `opSvcKei = opSvcKeiList.get(opIdx)` |
| 6 | SET | `hikiMotoOpSvcKeiNo = (String)opSvcKei.get("op_svc_kei_no")` |
| 7 | CALL | `getOpSvcKeiInfo(handle, param, hikiMotoOpSvcKeiNo)` |
| 8 | SET | `retHikiMotoEKK0351A010 = (CAANMsg[])infoMap.get(MAP_KEY_OP_SVC)` |
| 9 | SET | `HkmtOpSvcCd = retHikiMotoEKK0351A010[0].getString(EKK0351A010CBSMsg1List.OP_SVC_CD)` |

**Block 12.1** — [IF] `(HkmtOpSvcCd.equals("B131") - InetSigwl)` (L1656)

| # | Type | Code |
|---|------|------|
| 1 | SET | `inetsgwlTgFlg = "1"` // Internet security found |

**Block 12.2** — [IF] `(HkmtOpSvcCd.equals("B132") - Norton)` (L1658)

| # | Type | Code |
|---|------|------|
| 1 | SET | `ntfmlprmTgFlg = "1"` // Norton premium found |

**Block 12.3** — [IF] `(HkmtOpSvcCd.equals("B021") - Remote Support)` (L1660)

| # | Type | Code |
|---|------|------|
| 1 | SET | `rmtsprtTgFlg = "1"` // Remote support found |

### Charge Determination Phase (Security Services)

**Block 13** — [IF] `(inetsgwlTgFlg="1" OR ntfmlprmTgFlg="1" OR secuPackFlg="1" OR rmtsprtTgFlg="1")` (L1672)

> When Internet Security, Norton Premium, Security Pack, or Remote Support is present, determine charge status (paid vs. non-paid) for SagiWall and Norton options.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sagiHikakinFlg = "0"` // SagiWall non-charge flag |
| 2 | SET | `nortonHikakinFlg = "0"` // Norton non-charge flag |
| 3 | FOR | `for(int opIdx = 0; opIdx < opSvcKeiList.size(); opIdx++)` |
| 4 | CALL | `getOpSvcKeiInfo(handle, param, hikiMotoOpSvcKeiNo)` |
| 5 | SET | `HkmtOpSvcStat = retHikiMotoEKK0351A010[0].getString(EKK0351A010CBSMsg1List.OP_SVC_KEI_STAT)` |
| 6 | SET | `HkmtOpSvcCd = retHikiMotoEKK0351A010[0].getString(EKK0351A010CBSMsg1List.OP_SVC_CD)` |

**Block 13.1** — [IF] `(SVC_KEI_STAT_020="020" (Agreed) OR 030 (Contracted) OR 100 (Service In Progress))` (L1712)

> Only determine charges for active contracts.

| # | Type | Code |
|---|------|------|
| 1 | IF | `SVC_KEI_STAT_020.equals(HkmtOpSvcStat) \|\| SVC_KEI_STAT_030.equals(HkmtOpSvcStat) \|\| SVC_KEI_STAT_100.equals(HkmtOpSvcStat)` |
| 2 | IF | `HkmtOpSvcCd.equals(OP_SVC_CD_SAGIWALL)` |
| 3 | SET | `HkmtSagiOpSvcStat = ...` // Get SagiWall status |
| 4 | ELSE IF | `HkmtOpSvcCd.equals(OP_SVC_CD_NORTON)` |
| 5 | SET | `HkmtNortonOpSvcStat = ...` // Get Norton status |
| 6 | CALL | `runHiChrgJdgUtil(...)` // Charge determination utility |
| 7 | SET | `ChrgFlg = (String)jdgHiChrgMapOpSvcKei.get("chrgFlg")` // 0=paid, else non-paid |
| 8 | IF | `"0".equals(ChrgFlg)` |
| 9 | SET | `sagiHikakinFlg = "2"` // SagiWall paid |
| 10 | SET | `nortonHikakinFlg = "2"` // Norton paid |
| 11 | ELSE | Set flag to "1" (non-paid) |

### Security Pack Processing Phase

**Block 14** — [IF] `(secuPackFlg="1" OR rmtsprtTgFlg="1" OR (HikiSakiSvcStatus active AND sub-option statuses active))` (L1745)

> Executes security pack succession via `JKKSecurityPackOperateCC`. Prepares add/cancel parameter lists with all relevant service codes and flags.

| # | Type | Code |
|---|------|------|
| 1 | SET | `seqpackTrgtData = new HashMap<String, Object>()` |
| 2 | SET | `seqpackTrgtData.put(KEY_FUNC_CD, "1")` // Function code |
| 3 | SET | `seqpackTrgtData.put(KEY_HIKITUGI_UM, "1")` // Succession flag |
| 4 | SET | `seqpackTrgtData.put(KEY_IDO_DIV, getIdoDiv(workMap))` // Displacement division |
| 5 | SET | `childMap1.put(KEY_SYSID_ADD, ...)` // Successor SYSID |
| 6 | SET | `childMap1.put(KEY_SVC_KEI_NO_ADD, ...)` // Successor SVC kei no |
| 7 | SET | `childMap1.put(KEY_MSKM_DTL_NO_ADD, mskmDtlNo)` // Application detail number |
| 8 | SET | `childMap1.put(KEY_SECURITY_PACK_TG_FLG_ADD, secuPackFlg)` |
| 9 | SET | `childMap1.put(KEY_INETSGWL_TG_FLG_ADD, "1" OR "0")` // InetSigwl target flag |
| 10 | SET | `childMap1.put(KEY_NTFMLPRM_TG_FLG_ADD, "1" OR "0")` // Norton target flag |
| 11 | SET | `childMap1.put(KEY_RMTSPRT_TG_FLG_ADD, rmtsprtTgFlg)` // Remote support flag |
| 12 | SET | `childMap2.put(KEY_SYSID_CANCEL, ...)` // Predecessor SYSID |
| 13 | SET | `childMap2.put(KEY_INETSGWL_CHRG_HICHRG_CD_CANCEL, sagiHikakinFlg)` |
| 14 | SET | `childMap2.put(KEY_NTFMLPRM_CHRG_HICHRG_CD_CANCEL, nortonHikakinFlg)` |
| 15 | SET | `param.setData("seqpackTrgtData", seqpackTrgtData)` |
| 16 | CALL | `JKKSecurityPackOperateCC seqpackcc = new JKKSecurityPackOperateCC()` |
| 17 | CALL | `seqpackcc.execute(handle, param, "seqpackTrgtData")` // Execute security pack |
| 18 | SET | `motoLastUpdDtm = (String)childMap.get("upd_dtm_af")` // Update timestamps |
| 19 | SET | `sakiLastUpdDtm = (String)childMap4.get("upd_dtm_af")` |

### Option Succession Iteration Phase

**Block 15** — [FOR] `(iterate all option service contracts for succession)` (L1920)

> Main iteration block. For each option in the predecessor's option list: get option info, cancel on old side, register on new side, update statuses, generate SOD parameters.

| # | Type | Code |
|---|------|------|
| 1 | FOR | `for(int opIdx = 0; opIdx < opSvcKeiList.size(); opIdx++)` |
| 2 | SET | `opSvcKei = opSvcKeiList.get(opIdx)` |
| 3 | SET | `hikiMotoOpSvcKeiNo = (String)opSvcKei.get("op_svc_kei_no")` |
| 4 | SET | `setHikiMotoOpSvcKeiNo(workMap, hikiMotoOpSvcKeiNo)` |
| 5 | CALL | `getOpSvcKeiInfo(handle, param, hikiMotoOpSvcKeiNo)` |
| 6 | SET | `retHikiMotoEKK0351A010 = (CAANMsg[])infoMap.get(MAP_KEY_OP_SVC)` |
| 7 | SET | `retHikiMotoEKK0361A010 = (CAANMsg[])infoMap.get(MAP_KEY_OP_SVC_ISP)` |
| 8 | SET | `retHikiMotoEKK0401B001 = (CAANMsg[])infoMap.get(MAP_KEY_SBOP_SVC)` |
| 9 | SET | `hikiMotoOpSvcKeiStat = retHikiMotoEKK0351A010[0].getString(...)` |
| 10 | SET | `hikiMotoOpSvcCd = retHikiMotoEKK0351A010[0].getString(...)` |

**Block 15.1** — [IF] `(OP_SVC_CD_SAGIWALL = "B131" OR OP_SVC_CD_NORTON = "B132" OR OP_SVC_CD_RMTSPRT_PLUS = "B021")` (L1995)

> Security services (SagiWall, Norton, Remote Support) are handled by the Security Pack section (Block 14) above. These options are SKIPPED in the general option cancellation/addition loop.

| # | Type | Code |
|---|------|------|
| 1 | IF | `OP_SVC_CD_SAGIWALL.equals(hikiMotoOpSvcCd) \|\| OP_SVC_CD_NORTON.equals(hikiMotoOpSvcCd) \|\| JKKStrConst.OP_SVC_CD_RMTSPRT_PLUS.equals(hikiMotoOpSvcCd)` |
| 2 | EXEC | `// No action — handled by Security Pack section` |

**Block 15.2** — [ELSE] `(non-security option: Mail, My Homepage, etc.)` (L2008)

> Executes the standard option succession flow: cancel on predecessor, cancel relevant options on successor, register on successor side.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `dslOption(handle, param, retHikiMotoEKK0081A010, retHikiMotoEKK0351A010, ..., true, AGING_EXEC_KBN_KIHK, opSvkeiSodInfo, workMap)` // Cancel on predecessor |
| 2 | IF | `OP_SVC_CD_EMAIL.equals(hikiMotoOpSvcCd)` |
| 3 | IF | `opSvcKeiB001Index < hikiSakiOpSvcKeiListB001.size()` |
| 4 | CALL | `hikisakiDslOption(handle, param, retHikiSakiEKK0081A010, ..., mskmDtlNo, opSvkeiSodInfo, workMap)` // Cancel on successor |
| 5 | SET | `opSvcKeiB001Index++` |
| 6 | ELSE IF | `OP_SVC_CD_MYHOMEPAGE.equals(hikiMotoOpSvcCd)` |
| 7 | IF | `opSvcKeiB002Index < hikiSakiOpSvcKeiListB002.size()` |
| 8 | CALL | `hikisakiDslOption(handle, param, retHikiSakiEKK0081A010, ..., mskmDtlNo, opSvkeiSodInfo, workMap)` |
| 9 | IF | `!SVC_KEI_STAT_010.equals(hikiSakiDslOpSvcKeiStat)` |
| 10 | SET | `hikiSakiDslOpSvcKeiB002Sjisho.add(...)` // Retain for sjisho |
| 11 | SET | `opSvcKeiB002Index++` |
| 12 | CALL | `List<Map<String, Object>> addSodList = addOption(handle, param, retHikiMotoEKK0351A010, retHikiMotoEKK0361A010, retHikiMotoEKK0401B001, hikiSakiSeikyKeiNo, mskmDtlNo, hikiMotoOpSvcKeiNo, famiPackAri, opSvkeiSodInfo, hikiSakiSbOpSvcKeiNoList, hikiSakiSbOpSvcCdList, sodCcInputList, workMap)` |
| 13 | SET | `hikiSakiOpSvcKeiNo = getHikiSakiOpSvcKeiNo(workMap, hikiMotoOpSvcKeiNo)` |
| 14 | IF | `OP_SVC_CD_EMAIL.equals(hikiMotoOpSvcCd)` |
| 15 | IF | `!SVC_KEI_STAT_010.equals(hikiMotoOpSvcKeiStat)` |
| 16 | SET | `hikiMotoOpSvcKeiB001Sjisho.add(hikiMotoOpSvcKeiNo)` // Retain predecessor |
| 17 | IF | `!SVC_KEI_STAT_010.equals(hikiSakiSvcKeiStat)` |
| 18 | SET | `hikiSakiOpSvcKeiB001Sjisho.add(hikiSakiOpSvcKeiNo)` // Retain successor |
| 19 | ELSE IF | `OP_SVC_CD_MYHOMEPAGE.equals(hikiMotoOpSvcCd)` |
| 20 | SET | `hikiMotoOpSvcKeiB002Sjisho.add(...)` // Retain |
| 21 | SET | `hikiSakiOpSvcKeiB002Sjisho.add(...)` // Retain |
| 22 | IF | `hikiMotoSysid.equals(hikiSakiSysid)` |
| 23 | CALL | `kaihkOptinm(handle, param, this.fixedText, retHikiMotoEKK0351A010, retHikiMotoEKK0361A010, workMap)` // Restore opt-in email |
| 24 | ELSE |
| 25 | CALL | `addOptinm(handle, param, this.fixedText, retHikiMotoEKK0351A010, retHikiMotoEKK0361A010, workMap)` // Add opt-in email |
| 26 | CALL | `dslOptinm(handle, param, this.fixedText, retHikiMotoEKK0351A010, retHikiMotoEKK0361A010, workMap)` // Cancel old opt-in email |
| 27 | CALL | `addOdrSet(handle, param, workMap, hikiSakiSvcKeiNo, hikiSakiOpSvcKeiNo, hikiMotoOpSvcCd, retHikiMotoEKK0361A010[0].getString(...))` // Order setting |
| 28 | SET | `sodParamFlg = opSvcKeiStatUp(handle, param, hikiMotoOpSvcKeiNo, retHikiMotoEKK0361A010, hikiSakiSbOpSvcKeiNo, hikiSakiSbOpSvcCd, famiPackAri, workMap)` // Update status |
| 29 | IF | `SVC_KEI_STAT_100.compareTo(hikiSakiSvcKeiStat) <= 0` // Next-side is 100 (Service In Progress) or higher |
| 30 | CALL | `inputMap = this.mapper.editInMsgEKK0361C040(param, retHikiMotoEKK0361A010[0], hikiSakiOpSvcKeiNo, getIdoDiv(workMap), sakiLastUpdDtm)` |
| 31 | SET | `inputMap.put("op_hktgi_sk_svc_kei_no", hikiSakiSvcKeiNo)` |
| 32 | IF | `isSokujitsu` |
| 33 | SET | `inputMap.put("skj_ykgt", "01")` // Immediate start |
| 34 | ELSE |
| 35 | SET | `inputMap.put("skj_ykgt", "02")` // Next month start |
| 36 | CALL | `retMsg = (CAANMsg)runSc(handle, param, EKK0361C040, inputMap)` // Start opSvc contract for ISP |
| 37 | SET | `sakiLastUpdDtm = retMsg.getString(EKK0361C040CBSMsg.UPD_DTM)` |
| 38 | SET | `hikiSakiGeneAddDtm = retMsg.getString(EKK0361C040CBSMsg.KK0351_GENE_ADD_DTM)` |
| 39 | CALL | `setHikiSakiOpSvKeiGeneAddDtm(workMap, hikiMotoOpSvcKeiNo, hikiSakiGeneAddDtm)` |
| 40 | FOR | `for(int i = 0; i < hikiSakiSbOpSvcKeiNo.length; i++)` |
| 41 | IF | `sbOpSvcKeiNo == null || "".equals(sbOpSvcKeiNo)` |
| 42 | EXEC | `continue;` // Skip null entries |
| 43 | CALL | `inputMap = this.mapper.editInMsgEKK0411C050(param, hikiSakiOpSvcKeiNo, sbOpSvcKeiNo, sakiLastUpdDtm, getIdoDiv(workMap))` |
| 44 | SET | `inputMap.put("skj_ykgt", "01")` // Immediate start |
| 45 | CALL | `retMsg = (CAANMsg)runSc(handle, param, EKK0411C050, inputMap)` // Start sub-option for ISP |
| 46 | SET | `sodParamFlg = true` |
| 47 | IF | `sodParamFlg` |
| 48 | CALL | `sodCcInputList = createSODParam(hikiMotoOpSvcKeiNo, opSvkeiSodInfo, addSodList, sodCcInputList, workMap)` |

### SOD Generation Phase

**Block 16** — [IF] `(sodCcInputList.size() > 0)` (L2215)

> Generates SOD (Service Order Data) for all options that were added during this succession.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sodTrgtData = new HashMap<String, Object>()` |
| 2 | SET | `sodTrgtData.put(SODCC_FIXED_TEXT, sodCcInputList)` // Set SOD input data |
| 3 | SET | `sodTrgtData.put(JCMConstants.FUNC_CODE_KEY, JPCModelConstant.FUNC_CD_1)` |
| 4 | SET | `param.setData("sodTrgtData", sodTrgtData)` |
| 5 | CALL | `JKKHakkoSODCC sodcc = new JKKHakkoSODCC()` |
| 6 | CALL | `sodcc.hakkoSOD(handle, param, "sodTrgtData")` // Generate SODs |

### Instruction Book Dispatch Phase

**Block 17** — [IF] `(hikiSakiOpSvcKeiB001Sjisho.size() > 0 OR hikiSakiOpSvcKeiB002Sjisho.size() > 0)` (L2237)

> Dispatches instruction books (指示書) for option contracts that need to be retained for cancellation purposes (e.g., Mail/Mypage options with non-ordered status).

| # | Type | Code |
|---|------|------|
| 1 | IF | `hikiSakiOpSvcKeiB001Sjisho.size() > 0 \|\| hikiSakiOpSvcKeiB002Sjisho.size() > 0` |
| 2 | CALL | `sjishoCC(handle, param, hikiMotoOpSvcKeiB001Sjisho, hikiSakiOpSvcKeiB001Sjisho, hikiMotoOpSvcKeiB002Sjisho, hikiSakiOpSvcKeiB002Sjisho, hikiSakiDslOpSvcKeiB002Sjisho, workMap)` |

### Work Order Phase

**Block 18** — [IF] `(!"00019".equals(getIdoDiv(workMap)) AND successor exists AND non-mobile)` (L2247)

> For non-address-change displacements, if the successor has existing work orders and is not a mobile-type service, create a work order (工事案件) for service content changes.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!"00019".equals(getIdoDiv(workMap))` // Not address change |
| 2 | IF | `retHikiSakiEKK0081A010 != null && retHikiSakiEKK0081A010.length > 0` |
| 3 | SET | `hikiSakiPrcGrpCd = retHikiSakiEKK0081A010[0].getString(EKK0081A010CBSMsg1List.PRC_GRP_CD)` |
| 4 | IF | `!StringUtils.isEmpty(hikiSakiPrcGrpCd) && !PRC_GRP_CD_MOB_WIFI.equals(...) && !PRC_GRP_CD_MOB_EM.equals(...) && !PRC_GRP_CD_MOB_UQ.equals(...) && !"16".equals(...)` // Not mobile |
| 5 | CALL | `inputMap = this.mapper.editInMsgEKU0011B030(param, getHikiSakiSvcKeiNo(workMap))` // Query work orders |
| 6 | CALL | `runSc(handle, param, EKU0011B030, inputMap)` // Work order list |
| 7 | IF | `retEKU0011B030 != null && retEKU0011B030.length > 0` // Valid work orders exist |
| 8 | CALL | `inputMap = this.mapper.editInMsgEKK0021A010(param, mskmDtlNo)` // Application agreement |
| 9 | CALL | `runSc(handle, param, EKK0021A010, inputMap)` |
| 10 | SET | `mskmNo = retEKK0021A010[0].getString(EKK0021A010CBSMsg1List.MSKM_NO)` |
| 11 | CALL | `targetMap = createKojiakParam(param, workMap, hikiSakiSvcKeiNo, hikiSakiSysid, mskmNo, mskmDtlNo)` |
| 12 | SET | `param.setData("kojiakTrgtData", targetMap)` |
| 13 | CALL | `JKKKojiAnkenCC kojiakCC = new JKKKojiAnkenCC()` |
| 14 | CALL | `kojiakCC.executeKojiAnken(handle, param, "kojiakTrgtData")` // Create work order |
| 15 | SET (internal) | `targetMap.put(JKKKojiAnkenConstCC.KOJI_UK_CD, "070")` // Work order code |
| 16 | SET (internal) | `targetMap.put(JKKKojiAnkenConstCC.KOJI_UK_DTL_CD, "A2")` // Work order detail code |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `mskmDtlNo` | Field | Application detail number — unique identifier for a line item within a customer's application/contract |
| `op_svc_kei_no` | Field | Option service contract number — unique ID for an optional service subscription (e.g., Mail, My Homepage) |
| `op_svc_cd` | Field | Option service code — classification code for optional service types (B001=Mail, B002=My Homepage, B131=SagiWall, B132=Norton, B021=Remote Support) |
| `op_svc_kei_stat` | Field | Option service contract status — current state of an option subscription |
| `svc_kei_no` | Field | Service contract number — unique ID for a main service contract line |
| `svc_kei_stat` | Field | Service contract status — 010=Ordered, 020=Agreed, 030=Contracted, 100=Service In Progress, 910=Terminated, 920=Cancelled |
| `hiki_moto` | Field | Predecessor / transfer-out — the original service contract from which options are being transferred away |
| `hiki_saki` | Field | Successor / transfer-in — the new service contract receiving the option subscriptions |
| `seiky_kei_no` | Field | Billing contract number — the contract number used for invoicing, may differ from the service contract number |
| `aplyYmd` | Field | Application date — the effective date (YYYYMMDD) when the option succession takes effect |
| `sodCcInputList` | Field | SOD (Service Order Data) input list — accumulates order generation exception data for options that need SOD creation |
| `secuPackFlg` | Field | Security pack flag — indicates whether the user selected a security pack option during succession ("1"=selected, "0"=not selected) |
| `famiPackAri` | Field | Family pack existence flag — true if Family Pack / Security Pack / Premium Pack discount subscriptions exist on successor |
| `sagiHikakinFlg` | Field | SagiWall charge determination flag — "1"=paid, "2"=non-paid, "0"=undetermined |
| `nortonHikakinFlg` | Field | Norton charge determination flag — "1"=paid, "2"=non-paid, "0"=undetermined |
| `inetsgwlTgFlg` | Field | Internet Sigwl target flag — true when Internet Security (B131) is present in predecessor options |
| `ntfmlprmTgFlg` | Field | Norton Premium target flag — true when Norton Premium (B132) is present in predecessor options |
| `rmtsprtTgFlg` | Field | Remote Support target flag — true when Remote Support (B021) is present in predecessor options |
| `idoDiv` | Field | Displacement division — code indicating the type of service change (e.g., "00019"=address change) |
| SOD | Acronym | Service Order Data — order generation data entity for telecom service fulfillment |
| ISP | Business term | Internet Service Provider — type of option service contract related to internet access |
| My Homepage | Business term | Fujitsu's My Homepage web portal service — customers can access account info and billing details online |
| SagiWall | Business term | Sagisystem security service (Internet security / antivirus firewall) — option service code B131 |
| Norton Premium | Business term | Symantec/Norton internet security service — premium antivirus/firewall option (code B132) |
| Remote Support Plus | Business term | Remote technical support service — option service code B021 (eo光 Simple Plan addition) |
| Mail Access | Business term | Fujitsu's email access service for customers — allows checking email from any browser (option code B001) |
| Family Pack | Business term | Fujitsu discount bundle combining multiple services at reduced rates — includes Security Pack and Premium Pack |
| Security Pack | Business term | Fujitsu's bundled security service incorporating Sagisystem, Norton, and/or Remote Support |
| Premium Pack | Business term | Fujitsu's premium add-on service bundle |
| Opt-in Email | Business term | Marketing email subscription settings — customers opt-in to receive promotional emails from K-Opticom |
| Charge Code (PCRS_CD) | Field | Charge code — billing classification code for the service contract |
| SYSID | Field | System ID — unique identifier for a K-Opticom system/account |
| Last Update DTM | Field | Last update datetime — timestamp of the most recent modification to a service contract record |
| DSL | Business term | Digital Subscriber Line — broadband internet access technology used by K-Opticom |
| Work Order (Koji Anken) | Business term | Construction/installation work order — created when service content changes require physical work |
| Instruction Book (Shijisho) | Business term | Customer instruction document — dispatched when cancelled options need to be retained for record-keeping |
| Agreement Check (Goi Shoukai) | Business term | Contract agreement lookup — CBS operation to verify the status and details of a service contract |
| Sub-option (Sub-opSvc) | Business term | Sub-service — secondary services tied to a primary option (e.g., antivirus tied to internet security) |
| Aging Recovery (KIHK) | Business term | Aging processing recovery — flag to trigger aging/periodic processing during option cancellation |
