# Business Logic — JKKUsePlaceAdInfUpdCC.updateUsePlaceAd() [176 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKUsePlaceAdInfUpdCC` |
| Layer | CC (Common Component — shared business logic layer) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKUsePlaceAdInfUpdCC.updateUsePlaceAd()

This method implements the **Use Place Address Change** business operation (利用場所住所変更処理) within K-Opticom's customer infrastructure system. When a subscriber relocates or changes their service installation address, this method orchestrates the full lifecycle of updating all address-related records across the system.

The method handles address data for three distinct entity groups: (1) the main service contract line address (EKK0251A010/A010 revision map), (2) emergency contact addresses (via `updateEmgContactAd`), and (3) equipment usage place addresses (via `updateKikiUsedAd`). For each service contract in the request, it also registers a progression history record (EKK1091D010), capturing whether the move was an accepted transfer or a general update.

The method follows a **delegation pattern**: it obtains a mapper object (`JKKAdInfChgMapperCC`) and a service component request invoker (`ServiceComponentRequestInvoker`), then coordinates multiple downstream SC calls through these intermediaries. It also conditionally calls `executeEKKA0020002_Kaisen` to allocate a new set-place number when the address change occurs before the location is finalized (i.e., some service contracts are still in a pre-accepted state).

A key design decision is the `beforeShosa` check: if all service contracts are already in the "accepted" state (`svc_kei_stat = 010`), the method skips the set-place number allocation step entirely, since the address relocation has already been processed. Otherwise, it dynamically allocates a new set-place number from the EKKA0020002 process. This branching ensures data integrity for partial-move scenarios where some lines are already accepted and others are not.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["updateUsePlaceAd"])
    START --> PREP["Prepare: Get paramMap, create mapper and scCall"]
    PREP --> GET_REVISION_MAP["Get kk0251_a010_map from paramMap"]
    GET_REVISION_MAP --> CREATE_PRG["createPrgTokkiMapKaisen Build progression spec map"]
    CREATE_PRG --> UPDATE_ADDR["Update address fields in kk0251_a010_map"]
    UPDATE_ADDR --> SET_FIX_FLG["Set KISN_PLC_AD_MI_FIX_FLG"]
    SET_FIX_FLG --> SET_UPD_DTM["Set LAST_UPD_DTM_BEF from LAST_UPD_DTM"]
    SET_UPD_DTM --> SET_MSKM{"MSKM_DTL_NO present?"}
    SET_MSKM -- yes --> SET_MSKM_VAL["Set MSKM_DTL_NO in map"]
    SET_MSKM -- no --> SHOSA_CHECK
    SET_MSKM_VAL --> SHOSA_CHECK{"beforeShosa all accepted?"}
    SHOSA_CHECK -- true after location --> SC_0251C
    SHOSA_CHECK -- false before location --> CALL_EXEC["Call executeEKKA0020002_Kaisen"]
    CALL_EXEC --> CHECK_SETPLACE{"setPlaceNo not empty?"}
    CHECK_SETPLACE -- yes --> SET_PNO["Set KAISEN_PLACE_NO in map"]
    CHECK_SETPLACE -- no --> SC_0251C
    SET_PNO --> SC_0251C
    SC_0251C["Call EKK0251C030 SC"] --> GET_RESULT["Get EKK0251C030 result and check"]
    GET_RESULT --> GET_ERRORS["Get ad_rm_no_res and ad_chk_lv_res"]
    GET_ERRORS --> EMG_UPDATE["Call updateEmgContactAd"]
    EMG_UPDATE --> KIKI_UPDATE["Call updateKikiUsedAd"]
    KIKI_UPDATE --> SVC_LOOP["Loop svc_kei_list"]
    SVC_LOOP --> GET_SVC_STAT["Get svcKeiStat and idoDiv"]
    GET_SVC_STAT --> ACCEPTED_CHECK{svcKeiStat == 010?}
    ACCEPTED_CHECK -- yes --> QUERY_HISTORY["Call EKK1091B001 SC"]
    ACCEPTED_CHECK -- no --> BUILD_PARENT
    QUERY_HISTORY --> BUILD_PARENT["Build parent_map"]
    BUILD_PARENT --> SET_IDO{svcKeiStat == 010?}
    SET_IDO -- yes --> SET_FROM_HISTORY["Set IDO_DIV and IDO_DTM from history"]
    SET_IDO -- no --> SET_DEFAULT_IDO["Set IDO_DIV=00048, DTM=System time"]
    SET_FROM_HISTORY --> SET_PRG_STAT["Set PRG_STAT and progress fields"]
    SET_DEFAULT_IDO --> SET_PRG_STAT
    SET_PRG_STAT --> PROGRESS_REG["Call EKK1091D010 SC - Progress reg"]
    PROGRESS_REG --> GET_PROG_RESULT["Get EKK1091D010 result"]
    GET_PROG_RESULT --> NEXT_SVC{More svc_kei?}
    NEXT_SVC -- yes --> GET_SVC_STAT
    NEXT_SVC -- no --> END_METHOD(["Return"])
    START --> EXCEPTION["catch Exception, throw CCException"]
    EXCEPTION --> END_METHOD
```

**Preparation Phase:** The method initializes a `HashMap` called `condMap`, retrieves the request parameter map via `param.getData(fixedText)`, obtains a singleton mapper (`JKKAdInfChgMapperCC.getInstance()`), and creates a `ServiceComponentRequestInvoker` for executing SC calls.

**Address Map Update Phase:** The revision map (`kk0251_a010_map`) is extracted from the parameter map. The method then updates all address-related fields in this map — including the address change flag, address code, postal code, prefecture, city, district, block, and two address lines. It also sets the unconfirmed address flag and the last-update datetime backup. If `MSKM_DTL_NO` (specified detail number) is present, it is also copied into the revision map.

**Conditional Set-Place Number Allocation:** The `beforeShosa` helper determines whether any service contract is NOT in "accepted" state (`svc_kei_stat != 010`). If so, the address change is happening *before* the location is finalized. In this case, the method calls `executeEKKA0020002_Kaisen` to allocate a new set-place number and copies it back into the revision map and the parent parameter map.

**EKK0251C030 SC Execution:** The mapper prepares the SC request, the invoker executes it against the service component `EKK0251C030` (Service Contract Line Content Update), and the result is mapped back. The `ad_rm_no_res` and `ad_chk_lv_res` error fields are extracted from the result for downstream use.

**Emergency and Equipment Updates:** Two delegated methods update emergency contact addresses and equipment usage addresses respectively, both receiving the shared `scCall` invoker and parameter map.

**Progress Registration Loop:** For each service contract in the service list, the method determines if it is in "accepted" state (`svc_kei_stat == 010`). If accepted, it queries the progress history via EKK1091B001 SC to obtain the actual movement datetime (`idoDtm`). Otherwise, it assigns a default movement division code (`00048: 住所一括更新` — Unified Address Update) and the current system timestamp. Finally, it registers the progression record via EKK1091D010 SC.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database session handle providing the transaction context for SC calls and data persistence. Used to execute service component invocations against the backend. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object carrying the entire request payload. Contains the address change data (new address fields, flags, service contract list) and receives output data (error codes, set-place number, address check level). Accessed via `getData(fixedText)` and individual getters/setters. |
| 3 | `fixedText` | `String` | User-defined arbitrary string used as a key to retrieve the correct data group from the parameter map. Acts as a namespace identifier within the multi-group request payload. |

**Instance fields / external state read:**

| Source | Description |
|--------|-------------|
| `paramMap.get(SVC_KEI_LIST)` | ArrayList of service contract records (each as a HashMap) — drives the progress registration loop |
| `paramMap.get(SVC_KEI_KAISEN_UCWK_NO)` | Service contract revision work number — links all progression records to the same work item |
| `paramMap.get(KAISEN_PLC_KSH_AD_SAI_FLG)` | Address change flag — indicates whether the address has been changed |
| `paramMap.get(KAISEN_PLACE_AD_CD)` | Address code for the new location |
| `paramMap.get(PARAM_AD_PCD)` | Postal code of the new address |
| `paramMap.get(PARAM_AD_STATE_NM)` | Prefecture name of the new address |
| `paramMap.get(PARAM_AD_CITY_NM)` | City/town name of the new address |
| `paramMap.get(PARAM_AD_OAZTSU_NM)` | District name of the new address |
| `paramMap.get(PARAM_AD_AZCHO_NM)` | Block-level name of the new address |
| `paramMap.get(PARAM_AD_BNCHIGO)` | Branch code of the new address |
| `paramMap.get(PARAM_AD_ADRTTM)` | Address line 1 of the new address |
| `paramMap.get(PARAM_AD_ADRRM)` | Address line 2 of the new address |
| `paramMap.get(KISN_PLC_AD_MI_FIX_FLG)` | Unconfirmed address flag — whether the address is not yet finalized |
| `paramMap.get(JKKAdInfChgConstCC.PARAM_KEY_MSKM_DTL_NO)` | Specified detail number — optional detail identifier for the address |
| `paramMap.get(MAN_INPUT_FLG)` | Manual input flag — indicates if set-place was manually entered (for in-home equipment system integration) |
| `kk0251_a010_map.get(EKK0251A010CBSMsg1List.LAST_UPD_DTM)` | Last update datetime — backed up to `LAST_UPD_DTM_BEF` |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JKKUsePlaceAdInfUpdCC.createPrgTokkiMapKaisen` | — | In-memory HashMap | Builds the progression specification map from the service contract revision map and parameter map. Extracts equipment and service type details. |
| C | `JKKUsePlaceAdInfUpdCC.executeEKKA0020002_Kaisen` | EKKAA0020002 | KK_T_SETPLACE | Allocates a new set-place number (installation place identifier) when the address change occurs before location finalization. This is a place creation in the set-place management table. |
| R | `JKKAdInfChgMapperCC.setEKK0251C030` | EKK0251C030 | — | Mapper prepares the request payload for the EKK0251C030 service component call, mapping the address revision data into the SC input structure. |
| - | `ServiceComponentRequestInvoker.run` | EKK0251C030 | KK_T_ODRSVCKEI, KK_M_ADR | Executes the service contract line content update SC. Updates address fields on the service contract line. |
| R | `JKKAdInfChgMapperCC.getEKK0251C030` | EKK0251C030 | — | Mapper reads the SC response back into the parameter map, extracting the address removal number error field and address check level error field. |
| - | `JKKAdInfChgMapperCC.scResultCheck` | EKK0251C030 | — | Validates the SC response for errors. Throws `SCException` if the response indicates failure. |
| R | `JKKUsePlaceAdInfUpdCC.updateEmgContactAd` | — | — | Delegates to the emergency contact address update method, which updates emergency contact address records using the same `scCall` invoker. |
| R | `JKKUsePlaceAdInfUpdCC.updateKikiUsedAd` | — | — | Delegates to the equipment usage place address update method, updating equipment-to-address linkage records. |
| R | `JKKAdInfChgMapperCC.setEKK1091B001` | EKK1091B001 | — | Mapper prepares a request to query progress history list for an accepted service contract, keyed by service contract number. |
| - | `ServiceComponentRequestInvoker.run` | EKK1091B001 | KK_T_ODR_PROC_HIST, KK_T_ODR_HAKKO_JOKEN | Executes progress history list query. Retrieves movement datetime (`idoDtm`) and other history data. |
| R | `JKKAdInfChgMapperCC.getEKK1091B001` | EKK1091B001 | — | Mapper reads progress history results back into the parameter map. |
| - | `JKKAdInfChgMapperCC.scResultCheck` | EKK1091B001 | — | Validates the SC response. |
| R | `JKKUsePlaceAdInfUpdCC.getIdoRsnList` | — | — | Retrieves the movement reason list from the parameter map, passed as input to the progress registration SC. |
| R | `JKKAdInfChgMapperCC.setEKK1091D010` | EKK1091D010 | — | Mapper prepares the progress registration request, assembling parent map data, movement reasons, and service contract details. |
| - | `ServiceComponentRequestInvoker.run` | EKK1091D010 | KK_T_ODR_PROC_DTL, KK_T_ODR_HAKKO_JOKEN | Executes the progression registration SC, inserting a new record into the progress detail table. |
| R | `JKKAdInfChgMapperCC.getEKK1091D010` | EKK1091D010 | — | Mapper reads the registration result back into the parameter map. |
| - | `JKKAdInfChgMapperCC.scResultCheck` | EKK1091D010 | — | Validates the SC response. |
| R | `JCCBPCommon.getSysDateTimeStamp` | — | — | Retrieves the current system datetime stamp, used as the movement datetime when the service contract is not in accepted state. |

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 methods.
Terminal operations from this method: `scResultCheck` [-], `getEKK1091D010` [R], `run` [-], `run` [-], `run` [-], `run` [-], `run` [-], `setEKK1091D010` [-], `getIdoRsnList` [R], `getSysDateTimeStamp` [R], `getSysDateTimeStamp` [R], `getSysDateTimeStamp` [R], `getSysDateTimeStamp` [R], `getSysDateTimeStamp` [R], `getMapString` [R], `scResultCheck` [-], `getEKK1091B001` [R], `run` [-], `run` [-], `run` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `JKKUsePlaceAdInfUpdCC.execute()` | `execute()` -> `updateUsePlaceAd(handle, param, fixedText)` | `EKK0251C030 [U] KK_T_ODRSVCKEI`, `EKK1091D010 [C] KK_T_ODR_PROC_DTL`, `EKK1091B001 [R] KK_T_ODR_PROC_HIST` |

The `execute()` method on the same class is the sole direct caller. This method serves as the internal dispatch point that calls `updateUsePlaceAd` as part of the broader address change processing workflow. The entry screen/batch that invokes `execute()` is not visible in the current search depth.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Preparation (L1034)

Prepares the working data structures and service component interfaces.

| # | Type | Code |
|---|------|------|
| 1 | SET | `condMap = new HashMap<>()` // Working map for SC query conditions |
| 2 | SET | `paramMap = (HashMap)param.getData(fixedText)` // Retrieves the request parameter group by fixedText key |
| 3 | SET | `reqMap` (declared) // SC request map, populated later |
| 4 | SET | `resMap` (declared) // SC response map, populated later |
| 5 | SET | `mapper = JKKAdInfChgMapperCC.getInstance()` // Obtains singleton mapper for SC data mapping |
| 6 | SET | `scCall = new ServiceComponentRequestInvoker()` // Service component invocation gateway |

**Block 2** — [SET] Address Revision Map Extraction (L1068)

Retrieves the service contract line revision map from the parameter map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kk0251_a010_map = (HashMap)paramMap.get(SVC_KEI_KAISEN_UW_MAP)` // Service contract revision map from paramMap |

**Block 3** — [SET] Build Progression Specification Map (L1089)

Creates a map of specification equipment details for progression tracking.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `prgMap = createPrgTokkiMapKaisen(kk0251_a010_map, paramMap)` // Builds progression equipment map from revision and param maps |

**Block 4** — [SET] Update Agreement Result Map Fields (L1094–L1112)

Copies all address-related values from `paramMap` into the revision map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kk0251_a010_map.put(KAISEN_PLC_KSH_AD_SAI_FLG, paramMap.get(KAISEN_PLC_KSH_AD_SAI_FLG))` // Contract location change re-execution flag |
| 2 | SET | `kk0251_a010_map.put(KAISEN_PLACE_AD_CD, paramMap.get(KAISEN_PLACE_AD_CD))` // New address code |
| 3 | SET | `kk0251_a010_map.put(KAISEN_PLACE_PCD, paramMap.get(PARAM_AD_PCD))` // New postal code |
| 4 | SET | `kk0251_a010_map.put(KAISEN_PLACE_STATE_NM, paramMap.get(PARAM_AD_STATE_NM))` // New prefecture name |
| 5 | SET | `kk0251_a010_map.put(KAISEN_PLACE_CITY_NM, paramMap.get(PARAM_AD_CITY_NM))` // New city/town name |
| 6 | SET | `kk0251_a010_map.put(KAISEN_PLACE_OAZTSU_NM, paramMap.get(PARAM_AD_OAZTSU_NM))` // New district name |
| 7 | SET | `kk0251_a010_map.put(KAISEN_PLACE_AZCHO_NM, paramMap.get(PARAM_AD_AZCHO_NM))` // New block name |
| 8 | SET | `kk0251_a010_map.put(KAISEN_PLACE_BNCHIGO, paramMap.get(PARAM_AD_BNCHIGO))` // New branch code |
| 9 | SET | `kk0251_a010_map.put(KAISEN_PLACE_ADRTTM, paramMap.get(PARAM_AD_ADRTTM))` // New address line 1 |
| 10 | SET | `kk0251_a010_map.put(KAISEN_PLACE_ADRRM, paramMap.get(PARAM_AD_ADRRM))` // New address line 2 |

**Block 5** — [SET] Unconfirmed Address Flag (L1114)

| # | Type | Code |
|---|------|------|
| 1 | SET | `kk0251_a010_map.put(KISN_PLC_AD_MI_FIX_FLG, paramMap.get(KISN_PLC_AD_MI_FIX_FLG))` // Unconfirmed address flag |

**Block 6** — [IF] Specified Detail Number Update (L1117–L1119)

| # | Type | Code |
|---|------|------|
| 1 | SET | `if (!StringUtils.isEmpty((String)paramMap.get(JKKAdInfChgConstCC.PARAM_KEY_MSKM_DTL_NO)))` // Check if specified detail number is present |
| 2 | SET | `kk0251_a010_map.put(MSKM_DTL_NO, (String)paramMap.get(JKKAdInfChgConstCC.PARAM_KEY_MSKM_DTL_NO))` // Copy detail number into revision map |

**Block 7** — [SET] Update Datetime Backup (L1121)

| # | Type | Code |
|---|------|------|
| 1 | SET | `kk0251_a010_map.put(UPD_DT_KEI_KAIS_UCWK_UPD_DTM_BEF, kk0251_a010_map.get(EKK0251A010CBSMsg1List.LAST_UPD_DTM))` // Backup current last update datetime |

**Block 8** — [IF] beforeShosa — Check if any service contract is pre-accepted (L1124)

> Business meaning: If `beforeShosa` returns `false`, all service contracts are already in "accepted" state (`svc_kei_stat = 010`), meaning the address change has already been processed through the location phase. In this case, skip set-place number allocation. If `beforeShosa` returns `true`, at least one contract is not yet accepted, and a new set-place number must be allocated.

| # | Type | Code |
|---|------|------|
| 1 | SET | `if (!beforeShosa(paramMap))` // If not all accepted → need set-place number |
| 2 | SET | `kk0251_a010_map.put(KEY_SETPLACE_AD_MAN_INPUT_FLG, paramMap.get(MAN_INPUT_FLG))` // Set manual input flag for in-home equipment system |
| 3 | CALL | `setPlaceNo = executeEKKA0020002_Kaisen(handle, param, fixedText, kk0251_a010_map)` // Allocate new set-place number |

**Block 8.1** — [IF] Set-place number allocation result (L1131)

| # | Type | Code |
|---|------|------|
| 1 | SET | `if (!StringUtils.isEmpty(setPlaceNo))` // If a new set-place number was allocated |
| 2 | SET | `kk0251_a010_map.put(KAISEN_PLACE_NO, setPlaceNo)` // Set new place number in revision map |
| 3 | SET | `paramMap.put(PARAM_KEY_ITENS_PLACE_NO, setPlaceNo)` // Propagate set-place number to parent parameter map |

**Block 9** — [EXEC] EKK0251C030 SC Execution — Service Contract Line Content Update (L1138–L1141)

This is the core address update service component call. It updates the service contract line record with the new address data.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `reqMap = mapper.setEKK0251C030(param, fixedText, kk0251_a010_map)` // Build SC request from mapper |
| 2 | EXEC | `resMap = scCall.run(reqMap, handle)` // Execute SC call |
| 3 | CALL | `kk0251_c030_map = mapper.getEKK0251C030(param, fixedText, resMap)` // Read SC response |
| 4 | EXEC | `mapper.scResultCheck(param)` // Validate SC result, throw on error |

**Block 10** — [SET] Extract Return Values (L1144–L1152)

| # | Type | Code |
|---|------|------|
| 1 | SET | `ad_rm_no_res = (String)paramMap.get(EKK0251C030CBSMsg.SKS_YO_KISN_PLACE_AD_RM_NO_ERR)` // Address removal number error code |
| 2 | SET | `paramMap.put(PARAM_KEY_AD_RM_NO_RES, ad_rm_no_res)` // Store removal number result |
| 3 | SET | `ad_chk_lv_res = (String)paramMap.get(EKK0251C030CBSMsg.KISN_AD_CHK_LV_ERR)` // Address check level error code |
| 4 | SET | `if (!StringUtils.isEmpty(ad_chk_lv_res))` // If check level error present |
| 5 | SET | `paramMap.put("ad_chk_lv_res", ad_chk_lv_res)` // Store check level result |

**Block 11** — [CALL] Emergency Contact Address Update (L1158)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `updateEmgContactAd(handle, param, fixedText, scCall, paramMap)` // Update emergency contact address records |

**Block 12** — [CALL] Equipment Usage Place Address Update (L1164)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `updateKikiUsedAd(handle, param, fixedText, scCall, paramMap)` // Update equipment-to-address linkage records |

**Block 13** — [FOR] Progress Registration Loop (L1170)

> Iterates over all service contracts in the service list, registering a progression history record for each one.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_kei_list = (ArrayList)paramMap.get(SVC_KEI_LIST)` // Service contract list |
| 2 | SET | `for (HashMap<String, Object> kk0081_a010_map : svc_kei_list)` // Iterate each service contract record |
| 3 | SET | `svcKeiStat = getMapString(kk0081_a010_map, EKK0081A010CBSMsg1List.SVC_KEI_STAT)` // Get service contract status |
| 4 | SET | `idoDiv = getMapString(kk0081_a010_map, EKK0081A010CBSMsg1List.IDO_DIV)` // Get movement division code |
| 5 | SET | `idoDtm = new String()` // Initialize movement datetime |

**Block 13.1** — [IF] Service Contract Status Check — Accepted (L1177)

> When the service contract is in "accepted" state (`svc_kei_stat == 010`), query the progress history to obtain the actual movement datetime. This preserves the original move datetime from when the contract was accepted.

| # | Type | Code |
|---|------|------|
| 1 | SET | `if (JKKSvcConst.SVC_KEI_STAT_010.equals(svcKeiStat))` // Check if accepted (010) |
| 2 | EXEC | `condMap.clear()` // Clear working condition map |
| 3 | SET | `condMap.put("key_svc_kei_no", kk0081_a010_map.get(EKK0081A010CBSMsg1List.SVC_KEI_NO))` // Set service contract number as query key |
| 4 | CALL | `reqMap = mapper.setEKK1091B001(param, fixedText, condMap)` // Build EKK1091B001 query request |
| 5 | EXEC | `resMap = scCall.run(reqMap, handle)` // Execute progress history list query |
| 6 | CALL | `kk1091_a010_map = mapper.getEKK1091B001(param, fixedText, resMap)` // Read query results |
| 7 | EXEC | `mapper.scResultCheck(param)` // Validate result |
| 8 | SET | `idoDtm = getMapString(kk1091_a010_map, EKK1091B001CBSMsg1List.IDO_DTM)` // Extract movement datetime from history |

**Block 13.2** — [SET] Build Parent Map (L1195–L1200)

Prepares the parent data map for progress registration.

| # | Type | Code |
|---|------|------|
| 1 | SET | `parent_map = new HashMap<>()` // New parent map for progress registration |
| 2 | SET | `parent_map.put(SVC_KEI_NO, kk0081_a010_map.get(EKK0081A010CBSMsg1List.SVC_KEI_NO))` // Service contract number |
| 3 | SET | `parent_map.put(SVC_KEI_KAISEN_UCWK_NO, paramMap.get(PARAM_SVC_KEI_KAISEN_UCWK_NO))` // Service contract revision work number |

**Block 13.3** — [IF/ELSE] Movement Division and Datum Setting (L1203–L1212)

> When the contract is accepted, use the actual movement datetime from the history. When not accepted, assign a default movement division code (`00048: Unified Address Update`) and the current system timestamp.

| # | Type | Code |
|---|------|------|
| 1 | SET | `if (JKKSvcConst.SVC_KEI_STAT_010.equals(svcKeiStat))` // If accepted |
| 2 | SET | `parent_map.put(IDO_DIV, idoDiv)` // Set actual movement division |
| 3 | SET | `parent_map.put(IDO_DTM, idoDtm)` // Set actual movement datetime |
| 4 | SET | `else` // If not accepted |
| 5 | SET | `parent_map.put(IDO_DIV, (String)paramMap.get(JKKAdInfChgConstCC.PARAM_KEY_IDO_DIV))` // Set default movement division (00048) |
| 6 | SET | `parent_map.put(IDO_DTM, JCCBPCommon.getSysDateTimeStamp())` // Set current system datetime |
| 7 | SET | `parent_map.put(PRG_STAT, JKKAdInfChgConstCC.CD00647_E020)` // Set progress status to E020 |
| 8 | SET | `parent_map.put(PRG_TKJK_1, prgMap.get(EKK1091D010CBSMsg.PRG_TKJK_1))` // Set specification equipment field 1 |
| 9 | SET | `parent_map.put(PRG_TKJK_2, prgMap.get(EKK1091D010CBSMsg.PRG_TKJK_2))` // Set specification equipment field 2 |
| 10 | SET | `if (!StringUtils.isEmpty((String)paramMap.get(JKKAdInfChgConstCC.PARAM_KEY_MSKM_DTL_NO)))` // If detail number present |
| 11 | SET | `parent_map.put(MSKM_DTL_NO, (String)paramMap.get(JKKAdInfChgConstCC.PARAM_KEY_MSKM_DTL_NO))` // Set detail number |

**Block 14** — [EXEC] EKK1091D010 SC Execution — Progress Registration (L1218–L1220)

Registers the progression history record for the service contract.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `reqMap = mapper.setEKK1091D010(param, fixedText, parent_map, getIdoRsnList(param, fixedText))` // Build progress registration request |
| 2 | EXEC | `resMap = scCall.run(reqMap, handle)` // Execute progress registration SC |
| 3 | CALL | `mapper.getEKK1091D010(param, fixedText, resMap)` // Read registration result |
| 4 | EXEC | `mapper.scResultCheck(param)` // Validate result |

**Block 15** — [CATCH] Exception Handler (L1223–L1226)

Maps any thrown exception to a `CCException` with the error result code.

| # | Type | Code |
|---|------|------|
| 1 | SET | `catch (Exception ex)` // Catch any exception |
| 2 | SET | `throw new CCException(JKKAdInfChgConstCC.ERR_STR_RESULT_CD, ex.getCause())` // Map to CCException with error code |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `updateUsePlaceAd` | Method | Use Place Address Change — the core address relocation business operation |
| `utilization place` | Business term | The physical address where a customer's service is installed and equipment is placed |
| `SVC_KEI_KAISEN_UW_MAP` | Field | Service contract revision work map — holds the address data being updated for a service contract line item |
| `SVC_KEI_LIST` | Field | Service contract list — the collection of all service contracts being processed in this address change |
| `SVC_KEI_KAISEN_UCWK_NO` | Field | Service contract revision work number — a tracking identifier that groups related revision operations |
| `SVC_KEI_STAT` | Field | Service contract status — the current state of a service contract (e.g., 010 = accepted) |
| `JKKSvcConst.SVC_KEI_STAT_010` | Constant | Service contract status = "Accepted" — the contract has been processed through the acceptance workflow |
| `KAISEN_PLC_KSH_AD_SAI_FLG` | Field | Address change re-execution flag — indicates if the address change is being redone |
| `KAISEN_PLACE_AD_CD` | Field | Address change place code — the code identifier for the new address location |
| `PARAM_AD_PCD` | Field | Postal code of the new address |
| `PARAM_AD_STATE_NM` | Field | Prefecture name of the new address |
| `PARAM_AD_CITY_NM` | Field | City/town name of the new address |
| `PARAM_AD_OAZTSU_NM` | Field | District name of the new address |
| `PARAM_AD_AZCHO_NM` | Field | Block-level name of the new address |
| `PARAM_AD_BNCHIGO` | Field | Branch code — a subdivision identifier within the address |
| `PARAM_AD_ADRTTM` | Field | Address line 1 of the new address |
| `PARAM_AD_ADRRM` | Field | Address line 2 of the new address |
| `KISN_PLC_AD_MI_FIX_FLG` | Field | Unconfirmed address flag — indicates whether the address is not yet finalized |
| `MSKM_DTL_NO` | Field | Specified detail number — an optional additional identifier for the address |
| `MAN_INPUT_FLG` | Field | Manual input flag — whether the set-place number was manually entered, used for in-home equipment system integration |
| `SETPLACE_NO` | Field | Set-place number — a unique identifier for the installation place in the equipment management system |
| `PARAM_KEY_ITENS_PLACE_NO` | Field | Item set-place number — shared set-place number propagated to other processing modules |
| `beforeShosa` | Method | Pre-inspection check — determines whether all service contracts are in accepted state. Returns `true` = all accepted (after location), `false` = some not accepted (before location) |
| `EKK0251C030` | SC Code | Service Contract Line Content Update SC — updates address details on the service contract line |
| `EKK0251A010` | SC Code | Service Contract Line Agreement Meeting SC — handles the address revision agreement data |
| `EKK1091D010` | SC Code | Progress Registration SC — registers a new progression history detail record |
| `EKK1091B001` | SC Code | Progress History List Query SC — retrieves the movement history for a service contract |
| `EKK1091D010CBSMsg` | Class | CBS message constants for the progress registration detail output |
| `EKK1091B001CBSMsg1List` | Class | CBS message constants for the progress history list query |
| `IDO_DIV` | Field | Movement division — classifies the type of address move (e.g., 00048 = Unified Address Update) |
| `IDO_DTM` | Field | Movement datetime — the actual date and time when the address change took effect |
| `PRG_STAT` | Field | Progress status — the current stage of the progression workflow (e.g., CD00647_E020) |
| `PRG_TKJK_1`, `PRG_TKJK_2` | Field | Progress specification equipment fields 1 and 2 — equipment detail identifiers for tracking |
| `ERR_STR_RESULT_CD` | Constant | Error result code string — used as the error message key when a CCException is thrown |
| `JKKAdInfChgMapperCC` | Class | Address information change mapper — singleton class that maps data between parameters and service component structures |
| `ServiceComponentRequestInvoker` | Class | SC request invoker — gateway class for executing service component operations against the backend |
| `JCCBPCommon` | Class | Common business component for the KK platform — provides utility methods including system datetime retrieval |
| `KK_T_ODRSVCKEI` | Table | Order Service Key table — stores service contract line records including address data |
| `KK_T_ODR_PROC_DTL` | Table | Order Process Detail table — stores individual progression history records |
| `KK_T_ODR_PROC_HIST` | Table | Order Process History table — stores historical progression records for querying |
| `KK_T_SETPLACE` | Table | Set Place table — stores installation place records managed by the in-home equipment system |
| `KK_M_ADR` | Table | Address master table — stores address reference data |
| `JKKAdInfChgConstCC` | Class | Address information change constants — contains all constant definitions for address change processing |
| `CD00647_E020` | Constant | Progress status code E020 — represents a specific stage in the progression workflow |
| `C00048` | Constant | Movement division code 00048 — "Unified Address Update" (住所一括更新), the default movement type for bulk address changes |
| `C00048` | Constant | Movement division code 00048 — "Unified Address Update" (住所一括更新), the default movement type for bulk address changes |
| `EKKA0020002` | SC Code | Set-place allocation SC — creates and allocates a new set-place number for the installation location |
| `updateEmgContactAd` | Method | Emergency contact address update — updates emergency contact address records |
| `updateKikiUsedAd` | Method | Equipment usage place address update — updates equipment-to-address linkage records |
| `createPrgTokkiMapKaisen` | Method | Create progression specification equipment revision map — builds equipment detail map for progression tracking |
| `getIdoRsnList` | Method | Get movement reason list — retrieves the list of reasons for the address move |
| `getMapString` | Helper | Safe string extraction from HashMap — returns an empty string instead of null |
| `SCException` | Exception | Service Component exception — thrown when a backend SC call fails |
| `CCException` | Exception | Common Component exception — wraps underlying errors with a business-level error code |
| `KKSV*` | Screen pattern | Screen class naming convention — KK prefix for K-Opticom screens, followed by a 4-digit number |
| `KKSV0004` | Screen | Customer infrastructure address change screen — the screen likely responsible for invoking the address change workflow |
