# Business Logic — JFUAddSvcKeiTvCC.editInEKK0101D010() [418 LOC]

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

## 1. Role

### JFUAddSvcKeiTvCC.editInEKK0101D010()

This method performs the **upward mapping processing for K-Opticom TV Service Contract Registration** (サービス契約＜TV＞登録の上りマッピング処理). It is the primary data transformation layer that takes raw input data from the UI screen's request parameter and maps it into a structured `CAANMsg` (CBS message template) that conforms to the `EKK0101D010CBSMsg` schema.

The method handles **TV broadband internet + television bundled service contracts** (eo光TV) — the core product offering where fiber-optic internet (eo光) is combined with TV subscription services. All service types under this umbrella (FTTH, basic TV tiers, optional add-on services) flow through this single unified mapping method, which normalizes the diverse field set into a consistent CBS request message.

It implements a **delegation / data-mapper design pattern**: the method reads data from multiple sources (the main request data map, the work area map as a fallback for derived fields like SYSID and detail numbers, and the control map for operational metadata), applies null-safety checks, and populates the CBS message template field by field. It acts as a **shared utility component** called from multiple entry points within the TV service registration flow — both the standard registration path and the invoke/replay CBS path — ensuring that all callers send identically structured messages to the downstream CBS.

The method has no functional conditional branches by service type; instead, it follows a linear mapping pattern with per-field null/coalescing logic. Three special fields (`sysid`, `mskm_dtl_no`, `seiky_kei_no`) include fallback logic that reads from the work area map when the primary input map lacks the value, supporting scenarios where upstream processing computes these values separately.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editInEKK0101D010(param, fixedText)"])
    INIT1["Initialize CAANMsg template EKK0101D010CBSMsg"]
    INIT2["Set TEMPLATEID fixedText FUNC_CODE 1
Set OPERATOR_ID OPERATE_DATE OPERATE_DATETIME"]
    READ_IN["Read inMap param.getData fixedText"]
    FUNC_CHECK{inMap != null
and FUNC_CODE present}
    FUNC_SET["Override FUNC_CODE from inMap"]
    SYSID_NULL{inMap null or sysid empty}
    SYSID_WORK{sysid from work map null}
    SYSID_NULL_VAL["template.setNull SYSID"]
    SYSID_SET["template.set SYSID sysid value"]
    SYSID_MAP["template.set SYSID inMap.sysid"]
    MAP_FIELD["Map 36 fields svc_cd mskm_dtl_no and more"]
    RETURN_TPL["Return template"]
    END(["End"])
    START --> INIT1 --> INIT2 --> READ_IN --> FUNC_CHECK
    FUNC_CHECK -- Yes --> FUNC_SET --> SYSID_NULL
    FUNC_CHECK -- No --> SYSID_NULL
    SYSID_NULL -- Yes --> SYSID_WORK
    SYSID_WORK -- null --> SYSID_NULL_VAL
    SYSID_WORK -- value --> SYSID_SET
    SYSID_NULL -- No --> SYSID_MAP --> MAP_FIELD
    SYSID_NULL_VAL --> MAP_FIELD
    SYSID_SET --> MAP_FIELD
    SYSID_MAP --> MAP_FIELD
    MAP_FIELD --> RETURN_TPL --> END
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The request parameter object carrying all UI input data for TV service contract registration. Contains the primary data map (`getData(fixedText)`) with field values entered or computed on the registration screen, the control map (for operator ID, operate date, operate time), and the mapping work area (for fallback field resolution of `sysid`, `mskm_dtl_no`, `seiky_kei_no`). |
| 2 | `fixedText` | `String` | The template identifier / key used to look up data from the request parameter. Typically equals `"EKK0101D010"` (the service contract registration mapping template ID). Used as the lookup key in `param.getData(fixedText)` to retrieve the HashMap of input fields, and also directly set as the `TEMPLATEID` field on the output CBS message. |

**Instance fields / external state read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `CC_WORK_AREA_NAME_KEISHA` | `String` | Work area map name `"JFUAddKeishaServiceCCWork"` — corporate/customer service data area used as fallback for SYSID resolution |
| `CC_WORK_AREA_NAME_MSKM` | `String` | Work area map name `"JFUAddMskmSCWork"` — order detail work area used as fallback for `mskm_dtl_no` resolution |
| `CC_WORK_AREA_NAME_SKK` | `String` | Work area map name `"JFUAddSkkSCWork"` — billing contract work area used as fallback for `seiky_kei_no` resolution |
| `getWorkMapValue` | Method | Internal helper that reads from `param.getMappingWorkArea()` to resolve field values from the work area map. |

## 4. CRUD Operations / Called Services

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

No external SC/CBS service calls, DAO calls, or database operations are made within this method. It is a pure data-mapping method that creates and populates a `CAANMsg` template. All operations are local: reading from `param`, writing to `template`, and invoking the local helper `getWorkMapValue()`.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `getWorkMapValue` | (internal helper) | Mapping Work Area | Reads field values from the mapping work area map as fallback source for sysid, mskm_dtl_no, and seiky_kei_no when the primary input data is missing. |
| - | `param.getData(fixedText)` | (request parameter) | Request Data Map | Reads the HashMap of raw input fields keyed by `fixedText` template ID. |
| - | `param.getControlMapData(...)` | (request parameter) | Control Map | Reads operational metadata: operator ID, operate date, operate time. |
| - | `template.set(...)` / `template.setNull(...)` | (local object) | CAANMsg Template | Sets or nullifies fields on the CBS message template (36+ field assignments). |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: `JFUAddSvcKeiTvCC.addTvTrk()` | `addTvTrk()` -> `editInEKK0101D010(param, fixedText)` | `setNull` [-], `set` [-] |
| 2 | CBS: `JFUAddSvcKeiTvCC.getInvokeCBS()` | `getInvokeCBS()` -> `editInEKK0101D010(param, fixedText)` | `setNull` [-], `set` [-] |

**Notes:**
- Both callers are CBS (Common Business Service) methods within the same class `JFUAddSvcKeiTvCC`.
- `addTvTrk()` is the standard TV registration entry point that invokes upward mapping before sending to CBS.
- `getInvokeCBS()` handles the CBS invoke/replay path, re-using the same mapping method to construct the CBS message for replay scenarios.
- This method has no screen/batch entry points within 8 hops — it sits deep in the CBS layer.
- Terminal operations: all are local `set`/`setNull` calls on the `CAANMsg` template. No database, entity, or SC calls originate from this method.

## 6. Per-Branch Detail Blocks

**Block 1** — [INITIALIZATION] (L378)

> Creates the CBS message template and populates core operational metadata fields from the control map.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `CAANMsg template = new CAANMsg(EKK0101D010CBSMsg.class.getName())` | Initialize new CBS message template with EKK0101D010 schema |
| 2 | SET | `template.set(TEMPLATEID, fixedText)` | Set template ID to the value of `fixedText` parameter |
| 3 | SET | `template.set(FUNC_CODE, "1")` | Set function code to default "1" — registration mode (機能コード（デフォルト：1）) |
| 4 | EXEC | `param.getControlMapData(SCControlMapKeys.OPERATOR_ID)` | Read operator ID from control map |
| 5 | SET | `template.set(OPERATOR_ID_KEY, operatorId)` | Set operator ID on template |
| 6 | EXEC | `param.getControlMapData(SCControlMapKeys.OPE_DATE)` | Read operate date from control map |
| 7 | SET | `template.set(OPERATE_DATE_KEY, operateDate)` | Set operate date on template |
| 8 | EXEC | `param.getControlMapData(SCControlMapKeys.OPE_TIME)` | Read operate time from control map |
| 9 | SET | `template.set(OPERATE_DATETIME_KEY, operateDateTime)` | Set operate datetime on template |

**Block 2** — [DATA INPUT READ] (L400)

> Reads the primary input data map from the request parameter.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `inMap = (HashMap)param.getData(fixedText)` | Get user data HashMap from request using template key (ユーザーデータ情報) |

**Block 3** — [FUNCTION CODE OVERRIDE] (L403)

> If input map exists and contains a function code, override the default.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap != null` | Check if input map is available |
| 2 | SET | `template.set(FUNC_CODE, inMap.get(FUNC_CODE_KEY))` | Override function code with value from input map (機能コード) |

**Block 4** — [SYSID FIELD MAPPING] (L407)

> Maps the SYSID field. If input map lacks it, falls back to the work area map (`JFUAddKeishaServiceCCWork`).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR inMap.get("sysid") == null OR "sysid" empty` | Check sysid availability (サービス契約＜eo光TV＞登録マップ.SYSID -> SYSID) |
| 2.1 | IF | Work area fallback path | v1.00.00 added feature: try work map as fallback (v1.00.00 追加開始) |
| 2.2 | SET | `sysid = getWorkMapValue(param, "sysid", CC_WORK_AREA_NAME_KEISHA)` | Resolve SYSID from corporate service work area (CC_WORK_AREA_NAME_KEISHA = "JFUAddKeishaServiceCCWork") |
| 2.3 | IF | `sysid == null` | Work map also has no SYSID |
| 2.4 | EXEC | `template.setNull(SYSID)` | Set SYSID as null on template |
| 2.5 | ELSE | `sysid != null` | SYSID found in work area |
| 2.6 | SET | `template.set(SYSID, sysid)` | Set resolved SYSID value |
| 2.7 | END | (v1.00.00 追加終了) | End of added block |
| 3 | ELSE | Input map has sysid | Direct from input map |
| 4 | SET | `template.set(SYSID, inMap.get("sysid"))` | Set SYSID from input map |

**Block 5** — [SVC_CD FIELD MAPPING] (L426)

> Maps the service code field.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR svc_cd missing or empty` | Check service code availability (サービス契約＜eo光TV＞登録マップ.サービスコード -> サービスコード) |
| 2 | EXEC | `template.setNull(SVC_CD)` | Set null |
| 3 | ELSE | svc_cd present | |
| 4 | SET | `template.set(SVC_CD, inMap.get("svc_cd"))` | Set service code |

**Block 6** — [MSKM_DTL_NO FIELD MAPPING] (L434)

> Maps the order detail number. Falls back to work area (`JFUAddMskmSCWork`) if missing from input — v1.00.00 addition.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR mskm_dtl_no missing or empty` | Check order detail number (サービス契約＜eo光TV＞登録マップ.申請明細番号 -> 申請明細番号) |
| 2 | SET | `mskm_dtl_no = getWorkMapValue(param, "ekk0101_mskm_dtl_no", CC_WORK_AREA_NAME_MSKM)` | Resolve from work area (CC_WORK_AREA_NAME_MSKM = "JFUAddMskmSCWork") |
| 3 | IF | `mskm_dtl_no == null` | Not in work area either |
| 4 | EXEC | `template.setNull(MSKM_DTL_NO)` | Set null |
| 5 | ELSE | value found | |
| 6 | SET | `template.set(MSKM_DTL_NO, mskm_dtl_no)` | Set resolved value |
| 7 | ELSE | Input map has mskm_dtl_no | |
| 8 | SET | `template.set(MSKM_DTL_NO, inMap.get("mskm_dtl_no"))` | Set from input map |

**Block 7** — [MENKAIHAT_ANKEN_NO FIELD MAPPING] (L448)

> Maps the development plan case number (面開発案件番号).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR menkaihat_anken_no missing or empty` | Check development plan case number |
| 2 | EXEC | `template.setNull(MENKAIHAT_ANKEN_NO)` | Set null |
| 3 | ELSE | | |
| 4 | SET | `template.set(MENKAIHAT_ANKEN_NO, inMap.get("menkaihat_anken_no"))` | Set value |

**Block 8** — [PRC_GRP_CD FIELD MAPPING] (L456)

> Maps the price group code (料金グループコード -> 料金グループコード).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR prc_grp_cd missing or empty` | |
| 2 | EXEC | `template.setNull(PRC_GRP_CD)` | Set null |
| 3 | ELSE | | |
| 4 | SET | `template.set(PRC_GRP_CD, inMap.get("prc_grp_cd"))` | Set value |

**Block 9** — [PCRS_CD FIELD MAPPING] (L464)

> Maps the price course code (料金コースコード -> 料金コースコード).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR pcrs_cd missing or empty` | |
| 2 | EXEC | `template.setNull(PCRS_CD)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(PCRS_CD, inMap.get("pcrs_cd"))` | |

**Block 10** — [PPLAN_CD FIELD MAPPING] (L472)

> Maps the price plan code (料金プランコード -> 料金プランコード).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR pplan_cd missing or empty` | |
| 2 | EXEC | `template.setNull(PPLAN_CD)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(PPLAN_CD, inMap.get("pplan_cd"))` | |

**Block 11** — [TK_HOSHIKI_KEI_NO FIELD MAPPING] (L480)

> Maps the provider format contract number (提供方式契約番号 -> 提供方式契約番号).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR tk_hoshiki_kei_no missing or empty` | |
| 2 | EXEC | `template.setNull(TK_HOSHIKI_KEI_NO)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(TK_HOSHIKI_KEI_NO, inMap.get("tk_hoshiki_kei_no"))` | |

**Block 12** — [SVC_USE_STA_KIBO_YMD FIELD MAPPING] (L488)

> Maps the desired service usage start date (サービス利用開始希望年月日 -> サービス利用開始希望年月日).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR svc_use_sta_kibo_ymd missing or empty` | |
| 2 | EXEC | `template.setNull(SVC_USE_STA_KIBO_YMD)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(SVC_USE_STA_KIBO_YMD, inMap.get("svc_use_sta_kibo_ymd"))` | |

**Block 13** — [RSV_TSTA_KIBO_YMD FIELD MAPPING] (L496)

> Maps the reservation application start date (予約適用開始希望年月日 -> 予約適用開始希望年月日).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR rsv_tsta_kibo_ymd missing or empty` | |
| 2 | EXEC | `template.setNull(RSV_TSTA_KIBO_YMD)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(RSV_TSTA_KIBO_YMD, inMap.get("rsv_tsta_kibo_ymd"))` | |

**Block 14** — [ID_SOKHOSHO_OUTPUT_YH FIELD MAPPING] (L504)

> Maps the ID notice output flag (ID速報書出力要否 -> ID速報書出力要否).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR id_sokhosho_output_yh missing or empty` | |
| 2 | EXEC | `template.setNull(ID_SOKHOSHO_OUTPUT_YH)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(ID_SOKHOSHO_OUTPUT_YH, inMap.get("id_sokhosho_output_yh"))` | |

**Block 15** — [PAYWAY_KEIZOKU_FLG FIELD MAPPING] (L512)

> Maps the payment method continuation flag (支払い方法継続フラグ -> 支払い方法継続フラグ).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR payway_keizoku_flg missing or empty` | |
| 2 | EXEC | `template.setNull(PAYWAY_KEIZOKU_FLG)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(PAYWAY_KEIZOKU_FLG, inMap.get("payway_keizoku_flg"))` | |

**Block 16** — [FTRIAL_KANYU_YMD FIELD MAPPING] (L520)

> Maps the trial input date (試用加入年月日 -> 試用加入年月日).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR ftrial_kanyu_ymd missing or empty` | |
| 2 | EXEC | `template.setNull(FTRIAL_KANYU_YMD)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(FTRIAL_KANYU_YMD, inMap.get("ftrial_kanyu_ymd"))` | |

**Block 17** — [FTRIAL_PRD_ENDYMD FIELD MAPPING] (L528)

> Maps the trial period end date (試用期間終了年月日 -> 試用期間終了年月日).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR ftrial_prd_endymd missing or empty` | |
| 2 | EXEC | `template.setNull(FTRIAL_PRD_ENDYMD)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(FTRIAL_PRD_ENDYMD, inMap.get("ftrial_prd_endymd"))` | |

**Block 18** — [HONKANYU_YMD FIELD MAPPING] (L536)

> Maps the full input date (本加入年月日 -> 本加入年月日).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR honkanyu_ymd missing or empty` | |
| 2 | EXEC | `template.setNull(HONKANYU_YMD)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(HONKANYU_YMD, inMap.get("honkanyu_ymd"))` | |

**Block 19** — [HONKANYU_IKO_KIGEN_YMD FIELD MAPPING] (L544)

> Maps the full input transfer deadline date (本加入移行期限年月日 -> 本加入移行期限年月日).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR honkanyu_iko_kigen_ymd missing or empty` | |
| 2 | EXEC | `template.setNull(HONKANYU_IKO_KIGEN_YMD)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(HONKANYU_IKO_KIGEN_YMD, inMap.get("honkanyu_iko_kigen_ymd"))` | |

**Block 20** — [LETTER_HASSO_SHIWAKE_DIV FIELD MAPPING] (L552)

> Maps the letter dispatch classification (レーター発送仕区分 -> レーター発送仕区分).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR letter_hasso_shiwake_div missing or empty` | |
| 2 | EXEC | `template.setNull(LETTER_HASSO_SHIWAKE_DIV)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(LETTER_HASSO_SHIWAKE_DIV, inMap.get("letter_hasso_shiwake_div"))` | |

**Block 21** — [THNX_LETTER_SHS_CD FIELD MAPPING] (L560)

> Maps the thank-you letter dispatch destination code (サンキューレーター送付先コード -> サンキューレーター送付先コード).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR thnx_letter_shs_cd missing or empty` | |
| 2 | EXEC | `template.setNull(THNX_LETTER_SHS_CD)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(THNX_LETTER_SHS_CD, inMap.get("thnx_letter_shs_cd"))` | |

**Block 22** — [WEB_OP_ADD_FAIL_FLG FIELD MAPPING] (L568)

> Maps the web operation addition failure flag (WEBオプション追加不可フラグ -> WEBオプション追加不可フラグ).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR web_op_add_fail_flg missing or empty` | |
| 2 | EXEC | `template.setNull(WEB_OP_ADD_FAIL_FLG)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(WEB_OP_ADD_FAIL_FLG, inMap.get("web_op_add_fail_flg"))` | |

**Block 23** — [CHGE_MT_HOJINSVKEI_UK_NO FIELD MAPPING] (L576)

> Maps the corporate change original service contract receipt number (変更元法人サービス契約受付番号 -> 変更元法人サービス契約受付番号).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR chge_mt_hojinsvkei_uk_no missing or empty` | |
| 2 | EXEC | `template.setNull(CHGE_MT_HOJINSVKEI_UK_NO)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(CHGE_MT_HOJINSVKEI_UK_NO, inMap.get("chge_mt_hojinsvkei_uk_no"))` | |

**Block 24** — [CHGE_MT_HOJINSVKEI_UK_NOPT FIELD MAPPING] (L584)

> Maps the corporate change original service contract receipt sub-number (変更元法人サービス契約受付番号子 -> 変更元法人サービス契約受付番号子).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR chge_mt_hojinsvkei_uk_nopt missing or empty` | |
| 2 | EXEC | `template.setNull(CHGE_MT_HOJINSVKEI_UK_NOPT)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(CHGE_MT_HOJINSVKEI_UK_NOPT, inMap.get("chge_mt_hojinsvkei_uk_nopt"))` | |

**Block 25** — [PNLTY_HASSEI_CD FIELD MAPPING] (L592)

> Maps the penalty occurrence code (違約金発生コード -> 違約金発生コード).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR pnlty_hassei_cd missing or empty` | |
| 2 | EXEC | `template.setNull(PNLTY_HASSEI_CD)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(PNLTY_HASSEI_CD, inMap.get("pnlty_hassei_cd"))` | |

**Block 26** — [IDO_DIV FIELD MAPPING] (L600)

> Maps the relocation classification (異動区分 -> 異動区分).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR ido_div missing or empty` | |
| 2 | EXEC | `template.setNull(IDO_DIV)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(IDO_DIV, inMap.get("ido_div"))` | |

**Block 27** — [INTR_CD FIELD MAPPING] (L608)

> Maps the referral code (紹介コード -> 紹介コード).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR intr_cd missing or empty` | |
| 2 | EXEC | `template.setNull(INTR_CD)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(INTR_CD, inMap.get("intr_cd"))` | |

**Block 28** — [WORK_RRK_BIKO FIELD MAPPING] (L616)

> Maps the business contact remarks (業務連絡備考 -> 業務連絡備考). Note: reads from `"work_rrk_biko"` key.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR work_rrk_biko missing or empty` | |
| 2 | EXEC | `template.setNull(WORK_RRK_BIKO)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(WORK_RRK_BIKO, inMap.get("work_rrk_biko"))` | |

**Block 29** — [AUTO_SHOSA_TRAN_STAT_CD FIELD MAPPING] (L624)

> Maps the automatic investigation processing status code (自動照会処理状態コード -> 自動照会処理状態コード).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR auto_shosa_tran_stat_cd missing or empty` | |
| 2 | EXEC | `template.setNull(AUTO_SHOSA_TRAN_STAT_CD)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(AUTO_SHOSA_TRAN_STAT_CD, inMap.get("auto_shosa_tran_stat_cd"))` | |

**Block 30** — [DMPS_ANKEN_NO FIELD MAPPING] (L632)

> Maps the telecom disaster case number (電波障害案件番号 -> 電波障害案件番号).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR dmps_anken_no missing or empty` | |
| 2 | EXEC | `template.setNull(DMPS_ANKEN_NO)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(DMPS_ANKEN_NO, inMap.get("dmps_anken_no"))` | |

**Block 31** — [RE_SEND_TK_SVC_SBT_CD FIELD MAPPING] (L640)

> Maps the re-sent provider service type code (再送信提供サービス種別コード -> 自動照会処理状態コード). Added 2012/05/07 for TV service integration support (サービスインターフェース取込対応).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR re_send_tk_svc_sbt_cd missing or empty` | Bug note: condition checks literal string `"re_send_tk_svc_sbt_cd"` instead of `inMap.get("re_send_tk_svc_sbt_cd")` — always evaluates to false, so this branch always takes the else path (never sets null). |
| 2 | EXEC | `template.setNull(RE_SEND_TK_SVC_SBT_CD)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(RE_SEND_TK_SVC_SBT_CD, inMap.get("re_send_tk_svc_sbt_cd"))` | |

**Block 32** — [TV_BUSINESS_CHIK_CD FIELD MAPPING] (L650)

> Maps the TV business district code (TV営業地区コード -> TV営業地区コード).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR tv_business_chik_cd missing or empty` | |
| 2 | EXEC | `template.setNull(TV_BUSINESS_CHIK_CD)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(TV_BUSINESS_CHIK_CD, inMap.get("tv_business_chik_cd"))` | |

**Block 33** — [TV_BUSINESS_TNT_USER_ID FIELD MAPPING] (L658)

> Maps the TV business assigned user ID (TV営業担当ユーザーID -> TV営業担当ユーザーID).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR tv_business_tnt_user_id missing or empty` | |
| 2 | EXEC | `template.setNull(TV_BUSINESS_TNT_USER_ID)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(TV_BUSINESS_TNT_USER_ID, inMap.get("tv_business_tnt_user_id"))` | |

**Block 34** — [KAKINS_NO FIELD MAPPING] (L665)

> Maps the billing advance number (課金先番号 -> 課金先番号).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR kakins_no missing or empty` | |
| 2 | EXEC | `template.setNull(KAKINS_NO)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(KAKINS_NO, inMap.get("kakins_no"))` | |

**Block 35** — [SEIKY_KEI_NO FIELD MAPPING] (L672)

> Maps the billing contract number (請求契約番号 -> 請求契約番号). Falls back to work area (`JFUAddSkkSCWork`) if missing — v1.00.00 addition.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR seiky_kei_no missing or empty` | Check billing contract number (v1.00.00 追加開始) |
| 2 | SET | `seiky_kei_no = getWorkMapValue(param, "seiky_kei_no", CC_WORK_AREA_NAME_SKK)` | Resolve from billing work area (CC_WORK_AREA_NAME_SKK = "JFUAddSkkSCWork") |
| 3 | IF | `seiky_kei_no == null` | |
| 4 | EXEC | `template.setNull(SEIKY_KEI_NO)` | Set null |
| 5 | ELSE | | |
| 6 | SET | `template.set(SEIKY_KEI_NO, seiky_kei_no)` | Set resolved value |
| 7 | ELSE | Input map has seiky_kei_no | (v1.00.00 追加終了) |
| 8 | SET | `template.set(SEIKY_KEI_NO, inMap.get("seiky_kei_no"))` | Set from input map |

**Block 36** — [PRC_KMK_CD FIELD MAPPING] (L688)

> Maps the price item code (料金項目コード -> 料金項目コード).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap == null OR prc_kmk_cd missing or empty` | |
| 2 | EXEC | `template.setNull(PRC_KMK_CD)` | |
| 3 | ELSE | | |
| 4 | SET | `template.set(PRC_KMK_CD, inMap.get("prc_kmk_cd"))` | |

**Block 37** — [rule0079_auto_aply FIELD MAPPING] (L695)

> Maps the labor cost automatic application flag (工事費自動適用要否 -> 工事費自動適用要否). Uses simple empty-string check (no null check on inMap for this field — assumes inMap is always non-null at this point).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap.get("rule0079_auto_aply") == ""` | Labor cost auto-apply flag check (工事費自動適用要否) |
| 2 | EXEC | `template.setNull("rule0079_auto_aply")` | Set null |
| 3 | ELSE | | |
| 4 | SET | `template.set("rule0079_auto_aply", inMap.get("rule0079_auto_aply"))` | Set value |

**Block 38** — [rule0059_auto_aply FIELD MAPPING] (L704)

> Maps the office handling fee automatic application flag (事務手数料自動適用要否 -> 事務手数料自動適用要否).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `inMap.get("rule0059_auto_aply") == ""` | Office handling fee auto-apply flag (事務手数料自動適用要否) |
| 2 | EXEC | `template.setNull("rule0059_auto_aply")` | Set null |
| 3 | ELSE | | |
| 4 | SET | `template.set("rule0059_auto_aply", inMap.get("rule0059_auto_aply"))` | Set value |

**Block 39** — [RETURN] (L711)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | RETURN | `return template;` | Return the fully populated CBS message template |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_ucwk_no` | Field | Service detail work number — internal tracking ID for service contract line items |
| `odr_naiyo_cd` | Field | Order content code — classifies order type (FTTH registration, Mail change, etc.) |
| `svc_cd` | Field | Service code — identifies the type of service being registered (e.g., TV bundle, broadband only) |
| `mskm_dtl_no` | Field | Application detail number — unique sequence number for application details |
| `menkaihat_anken_no` | Field | Development plan case number — reference to the development/planning case |
| `prc_grp_cd` | Field | Price group code — grouping code for pricing tiers |
| `pcrs_cd` | Field | Price course code — specific pricing course/plan code |
| `pplan_cd` | Field | Price plan code — pricing plan identifier |
| `tk_hoshiki_kei_no` | Field | Provider format contract number — contract number for the provision format type |
| `svc_use_sta_kibo_ymd` | Field | Desired service usage start date (YYYYMMDD) — when the customer wants service to begin |
| `rsv_tsta_kibo_ymd` | Field | Reservation application start date (YYYYMMDD) — when reserved pricing begins |
| `id_sokhosho_output_yh` | Field | ID notice output flag — whether to output the ID notification letter |
| `payway_keizoku_flg` | Field | Payment method continuation flag — whether to continue existing payment method |
| `ftrial_kanyu_ymd` | Field | Trial input date (YYYYMMDD) — when trial period begins |
| `ftrial_prd_endymd` | Field | Trial period end date (YYYYMMDD) — when trial period ends |
| `honkanyu_ymd` | Field | Full service input date (YYYYMMDD) — date of full service activation |
| `honkanyu_iko_kigen_ymd` | Field | Full service transfer deadline date (YYYYMMDD) — deadline for transitioning to full service |
| `letter_hasso_shiwake_div` | Field | Letter dispatch classification — how/whether to dispatch letters to the customer |
| `thnx_letter_shs_cd` | Field | Thank-you letter dispatch destination code — where to send the welcome/thank-you letter |
| `web_op_add_fail_flg` | Field | Web option addition failure flag — indicates if web optional services failed to add |
| `chge_mt_hojinsvkei_uk_no` | Field | Corporate change original service contract receipt number — original contract number when entity changed |
| `chge_mt_hojinsvkei_uk_nopt` | Field | Corporate change original service contract receipt sub-number — sub-number for entity change |
| `pnlty_hassei_cd` | Field | Penalty occurrence code — code indicating whether a penalty applies (e.g., early termination) |
| `ido_div` | Field | Relocation classification — type of relocation (e.g., same area, cross area) |
| `intr_cd` | Field | Referral code — code for how the customer was referred |
| `work_rrk_biko` | Field | Business contact remarks — free-text remarks for business contact |
| `auto_shosa_tran_stat_cd` | Field | Automatic investigation processing status code — status of automated credit/investigation checks |
| `dmps_anken_no` | Field | Telecom disaster case number — reference to disaster-related case |
| `re_send_tk_svc_sbt_cd` | Field | Re-sent provider service type code — code for services being re-sent via interface |
| `tv_business_chik_cd` | Field | TV business district code — regional code for TV business operations |
| `tv_business_tnt_user_id` | Field | TV business assigned user ID — ID of the staff member assigned to the TV business deal |
| `kakins_no` | Field | Billing advance number — advance billing sequence number |
| `seiky_kei_no` | Field | Billing contract number — the billing contract identifier (separate from service contract number) |
| `prc_kmk_cd` | Field | Price item code — identifies specific price line items |
| `rule0079_auto_aply` | Field | Labor cost automatic application flag — whether to auto-apply labor costs |
| `rule0059_auto_aply` | Field | Office handling fee automatic application flag — whether to auto-apply office handling fees |
| `sysid` | Field | System ID — internal identifier for the corporate/customer entity |
| `fixedText` | Parameter | Template identifier key — used to look up data and set the CBS message template ID |
| eo光TV | Business term | K-Opticom's bundled fiber-optic internet + television service offering |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband connection technology |
| CAANMsg | Technical | Fujitsu's generic message class used for CBS (Common Business Service) communication |
| EKK0101D010CBSMsg | Technical | CBS message schema class defining the field structure for TV service contract registration messages |
| CC (Common Component) | Technical | Component layer providing shared business logic across screens and CBS modules |
| 上りマッピング (Norimapping) | Japanese term | Upward mapping — transforming screen-level request data into CBS message format for backend processing |
| SVC_KEI_GRP_LIST | Field | Service contract group list — list key for grouping service contracts |
| SVC_KEI_LIST | Field | Service contract list — list key for service contract items |
| TEMPLATE_ID_TV | Constant | Template ID `"EKK0101D010"` — TV service contract registration mapping template |
| FUNC_CODE | Field | Function code — "1" for registration, distinguishes operation type |
| OPERATOR_ID_KEY | Field | Operator ID — ID of the staff member performing the operation |
| OPERATE_DATE_KEY | Field | Operate date — date of the operation |
| OPERATE_DATETIME_KEY | Field | Operate datetime — timestamp of the operation |
| EKK2931D010 | Constant | Registration-impossible contract reservation mapping template — for contracts that cannot be registered |
