# Business Logic — JFUAddKktSvcKeiCC.editInEKK2811D010Net() [284 LOC]

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

## 1. Role

### JFUAddKktSvcKeiCC.editInEKK2811D010Net()

This method performs the **upper-mapping processing** (上りマッピング処理) for the **Device Option Service Contract Registration (Online)** — a key business operation in Fujitsu's telecom order fulfillment system. It transforms raw request data from the online device option service contract screen into a structured `CAANMsg` template (`EKK2811D010CBSMsg`) that is subsequently sent to the downstream CBS (Component-Based System) layer for persistence.

The method implements a **data transformation/routing pattern**: it first determines whether a wireless router is reserved by scanning the network router list against a predefined set of wireless PCRS codes (C22, C23, C42, CA6), then selects the appropriate pricing service code and plan code accordingly — **CD00134_G02 / CD00565_PG0201** for wireless or **CD00134_G01 / CD00565_PG0101** for wired. This routing directly controls the billing and product classification downstream.

It serves as a **shared utility** called from `addKktSvcKei()` (the primary entry point for the device option service contract registration screen), acting as a per-line-item transformer. The `index` parameter allows this method to handle multiple device option service contract line items from a single screen request, each mapped independently into the CBS message template.

The method handles **conditional field resolution**: for several fields (`SYSID`, `MSKM_DTL_NO`), it first checks the primary work map (`inMap`), and falls back to a secondary work map helper (`getKeishaWorkMapValue` or `getMskmWorkMapValue`) if the primary source is null or empty — ensuring robust data lineage across different screen entry points.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editInEKK2811D010Net(params)"])
    
    START --> CREATE_TEMPLATE["Create CAANMsg template"]
    CREATE_TEMPLATE --> SET_TEMPLATE_ID["Set TEMPLATEID from fixedText"]
    SET_TEMPLATE_ID --> SET_FUNC_CODE["Set FUNC_CODE to FUNC_1 = \"1\""]
    SET_FUNC_CODE --> SET_OPERATOR_ID["Set OPERATOR_ID from param"]
    SET_OPERATOR_ID --> SET_OPE_DATE["Set OPERATE_DATE from param"]
    SET_OPE_DATE --> SET_OPE_DATETIME["Set OPERATE_DATETIME from param"]
    SET_OPE_DATETIME --> GET_WORK_MAP["Get workMap from param.getMappingWorkArea"]
    GET_WORK_MAP --> IN_MAP_INIT["inMap = null"]
    IN_MAP_INIT --> GET_DATA["inMap = param.getData(fixedText)"]
    GET_DATA --> EXTRACT_INDEX["Extract: inMap = ArrayList.get(index)"]
    EXTRACT_INDEX --> GET_USEPLACE["Get useplaceAddressMap from param.getData"]
    GET_USEPLACE --> FALLBACK_CHECK{"useplaceAddressMap == null?"}
    FALLBACK_CHECK -->|Yes| FALLBACK_GET["Fallback get from param.getData(FUSV016102CC)"]
    FALLBACK_GET --> CHECK_MUSEN
    FALLBACK_CHECK -->|No| CHECK_MUSEN
    
    CHECK_MUSEN --> MUSSEN_INIT["musenFlg = false"]
    MUSSEN_INIT --> MUSSEN_LIST["Build musenList = [C22, C23, C42, CA6]"]
    MUSSEN_LIST --> NET_ROUTER_MAP["Get netRouterMap from param.getData(EKK0341B002)"]
    NET_ROUTER_MAP --> NET_ROUTER_LIST["Get netRouterList from netRouterMap.get(EKK0341B002CBSMsg1List)"]
    NET_ROUTER_LIST --> MUSSEN_LOOP_START{"For each netRouterList entry"}
    MUSSEN_LOOP_START -->|i < size| GET_PCRS_CD["Get kikiPcrsCd from childMap"]
    GET_PCRS_CD --> MUSSEN_CHECK{"musenList.contains(kikiPcrsCd)?"}
    MUSSEN_CHECK -->|Yes| SET_MUSEN["musenFlg = true; break"]
    SET_MUSEN --> CHECK_SVC_CD
    MUSSEN_CHECK -->|No| MUSSEN_NEXT
    MUSSEN_NEXT --> MUSSEN_LOOP_START
    
    CHECK_SVC_CD --> SVC_CD_NULL{"inMap == null || kkop_svc_cd == null/empty?"}
    SVC_CD_NULL -->|Yes| SVC_CD_NULL_SET["template.setNull(KKOP_SVC_CD)"]
    SVC_CD_NULL -->|No| SVC_CD_SET["template.set(KKOP_SVC_CD, kkop_svc_cd)"]
    
    SVC_CD_SET --> MUSSEN_PRCS{"musenFlg == true?"}
    SET_MUSEN --> MUSSEN_PRCS
    
    MUSSEN_PRCS -->|Yes| MUSSEN_ROUTER["Set PCS_CD = CD00134_G02 (Wireless Router)"]
    MUSSEN_PRCS -->|No| WIRED_ROUTER["Set PCS_CD = CD00134_G01 (Wired Router)"]
    MUSSEN_ROUTER --> MUSSEN_PLAN["Set PPLAN_CD = CD00565_PG0201 (Wireless plan)"]
    WIRED_ROUTER --> WIRED_PLAN["Set PPLAN_CD = CD00565_PG0101 (Wired plan)"]
    
    MUSSEN_PLAN --> GET_KIKI["Get kikiMap from param.getData(EKK0341D010Tel)"]
    WIRED_PLAN --> GET_KIKI
    GET_KIKI --> GET_KIKI_LIST["Get kikiList and kikiSvcMap index 0"]
    GET_KIKI_LIST --> GET_KKT_SVC["Get kktk_svc_kei_no from kikiSvcMap"]
    GET_KKT_SVC --> KKT_SVC_NULL{"kktk_svc_kei_no == null?"}
    KKT_SVC_NULL -->|Yes| KKT_SVC_NULL_SET["template.setNull(KKTK_SVC_KEI_NO)"]
    KKT_SVC_NULL -->|No| KKT_SVC_SET["template.set(KKTK_SVC_KEI_NO, value)"]
    
    KKT_SVC_SET --> SYSID_NULL{"inMap == null || sysid == null/empty?"}
    SYSID_NULL -->|Yes| SYSID_FALLBACK["Call getKeishaWorkMapValue(param, sysid)"]
    SYSID_FALLBACK --> SYSID_CHECK2{"sysid == null?"}
    SYSID_CHECK2 -->|Yes| SYSID_NULL_SET["template.setNull(SYSID)"]
    SYSID_CHECK2 -->|No| SYSID_SET["template.set(SYSID, value)"]
    SYSID_NULL -->|No| SYSID_DIRECT["template.set(SYSID, inMap sysid)"]
    
    SYSID_SET --> MSDM_NULL{"inMap == null || mskm_dtl_no == null/empty?"}
    SYSID_DIRECT --> MSDM_NULL
    MSDM_NULL -->|Yes| MSDM_FALLBACK["Call getMskmWorkMapValue(param, ekk0111_mskm_dtl_no)"]
    MSDM_FALLBACK --> MSDM_CHECK2{"mskm_dtl_no == null?"}
    MSDM_CHECK2 -->|Yes| MSDM_NULL_SET["template.setNull(MSKM_DTL_NO)"]
    MSDM_CHECK2 -->|No| MSDM_SET["template.set(MSKM_DTL_NO, value)"]
    MSDM_NULL -->|No| MSDM_DIRECT["template.set(MSKM_DTL_NO, inMap value)"]
    
    MSDM_SET --> DATE_FIELDS["Map date fields from inMap:
  ftrial_kanyu_ymd
  ftrial_prd_endymd
  honkanyu_ymd
  honkanyu_iko_kigen_ymd
  svc_use_sta_kibo_ymd
  rsv_tsta_kibo_ymd"]
    MSDM_SET --> DATE_FIELDS
    MSDM_DIRECT --> DATE_FIELDS
    
    DATE_FIELDS --> PENALTY_FIELDS["Map: pnlty_hassei_cd, ido_div"]
    PENALTY_FIELDS --> FLG_FIELDS["Map: kiki_rntai_kei_chgechu_flg"]
    FLG_FIELDS --> GET_SEIKY["Get billing contract number from EKK0321B002"]
    GET_SEIKY --> SET_SEIKY["template.set(SEIKY_KEI_NO)"]
    SET_SEIKY --> PRC_KMK["Map: prc_kmk_cd"]
    PRC_KMK --> UPD_DTM["Get updDtmBf from EKK0341D010Tel"]
    UPD_DTM --> SET_UPD_DTM{"updDtmBf == null?"}
    SET_UPD_DTM -->|Yes| UPD_DTM_NULL["template.setNull(UPD_DTM_BF)"]
    SET_UPD_DTM -->|No| UPD_DTM_SET["template.set(UPD_DTM_BF, value)"]
    UPD_DTM_NULL --> RETURN_TPL["Return template"]
    UPD_DTM_SET --> RETURN_TPL
    
    KKT_SVC_NULL_SET --> SYSID_NULL
    SYSID_NULL_SET --> MSDM_NULL
    KKT_SVC_NULL_SET --> SYSID_NULL
    KKT_SVC_SET --> SYSID_NULL
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The request parameter object carrying all screen input data, control map information (operator ID, operating date/time), and work area mapping. It serves as the primary data source — the method reads device option service contract line items, router lists, customer registration data, and billing contract info from it. |
| 2 | `fixedText` | `String` | The template identifier (template ID) used as the key to retrieve screen data from `param.getData()`. It also serves as the `TEMPLATEID` value in the output CBS message. Acts as a screen-specific discriminator when multiple screens or tabs share this method. |
| 3 | `index` | `int` | The zero-based index within the `EKK2811D010NetList` ArrayList, identifying which device option service contract line item to process. Enables this method to be called once per line item in a multi-item screen (e.g., multiple services registered in a single order). |

### External State Read

| Field / Source | Type | Business Description |
|---------------|------|---------------------|
| `param.getControlMapData(OPERATOR_ID)` | `String` | Current operator/user ID performing the action |
| `param.getControlMapData(OPE_DATE)` | `String` | Current operating date |
| `param.getControlMapData(OPE_TIME)` | `String` | Current operating time |
| `param.getMappingWorkArea()` | `Map` | Work area mapping context (not directly used for data in this method; the `inMap` is overridden by `getData()`) |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JFUAddKktSvcKeiCC.getKeishaWorkMapValue` | — | — | Calls `getKeishaWorkMapValue` in `JFUAddKktSvcKeiCC` — falls back to enterprise work map for customer SYSID |
| R | `JFUAddKktSvcKeiCC.getMskmWorkMapValue` | — | — | Calls `getMskmWorkMapValue` in `JFUAddKktSvcKeiCC` — falls back to enterprise work map for subcontract detail number |
| R | `param.getData(fixedText)` | — | — | Reads primary screen work data for the `EKK2811D010Net` list (device option service contract line items) |
| R | `param.getData("FUSV015211CC")` | — | — | Reads post-split usage location address information |
| R | `param.getData("FUSV016102CC")` | — | — | Fallback: alternative post-split usage location address data source |
| R | `param.getData("EKK0341B002")` | — | — | Reads network router reservation data (PCRS codes for wireless detection) |
| R | `param.getData("EKK0341D010Tel")` | — | — | Reads device service contract data (contract number, update datetime) |
| R | `param.getData("EKK0321B002")` | — | — | Reads billing contract number data for the online request |

**Classification Notes:**
- All operations in this method are **Read (R)** — the method is a pure data transformer with no database writes.
- The `template.set()` / `template.setNull()` calls are internal CBS message building operations, not direct CRUD against the database. The actual persistence is handled downstream by the CBS layer after this method returns.
- `getKeishaWorkMapValue` and `getMskmWorkMapValue` are private helper methods within `JFUAddKktSvcKeiCC` that delegate to the enterprise work map for fallback data resolution.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: `JFUAddKktSvcKeiCC.addKktSvcKei` | `addKktSvcKei()` -> `editInEKK2811D010Net()` | `setNull` (null propagation), `set` (field population), `param.getData` [R] |

**Call Chain Detail:**
- The direct caller is `JFUAddKktSvcKeiCC.addKktSvcKei()`, which serves as the CBS entry point for the device option service contract registration operation. It iterates over line items and calls `editInEKK2811D010Net()` for each one, accumulating the resulting `CAANMsg` templates.
- Terminal operations: The method performs **only reads** from `param.getData()` (7 distinct data sources), **writes** to the `CAANMsg` template via `set()`/`setNull()`, and **returns** a fully populated `EKK2811D010CBSMsg` template to the caller for further processing and eventual CBS dispatch. No terminal database operations occur within this method's scope.

## 6. Per-Branch Detail Blocks

### Block 1 — INITIALIZATION (L6395)

> Create and initialize the CBS message template with header information (template ID, function code, operator, operating date/time).

| # | Type | Code |
|---|------|------|
| 1 | SET | `template = new CAANMsg(EKK2811D010CBSMsg.class.getName())` // Create new CBS message template |
| 2 | SET | `template.set(EKK2811D010CBSMsg.TEMPLATEID, fixedText)` // Set template ID (上りマッピングのテンプレートID) |
| 3 | SET | `template.set(EKK2811D010CBSMsg.FUNC_CODE, FUNC_1 = "1")` // Function code default: 1 (機能コード: デフォルト) |
| 4 | CALL | `param.getControlMapData(SCControlMapKeys.OPERATOR_ID)` // Get operator ID (作業領域の取得) |
| 5 | SET | `template.set(JCMConstants.OPERATOR_ID_KEY, operatorId)` // Set operator ID in template |
| 6 | CALL | `param.getControlMapData(SCControlMapKeys.OPE_DATE)` // Get operating date (運用日付) |
| 7 | SET | `template.set(JCMConstants.OPERATE_DATE_KEY, operateDate)` // Set operating date |
| 8 | CALL | `param.getControlMapData(SCControlMapKeys.OPE_TIME)` // Get operating time (運用日時) |
| 9 | SET | `template.set(JCMConstants.OPERATE_DATETIME_KEY, operateDateTime)` // Set operating datetime |

### Block 2 — WORK MAP EXTRACTION (L6416)

> Extract the work area from the parameter, retrieve the primary data, and drill down to the specific line item via the `index` parameter.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workMap = (Map)param.getMappingWorkArea()` // Work area information (作業項目情報) |
| 2 | SET | `inMap = null` // Initialize inMap |
| 3 | SET | `inMap = (HashMap)param.getData(fixedText)` // Primary data retrieval (ユーザーデータ情報) |
| 4 | SET | `inMap = (ArrayList)inMap.get("EKK2811D010NetList").get(index)` // **v1.00.00 Addition**: Extract specific line item from the nested list structure |
| 5 | SET | `useplaceAddressMap = (HashMap)param.getData("FUSV015211CC")` // Post-split usage location address info (分割後利用場所住所情報) |

### Block 3 — USEPLACE ADDRESS FALLBACK (L6429)

> If the primary usage location address source is null, fall back to an alternative data source (`FUSV016102CC`).

| # | Type | Code |
|---|------|------|
| 1 | IF | `null == useplaceAddressMap` (分割後利用場所住所情報 一括登録) |
| 2 | SET | `useplaceAddressMap = (HashMap)param.getData("FUSV016102CC")` // Fallback: alternative address source |

### Block 4 — WIRELESS ROUTER DETECTION (L6438–6459)

> Scan the network router list to detect whether any reserved wireless routers (PCRS codes C22, C23, C42, CA6) are present. Set the `musenFlg` (無線ルーター保留フラグ) boolean accordingly. This flag drives the pricing service type routing in Block 5.

| # | Type | Code |
|---|------|------|
| 1 | SET | `musenFlg = false` // Wireless router reservation flag (無線ルーター保留判定) |
| 2 | SET | `musenList = Arrays.asList(CD00134_C22="C22", CD00134_C23="C23", CD00134_C42="C42", CD00134_CA6="CA6")` // Wireless PCRS code list |
| 3 | SET | `netRouterMap = (HashMap)param.getData("EKK0341B002")` // Get network router data |
| 4 | SET | `netRouterList = (ArrayList)netRouterMap.get("EKK0341B002CBSMsg1List")` // Get router list |
| 5 | FOR | `i = 0; i < netRouterList.size()` // Iterate over router entries |
| 6 | SET | `childMap = (HashMap)netRouterList.get(i)` // Current router entry |
| 7 | SET | `kikiPcrsCd = (String)childMap.get(EKK0341B002CBSMsg1List.PCRS_CD)` // Get PCRS code (機器PCRSコード) |
| 8 | IF | `musenList.contains(kikiPcrsCd)` (無線ルーターを保有している場合) |
| 9 | SET | `musenFlg = true` // Set wireless flag — even one wireless router triggers it (無線ルーターが1つでも保有している場合、ループを終了) |
| 10 | EXEC | `break` // Exit loop early |

### Block 5 — PRICING SERVICE CODE ROUTING (L6461–6474)

> Route to wired or wireless pricing based on `musenFlg`. Sets two fields: `PCRS_CD` (pricing service code) and `PPLAN_CD` (pricing plan code).

**Block 5.A — [IF] Wireless Router (`musenFlg == true`) (L6464)**

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(PCRS_CD, JFUStrConst.CD00134_G02 = "G02")` // Wireless router function (無線ルーター機能) |
| 2 | SET | `template.set(PPLAN_CD, JFUStrConst.CD00565_PG0201 = "PG0201")` // Wireless pricing plan |

**Block 5.B — [ELSE] Wired Router (`musenFlg == false`) (L6469)**

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(PCRS_CD, JFUStrConst.CD00134_G01 = "G01")` // Wired router function (有線ルーター機能) |
| 2 | SET | `template.set(PPLAN_CD, JFUStrConst.CD00565_PG0101 = "PG0101")` // Wired pricing plan |

### Block 6 — DEVICE OPTION SERVICE CODE (L6459–6462)

> Map the device option service code from `inMap`, with null/empty guard.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null || inMap.get("kkop_svc_cd") == null || "".equals(...)` (機器オプションサービスコード) |
| 2 | EXEC | `template.setNull(KKOP_SVC_CD)` // Set null when no service code |
| 3 | ELSE | — |
| 4 | SET | `template.set(KKOP_SVC_CD, (String)inMap.get("kkop_svc_cd"))` // Set device option service code |

### Block 7 — SERVICE CONTRACT NUMBER (L6476–6489)

> Extract the device service contract number (`KKTK_SVC_KEI_NO`) from the EKK0341D010Tel data structure (index 0 of the device list).

| # | Type | Code |
|---|------|------|
| 1 | SET | `kikiMap = (HashMap)param.getData("EKK0341D010Tel")` // Device service contract data |
| 2 | SET | `kikiList = (ArrayList)kikiMap.get("EKK0341D010TelList")` // Device list |
| 3 | SET | `kikiSvcMap = (HashMap)kikiList.get(0)` // First entry |
| 4 | SET | `kktk_svc_kei_no = (String)kikiSvcMap.get(EKK0341D010CBSMsg.KKTK_SVC_KEI_NO)` // Service contract number |
| 5 | IF | `kktk_svc_kei_no == null` (機器提供サービス契約番号) |
| 6 | EXEC | `template.setNull(KKTK_SVC_KEI_NO)` |
| 7 | ELSE | — |
| 8 | SET | `template.set(KKTK_SVC_KEI_NO, kktk_svc_kei_no)` |

### Block 8 — CUSTOMER SYSID (L6491–6519)

> Map the customer registration SYSID. Primary source: `inMap.get("sysid")`. Fallback: `getKeishaWorkMapValue(param, "sysid")`.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null || inMap.get("sysid") == null || "".equals(...)` (お客様登録.SYSID) |
| 2 | SET | `sysid = getKeishaWorkMapValue(param, "sysid")` // **v1.00.00 Addition**: Fallback to enterprise work map |
| 3 | IF | `sysid == null` (Fallback null check) |
| 4 | EXEC | `template.setNull(SYSID)` |
| 5 | ELSE | — |
| 6 | SET | `template.set(SYSID, sysid)` |
| 7 | ELSE | (L6515) — Primary source available |
| 8 | SET | `template.set(SYSID, (String)inMap.get("sysid"))` |

### Block 9 — SUBCONTRACT DETAIL NUMBER (L6519–6546)

> Map the subcontract detail number (`MSKM_DTL_NO`). Primary: `inMap.get("mskm_dtl_no")`. Fallback: `getMskmWorkMapValue(param, "ekk0111_mskm_dtl_no")`.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null || inMap.get("mskm_dtl_no") == null || "".equals(...)` (申込登録.申込明細番号) |
| 2 | SET | `mskm_dtl_no = getMskmWorkMapValue(param, "ekk0111_mskm_dtl_no")` // **v1.00.00 Addition**: Fallback |
| 3 | IF | `mskm_dtl_no == null` |
| 4 | EXEC | `template.setNull(MSKM_DTL_NO)` |
| 5 | ELSE | — |
| 6 | SET | `template.set(MSKM_DTL_NO, mskm_dtl_no)` |
| 7 | ELSE | (L6540) — Primary source available |
| 8 | SET | `template.set(MSKM_DTL_NO, (String)inMap.get("mskm_dtl_no"))` |

### Block 10 — DATE FIELDS (L6546–6606)

> Map six date fields from `inMap` to the template, each with a null/empty guard. No fallback helpers are used — these come strictly from the primary work map.

| # | Type | Code | Source Field | Template Field |
|---|------|------|-------------|----------------|
| 1 | IF/SET | `inMap.get("ftrial_kanyu_ymd") == null` → `setNull`; else `set` | `ftrial_kanyu_ymd` (試技加入年月日: Trial installation date) | `FTRIAL_KANYU_YMD` |
| 2 | IF/SET | `inMap.get("ftrial_prd_endymd") == null` → `setNull`; else `set` | `ftrial_prd_endymd` (試技期間終了年月日: Trial period end date) | `FTRIAL_PRD_ENDYMD` |
| 3 | IF/SET | `inMap.get("honkanyu_ymd") == null` → `setNull`; else `set` | `honkanyu_ymd` (本加入年月日: Full activation date) | `HONKANYU_YMD` |
| 4 | IF/SET | `inMap.get("honkanyu_iko_kigen_ymd") == null` → `setNull`; else `set` | `honkanyu_iko_kigen_ymd` (本加入移行期限年月日: Full activation transfer deadline) | `HONKANYU_IKO_KIGEN_YMD` |
| 5 | IF/SET | `inMap.get("svc_use_sta_kibo_ymd") == null` → `setNull`; else `set` | `svc_use_sta_kibo_ymd` (サービス利用開始希望年月日: Desired service start date) | `SVC_USE_STA_KIBO_YMD` |
| 6 | IF/SET | `inMap.get("rsv_tsta_kibo_ymd") == null` → `setNull`; else `set` | `rsv_tsta_kibo_ymd` (予約適応開始希望年月日: Desired reservation adaptation start date) | `RSV_TSTA_KIBO_YMD` |

### Block 11 — PENALTY AND MOVEMENT FIELDS (L6608–6628)

> Map two additional business fields: penalty occurrence code and movement division code.

| # | Type | Code | Source Field | Template Field |
|---|------|------|-------------|----------------|
| 1 | IF/SET | `inMap.get("pnlty_hassei_cd") == null` → `setNull`; else `set` | `pnlty_hassei_cd` (違約金発生コード: Penalty occurrence code) | `PNLTY_HASSEI_CD` |
| 2 | IF/SET | `inMap.get("ido_div") == null` → `setNull`; else `set` | `ido_div` (異動区分: Movement/transfer classification) | `IDO_DIV` |

### Block 12 — DEVICE BROADBAND CONTRACT CHANGE FLAG (L6630–6642)

> Map the device broadband contract change-in-progress flag.

| # | Type | Code | Source Field | Template Field |
|---|------|------|-------------|----------------|
| 1 | IF/SET | `inMap.get("kiki_rntai_kei_chgechu_flg") == null` → `setNull`; else `set` | `kiki_rntai_kei_chgechu_flg` (機器携帯契約変更手続中フラグ: Device broadband contract change in-progress flag) | `KIKI_RNTAI_KEI_CHGECHU_FLG` |

### Block 13 — BILLING CONTRACT NUMBER (L6644–6651)

> Read the billing contract number from `EKK0321B002` data (online billing contract number). This is a direct read with no null guard.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kakinMap = (HashMap)param.getData("EKK0321B002")` // Online billing contract number (ネットの請求契約番号を取得) |
| 2 | SET | `kakinList = (ArrayList)kakinMap.get("EKK0321B002CBSMsg1List")` // Billing contract list |
| 3 | SET | `kakinMap2 = (HashMap)kakinList.get(0)` // First entry |
| 4 | SET | `template.set(SEIKY_KEI_NO, (String)kakinMap2.get("seiky_kei_no"))` // Set billing contract number (請求契約番号) |

### Block 14 — PRICING ITEM CODE (L6653–6662)

> Map the pricing item code with null/empty guard.

| # | Type | Code | Source Field | Template Field |
|---|------|------|-------------|----------------|
| 1 | IF/SET | `inMap.get("prc_kmk_cd") == null` → `setNull`; else `set` | `prc_kmk_cd` (料金項目コード: Pricing item code) | `PRC_KMK_CD` |

### Block 15 — UPDATE DATETIME BEFORE (L6664–6680)

> Read the pre-update datetime from `EKK0341D010Tel` data structure (same source as Block 7, but different data — the update timestamp).

| # | Type | Code |
|---|------|------|
| 1 | SET | `updDtmMap = (HashMap)param.getData("EKK0341D010Tel")` // Same source as device data |
| 2 | SET | `updDtmList = (ArrayList)updDtmMap.get("EKK0341D010TelList")` // List |
| 3 | SET | `updDtmBfMap = (HashMap)updDtmList.get(0)` // First entry |
| 4 | SET | `updDtmBf = (String)updDtmBfMap.get(EKK0341D010CBSMsg.UPD_DTM)` // Update datetime before (更新年月日時分秒(更新前)) |
| 5 | IF | `updDtmBf == null` |
| 6 | EXEC | `template.setNull(UPD_DTM_BF)` |
| 7 | ELSE | — |
| 8 | SET | `template.set(UPD_DTM_BF, updDtmBf)` |

### Block 16 — RETURN (L6680)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return template` // Return fully populated EKK2811D010CBSMsg template |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `kkop_svc_cd` | Field | Device option service code — identifies the specific device option service product (e.g., router add-on) attached to a service contract line |
| `kkop_svc_cd` | Abbrev. | KKOP = Kiki Option (機器オプション) — Device Option |
| `kktk_svc_kei_no` | Field | Device service contract number — the unique contract identifier for the device service line |
| `kktk` | Abbrev. | KKTK = Kiki Teiki (機器定額) — Device Regular Fee |
| `sysid` | Field | Customer registration SYSID — the system identifier for the customer in the registration database |
| `mskm_dtl_no` | Field | Subcontract detail number — the detailed line item number for subcontracted service registrations |
| `mskm` | Abbrev. | MSKM = MeShotengai Keiyaku (めしょうげいかい契約) — Subcontract/Channel agreement detail |
| `ftrial_kanyu_ymd` | Field | Trial installation date (加入) — the date the trial period for the service begins |
| `ftrial_prd_endymd` | Field | Trial period end date — the expiration date of the trial/evaluation period for the service |
| `honkanyu_ymd` | Field | Full activation date — the date the service transitions from trial to fully active (本加入) |
| `honkanyu_iko_kigen_ymd` | Field | Full activation transfer deadline — the deadline by which the service must complete transition to full activation |
| `svc_use_sta_kibo_ymd` | Field | Desired service start date — the customer's requested service commencement date |
| `rsv_tsta_kibo_ymd` | Field | Desired reservation adaptation start date — the customer's requested date for reservation-based service adaptation |
| `pnlty_hassei_cd` | Field | Penalty occurrence code — the classification code for penalty/wrongful contract charges (違約金) |
| `ido_div` | Field | Movement/transfer classification — the type of service line transfer or movement (異動) |
| `kiki_rntai_kei_chgechu_flg` | Field | Device broadband contract change-in-progress flag — indicates whether a device broadband contract change procedure is currently underway |
| `prc_kmk_cd` | Field | Pricing item code — the classification code for pricing/tariff items (料金項目コード) |
| `upd_dtm` | Field | Update datetime (before) — the last-modified timestamp before the current update operation |
| `seiky_kei_no` | Field | Billing contract number — the contract number for billing/invoice purposes (請求契約番号) |
| `kkop_svc_cd` | Field | Device option service code — the service product code for device option (機器オプションサービス) |
| `kkop_svc_cd` | Abbrev. | KKOP = Kiki Option (機器オプション) |
| `PCRS_CD` | Field | Pricing service code — the code used for pricing/tariff determination (料金コードサービスコード) |
| `PPLAN_CD` | Field | Pricing plan code — the pricing plan identifier used for billing calculation |
| `CD00134_G01` | Constant | Wired router function — management code for wired router service (有線ルーター機能) |
| `CD00134_G02` | Constant | Wireless router function — management code for wireless router service (無線ルーター機能) |
| `CD00565_PG0101` | Constant | Wired pricing plan — the tariff plan associated with wired router (有線プラン) |
| `CD00565_PG0201` | Constant | Wireless pricing plan — the tariff plan associated with wireless router (無線プラン) |
| `CD00134_C22` | Constant | eo optical wireless router (100M) — pricing code for 100M wireless router |
| `CD00134_C23` | Constant | eo optical wireless router (1G) — pricing code for 1G wireless router |
| `CD00134_C42` | Constant | Network (net) — local constant for wireless router PCRS code |
| `CD00134_CA6` | Constant | Pricing code series A — wireless router-related code |
| `musenFlg` | Field | Wireless router reservation flag (無線ルーター保留フラグ) — true when any wireless router is found in the router list |
| `FUNC_1` | Constant | Function code value "1" — default function code for CBS message routing |
| `EKK2811D010CBSMsg` | CBS Msg | CBS message class for device option service contract registration (online) — the output template structure |
| `EKK0341B002` | Data Source | Network router reservation data — contains PCRS codes for router reservation checking |
| `EKK0341D010Tel` | Data Source | Device service contract data — contains device contract numbers and update timestamps |
| `EKK0321B002` | Data Source | Online billing contract data — contains billing contract numbers for the online flow |
| `FUSV015211CC` | Data Source | Post-split usage location address info — address data for split (分割) installation locations |
| `FUSV016102CC` | Data Source | Fallback post-split usage location address — alternative address data source |
| `EKK2811D010NetList` | Data Structure | Nested ArrayList of device option service contract line items for the online (net) flow — each index corresponds to one line item |
| CAANMsg | Class | Common message wrapper class used as the base for all CBS message templates |
| IRequestParameterReadWrite | Interface | Request parameter interface — the contract for reading/writing screen input data in the framework |
| SCControlMapKeys | Constant Class | Service component control map keys — predefined keys for OPERATOR_ID, OPE_DATE, OPE_TIME control data |
| JCMConstants | Constant Class | Java Common Module constants — standardized keys for OPERATOR_ID_KEY, OPERATE_DATE_KEY, OPERATE_DATETIME_KEY |
| CC_WORK_AREA_NAME | Constant | Work area name key — used to retrieve work area mapping from param (not directly active in this method as inMap is overridden) |
| SOD | Acronym | Service Order Data — telecom order fulfillment data entity |
| BS | Acronym | Business System — Fujitsu's internal telecom billing/ordering system platform |
| PCRS_CD | Abbrev. | Pricing Service Code — code used for product pricing determination |
| Net (ネット) | Business term | Online (internet-based) — distinguishes internet-order workflows from in-store/phone workflows |