# Business Logic — JFUAddSvcKeiNetCC.editInEKK0171D010() [227 LOC]

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

## 1. Role

### JFUAddSvcKeiNetCC.editInEKK0171D010()

This method performs **inbound mapping** for the "Service Contract Details <eo Light Net> Registration" (サービス契約内訳＜eo光ネット＞登録) business process. It transforms request parameter data — specifically the eo Light Net (Fiber To The Home broadband service) contract line item details — into a typed `CAANMsg` template (`EKK0171D010CBSMsg`) that serves as the input payload for a downstream Service Component (SC) call.

The method implements a **mapping/dispatch design pattern**: it reads a `HashMap` of raw string key-value pairs from the request (`param.getData(fixedText)`) and, for each of the 17+ contract detail fields, copies the value into the corresponding template message field using `template.set()`, or clears it with `template.setNull()` if the source is missing or empty. For a subset of fields (e.g., `svc_kei_no`, `mskm_dtl_no`), it implements a **work-area fallback pattern**: if the value is absent from the request data map, it falls back to reading from the work map area via helper methods like `getWorkMapValue()` and `getMskmWorkMapValue()`.

Its role in the larger system is that of a **shared inbound mapper** — it is called by the `addNetTrk()` method (which orchestrates a full eo Light Net service registration transaction by calling the SC) and by `getInvokeCBS()` (which batches multiple CBS message templates together). This method is not a screen entry point itself; it is a reusable component invoked during the registration flow for the eo Light Net service line item.

The method has no conditional branches on business content codes (such as service type). Instead, its flow is determined by **data presence** — whether each input field exists, is null, or is an empty string — which determines whether the field is populated directly, read from the work area, or set to null in the output template.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editInEKK0171D010"])
    
    START --> INIT["Create CAANMsg template with EKK0171D010CBSMsg"]
    INIT --> SETUP["Set template metadata:
TEMPLATEID, FUNC_CODE, OPERATOR_ID, OPE_DATE, OPE_TIME"]
    SETUP --> GET_INMAP["Get inMap from param.getData(fixedText)
Get workMap from param.getMappingWorkArea()"]
    
    GET_INMAP --> SVC_KEI_NO["svc_kei_no check"]
    SVC_KEI_NO -->|null or empty| WORK_FALLBACK1["getWorkMapValue(param, svc_kei_no, CC_WORK_AREA_NAME)"]
    WORK_FALLBACK1 -->|null| SET_NULL1["template.setNull(SVC_KEI_NO)"]
    WORK_FALLBACK1 -->|value| SET_VAL1["template.set(SVC_KEI_NO, workMap value)"]
    SVC_KEI_NO -->|value| INMAP_SET1["template.set(SVC_KEI_NO, inMap value)"]
    SET_NULL1 --> MSKM_DTL_NO["mskm_dtl_no check"]
    SET_VAL1 --> MSKM_DTL_NO
    INMAP_SET1 --> MSKM_DTL_NO
    
    MSKM_DTL_NO -->|null or empty| WORK_FALLBACK2["getMskmWorkMapValue(param, ekk0091_mskm_dtl_no)"]
    WORK_FALLBACK2 -->|null| SET_NULL2["template.setNull(MSKM_DTL_NO)"]
    WORK_FALLBACK2 -->|value| SET_VAL2["template.set(MSKM_DTL_NO, workMap value)"]
    MSKM_DTL_NO -->|value| INMAP_SET2["template.set(MSKM_DTL_NO, inMap value)"]
    SET_NULL2 --> TK_HOSHIKI["tk_hoshiki_kei_no check"]
    SET_VAL2 --> TK_HOSHIKI
    INMAP_SET2 --> TK_HOSHIKI
    
    TK_HOSHIKI -->|empty| NULL_P1["template.setNull(TK_HOSHIKI_KEI_NO)"]
    TK_HOSHIKI -->|value| SET_P1["template.set(TK_HOSHIKI_KEI_NO, inMap value)"]
    NULL_P1 --> PAYWAY["payway_keizoku_flg check"]
    SET_P1 --> PAYWAY
    
    PAYWAY -->|empty| NULL_P2["template.setNull(PAYWAY_KEIZOKU_FLG)"]
    PAYWAY -->|value| SET_P2["template.set(PAYWAY_KEIZOKU_FLG, inMap value)"]
    NULL_P2 --> WEB_OP["web_op_add_fail_flg check"]
    SET_P2 --> WEB_OP
    
    WEB_OP -->|empty| NULL_P3["template.setNull(WEB_OP_ADD_FAIL_FLG)"]
    WEB_OP -->|value| SET_P3["template.set(WEB_OP_ADD_FAIL_FLG, inMap value)"]
    NULL_P3 --> WORK_RRK["work_rrk_biko check"]
    SET_P3 --> WORK_RRK
    
    WORK_RRK -->|empty| NULL_P4["template.setNull(WORK_RRK_BIKO)"]
    WORK_RRK -->|value| SET_P4["template.set(WORK_RRK_BIKO, inMap value)"]
    NULL_P4 --> SVC_USE["svc_use_sta_kibo_ymd check"]
    SET_P4 --> SVC_USE
    
    SVC_USE -->|empty| NULL_P5["template.setNull(SVC_USE_STA_KIBO_YMD)"]
    SVC_USE -->|value| SET_P5["template.set(SVC_USE_STA_KIBO_YMD, inMap value)"]
    NULL_P5 --> RSV_TSTA["rsv_tsta_kibo_ymd check"]
    SET_P5 --> RSV_TSTA
    
    RSV_TSTA -->|empty| NULL_P6["template.setNull(RSV_TSTA_KIBO_YMD)"]
    RSV_TSTA -->|value| SET_P6["template.set(RSV_TSTA_KIBO_YMD, inMap value)"]
    NULL_P6 --> FTRIAL_K["ftrial_kanyu_ymd check"]
    SET_P6 --> FTRIAL_K
    
    FTRIAL_K -->|empty| NULL_P7["template.setNull(FTRIAL_KANYU_YMD)"]
    FTRIAL_K -->|value| SET_P7["template.set(FTRIAL_KANYU_YMD, inMap value)"]
    NULL_P7 --> FTRIAL_P["ftrial_prd_endymd check"]
    SET_P7 --> FTRIAL_P
    
    FTRIAL_P -->|empty| NULL_P8["template.setNull(FTRIAL_PRD_ENDYMD)"]
    FTRIAL_P -->|value| SET_P8["template.set(FTRIAL_PRD_ENDYMD, inMap value)"]
    NULL_P8 --> HONKANYU["honkanyu_ymd check"]
    SET_P8 --> HONKANYU
    
    HONKANYU -->|empty| NULL_P9["template.setNull(HONKANYU_YMD)"]
    HONKANYU -->|value| SET_P9["template.set(HONKANYU_YMD, inMap value)"]
    NULL_P9 --> HONK_IKO["honkanyu_iko_kigen_ymd check"]
    SET_P9 --> HONK_IKO
    
    HONK_IKO -->|empty| NULL_P10["template.setNull(HONKANYU_IKO_KIGEN_YMD)"]
    HONK_IKO -->|value| SET_P10["template.set(HONKANYU_IKO_KIGEN_YMD, inMap value)"]
    NULL_P10 --> PNLTY["pnlty_hassei_cd check"]
    SET_P10 --> PNLTY
    
    PNLTY -->|empty| NULL_P11["template.setNull(PNLTY_HASSEI_CD)"]
    PNLTY -->|value| SET_P11["template.set(PNLTY_HASSEI_CD, inMap value)"]
    NULL_P11 --> IDO["ido_div check"]
    SET_P11 --> IDO
    
    IDO -->|empty| NULL_P12["template.setNull(IDO_DIV)"]
    IDO -->|value| SET_P12["template.set(IDO_DIV, inMap value)"]
    NULL_P12 --> TK_TAIKI["tk_taiiki_cd check"]
    SET_P12 --> TK_TAIKI
    
    TK_TAIKI -->|empty| NULL_P13["template.setNull(TK_TAIIKI_CD)"]
    TK_TAIKI -->|value| SET_P13["template.set(TK_TAIIKI_CD, inMap value)"]
    NULL_P13 --> UPD_DTM["upd_dtm_bf check + upd_dtm fallback"]
    SET_P13 --> UPD_DTM
    
    UPD_DTM --> WORK_UPD["getWorkMapValue(param, upd_dtm, CC_WORK_AREA_NAME)"]
    UPD_DTM -->|empty or null| UPD_FALLBACK1["if upd_dtm empty: setNull(UPD_DTM_BF)
else: set(UPD_DTM_BF, upd_dtm)"]
    UPD_DTM -->|value| UPD_DIRECT["template.set(UPD_DTM_BF, inMap value)"]
    WORK_UPD --> UPD_FALLBACK1
    UPD_FALLBACK1 --> RETURN_END["Return template CAANMsg"]
    UPD_DIRECT --> RETURN_END
    
    RETURN_END --> END(["end"])
```

**Processing flow summary:**

1. **Template initialization** (L1014–L1037): Create a new `CAANMsg` using `EKK0171D010CBSMsg.class.getName()` as the schema. Set fixed metadata fields: `TEMPLATEID` from `fixedText`, `FUNC_CODE` to `"1"` (default: registration), `OPERATOR_ID`, `OPERATE_DATE`, and `OPERATE_DATETIME` from control map data.

2. **Input data retrieval** (L1041–L1042): Obtain the working area map from `param.getMappingWorkArea()` and the in-map from `param.getData(fixedText)` — this is the raw request data for the service contract details.

3. **Field-by-field mapping** (L1048–L1218): For each of the 17 contract detail fields, the method applies a conditional pattern:
   - For `svc_kei_no` and `mskm_dtl_no`: If the value is missing in `inMap`, fall back to reading from the work area (`getWorkMapValue` / `getMskmWorkMapValue`). If that also returns null, set the field to null in the template. Otherwise, populate with the work-area value.
   - For all other fields: If the value in `inMap` is an empty string, call `template.setNull()`. Otherwise, call `template.set()` with the string value from `inMap`.

4. **Return** (L1233): Return the fully populated `CAANMsg` template to the caller.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | Request parameter object carrying all input data for the service registration. Contains the raw service contract details map (keyed by fixedText, e.g., `"EKK0171D010"`), control map data (operator ID, operation date/time), and a work area map containing pre-populated context from earlier processing steps (e.g., customer work area, registration detail work area). |
| 2 | `fixedText` | `String` | A service message identifier that serves as the key to look up the correct data map from the request. In the context of this method, it is always `"EKK0171D010"` — the template identifier for Service Contract Details <eo Light Net> Registration. This key is used to fetch the raw input HashMap via `param.getData(fixedText)`. |

**Instance fields read by this method (inferred from called helpers):**

| Field | Type | Business Description |
|-------|------|---------------------|
| `CC_WORK_AREA_NAME` | `String` (static field, resolved to `"JFUAddSvcKeiNetCCWork"`) | The work map key used by `getWorkMapValue()` to read data from the general service contract work area. |
| `CC_WORK_AREA_NAME_MSKM` | `String` (static field, resolved to `"JFUAddMskmSCWork"`) | The work map key used by `getMskmWorkMapValue()` to read data from the registration detail work area. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `getWorkMapValue` | - | Work Area Map | Reads `svc_kei_no` from the general service contract work area as a fallback for the `svc_kei_no` field. |
| R | `getMskmWorkMapValue` | - | Work Area Map | Reads `ekk0091_mskm_dtl_no` from the registration detail work area as a fallback for the `mskm_dtl_no` field. |
| R | `param.getMappingWorkArea` | - | Work Area Map | Retrieves the full working area map from the request parameter for use in work-area fallback reads. |
| R | `param.getData("EKK0171D010")` | - | Request Data Map | Retrieves the raw input HashMap containing the service contract detail fields from the request. |
| R | `param.getControlMapData(OPERATOR_ID)` | - | Control Map | Reads the operator ID from the control map to set on the output template. |
| R | `param.getControlMapData(OPE_DATE)` | - | Control Map | Reads the operation date from the control map to set on the output template. |
| R | `param.getControlMapData(OPE_TIME)` | - | Control Map | Reads the operation time from the control map to set on the output template. |
| - | `template.set()` (×16) | EKK0171D010CBSMsg | - | Sets each service contract detail field onto the output CAANMsg template (SET operation on the message object). |
| - | `template.setNull()` (×16) | EKK0171D010CBSMsg | - | Clears each service contract detail field to null on the output CAANMsg template when the source data is empty. |
| - | `new CAANMsg(EKK0171D010CBSMsg)` | EKK0171D010CBSMsg | - | Creates the output message template that will be sent to the SC layer. |

**How to classify:**
This method is entirely an **R (Read)** and **SET/Null-write** operation on message objects. It does not directly create, update, or delete any database records. Instead, it reads data from the request parameter work maps and control maps, then writes (sets) the mapped data into a `CAANMsg` template. The actual database CRUD is performed by the downstream Service Component (SC) that receives this template as input — a separate SC call (in `addNetTrk()`) that executes the `EKK0171D010` CBS against the database.

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 2 methods.
Terminal operations from this method: `setNull` [-], `set` [-] (×16+), `getWorkMapValue` [R], `getMskmWorkMapValue` [R], `param.getMappingWorkArea` [R], `param.getData` [R], `param.getControlMapData` [R] (×3).

Trace who calls this method and what this method ultimately calls.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: JFUAddSvcKeiNetCC.addNetTrk() | `addNetTrk(handle, param, fixedText)` -> `editInEKK0171D010(param, "EKK0171D010")` -> `template.set()/setNull()` for 17 fields | `editInEKK0171D010 [R] WorkAreaMap, RequestData; [SET] CAANMsg template -> scCall.run() -> EKK0171D010 CBS` |
| 2 | CBS: JFUAddSvcKeiNetCC.getInvokeCBS() | `getInvokeCBS(handle, param, fixedText)` -> `editInEKK0171D010(param, "EKK0171D010")` -> `template.set()/setNull()` for 17 fields | `editInEKK0171D010 [R] WorkAreaMap, RequestData; [SET] CAANMsg template -> returned as part of template list to SC |

**How this method is used:**

- **`addNetTrk()`** (L1134–L1140): This is the primary entry point. It first maps the service contract (EKK0091D010), then calls `editInEKK0171D010` to map the contract details, passes both templates to a `ServiceComponentRequestInvoker` to execute the SC call, and then unmapps the results via `editOutEKK0171D010Msg()`. It also checks for error status codes and throws `CCException` if an error occurred.

- **`getInvokeCBS()`** (L1031–L1037): This is a batch variant that gathers multiple CBS message templates into a list (both `editInEKK0091D010` and `editInEKK0171D010`), then prepares them into a single `paramMap` with `JCMConstants.TEMPLATE_LIST_KEY` for batch SC invocation.

## 6. Per-Branch Detail Blocks

### Block 1 — INITIALIZATION (L1014–L1037)

> Initialize the CAANMsg template and set fixed metadata fields.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template = new CAANMsg(EKK0171D010CBSMsg.class.getName())` |
| 2 | SET | `inMap = null` |
| 3 | SET | `template.set(EKK0171D010CBSMsg.TEMPLATEID, fixedText)` — Set template ID from fixedText parameter |
| 4 | SET | `template.set(EKK0171D010CBSMsg.FUNC_CODE, "1")` — Set function code (default: "1" = Registration) [-> FUNC_CODE="1" (Registration)] |
| 5 | SET | `operatorId = param.getControlMapData(SCControlMapKeys.OPERATOR_ID)` — Read operator ID from control map |
| 6 | SET | `template.set(JCMConstants.OPERATOR_ID_KEY, operatorId)` |
| 7 | SET | `operateDate = param.getControlMapData(SCControlMapKeys.OPE_DATE)` — Read operation date |
| 8 | SET | `template.set(JCMConstants.OPERATE_DATE_KEY, operateDate)` |
| 9 | SET | `operateDateTime = param.getControlMapData(SCControlMapKeys.OPE_TIME)` — Read operation time |
| 10 | SET | `template.set(JCMConstants.OPERATE_DATETIME_KEY, operateDateTime)` |
| 11 | SET | `workMap = (Map) param.getMappingWorkArea()` — Read work area map |

### Block 2 — INPUT DATA RETRIEVAL (L1041–L1042)

> Retrieve the raw input data HashMap and the work area map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap = (HashMap) param.getData(fixedText)` — Get user data from request keyed by fixedText (e.g., "EKK0171D010") |
| 2 | SET | `template.set(EKK0171D010CBSMsg.FUNC_CODE, inMap.get(JCMConstants.FUNC_CODE_KEY))` — Override default FUNC_CODE with actual value from input map |

### Block 3 — svc_kei_no FIELD MAPPING (L1048–L1067)

> **SERVICE CONTRACT NUMBER** — If not in input map, fall back to work area.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null || inMap.get("svc_kei_no") == null || "".equals(inMap.get("svc_kei_no"))` — Check if svc_kei_no is missing |
| 1.1 | IF (MISSING) | — [svc_kei_no missing or empty from inMap] |
| 1.1.1 | SET | `svc_kei_no = getWorkMapValue(param, "svc_kei_no", CC_WORK_AREA_NAME)` — Fallback: read from work area [-> CC_WORK_AREA_NAME="JFUAddSvcKeiNetCCWork"] |
| 1.1.2 | IF | `svc_kei_no == null` — Check if work-area fallback is also null |
| 1.1.2.1 | SET | `template.setNull(EKK0171D010CBSMsg.SVC_KEI_NO)` — Set null on template |
| 1.1.3 | ELSE | — [svc_kei_no found in work area] |
| 1.1.3.1 | SET | `template.set(EKK0171D010CBSMsg.SVC_KEI_NO, svc_kei_no)` — Set work-area value on template |
| 1.2 | ELSE (PRESENT) | — [svc_kei_no present in inMap] |
| 1.2.1 | SET | `template.set(EKK0171D010CBSMsg.SVC_KEI_NO, (String) inMap.get("svc_kei_no"))` |

### Block 4 — mskm_dtl_no FIELD MAPPING (L1071–L1093)

> **REGISTRATION DETAIL NUMBER** — If not in input map, fall back to registration detail work area.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null || inMap.get("mskm_dtl_no") == null || "".equals(inMap.get("mskm_dtl_no"))` — Check if mskm_dtl_no is missing |
| 1.1 | IF (MISSING) | — [mskm_dtl_no missing or empty] |
| 1.1.1 | SET | `mskm_dtl_no = getMskmWorkMapValue(param, "ekk0091_mskm_dtl_no")` — Fallback: read from registration detail work area [-> CC_WORK_AREA_NAME_MSKM="JFUAddMskmSCWork"] |
| 1.1.2 | IF | `mskm_dtl_no == null` — Check if work-area fallback is also null |
| 1.1.2.1 | SET | `template.setNull(EKK0171D010CBSMsg.MSKM_DTL_NO)` — Set null on template |
| 1.1.3 | ELSE | — [mskm_dtl_no found in work area] |
| 1.1.3.1 | SET | `template.set(EKK0171D010CBSMsg.MSKM_DTL_NO, mskm_dtl_no)` — Set work-area value on template |
| 1.2 | ELSE (PRESENT) | — [mskm_dtl_no present in inMap] |
| 1.2.1 | SET | `template.set(EKK0171D010CBSMsg.MSKM_DTL_NO, (String) inMap.get("mskm_dtl_no"))` |

### Block 5 — tk_hoshiki_kei_no FIELD MAPPING (L1099–L1109)

> **PROVISION METHOD CONTRACT NUMBER** — Direct from inMap; null if empty.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(inMap.get("tk_hoshiki_kei_no"))` — Check if empty |
| 1.1 | IF (EMPTY) | — [tk_hoshiki_kei_no is empty] |
| 1.1.1 | SET | `template.setNull(EKK0171D010CBSMsg.TK_HOSHIKI_KEI_NO)` |
| 1.2 | ELSE (PRESENT) | — [tk_hoshiki_kei_no has value] |
| 1.2.1 | SET | `template.set(EKK0171D010CBSMsg.TK_HOSHIKI_KEI_NO, (String) inMap.get("tk_hoshiki_kei_no"))` |

### Block 6 — payway_keizoku_flg FIELD MAPPING (L1113–L1123)

> **PAYMENT METHOD CONTINUATION FLAG** — Direct from inMap; null if empty.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(inMap.get("payway_keizoku_flg"))` — Check if empty |
| 1.1 | IF (EMPTY) | — [payway_keizoku_flg is empty] |
| 1.1.1 | SET | `template.setNull(EKK0171D010CBSMsg.PAYWAY_KEIZOKU_FLG)` |
| 1.2 | ELSE (PRESENT) | — [payway_keizoku_flg has value] |
| 1.2.1 | SET | `template.set(EKK0171D010CBSMsg.PAYWAY_KEIZOKU_FLG, (String) inMap.get("payway_keizoku_flg"))` |

### Block 7 — web_op_add_fail_flg FIELD MAPPING (L1127–L1137)

> **WEB OPERATION ADDITION FAILURE FLAG** — Direct from inMap; null if empty.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(inMap.get("web_op_add_fail_flg"))` — Check if empty |
| 1.1 | IF (EMPTY) | — [web_op_add_fail_flg is empty] |
| 1.1.1 | SET | `template.setNull(EKK0171D010CBSMsg.WEB_OP_ADD_FAIL_FLG)` |
| 1.2 | ELSE (PRESENT) | — [web_op_add_fail_flg has value] |
| 1.2.1 | SET | `template.set(EKK0171D010CBSMsg.WEB_OP_ADD_FAIL_FLG, (String) inMap.get("web_op_add_fail_flg"))` |

### Block 8 — work_rrk_biko FIELD MAPPING (L1141–L1151)

> **BUSINESS PARTNER REMARKS** — Direct from inMap; null if empty.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(inMap.get("work_rrk_biko"))` — Check if empty |
| 1.1 | IF (EMPTY) | — [work_rrk_biko is empty] |
| 1.1.1 | SET | `template.setNull(EKK0171D010CBSMsg.WORK_RRK_BIKO)` |
| 1.2 | ELSE (PRESENT) | — [work_rrk_biko has value] |
| 1.2.1 | SET | `template.set(EKK0171D010CBSMsg.WORK_RRK_BIKO, (String) inMap.get("work_rrk_biko"))` |

### Block 9 — svc_use_sta_kibo_ymd FIELD MAPPING (L1155–L1165)

> **SERVICE USE START DESIRED DATE (Year/Month/Day)** — Direct from inMap; null if empty.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(inMap.get("svc_use_sta_kibo_ymd"))` — Check if empty |
| 1.1 | IF (EMPTY) | — [svc_use_sta_kibo_ymd is empty] |
| 1.1.1 | SET | `template.setNull(EKK0171D010CBSMsg.SVC_USE_STA_KIBO_YMD)` |
| 1.2 | ELSE (PRESENT) | — [svc_use_sta_kibo_ymd has value] |
| 1.2.1 | SET | `template.set(EKK0171D010CBSMsg.SVC_USE_STA_KIBO_YMD, (String) inMap.get("svc_use_sta_kibo_ymd"))` |

### Block 10 — rsv_tsta_kibo_ymd FIELD MAPPING (L1169–L1179)

> **RESERVATION APPLY START DESIRED DATE (Year/Month/Day)** — Direct from inMap; null if empty.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(inMap.get("rsv_tsta_kibo_ymd"))` — Check if empty |
| 1.1 | IF (EMPTY) | — [rsv_tsta_kibo_ymd is empty] |
| 1.1.1 | SET | `template.setNull(EKK0171D010CBSMsg.RSV_TSTA_KIBO_YMD)` |
| 1.2 | ELSE (PRESENT) | — [rsv_tsta_kibo_ymd has value] |
| 1.2.1 | SET | `template.set(EKK0171D010CBSMsg.RSV_TSTA_KIBO_YMD, (String) inMap.get("rsv_tsta_kibo_ymd"))` |

### Block 11 — ftrial_kanyu_ymd FIELD MAPPING (L1183–L1193)

> **TRIAL ADDITION DATE (Year/Month/Day)** — Direct from inMap; null if empty.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(inMap.get("ftrial_kanyu_ymd"))` — Check if empty |
| 1.1 | IF (EMPTY) | — [ftrial_kanyu_ymd is empty] |
| 1.1.1 | SET | `template.setNull(EKK0171D010CBSMsg.FTRIAL_KANYU_YMD)` |
| 1.2 | ELSE (PRESENT) | — [ftrial_kanyu_ymd has value] |
| 1.2.1 | SET | `template.set(EKK0171D010CBSMsg.FTRIAL_KANYU_YMD, (String) inMap.get("ftrial_kanyu_ymd"))` |

### Block 12 — ftrial_prd_endymd FIELD MAPPING (L1197–L207)

> **TRIAL PERIOD END DATE (Year/Month/Day)** — Direct from inMap; null if empty.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(inMap.get("ftrial_prd_endymd"))` — Check if empty |
| 1.1 | IF (EMPTY) | — [ftrial_prd_endymd is empty] |
| 1.1.1 | SET | `template.setNull(EKK0171D010CBSMsg.FTRIAL_PRD_ENDYMD)` |
| 1.2 | ELSE (PRESENT) | — [ftrial_prd_endymd has value] |
| 1.2.1 | SET | `template.set(EKK0171D010CBSMsg.FTRIAL_PRD_ENDYMD, (String) inMap.get("ftrial_prd_endymd"))` |

### Block 13 — honkanyu_ymd FIELD MAPPING (L1211–L1221)

> **FULL ADDITION DATE (Year/Month/Day)** — Direct from inMap; null if empty.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(inMap.get("honkanyu_ymd"))` — Check if empty |
| 1.1 | IF (EMPTY) | — [honkanyu_ymd is empty] |
| 1.1.1 | SET | `template.setNull(EKK0171D010CBSMsg.HONKANYU_YMD)` |
| 1.2 | ELSE (PRESENT) | — [honkanyu_ymd has value] |
| 1.2.1 | SET | `template.set(EKK0171D010CBSMsg.HONKANYU_YMD, (String) inMap.get("honkanyu_ymd"))` |

### Block 14 — honkanyu_iko_kigen_ymd FIELD MAPPING (L1225–L1235)

> **FULL ADDITION TRANSFER DEADLINE DATE (Year/Month/Day)** — Direct from inMap; null if empty.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(inMap.get("honkanyu_iko_kigen_ymd"))` — Check if empty |
| 1.1 | IF (EMPTY) | — [honkanyu_iko_kigen_ymd is empty] |
| 1.1.1 | SET | `template.setNull(EKK0171D010CBSMsg.HONKANYU_IKO_KIGEN_YMD)` |
| 1.2 | ELSE (PRESENT) | — [honkanyu_iko_kigen_ymd has value] |
| 1.2.1 | SET | `template.set(EKK0171D010CBSMsg.HONKANYU_IKO_KIGEN_YMD, (String) inMap.get("honkanyu_iko_kigen_ymd"))` |

### Block 15 — pnlty_hassei_cd FIELD MAPPING (L1239–L1249)

> **PENALTY OCCURRENCE CODE** — Direct from inMap; null if empty.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(inMap.get("pnlty_hassei_cd"))` — Check if empty |
| 1.1 | IF (EMPTY) | — [pnlty_hassei_cd is empty] |
| 1.1.1 | SET | `template.setNull(EKK0171D010CBSMsg.PNLTY_HASSEI_CD)` |
| 1.2 | ELSE (PRESENT) | — [pnlty_hassei_cd has value] |
| 1.2.1 | SET | `template.set(EKK0171D010CBSMsg.PNLTY_HASSEI_CD, (String) inMap.get("pnlty_hassei_cd"))` |

### Block 16 — ido_div FIELD MAPPING (L1253–L1263)

> **CHANGE/DIVISION** — Direct from inMap; null if empty.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(inMap.get("ido_div"))` — Check if empty |
| 1.1 | IF (EMPTY) | — [ido_div is empty] |
| 1.1.1 | SET | `template.setNull(EKK0171D010CBSMsg.IDO_DIV)` |
| 1.2 | ELSE (PRESENT) | — [ido_div has value] |
| 1.2.1 | SET | `template.set(EKK0171D010CBSMsg.IDO_DIV, (String) inMap.get("ido_div"))` |

### Block 17 — tk_taiiki_cd FIELD MAPPING (L1267–L1277)

> **PROVISION REGION CODE** — Direct from inMap; null if empty.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(inMap.get("tk_taiiki_cd"))` — Check if empty |
| 1.1 | IF (EMPTY) | — [tk_taiiki_cd is empty] |
| 1.1.1 | SET | `template.setNull(EKK0171D010CBSMsg.TK_TAIIKI_CD)` |
| 1.2 | ELSE (PRESENT) | — [tk_taiiki_cd has value] |
| 1.2.1 | SET | `template.set(EKK0171D010CBSMsg.TK_TAIIKI_CD, (String) inMap.get("tk_taiiki_cd"))` |

### Block 18 — upd_dtm_bf FIELD MAPPING (L1283–L1304)

> **UPDATE DATE/TIME (BEFORE UPDATE)** — Special handling: reads `upd_dtm` from work area as a fallback for `upd_dtm_bf`. Added as part of the 2012/05/07 service interface integration対応 (correspondence).

| # | Type | Code |
|---|------|------|
| 1 | SET | `upd_dtm = getWorkMapValue(param, "upd_dtm", CC_WORK_AREA_NAME)` — Pre-read work area upd_dtm |
| 2 | IF | `inMap == null || inMap.get("upd_dtm_bf") == null || "".equals(inMap.get("upd_dtm_bf"))` — Check if upd_dtm_bf is missing in input |
| 2.1 | IF (MISSING) | — [upd_dtm_bf missing or empty from inMap] |
| 2.1.1 | IF | `upd_dtm == null || "".equals(upd_dtm)` — Check if work-area fallback is also empty |
| 2.1.1.1 | SET | `template.setNull(EKK0171D010CBSMsg.UPD_DTM_BF)` |
| 2.1.2 | ELSE | — [upd_dtm found in work area] |
| 2.1.2.1 | SET | `template.set(EKK0171D010CBSMsg.UPD_DTM_BF, upd_dtm)` |
| 2.2 | ELSE (PRESENT) | — [upd_dtm_bf present in inMap] |
| 2.2.1 | SET | `template.set(EKK0171D010CBSMsg.UPD_DTM_BF, inMap.get("upd_dtm_bf"))` |

### Block 19 — RETURN (L1298)

> Return the completed CAANMsg template.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return template;` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_no` | Field | Service contract number — the unique identifier for a service contract line item (the detail row within a service contract) |
| `svc_kei_grp_list` | Field | Service contract group list — internal grouping key for service contract categories |
| `svc_kei_list` | Field | Service contract list — list key for service contract items |
| `mskm_dtl_no` | Field | Registration detail number — the detail row number within a registration (申报登録明細番号) |
| `ekk0091_mskm_dtl_no` | Field | Registration detail number key for EKK0091 — work-area fallback key for the registration detail number |
| `tk_hoshiki_kei_no` | Field | Provision method contract number — identifies how the service is provisioned (e.g., direct, resold) |
| `payway_keizoku_flg` | Field | Payment method continuation flag — indicates whether to continue the existing payment method for the service |
| `web_op_add_fail_flg` | Field | Web operation addition failure flag — indicates whether the web-based service addition operation failed |
| `work_rrk_biko` | Field | Business partner remarks — free-text field for business partner notes (業務連絡備考) |
| `svc_use_sta_kibo_ymd` | Field | Service use start desired date — the customer's desired start date for service activation (Year/Month/Day format) |
| `rsv_tsta_kibo_ymd` | Field | Reservation apply start desired date — the customer's desired start date for reservation application (Year/Month/Day format) |
| `ftrial_kanyu_ymd` | Field | Trial addition date — the date the trial period begins (試用加入年月日) |
| `ftrial_prd_endymd` | Field | Trial period end date — the date the trial period ends (試用期間終了年月日) |
| `honkanyu_ymd` | Field | Full addition date — the date the service transitions from trial to full activation (本加入年月日) |
| `honkanyu_iko_kigen_ymd` | Field | Full addition transfer deadline date — the deadline by which the full activation transfer must be completed (本加入移行期限年月日) |
| `pnlty_hassei_cd` | Field | Penalty occurrence code — code indicating if/how a contract penalty has been triggered (違約金発生コード) |
| `ido_div` | Field | Change/division — classification of whether this is a new service, change, or transfer (異動区分) |
| `tk_taiiki_cd` | Field | Provision region code — the geographical region code for service provisioning (提供領域コード) |
| `upd_dtm` / `upd_dtm_bf` | Field | Update date/time (before) — timestamp of the last update before this operation (更新年月日時分秒) |
| `TEMPLATE_ID_NET` | Constant | Template ID "EKK0091D010" — Service Contract <eo Light Net> Registration |
| `TEMPLATE_ID_NET_UTC` | Constant | Template ID "EKK0171D010" — Service Contract Details <eo Light Net> Registration |
| `TEMPLATE_ID_KIKI` | Constant | Template ID "EKK0341D010Net" — Equipment Provision Service Contract Registration |
| `CC_WORK_AREA_NAME` | Constant | Work map name "JFUAddSvcKeiNetCCWork" — work area for service contract line items |
| `CC_WORK_AREA_NAME_MSKM` | Constant | Work map name "JFUAddMskmSCWork" — work area for registration details |
| `FUNC_CODE` | Field | Function code — operation type indicator (default "1" = Registration/登録) |
| `CAANMsg` | Class | Fuji Asia Application Message — a templated message class used to pass structured data between CBS layers |
| `EKK0171D010CBSMsg` | Class | CBS Message schema for Service Contract Details <eo Light Net> Registration — defines the template fields |
| `EKK0171D010` | Service Component | The CBS (Central Business System) for Service Contract Details <eo Light Net> Registration |
| eo Light Net | Business term | A Fiber To The Home (FTTH) broadband internet service offered by K-Opticom (eo光ネット) |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband network technology |
| `AbstractCommonComponent` | Class | Base class for all common components in the Fujitsu Futurity platform — provides shared utility methods like `setSCInputCommonData()` |
| `IRequestParameterReadWrite` | Interface | Request parameter interface providing access to control map data, work area maps, and typed data maps |
| `ServiceComponentRequestInvoker` | Class | Invoker class used to execute SC (Service Component) calls with mapped input parameters |
| K-Opticom | Business term | Japanese telecommunications provider offering FTTH and fiber optic services |
