# Business Logic - JKKSeikyKeiBunkatsuCC.editInMsg_EKK0251C030() [437 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKSeikyKeiBunkatsuCC` |
| Layer | CC / Common Component (cross-cutting business logic adapter) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKSeikyKeiBunkatsuCC.editInMsg_EKK0251C030()

This method creates the CBS (Central Business System) input message payload for the **Service Contract Line Item Content Change** operation (Japanese: サービス契約回線内訳内容変更), which handles modifying the detailed line-item information of an existing service contract in a Japanese telecommunications billing platform operated by K-Opticom. Specifically, it transforms UI-level child data carried in a `childMap` and a `templateArray` (containing previously fetched contract line details from the `EKK0251A010CBSMsg` schema) into a structured `CAANMsg` object formatted for the `EKK0251C030CBSMsg` CBS request schema.

The method implements the **Message Builder pattern**: it constructs a CBS request message from a base parameter map (via delegation to `editInMsg`), populates common system fields (operator ID, operate date, operate datetime, template ID, function code), then performs a bulk field-by-field copy from the child template into the newly created template. Each field copy follows a consistent null-or-empty-safety check to avoid propagating invalid data. The method handles over 60 fields spanning service line reconfiguration data, installation addresses, GPS coordinates, TV/antenna configuration, PON/VDSL access technology parameters, and invoicing address change flags.

It acts as the **inbound message preparation stage** within the three-step `execEKK0251C030` workflow: first it prepares the input message via `editInMsg_EKK0251C030`, then the caller invokes the CBS layer via `scCall.run(paramMap, handle)`, and finally `editOutMsg_EKK0251C030` maps the response back to the request parameter object for the UI layer.

The method is a shared utility called exclusively by `execEKK0251C030`, which in turn is invoked from the main screen processing flow for screen KKSv040330 (Service Contract Line Item Change) under the condition `ido_div = "00017"` (service contract line division flag) and `ekk0251RunFlg = "1"` (EKK0251 execution flag), meaning it is triggered specifically when performing line item content changes under the service contract division group.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editInMsg_EKK0251C030 call"])
    START --> COMMON["Common domain config: editInMsg param"]
    COMMON --> TEMPLATE["Create CAANMsg from EKK0251C030CBSMsg"]
    TEMPLATE --> SET_TEMPLATEID["Set templateID = TEMPLATE_ID_EKK0251C030"]
    SET_TEMPLATEID --> SET_FUNCCODE1["Set func_code = '1'"]
    SET_FUNCCODE1 --> SET_OPERATOR["Set operatorID from param control map"]
    SET_OPERATOR --> SET_OPE_DATE["Set operateDate from param control map"]
    SET_OPE_DATE --> SET_OPE_DATETIME["Set operateDatetime from param control map"]
    SET_OPE_DATETIME --> GET_WORKMAP["Get workMap from param.getMappingWorkArea"]
    GET_WORKMAP --> SET_FUNCCODE2["Set func_code from dataMap FUNC_CODE_KEY"]
    SET_FUNCCODE2 --> GET_CHILDTPL["Get childTemplate from templateArray[0]"]
    GET_CHILDTPL --> IF_SVC_KAISEN{"svc_kei_kaisen_ucwk_no empty?"}
    IF_SVC_KAISEN -->|Yes - empty| SET_NULL_SVC["Set svc_kei_kaisen_ucwk_no null"]
    IF_SVC_KAISEN -->|No - has value| SET_SVC["Set svc_kei_kaisen_ucwk_no from childMap"]
    SET_NULL_SVC --> IF_MSKM{"childTemplate msKm_dtl_no is null?"}
    SET_SVC --> IF_MSKM
    IF_MSKM -->|Yes - null| SET_NULL_MSKM["Set msKm_dtl_no null"]
    IF_MSKM -->|No - has value| SET_MSKM["Set msKm_dtl_no from childTemplate.getString"]
    SET_NULL_MSKM --> MAP_KISN_AD_MI_FIX{"KISN_PLC_AD_MI_FIX_FLG null?"}
    SET_MSKM --> MAP_KISN_AD_MI_FIX
    MAP_KISN_AD_MI_FIX -->|Yes| SET_NULL_KISN_AD["Set kisn_plc_ad_mi_fix_flg null"]
    MAP_KISN_AD_MI_FIX -->|No| SET_KISN_AD["Set kisn_plc_ad_mi_fix_flg from childTemplate"]
    SET_NULL_KISN_AD --> MAP_REMAINING["Map remaining 57 fields: same null-or-copy pattern"]
    SET_KISN_AD --> MAP_REMAINING
    MAP_REMAINING --> WRAP_TEMPLATES["Wrap template in templates array [1]"]
    WRAP_TEMPLATES --> PUT_MAP["paramMap.put TEMPLATE_LIST_KEY = templates"]
    PUT_MAP --> RETURN["Return paramMap"]
    RETURN --> END(["editInMsg_EKK0251C030 returns HashMap"])
```

### Processing Flow Summary

The method follows a linear, sequential flow with no nested conditionals beyond the flat null-or-copy pattern:

1. **Common domain initialization (lines 18439-18464):** Calls `editInMsg(param)` to establish the base parameter map, creates a `CAANMsg` template from `EKK0251C030CBSMsg.class`, sets the template ID to `"EKK0251C030"`, sets function code to `"1"` (initially), then populates standard operational metadata: operator ID, operate date, and operate datetime from the param control map.

2. **Work area extraction (line 18469):** Retrieves the mapping work area from the request parameter for downstream use.

3. **Function code override (line 18474):** Overwrites the function code with the actual value from `dataMap.get(JCMConstants.FUNC_CODE_KEY)`, allowing the caller to specify which function is being executed.

4. **Child template acquisition (line 18476):** Pulls the first element from `templateArray[0]` — this contains the previously fetched service contract line item details (from the EKK0251A010CBSMsg schema) that serve as the source data for the change operation.

5. **Field-by-field field mapping (lines 18479-18867):** For each of the 60+ fields, the method checks whether the value in the source is null/empty, and if so, sets the target field to null; otherwise, it copies the string value from the source to the target template. This covers:
   - Service line reconfiguration tracking number (`svc_kei_kaisen_ucwk_no`) — checked via `childMap` (empty string)
   - Application detail number (`mskm_dtl_no`)
   - Line location address unconfirmed flag and related fields
   - Customer reported address unconfirmed flag
   - Customer SOS usage flag
   - Mansion/bulding project number
   - Line location telephone number, kana, address codes, postal code
   - Administrative area names (prefecture, city, district, chome, block, building, room)
   - Line location number, area consolidation processing flag
   - Line location supplementary codes (1 and 2) and memo
   - Address format code, construction reservation date, power supply reservation date
   - Move-in reservation date, handover reservation date, moving reservation date
   - X/Y coordinates, longitude, latitude, coordinate correction flag
   - TV individual response code, TV antenna availability
   - Direction codes (1 and 2), building floor count codes (detached and apartment)
   - PON service type code, line provider company code
   - VDSL service parameters (tel line type, switching date, target tel number type, target tel number)
   - Moving date, relay area service start date, withdrawal construction desired date
   - Starting point substation code, contracted office code, power company business office code
   - Last update timestamp, invoice line location room number
   - Telephone BAS host ID, telephone VLAN ID, VLAN-ID confirmation flag
   - Telephone VLAN-ID acquisition date, invoice sender address change flag/desired date
   - Customer address change flag and desired date

6. **Template wrapping and return (lines 18869-18873):** Wraps the built template in a single-element array, stores it in `paramMap` under `JCMConstants.TEMPLATE_LIST_KEY`, and returns the map.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The request parameter container that carries all UI-level input data, control metadata (operator ID, operate date/time, error info), and the work area mapping. It serves as the primary vehicle for passing business context between screen handlers, component classes, and CBS layers. |
| 2 | `dataMap` | `Map<String, Object>` | A data map holding screen-level configuration data, including the function code key (`JCMConstants.FUNC_CODE_KEY`) that determines which specific function/sub-screen is being invoked. This allows a single component to serve multiple screen contexts. |
| 3 | `childMap` | `HashMap<String, Object>` | A child data map carrying screen-derived change parameters. Contains service line reconfiguration tracking number (`svc_kei_kaisen_ucwk_no`), provider company code, last update timestamp, and invoice address change flags. These represent user-entered or screen-computed values that differ from the existing record. |
| 4 | `templateArray` | `CAANMsg[]` | An array of message templates containing previously fetched contract line item details. The first element (`templateArray[0]`) provides the source data schema (`EKK0251A010CBSMsg1List`) from which over 60 fields are copied into the new change message. This was populated by a prior SC call to `EKK0251A010CBSMsg` (Service Contract Line Item Confirmation). |

**Instance fields / external state:** No instance fields are read directly. The method delegates to `editInMsg(param)` which may access internal state.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `JKKSeikyKeiBunkatsuCC.editInMsg` | - | - | Calls `editInMsg` in `JKKSeikyKeiBunkatsuCC` — updates the base parameter map with common domain settings |
| R | `EKK0251C030CBSMsg.class.getName()` | EKK0251C030 | - | Instantiates CBS request message schema class |
| R | `JCMConstants.OPERATOR_ID_KEY` | - | - | Reads operator ID constant key |
| R | `JCMConstants.OPERATE_DATE_KEY` | - | - | Reads operate date constant key |
| R | `JCMConstants.OPERATE_DATETIME_KEY` | - | - | Reads operate datetime constant key |
| R | `JCMConstants.FUNC_CODE_KEY` | - | - | Reads function code constant key |
| R | `JCMConstants.TEMPLATE_LIST_KEY` | - | - | Reads template list constant key |
| R | `SCControlMapKeys.OPERATOR_ID` | - | - | Reads operator ID control map key |
| R | `SCControlMapKeys.OPE_DATE` | - | - | Reads operate date control map key |
| R | `SCControlMapKeys.OPE_TIME` | - | - | Reads operate time control map key |
| R | `EKK0251A010CBSMsg1List.MSKM_DTL_NO` | - | - | Reads application detail number field key |
| R | `EKK0251A010CBSMsg1List.KISN_PLC_AD_MI_FIX_FLG` | - | - | Reads line location address unconfirmed flag field key |
| R | `EKK0251A010CBSMsg1List.KISN_PLC_AD_MI_FIX_RLS_YMD` | - | - | Reads line location address unconfirmed release date field key |
| R | `EKK0251A010CBSMsg1List.KAISEN_PLC_KSH_AD_SAI_FLG` | - | - | Reads line location customer address difference flag field key |
| R | `EKK0251A010CBSMsg1List.CUST_SKK_AD_MI_FIX_FLG` | - | - | Reads customer reported address unconfirmed flag field key |
| R | `EKK0251A010CBSMsg1List.CUST_SOS_USE_UM` | - | - | Reads customer SOS usage flag field key |
| R | `EKK0251A010CBSMsg1List.MANSION_BUKKEN_NO` | - | - | Reads mansion project number field key |
| R | `EKK0251A010CBSMsg1List.KAISEN_PLACE_TELNO` | - | - | Reads line location telephone number field key |
| R | `EKK0251A010CBSMsg1List.KAISEN_PLC_KANA` | - | - | Reads line location kana name field key |
| R | `EKK0251A010CBSMsg1List.KAISEN_PLACE_AD_CD` | - | - | Reads line location address code field key |
| R | `EKK0251A010CBSMsg1List.KAISEN_PLACE_PCD` | - | - | Reads line location postal code field key |
| R | `EKK0251A010CBSMsg1List.KAISEN_PLACE_STATE_NM` | - | - | Reads line location prefecture name field key |
| R | `EKK0251A010CBSMsg1List.KAISEN_PLACE_CITY_NM` | - | - | Reads line location city/town/village name field key |
| R | `EKK0251A010CBSMsg1List.KAISEN_PLACE_OAZTSU_NM` | - | - | Reads line location oaza district name field key |
| R | `EKK0251A010CBSMsg1List.KAISEN_PLACE_AZCHO_NM` | - | - | Reads line location chome name field key |
| R | `EKK0251A010CBSMsg1List.KAISEN_PLACE_BNCHIGO` | - | - | Reads line location block/ground code field key |
| R | `EKK0251A010CBSMsg1List.KAISEN_PLACE_ADRTTM` | - | - | Reads line location address supplementary building name field key |
| R | `EKK0251A010CBSMsg1List.KAISEN_PLACE_ADRRM` | - | - | Reads line location address supplementary room number field key |
| R | `EKK0251A010CBSMsg1List.KAISEN_PLACE_NO` | - | - | Reads line location number field key |
| R | `EKK0251A010CBSMsg1List.KISN_PLC_KKK_SEIRI_CHU_FLG` | - | - | Reads line location area consolidation processing flag field key |
| R | `EKK0251A010CBSMsg1List.KISN_PLC_HSK_CD_1` | - | - | Reads line location supplementary code 1 field key |
| R | `EKK0251A010CBSMsg1List.KISN_PLC_HSK_CD_2` | - | - | Reads line location supplementary code 2 field key |
| R | `EKK0251A010CBSMsg1List.KISN_PLC_HSK_MEMO` | - | - | Reads line location supplementary memo field key |
| R | `EKK0251A010CBSMsg1List.AD_FORM_CD` | - | - | Reads address format code field key |
| R | `EKK0251A010CBSMsg1List.SHUNKO_RSV_YMD` | - | - | Reads construction reservation date field key |
| R | `EKK0251A010CBSMsg1List.EPOWER_SODEN_RSV_YMD` | - | - | Reads power supply reservation date field key |
| R | `EKK0251A010CBSMsg1List.NYUKYO_RSV_YMD` | - | - | Reads move-in reservation date field key |
| R | `EKK0251A010CBSMsg1List.HIKIWATASHI_RSV_YMD` | - | - | Reads handover reservation date field key |
| R | `EKK0251A010CBSMsg1List.HIKKOSHI_RSV_YMD` | - | - | Reads moving reservation date field key |
| R | `EKK0251A010CBSMsg1List.XZAHYO` | - | - | Reads X coordinate field key |
| R | `EKK0251A010CBSMsg1List.YZAHYO` | - | - | Reads Y coordinate field key |
| R | `EKK0251A010CBSMsg1List.LGTD` | - | - | Reads longitude field key |
| R | `EKK0251A010CBSMsg1List.LTTD` | - | - | Reads latitude field key |
| R | `EKK0251A010CBSMsg1List.ZAHYO_HOSEI_UM` | - | - | Reads coordinate correction availability field key |
| R | `EKK0251A010CBSMsg1List.TV_KOBET_TAIO_CD` | - | - | Reads TV individual response code field key |
| R | `EKK0251A010CBSMsg1List.TV_ANTENNA_UM` | - | - | Reads TV antenna availability field key |
| R | `EKK0251A010CBSMsg1List.DIRECTION_CD_1` | - | - | Reads direction code 1 field key |
| R | `EKK0251A010CBSMsg1List.DIRECTION_CD_2` | - | - | Reads direction code 2 field key |
| R | `EKK0251A010CBSMsg1List.KODATE_KCKU_FLR_CNT_CD` | - | - | Reads detached house building floor count code field key |
| R | `EKK0251A010CBSMsg1List.SHUGJ_NYUKYO_FLR_CNT_CD` | - | - | Reads apartment building move-in floor count code field key |
| R | `EKK0251A010CBSMsg1List.PON_SBT_CD` | - | - | Reads PON service type code field key |
| R | `EKK0251A010CBSMsg1List.VDSL_USE_TEL_KISN_SBT_CD` | - | - | Reads VDSL tel line type code field key |
| R | `EKK0251A010CBSMsg1List.VDSL_USE_DKSN_SWCH_RSV_YMD` | - | - | Reads VDSL tel line switching reservation date field key |
| R | `EKK0251A010CBSMsg1List.VDSL_USE_TG_DBKSN_SBT_CD` | - | - | Reads VDSL target tel number line type code field key |
| R | `EKK0251A010CBSMsg1List.VDSL_USE_TG_TELNO` | - | - | Reads VDSL target telephone number field key |
| R | `EKK0251A010CBSMsg1List.HIKKOSHI_YMD` | - | - | Reads moving date field key |
| R | `EKK0251A010CBSMsg1List.GAITO_AREA_SVC_STAYMD` | - | - | Reads relay area service start date field key |
| R | `EKK0251A010CBSMsg1List.TEKKYO_KOJI_KIBO_YMD` | - | - | Reads withdrawal construction desired date field key |
| R | `EKK0251A010CBSMsg1List.KITEN_HDSHO_CD` | - | - | Reads starting point substation code field key |
| R | `EKK0251A010CBSMsg1List.SHYAKK_CD` | - | - | Reads contracted office code field key |
| R | `EKK0251A010CBSMsg1List.KEPCO_BUSIOFFICE_CD` | - | - | Reads power company business office code field key |
| R | `EKK0251A010CBSMsg1List.SKS_YO_KISN_PLACE_AD_RM_NO` | - | - | Reads invoice line location room number field key |
| R | `EKK0251A010CBSMsg1List.TEL_BAS_HOST_ID` | - | - | Reads telephone BAS host ID field key |
| R | `EKK0251A010CBSMsg1List.TEL_VLAN_ID` | - | - | Reads telephone VLAN ID field key |
| R | `EKK0251A010CBSMsg1List.VLAN_ID_FIX_FLG` | - | - | Reads VLAN-ID confirmation flag field key |
| R | `EKK0251A010CBSMsg1List.TEL_VLAN_ID_TRKM_YMD` | - | - | Reads telephone VLAN-ID acquisition date field key |
| R | `EKK0251A010CBSMsg1List.SKS_SHS_AD_CHG_UM` | - | - | Reads invoice sender address change flag field key |
| R | `EKK0251A010CBSMsg1List.KSHAD_CHG_UM` | - | - | Reads customer address change availability field key |
| R | `EKK0251A010CBSMsg1List.KSHAD_CHG_KIBO_YMD` | - | - | Reads customer address change desired date field key |
| R | `EKK0251C030CBSMsg.TEMPLATEID` | - | - | Reads template ID field constant |
| R | `EKK0251C030CBSMsg.FUNC_CODE` | - | - | Reads function code field constant |
| R | `EKK0251C030CBSMsg.SVC_KEI_KAISEN_UCWK_NO` | - | - | Reads service line change work number field constant |
| R | `EKK0251C030CBSMsg.MSKM_DTL_NO` | - | - | Reads application detail number field constant |
| R | `EKK0251C030CBSMsg.KISN_PLC_AD_MI_FIX_FLG` | - | - | Reads line location address unconfirmed flag field constant |
| R | `EKK0251C030CBSMsg.KISN_PLC_AD_MI_FIX_RLS_YMD` | - | - | Reads line location address unconfirmed release date field constant |

**Note:** This method itself does **not** directly perform database CRUD operations. It is purely a message-building utility. The actual database access (Create/Update/Read) occurs in the CBS layer (`EKK0251C030SC`) invoked by the caller `execEKK0251C030` via `scCall.run()`. This method's sole responsibility is preparing the input payload.

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 method.
Terminal operations from this method: `editInMsg` [U], `set` [U], `setNull` [U], `getString` [R], `isNull` [R], `getMappingWorkArea` [R], `getControlMapData` [R], `get` [R], `put` [U]

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 | Class: `JKKSeikyKeiBunkatsuCC` (Screen processing entry) | `screenEntry -> ... -> execEKK0251C030 -> editInMsg_EKK0251C030` | `scCall.run(EKK0251C030) [C/U] KK_T_SVC_KEI_ISP` |

**Call chain details:**

- **Direct caller:** `JKKSeikyKeiBunkatsuCC.execEKK0251C030()` (line 18420)
  - This method is the orchestrator for the entire service contract line item content change operation
  - Call chain: `execEKK0251C030` -> `editInMsg_EKK0251C030` (input preparation) -> `scCall.run(paramMap, handle)` (CBS invocation to `EKK0251C030`) -> `editOutMsg_EKK0251C030` (response mapping) -> `jdgErrRslt` (error judgment)

- **Invocation context (lines 815-826):** The caller `execEKK0251C030` is itself invoked from the main K-Opticom screen processing entry point (KKSv040330 context) when:
  - `ido_div = "00017"` (service contract line division indicator)
  - `ekk0251RunFlg = "1"` (EKK0251 execution enabled flag)
  - Before calling `execEKK0251C030`, the system first fetches existing contract line data via `EKK0251A010CBSMsg` (Service Contract Line Item Confirmation SC), then passes the fetched data in `templateArray` to `execEKK0251C030`

- **No direct screen entry point found within 8 hops** — the entry point is a screen handler in the K-Opticom web application tier that dispatches to component methods.

## 6. Per-Branch Detail Blocks

**Block 1** — EXEC (Common domain setup) `(L18439)`

> Initializes the base parameter map and creates the CBS message template with common system fields.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramMap = editInMsg(param)` // calls base editInMsg to set up common domain config [-> HashMap<String, Object>] |
| 2 | SET | `template = new CAANMsg(EKK0251C030CBSMsg.class.getName())` // creates CBS message instance |
| 3 | SET | `template.set(EKK0251C030CBSMsg.TEMPLATEID, TEMPLATE_ID_EKK0251C030)` // sets templateID = "EKK0251C030" [-> CONSTANT="EKK0251C030"] |
| 4 | SET | `template.set(EKK0251C030CBSMsg.FUNC_CODE, "1")` // sets initial func_code to "1" |
| 5 | SET | `operatorId = param.getControlMapData(SCControlMapKeys.OPERATOR_ID)` // reads operator ID |
| 6 | SET | `template.set(JCMConstants.OPERATOR_ID_KEY, operatorId)` |
| 7 | SET | `operateDate = param.getControlMapData(SCControlMapKeys.OPE_DATE)` // reads operate date |
| 8 | SET | `template.set(JCMConstants.OPERATE_DATE_KEY, operateDate)` |
| 9 | SET | `operateDateTime = param.getControlMapData(SCControlMapKeys.OPE_TIME)` // reads operate time |
| 10 | SET | `template.set(JCMConstants.OPERATE_DATETIME_KEY, operateDateTime)` |
| 11 | SET | `inMap = null` // unused local variable |
| 12 | SET | `inList = null` // unused local variable |
| 13 | SET | `workMap = param.getMappingWorkArea()` // reads work area mapping |

**Block 2** — EXEC (Function code override and child template acquisition) `(L18473-18476)`

> Overwrites the function code with caller-supplied value and retrieves the source data template.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EKK0251C030CBSMsg.FUNC_CODE, dataMap.get(JCMConstants.FUNC_CODE_KEY))` // overrides func_code from dataMap |
| 2 | SET | `childTemplate = templateArray[0]` // retrieves source message with existing contract line data |

**Block 3** — IF/ELSE `[svc_kei_kaisen_ucwk_no equals empty string]` `(L18479)`

> Checks if the service line change work number is empty (from childMap) and sets null or the value accordingly.

| # | Type | Code |
|---|------|------|
| 1 | SET | `childMap.get("svc_kei_kaisen_ucwk_no")` // reads service line change tracking number |

**Block 3.1** — ELSE `[svc_kei_kaisen_ucwk_no != empty]` `(L18481)`

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `template.setNull(EKK0251C030CBSMsg.SVC_KEI_KAISEN_UCWK_NO)` // sets null if empty |

**Block 3.2** — IF `[svc_kei_kaisen_ucwk_no != empty]` `(L18480)`

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `template.set(EKK0251C030CBSMsg.SVC_KEI_KAISEN_UCWK_NO, (String)childMap.get("svc_kei_kaisen_ucwk_no"))` // copies value |

**Block 4** — IF/ELSE `[childTemplate.isNull(msKm_dtl_no)]` `(L18486)`

> Copies the application detail number (submitted detail number, 申込明細番号) from the source template.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `childTemplate.isNull(EKK0251A010CBSMsg1List.MSKM_DTL_NO)` // checks if source is null |

**Block 4.1** — IF `[msKm_dtl_no is null]` `(L18487)`

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `template.setNull(EKK0251C030CBSMsg.MSKM_DTL_NO)` // propagates null |

**Block 4.2** — ELSE `[msKm_dtl_no has value]` `(L18489)`

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `template.set(EKK0251C030CBSMsg.MSKM_DTL_NO, childTemplate.getString(EKK0251A010CBSMsg1List.MSKM_DTL_NO))` // copies value |

**Block 5** — IF/ELSE `[childTemplate.isNull(kisn_plc_ad_mi_fix_flg)]` `(L18493)`

> Copies the line location address unconfirmed flag (回線場所住所未確定フラグ).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `childTemplate.isNull(EKK0251A010CBSMsg1List.KISN_PLC_AD_MI_FIX_FLG)` |

**Block 5.1** — IF `[is null]` → `template.setNull(EKK0251C030CBSMsg.KISN_PLC_AD_MI_FIX_FLG)`
**Block 5.2** — ELSE → `template.set(EKK0251C030CBSMsg.KISN_PLC_AD_MI_FIX_FLG, childTemplate.getString(...))`

**Block 6** — IF/ELSE `[childTemplate.isNull(kisn_plc_ad_mi_fix_rls_ymd)]` `(L18498)`

> Copies the line location address unconfirmed release date (回線場所住所未確定解除年月日).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `childTemplate.isNull(EKK0251A010CBSMsg1List.KISN_PLC_AD_MI_FIX_RLS_YMD)` |

**Block 6.1** — IF → `template.setNull(EKK0251C030CBSMsg.KISN_PLC_AD_MI_FIX_RLS_YMD)`
**Block 6.2** — ELSE → `template.set(EKK0251C030CBSMsg.KISN_PLC_AD_MI_FIX_RLS_YMD, childTemplate.getString(...))`

**Blocks 7 through 62** follow the exact same IF/ELSE pattern. Each handles one field, copying from `childTemplate` to `template` with null-safety checks. Below is the consolidated field mapping table for brevity:

| Block | Field (Source -> Target) | Japanese Description |
|-------|-------------------------|---------------------|
| 7 | `kaisen_plc_ksh_ad_sai_flg` | Line location customer address difference flag (回線場所_契約者住所差異フラグ) |
| 8 | `cust_skk_ad_mi_fix_flg` | Customer reported address unconfirmed flag (お客様申告住所未確定フラグ) |
| 9 | `cust_sos_use_um` | Customer SOS usage flag (お客様SOS利用有無) |
| 10 | `mansion_bukken_no` | Mansion project number (マンション物件番号) |
| 11 | `kaisen_place_telno` | Line location telephone number (回線場所電話番号) |
| 12 | `kaisen_plc_kana` | Line location kana name (回線場所カナ名) |
| 13 | `kaisen_place_ad_cd` | Line location address code (回線場所住所コード) |
| 14 | `kaisen_place_pcd` | Line location postal code (回線場所郵便番号) |
| 15 | `kaisen_place_state_nm` | Line location prefecture name (回線場所都道府県名) |
| 16 | `kaisen_place_city_nm` | Line location city/town/village name (回線場所市区町村名) |
| 17 | `kaisen_place_oaztsu_nm` | Line location oaza district name (回線場所大字通称名) |
| 18 | `kaisen_place_azcho_nm` | Line location chome name (回線場所字丁目名) |
| 19 | `kaisen_place_bnchigo` | Line location block/ground code (回線場所番地番号) |
| 20 | `kaisen_place_adrttm` | Line location address supplementary building name (回線場所住所補足・建物名) |
| 21 | `kaisen_place_adrrm` | Line location address supplementary room number (回線場所住所補足・部屋番号) |
| 22 | `kaisen_place_no` | Line location number (回線場所番号) |
| 23 | `kisn_plc_kkk_seiri_chu_flg` | Line location area consolidation processing flag (回線場所区画整理中フラグ) |
| 24 | `kisn_plc_hsk_cd_1` | Line location supplementary code 1 (回線場所補足コード1) |
| 25 | `kisn_plc_hsk_cd_2` | Line location supplementary code 2 (回線場所補足コード2) |
| 26 | `kisn_plc_hsk_memo` | Line location supplementary memo (回線場所補足メモ) |
| 27 | `ad_form_cd` | Address format code (住所形態コード) |
| 28 | `shunko_rsv_ymd` | Construction reservation date (立工予定年月日) |
| 29 | `epower_soden_rsv_ymd` | Power supply reservation date (電力送電予定年月日) |
| 30 | `nyukyo_rsv_ymd` | Move-in reservation date (入居予定年月日) |
| 31 | `hikiwatashi_rsv_ymd` | Handover reservation date (引渡し予定年月日) |
| 32 | `hikkoshi_rsv_ymd` | Moving reservation date (引越予定年月日) |
| 33 | `xzahyo` | X coordinate (X座標) |
| 34 | `yzahyo` | Y coordinate (Y座標) |
| 35 | `lgtd` | Longitude (経度) |
| 36 | `lttd` | Latitude (緯度) |
| 37 | `zahyo_hosei_um` | Coordinate correction availability (座標補正有無) |
| 38 | `tv_kobet_taio_cd` | TV individual response code (テレビ個別対応コード) |
| 39 | `tv_antenna_um` | TV antenna availability (TVアンテナ有無) |
| 40 | `direction_cd_1` | Direction code 1 (方角コード1) |
| 41 | `direction_cd_2` | Direction code 2 (方角コード2) |
| 42 | `kodate_kcku_flr_cnt_cd` | Detached house building floor count code (戸建建築階数コード) |
| 43 | `shugj_nyukyo_flr_cnt_cd` | Apartment move-in floor count code (集合住宅入居階数コード) |
| 44 | `pon_sbt_cd` | PON service type code (PON種別コード) |
| 45 | `kaisen_tk_comp_cd` (from childMap, empty check) | Line provider company code (回線提供会社コード) — checked via `childMap.get("kksv040330_kaisen_tk_comp_cd")` |
| 46 | `vdsl_use_tel_kisn_sbt_cd` | VDSL tel line type code (VDSL利用電話回線種別コード) |
| 47 | `vdsl_use_dksn_swch_rsv_ymd` | VDSL tel line switching reservation date (VDSL利用電話回線切替予定年月日) |
| 48 | `vdsl_use_tg_dbksn_sbt_cd` | VDSL target tel number line type code (VDSL利用対象電話番号回線種別コード) |
| 49 | `vdsl_use_tg_telno` | VDSL target telephone number (VDSL利用対象電話番号) |
| 50 | `hikkoshi_ymd` | Moving date (引越年月日) |
| 51 | `gaito_area_svc_staymd` | Relay area service start date (該当エリアサービス開始年月日) |
| 52 | `tekkyo_koji_kibo_ymd` | Withdrawal construction desired date (撤去工事希望年月日) |
| 53 | `kiten_hdsyo_cd` | Starting point substation code (起点変電所コード) |
| 54 | `shyakku_cd` | Contracted office code (契約局コード) |
| 55 | `kepcyo_busioffice_cd` | Power company business office code (関電営業所コード) |
| 56 | `last_upd_dtm_svc_kei` (from childMap, empty check) | Last update timestamp (更新年月日时分秒(更新前)) — checked via `childMap.get("last_upd_dtm_svc_kei")` |
| 57 | `skyo_kisn_place_ad_rm_no` | Invoice line location room number (請求書用回線場所部屋番号) |
| 58 | `tel_bas_host_id` | Telephone BAS host ID (電話BASホストID) |
| 59 | `tel_vlan_id` | Telephone VLAN ID (電話VLAN-ID) |
| 60 | `vlan_id_fix_flg` | VLAN-ID confirmation flag (VLAN-ID確定フラグ) |
| 61 | `tel_vlan_id_trkm_ymd` | Telephone VLAN-ID acquisition date (電話VLAN-ID取得年月日) |
| 62 | `kksv040330_sks_shs_ad_chg_um` (from childMap, empty check) | Invoice sender address change flag (請求書送付先住所変更有無) — checked via `childMap.get("kksv040330_sks_shs_ad_chg_um")` |
| 63 | `kksv040330_kshad_chg_kibo_ymd` (from childMap, empty check) | Invoice sender address change desired date (請求書送付先住所変更希望年月日) — checked via `childMap.get("kksv040330_kshad_chg_kibo_ymd")` |
| 64 | `kshad_chg_um` | Customer address change availability (契約者住所変更有無) |
| 65 | `kshad_chg_kibo_ymd` | Customer address change desired date (契約者住所変更希望年月日) |

> Fields 45, 56, 62, 63 use `childMap.get()` with empty string comparison (`"".equals(...)`) rather than `childTemplate.isNull()`, because these fields are passed directly from the screen-level childMap rather than from the previously fetched CBS response template.

**Block 63** — EXEC (Template wrapping and return) `(L18869-18873)`

> Wraps the built template into an array, stores it in the parameter map, and returns.

| # | Type | Code |
|---|------|------|
| 1 | SET | `templates = new CAANMsg[1]` // creates single-element array |
| 2 | SET | `templates[0] = template` // assigns built template |
| 3 | EXEC | `paramMap.put(JCMConstants.TEMPLATE_LIST_KEY, templates)` // stores template list in param map |
| 4 | RETURN | `return paramMap` // returns the prepared CBS request payload |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_kaisen_ucwk_no` | Field | Service line change work number — internal tracking ID for service contract line reconfiguration operations |
| `mskm_dtl_no` | Field | Application detail number — unique sequence number for each submitted service change request line item |
| `kisn_plc_ad_mi_fix_flg` | Field | Line location address unconfirmed flag — indicates whether the installation address has not yet been finalized |
| `kisn_plc_ad_mi_fix_rls_ymd` | Field | Line location address unconfirmed release date — date when the unconfirmed address flag will be cleared |
| `kaisen_plc_ksh_ad_sai_flg` | Field | Line location customer address difference flag — indicates a mismatch between the line location and customer address |
| `cust_skk_ad_mi_fix_flg` | Field | Customer reported address unconfirmed flag — indicates whether the address reported by the customer has not been confirmed |
| `cust_sos_use_um` | Field | Customer SOS usage flag — whether the customer uses the SOS emergency service |
| `mansion_bukken_no` | Field | Mansion/project building number — identifier for multi-unit building projects |
| `kaisen_place_telno` | Field | Line location telephone number — phone number at the installation point |
| `kaisen_plc_kana` | Field | Line location kana name — phonetic Japanese reading of the installation address |
| `kaisen_place_ad_cd` | Field | Line location address code — standardized postal/address code for the installation point |
| `kaisen_place_pcd` | Field | Line location postal code — Japanese postal code at the installation address |
| `kaisen_place_state_nm` | Field | Line location prefecture name — Japanese prefecture (都道府県) of the installation |
| `kaisen_place_city_nm` | Field | Line location city/town/village name — municipality name |
| `kaisen_place_oaztsu_nm` | Field | Line location oaza district name — large district name (大字) in Japanese addressing |
| `kaisen_place_azcho_nm` | Field | Line location chome name — sub-district/chome name in Japanese addressing |
| `kaisen_place_bnchigo` | Field | Line location block/ground code — parcel/block number |
| `kaisen_place_adrttm` | Field | Line location address supplementary building name — building name in address |
| `kaisen_place_adrrm` | Field | Line location address supplementary room number — room/suite number |
| `kaisen_place_no` | Field | Line location number — unique identifier for the line installation point |
| `kisn_plc_kkk_seiri_chu_flg` | Field | Line location area consolidation processing flag — indicates if the area is undergoing urban planning/consolidation |
| `kisn_plc_hsk_cd_1/2` | Field | Line location supplementary codes 1 and 2 — additional address refinement codes |
| `kisn_plc_hsk_memo` | Field | Line location supplementary memo — free-text supplementary address information |
| `ad_form_cd` | Field | Address format code — classification of the address type (e.g., rural, urban, multi-unit) |
| `shunko_rsv_ymd` | Field | Construction reservation date — scheduled date for installation work |
| `epower_soden_rsv_ymd` | Field | Power supply reservation date — scheduled date for electrical power activation |
| `nyukyo_rsv_ymd` | Field | Move-in reservation date — scheduled date for customer occupancy |
| `hikiwatashi_rsv_ymd` | Field | Handover reservation date — scheduled date for service handover to customer |
| `hikkoshi_rsv_ymd` | Field | Moving reservation date — scheduled date for moving |
| `xzahyo` / `yzahyo` | Field | X/Y coordinates — geographic coordinates for the installation point |
| `lgtd` | Field | Longitude — geographic longitude |
| `lttd` | Field | Latitude — geographic latitude |
| `zahyo_hosei_um` | Field | Coordinate correction availability — whether coordinate corrections have been applied |
| `tv_kobet_taio_cd` | Field | TV individual response code — code for TV service-specific handling |
| `tv_antenna_um` | Field | TV antenna availability — whether a TV antenna is installed/available |
| `direction_cd_1/2` | Field | Direction codes 1 and 2 — orientation/direction information for the installation |
| `kodate_kcku_flr_cnt_cd` | Field | Detached house building floor count code — number of floors for standalone houses |
| `shugj_nyukyo_flr_cnt_cd` | Field | Apartment move-in floor count code — floor level for apartment units |
| `pon_sbt_cd` | Field | PON service type code — Passive Optical Network service type (e.g., GPON, EPON) |
| `kaisen_tk_comp_cd` | Field | Line provider company code — identifies the telecommunications provider for the line |
| `vdsl_use_tel_kisn_sbt_cd` | Field | VDSL tel line type code — type of telephone line used for VDSL service |
| `vdsl_use_dksn_swch_rsv_ymd` | Field | VDSL tel line switching reservation date — date for switching to the new VDSL line |
| `vdsl_use_tg_dbksn_sbt_cd` | Field | VDSL target tel number line type code — line type for the target telephone number |
| `vdsl_use_tg_telno` | Field | VDSL target telephone number — the telephone number associated with VDSL service |
| `hikkoshi_ymd` | Field | Moving date — the actual moving date |
| `gaito_area_svc_staymd` | Field | Relay area service start date — service start date for adjacent/relayed service areas |
| `tekkyo_koji_kibo_ymd` | Field | Withdrawal construction desired date — desired date for removing old equipment |
| `kiten_hdsyo_cd` | Field | Starting point substation code — identifies the power substation serving the location |
| `shyakku_cd` | Field | Contracted office code — identifies the K-Opticom contracted office responsible for the service |
| `kepcyo_busioffice_cd` | Field | Power company business office code — identifies the power company regional office |
| `last_upd_dtm_svc_kei` | Field | Last update datetime of service line — used for optimistic locking in CBS updates |
| `skyo_kisn_place_ad_rm_no` | Field | Invoice line location room number — room number used for billing/invoicing purposes |
| `tel_bas_host_id` | Field | Telephone BAS host ID — identifier for the telephone Basic Access System host |
| `tel_vlan_id` | Field | Telephone VLAN ID — VLAN identifier for telephone service traffic |
| `vlan_id_fix_flg` | Field | VLAN-ID confirmation flag — whether the VLAN ID has been confirmed/locked |
| `tel_vlan_id_trkm_ymd` | Field | Telephone VLAN-ID acquisition date — date when the VLAN ID was obtained |
| `kksv040330_sks_shs_ad_chg_um` | Field | Invoice sender address change flag — whether the invoice sender address should be changed |
| `kksv040330_kshad_chg_kibo_ymd` | Field | Invoice sender address change desired date — desired date for invoice address change |
| `kshad_chg_um` | Field | Customer address change availability — whether the customer address should be changed |
| `kshad_chg_kibo_ymd` | Field | Customer address change desired date — desired date for customer address change |
| CBS | Acronym | Central Business System — the core enterprise business processing system |
| CAANMsg | Acronym | Custom Application ANd Message — Fujitsu's message/data container class in the K-Opticom platform |
| SC | Acronym | Service Component — a service layer component that interfaces with the CBS |
| CC | Acronym | Common Component — cross-cutting business logic and utility classes |
| FUNC_CODE | Field | Function code — identifies which specific function/sub-screen is being invoked (e.g., "1" for change) |
| TEMPLATE_ID_EKK0251C030 | Constant | Template identifier constant = "EKK0251C030" — identifies this message as the service contract line item content change CBS request |
| EKK0251C030 | Business code | Service Contract Line Item Content Change — the CBS transaction for modifying service contract line details |
| EKK0251A010 | Business code | Service Contract Line Item Confirmation — the CBS transaction for fetching existing contract line data |
| PON | Acronym | Passive Optical Network — fiber-optic broadband access technology |
| VDSL | Acronym | Very-high-bit-rate Digital Subscriber Line — broadband over copper telephone line technology |
| K-Opticom | Business term | Japanese telecommunications provider — the operator of this billing/ordering platform |
| BAS | Acronym | Basic Access System — telecommunications access infrastructure |
| VLAN | Acronym | Virtual Local Area Network — network segmentation technology |
| JCMConstants | Class | Shared constants class for Java Common Module — defines standard keys like OPERATOR_ID_KEY, FUNC_CODE_KEY, TEMPLATE_LIST_KEY |
| SCControlMapKeys | Class | Control map keys class — defines keys for control data like OPERATOR_ID, OPE_DATE, OPE_TIME, ERROR_INFO |
| IRequestParameterReadWrite | Interface | Request parameter interface — the standard data exchange vehicle between screen, component, and CBS layers |
| ServiceComponentRequestInvoker | Class | CBS invocation wrapper — invokes CBS SC methods with prepared request parameters |
| EKK0251 | Business code | Service contract line item operations family code — covers confirmation (A010), change (C030) operations |