# Business Logic — JBSbatKKAdChgSodUpd.execute() [836 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.business.service.JBSbatKKAdChgSodUpd` |
| Layer | Batch Service (extends `JBSbatBusinessService`) |
| Module | `service` (Package: `eo.business.service`) |

## 1. Role

### JBSbatKKAdChgSodUpd.execute()

This method is the core processing unit for **SOD (Service Order Data) generation during address change operations** in the K-Opticom customer base system. It processes records from the `KK_T_ADCHG_DTL` (Address Change Details) table that have been filtered and prepared by a prior batch run, and for each qualifying detail record, builds SOD emission trigger data structures based on the type of service contract change involved.

The method handles two primary service categories: **Net** (fiber-optic broadband, code "01") and **Tel** (telephone service, code "02"), and supports multiple address change detail sub-types: service contract number ("01"), service line item ("02"), KKTK (device-provided) service ("03"), and operation (add-on) service ("04"). It also handles the newer NET WRIB (network discount service) sub-type "11" for security pack operations.

The method implements a **batch routing/dispatch pattern** with three distinct operational modes: (1) the *null-input mode* — invoked by `JBSbatKKAdChgCstScreenKidou` with pre-built CC (Common Component) maps for final SOD emission across all operation types, (2) the *discount auto-apply early-exit mode* — when a discount auto-application flag is set, it delegates to the discount CC and returns early, and (3) the *main processing mode* — the primary path where it iterates over address change detail records, classifies them by odr_exec_div (SOD emission trigger classification), builds grouped SOD trigger target lists, and delegates CC setup for operation cancellation, transfer, and security pack operations.

Its role in the larger system is a critical post-confirmation step in the address change batch pipeline. After a user confirms an address change via screen KKSV0565, `JBSbatKKAdChgCstScreenKidou` schedules this batch for deferred processing. This method reads the pending address change details, evaluates eligibility for SOD emission based on whether the change is a release-and-new registration, an inheritance, a cancellation, or a combination thereof, and populates various CC lists that drive downstream service contract modifications.

If the method has conditional branches:
- **Null input branch**: Called with `inMap == null`, meaning deferred processing has been scheduled. It assembles all accumulated CC data (address change confirmation, op release, op cancel, op transfer, security pack, discount auto-apply, SOD emission, ENUM cancel) and invokes the ESB service to process them all at once.
- **Discount auto-apply branch**: When `inWribExeFlg == "1"`, the system is requesting discount auto-application. It delegates to `setWrisvcAutoAply()`, adds the input map to output, and returns early without processing address change details.
- **Main processing branch**: Reads address change details from `KK_T_ADCHG_DTL`, groups them by SOD emission trigger classification, builds SOD target maps, and delegates CC setup for various operation types.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["execute inMap outputInItem"])
    CHECK_NULL_INMAP{"inMap == null?"}
    CHECK_NULL_OUTPUT{"outputInItem null or Empty OutMapList?"}
    RETURN_NULL(["return null"])
    PRINT_DEBUG(["printDebugLog"])
    BUILD_PARAM_MAP["Build paramMap with USECASE_ID OPERATION_ID"]
    BUILD_INPUT_MAP["Build inputMap with KKSV056506CC KKSV056501CC KKSV056505CC KKSV056502CC KKSV056507CC KKSV056503CC KKSV056504CC KKSV056509CC KKSV056508CC"]
    INVOKE_SERVICE["JCCBatchEsbInterface.invokeService"]
    CHECK_RETURN["Check returnCode == SUCCESS?"]
    THROW_ERROR(["throw JBSbatBusinessException"])
    WARNING_BMP(["warningBmp"])
    RETURN_OUTPUT(["return outputInItem"])

    CHECK_WRIB_EXE{"inWribExeFlg equals 1?"}
    SET_WRIB_AUTO["setWrisvcAutoAply"]
    ADD_OUTMAP["outputInItem.addOutMapList"]
    EARLY_RETURN(["return outputInItem"])

    PARSE_INPUT["Parse input fields: adchgNo mskmNo newSvcKeiNo dslSvcKeiNo newFinFlg dslFinFlg"]
    SET_CND_NEW["Set cndNewSvcKeiNo"]
    SET_CND_DSL["Set cndDslSvcKeiNo"]
    SET_ODR_EXEC["Set odrExecDivMfr = x"]
    CHECK_NET_RLS{"isNetRlsAdd?"}
    SET_ODR_2_A["Set odrExecDivMfr = 2 DslFin only"]
    CHECK_NET_KEEP{"isNetKeep?"}
    SET_ODR_2_B["Set odrExecDivMfr = 2 DslFin only"]
    QUERY_ADCHG_DTL["executeKK_T_ADCHG_DTL_KK_SELECT_014"]
    LOOP_ADCHG{"for adchgDtlInfo from db_KK_T_ADCHG_DTL.selectNext"}
    READ_FIELDS["Read fields from adchgDtlInfo"]
    CHECK_ODR_X{"odrExecDiv equals x?"}
    CONTINUE_LOOP(["continue"])
    CHECK_OP_TRANSFER{"adchgDtlSbtCd equals 04 and chbfSkbtNo and chafSkbtNo present?"}
    CHECK_OP_HKTGI{"isOpHktgiTrgt?"}
    SET_HIK_OP["setHikOpSvcKeiList"]
    CHECK_FIXIP{"opSvcCd equals B004?"}
    SET_FIXIP_FLG(["existFixIpOp = true"])
    CHECK_NEW_FIN_SKIP{"inNewFinFlg equals 0 and odrExecDiv equals 3?"}
    CHECK_DSL_FIN_SKIP{"inDslFinFlg equals 0 and odrExecDiv equals 2?"}
    CHECK_INDEX{"index less than 1?"}
    INIT_HAKKO["Initialize hakko_trgr_trgt_list kiki_trgt_data_list opt_trgt_data_list"]
    SET_CUR_DIV["Set curOdrExecDiv"]
    CHECK_DIV_CHANGE{"curOdrExecDiv differs from odrExecDiv?"}
    SAVE_GROUP["Save hakko_trgr_trgt_data_map Reset lists"]
    BUILD_SOD_MAP["Build sod_map with svc info ucwk kktsvkei opsvkei"]
    ADD_TO_LISTS["kiki_trgt_data_list.add opt_trgt_data_list.add"]
    CHECK_ENUM_SOD{"svcCd equals 02 TEL AND sakiSvcKeiUcwkNo present?"}
    QUERY_TELNO["executeKK_T_SVKEIUW_EOH_TEL_KK_SELECT_013"]
    SET_ENUM["setEnumSodTarget"]
    INDEX_INC["index++"]
    FINAL_GROUP["Finalize last group Add to hakko_trgr_trgt_list"]
    CHECK_INDEX_POS{"index greater than 0?"}
    BUILD_TRGT["Build trgt_data_map"]
    CHECK_DSL_SVC_NO{"inDslSvcKeiNo present?"}
    SET_CRC_CHG["getCrcChgMskmDtlNo"]
    ADD_SOD_LIST["odr_hakko_svc_kei_list.add"]
    CHECK_EMAIL_DSL{"emailOpSvcKeiNoList not empty?"}
    SET_KKSV056501_0506["setKKSV056501CC_KKSV056505CC"]
    CHECK_FIXIP_RELS{"existFixIpOp?"}
    SET_KKSV056501["setKKSV056501CC"]
    CHECK_OP_LIST{"opSvcKeiList not empty?"}
    SET_KKSV056502["setKKSV056502CC"]
    CHECK_REL_ADD{"isRlsAdd check?"}
    QUERY_ADCHG_049["executeKK_T_ADCHG_DTL_KK_SELECT_049"]
    CHECK_NET_WRIB{"adchgDtlSbtCd equals 11?"}
    ADD_WRIB_SEC["wribSvcKeiSecurityOpList.add"]
    CHECK_SEC_PACK{"isSecPackOpeMapCC?"}
    CHECK_DSL_SVC_012{"inDslSvcKeiNo present?"}
    QUERY_SVC_012["executeKK_T_SVC_KEI_KK_SELECT_012"]
    CHECK_IS_TEL_RLS{"svcCd equals 02 TEL?"}
    IS_TEL_RLS["isTelRlsAdd"]
    END_NODE(["Return outputInItem"])

    START --> CHECK_NULL_INMAP
    CHECK_NULL_INMAP -->|Yes| CHECK_NULL_OUTPUT
    CHECK_NULL_INMAP -->|No| PARSE_INPUT
    CHECK_NULL_OUTPUT -->|Yes| RETURN_NULL
    CHECK_NULL_OUTPUT -->|No| PRINT_DEBUG
    PRINT_DEBUG --> BUILD_PARAM_MAP
    BUILD_PARAM_MAP --> BUILD_INPUT_MAP
    BUILD_INPUT_MAP --> INVOKE_SERVICE
    INVOKE_SERVICE --> CHECK_RETURN
    CHECK_RETURN -->|Fail| THROW_ERROR
    CHECK_RETURN -->|Success| WARNING_BMP
    WARNING_BMP --> RETURN_OUTPUT
    PARSE_INPUT --> CHECK_WRIB_EXE
    CHECK_WRIB_EXE -->|Yes| SET_WRIB_AUTO
    SET_WRIB_AUTO --> ADD_OUTMAP
    ADD_OUTMAP --> EARLY_RETURN
    CHECK_WRIB_EXE -->|No| SET_CND_NEW
    SET_CND_NEW --> SET_CND_DSL
    SET_CND_DSL --> SET_ODR_EXEC
    SET_ODR_EXEC --> CHECK_NET_RLS
    CHECK_NET_RLS -->|Yes| SET_ODR_2_A
    SET_ODR_2_A --> CHECK_NET_KEEP
    CHECK_NET_RLS -->|No| CHECK_NET_KEEP
    CHECK_NET_KEEP -->|Yes| SET_ODR_2_B
    SET_ODR_2_B --> QUERY_ADCHG_DTL
    CHECK_NET_KEEP -->|No| QUERY_ADCHG_DTL
    QUERY_ADCHG_DTL --> LOOP_ADCHG
    LOOP_ADCHG --> READ_FIELDS
    READ_FIELDS --> CHECK_ODR_X
    CHECK_ODR_X -->|Yes| CONTINUE_LOOP
    CONTINUE_LOOP --> LOOP_ADCHG
    CHECK_ODR_X -->|No| CHECK_OP_TRANSFER
    CHECK_OP_TRANSFER -->|Yes| CHECK_OP_HKTGI
    CHECK_OP_HKTGI -->|No| LOOP_ADCHG
    CHECK_OP_HKTGI -->|Yes| SET_HIK_OP
    SET_HIK_OP --> CHECK_FIXIP
    CHECK_OP_TRANSFER -->|No| CHECK_NEW_FIN_SKIP
    CHECK_FIXIP -->|Yes| SET_FIXIP_FLG
    SET_FIXIP_FLG --> CHECK_NEW_FIN_SKIP
    CHECK_FIXIP -->|No| CHECK_NEW_FIN_SKIP
    CHECK_NEW_FIN_SKIP -->|Skip| LOOP_ADCHG
    CHECK_NEW_FIN_SKIP -->|No| CHECK_DSL_FIN_SKIP
    CHECK_DSL_FIN_SKIP -->|Skip| LOOP_ADCHG
    CHECK_DSL_FIN_SKIP -->|No| CHECK_INDEX
    CHECK_INDEX -->|Yes| INIT_HAKKO
    INIT_HAKKO --> SET_CUR_DIV
    SET_CUR_DIV --> BUILD_SOD_MAP
    CHECK_INDEX -->|No| CHECK_DIV_CHANGE
    CHECK_DIV_CHANGE -->|Yes| SAVE_GROUP
    SAVE_GROUP --> INIT_HAKKO
    CHECK_DIV_CHANGE -->|No| BUILD_SOD_MAP
    BUILD_SOD_MAP --> ADD_TO_LISTS
    ADD_TO_LISTS --> CHECK_ENUM_SOD
    CHECK_ENUM_SOD -->|Yes| QUERY_TELNO
    QUERY_TELNO --> SET_ENUM
    SET_ENUM --> INDEX_INC
    CHECK_ENUM_SOD -->|No| INDEX_INC
    INDEX_INC --> LOOP_ADCHG
    RETURN_OUTPUT --> FINAL_GROUP
    FINAL_GROUP --> CHECK_INDEX_POS
    CHECK_INDEX_POS -->|Yes| BUILD_TRGT
    BUILD_TRGT --> CHECK_DSL_SVC_NO
    CHECK_DSL_SVC_NO -->|Yes| SET_CRC_CHG
    SET_CRC_CHG --> ADD_SOD_LIST
    CHECK_DSL_SVC_NO -->|No| ADD_SOD_LIST
    ADD_SOD_LIST --> CHECK_EMAIL_DSL
    CHECK_EMAIL_DSL -->|Yes| SET_KKSV056501_0506
    CHECK_EMAIL_DSL -->|No| CHECK_FIXIP_RELS
    SET_KKSV056501_0506 --> CHECK_FIXIP_RELS
    CHECK_FIXIP_RELS -->|Yes| SET_KKSV056501
    CHECK_FIXIP_RELS -->|No| CHECK_OP_LIST
    SET_KKSV056501 --> CHECK_OP_LIST
    CHECK_OP_LIST -->|Yes| SET_KKSV056502
    CHECK_OP_LIST -->|No| CHECK_REL_ADD
    SET_KKSV056502 --> CHECK_REL_ADD
    CHECK_REL_ADD -->|Yes| QUERY_ADCHG_049
    QUERY_ADCHG_049 --> CHECK_NET_WRIB
    CHECK_NET_WRIB -->|Yes| ADD_WRIB_SEC
    ADD_WRIB_SEC --> CHECK_SEC_PACK
    CHECK_NET_WRIB -->|No| CHECK_SEC_PACK
    CHECK_SEC_PACK -->|Yes| CHECK_DSL_SVC_012
    CHECK_SEC_PACK -->|No| CHECK_DSL_SVC_012
    CHECK_REL_ADD -->|No| CHECK_DSL_SVC_012
    CHECK_DSL_SVC_012 -->|Yes| QUERY_SVC_012
    QUERY_SVC_012 --> CHECK_IS_TEL_RLS
    CHECK_IS_TEL_RLS -->|Yes| IS_TEL_RLS
    IS_TEL_RLS --> END_NODE
    CHECK_IS_TEL_RLS -->|No| END_NODE
    CHECK_DSL_SVC_012 -->|No| END_NODE

    style START fill:#90EE90
    style END_NODE fill:#90EE90
    style RETURN_NULL fill:#FFB6C1
    style EARLY_RETURN fill:#FFB6C1
    style RETURN_OUTPUT fill:#FFB6C1
    style CONTINUE_LOOP fill:#FFD700
    style THROW_ERROR fill:#FF6B6B
```

**Branch descriptions:**

- **ODR_EXEC_DIV_DSL_FIN = "2" (Release Completion)** — SOD emission trigger classification indicating a service release event. These records are eligible for SOD emission during address change release completion.
- **ODR_EXEC_DIV_NEW_FIN = "3" (New Registration Completion)** — SOD emission trigger classification indicating a new service registration event. These records are eligible for SOD emission during address change new registration completion.
- **ADCHG_DTL_SBT_CD_SVC_KEI = "01"** — Address change detail sub-type for service contract number changes.
- **ADCHG_DTL_SBT_CD_UCWK = "02"** — Address change detail sub-type for service line item changes.
- **ADCHG_DTL_SBT_CD_KKTK = "03"** — Address change detail sub-type for KKTK (device-provided) service contract changes.
- **ADCHG_DTL_SBT_CD_OP = "04"** — Address change detail sub-type for operation (add-on) service contract changes.
- **ADCHG_DTL_SBT_CD_NET_WRIB = "11"** — Address change detail sub-type for network discount service contract changes.
- **SVC_CD_NET = "01"** — Service code for Net (fiber-optic broadband) service.
- **SVC_CD_TEL = "02"** — Service code for Tel (telephone) service.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `inMap` | `JBSbatServiceInterfaceMap` | Input message carrying address change processing parameters. Contains adchgNo (address change number), mskmNo (contract number), newSvcKeiNo (new service contract number), dslSvcKeiNo (cancelled service contract number), newFinFlg (new registration completion flag), dslFinFlg (release completion flag), wribExeFlg (discount auto-apply flag), and svcKeiIdoSbtCd (service contract change type code). When null, signals deferred processing mode where pre-built CC maps are emitted. |
| 2 | `outputInItem` | `JBSbatOutputItem` | Output item carrying return information. Used to accumulate processed maps via `addOutMapList()` and returned as the result. Contains the result of address change SOD processing. |

**Instance fields read by the method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `odr_hakko_svc_kei_list` | `ArrayList<HashMap<String, Object>>` | SOD emission target service contract list — accumulates all SOD trigger data maps across loop iterations |
| `op_svc_kei_dsl_list` | `ArrayList<HashMap<String, Object>>` | Operation release list — used in null-input mode for CC emission |
| `op_svc_kei_cnsl_list` | `ArrayList<HashMap<String, Object>>` | Operation cancel list — used in null-input mode for CC emission |
| `op_svc_hktgi_upd_list` | `ArrayList<HashMap<String, Object>>` | Operation transfer (inheritance) list — used in null-input mode for CC emission |
| `wrisvc_auto_aply_list` | `ArrayList<HashMap<String, Object>>` | Discount auto-apply list — used in null-input mode for CC emission |
| `enum_sod_target_list` | `ArrayList<HashMap<String, Object>>` | ENUM cancel SOD emission target list — for ENUM cancel SOD generation |
| `wrib_op_svc_hktgi_upd_map` | `HashMap<String, Object>` | WRIB (discount) operation transfer map — used in null-input mode |
| `adchgNo` | `String` | Address change number — used for address change confirmation processing |
| `opeDate` | `String` | (inherited) Application date — used as a query parameter in SQL calls |
| `db_KK_T_ADCHG_DTL` | `JBSbatSQLAccess` | Database access for KK_T_ADCHG_DTL — cursor used to iterate address change detail records |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JBSbatInterface.trim` | JBSbatInterface | - | Calls trim in JBSbatInterface |
| - | `JCCBatCommon.invokeService` | JCCBatCommon | - | Calls invokeService in JCCBatCommon — ESB service invoker |
| - | `JKKBatClarisAuthCrdt.isNullBlank` | JKKBatClarisAuthCrdt | - | Calls isNullBlank in JKKBatClarisAuthCrdt |
| - | `JKKBatClearPassBase.isNullBlank` | JKKBatClearPassBase | - | Calls isNullBlank in JKKBatClearPassBase |
| - | `JKKBatClearPassCrdt.isNullBlank` | JKKBatClearPassCrdt | - | Calls isNullBlank in JKKBatClearPassCrdt |
| - | `JZMBatCommon.trim` | JZMBatCommon | - | Calls trim in JZMBatCommon |
| - | `JBSbatACEoElectPrcInfoTrkm.isNullBlank` | JBSbatACEoElectPrcInfoTrkm | - | Calls isNullBlank in JBSbatACEoElectPrcInfoTrkm |
| - | `JBSbatACTrgtSvcKeiMake.isNullBlank` | JBSbatACTrgtSvcKeiMake | - | Calls isNullBlank in JBSbatACTrgtSvcKeiMake |
| R | `JBSbatFUCaseFileRnkData.getString` | JBSbatFUCaseFileRnkData | - | Calls getString in JBSbatFUCaseFileRnkData |
| R | `JBSbatFUMoveNaviData.getString` | JBSbatFUMoveNaviData | - | Calls getString in JBSbatFUMoveNaviData |
| R | `JBSbatKKAdChgSodUpd.executeKK_T_ADCHG_DTL_KK_SELECT_014` | JBSbatKKAdChgSodUpd | KK_T_ADCHG_DTL | Calls executeKK_T_ADCHG_DTL_KK_SELECT_014 — queries address change details with complex multi-condition filter |
| R | `JBSbatKKAdChgSodUpd.executeKK_T_ADCHG_DTL_KK_SELECT_049` | JBSbatKKAdChgSodUpd | KK_T_ADCHG_DTL | Calls executeKK_T_ADCHG_DTL_KK_SELECT_049 — queries address change details for NET WRIB check |
| R | `JBSbatKKAdChgSodUpd.executeKK_T_IDO_RSV_KK_SELECT_028` | JBSbatKKAdChgSodUpd | KK_T_IDO_RSV | Calls executeKK_T_IDO_RSV_KK_SELECT_028 — queries migration reservation data |
| R | `JBSbatKKAdChgSodUpd.executeKK_T_SVC_KEI_KK_SELECT_012` | JBSbatKKAdChgSodUpd | KK_T_SVC_KEI | Calls executeKK_T_SVC_KEI_KK_SELECT_012 — queries service contract for tel release check |
| R | `JBSbatKKAdChgSodUpd.executeKK_T_SVC_KEI_KK_SELECT_222` | JBSbatKKAdChgSodUpd | KK_T_SVC_KEI | Calls executeKK_T_SVC_KEI_KK_SELECT_222 — queries service contract by DTL No for old registration date |
| R | `JBSbatKKAdChgSodUpd.executeKK_T_SVKEIUW_EOH_TEL_KK_SELECT_013` | JBSbatKKAdChgSodUpd | KK_T_SVKEIUW_EOH_TEL | Calls executeKK_T_SVKEIUW_EOH_TEL_KK_SELECT_013 — queries tel number info for ENUM cancel SOD |
| R | `JBSbatKKAdChgSodUpd.getCrcChgMskmDtlNo` | JBSbatKKAdChgSodUpd | KK_T_MSKM_DTL | Calls getCrcChgMskmDtlNo — retrieves CRC change detail number from contract details |
| R | `JBSbatKKAdChgSodUpd.getOpSvcKeiGeneDtm` | JBSbatKKAdChgSodUpd | KK_T_OP_SVC_KEI | Calls getOpSvcKeiGeneDtm — retrieves operation service registration datetime |
| - | `JBSbatKKAdChgSodUpd.isNetKeep` | JBSbatKKAdChgSodUpd | - | Calls isNetKeep — checks if operation inheritance with release completion |
| - | `JBSbatKKAdChgSodUpd.isNetRlsAdd` | JBSbatKKAdChgSodUpd | - | Calls isNetRlsAdd — checks if release + new registration |
| - | `JBSbatKKAdChgSodUpd.isOpHktgiDlTrgt` | JBSbatKKAdChgSodUpd | - | Calls isOpHktgiDlTrgt — checks if operation is transfer-target |
| - | `JBSbatKKAdChgSodUpd.isOpHktgiTrgt` | JBSbatKKAdChgSodUpd | - | Calls isOpHktgiTrgt — checks if operation is transfer target |
| - |`JBSbatKKAdChgSodUpd.isRlsAdd` | JBSbatKKAdChgSodUpd | - | Calls isRlsAdd — checks release + add condition |
| - | `JBSbatKKAdChgSodUpd.isSecPackOpeMapCC` | JBSbatKKAdChgSodUpd | - | Calls isSecPackOpeMapCC — security pack operation CC setup |
| - | `JBSbatKKAdChgSodUpd.isTelRlsAdd` | JBSbatKKAdChgSodUpd | - | Calls isTelRlsAdd — tel release + add check |
| - | `JBSbatKKAdChgSodUpd.nullToBlank` | JBSbatKKAdChgSodUpd | - | Calls nullToBlank — null-to-blank conversion utility |
| - | `JBSbatKKAdChgSodUpd.printDebugLog` | JBSbatKKAdChgSodUpd | - | Calls printDebugLog — debug log output |
| - | `JBSbatKKAdChgSodUpd.setEnumSodTarget` | JBSbatKKAdChgSodUpd | - | Calls setEnumSodTarget — sets ENUM cancel SOD target |
| - | `JBSbatKKAdChgSodUpd.setHikOpSvcKeiList` | JBSbatKKAdChgSodUpd | - | Calls setHikOpSvcKeiList — sets operation inheritance list |
| - | `JBSbatKKAdChgSodUpd.setKKSV056501CC` | JBSbatKKAdChgSodUpd | - | Calls setKKSV056501CC — operation release CC setup |
| - | `JBSbatKKAdChgSodUpd.setOldNewSvcKeiNo` | JBSbatKKAdChgSodUpd | - | Calls setOldNewSvcKeiNo — sets old/new service contract numbers |
| - | `JBSbatKKAdChgSodUpd.setWrisvcAutoAply` | JBSbatKKAdChgSodUpd | - | Calls setWrisvcAutoAply — discount auto-apply CC setup |

### DB Table Access (from SQL key definitions and SQLAccess initialization):

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `executeKK_T_ADCHG_DTL_KK_SELECT_014` | (self) | KK_T_ADCHG_DTL | Reads address change details with multi-condition filter for SOD emission target |
| R | `db_KK_T_IDO_RSV.selectNext` | (self) | KK_T_IDO_RSV | Reads migration reservation data during course change old date retrieval |
| R | `db_KK_T_SVC_KEI.selectNext` | (self) | KK_T_SVC_KEI | Reads service contract data (via SELECT_222 and SELECT_012) |
| R | `db_KK_T_SVKEIUW_EOH_TEL.selectNext` | (self) | KK_T_SVKEIUW_EOH_TEL | Reads tel number info for ENUM cancel SOD |
| R | `executeKK_T_ADCHG_DTL_KK_SELECT_049` | (self) | KK_T_ADCHG_DTL | Reads address change details for NET WRIB (discount) check |
| R | `getCrcChgMskmDtlNo` | (self) | KK_T_MSKM_DTL | Reads contract detail for CRC change detail number |
| R | `getOpSvcKeiGeneDtm` | (self) | KK_T_OP_SVC_KEI | Reads operation service contract for registration datetime |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch: JBSbatKKAdChgCstScreenKidou | `JBSbatKKAdChgCstScreenKidou.execute()` → initializes `execRunObjSod = new JBSbatKKAdChgSodUpd()` → `execRunObjSod.execute()` | `executeKK_T_ADCHG_DTL_KK_SELECT_014 [R] KK_T_ADCHG_DTL`, `invokeService [C] KKSV0565 CC batch` |
| 2 | Screen: KKSV0565 (via ESB) | `KKSV0565Flow` → `KKSV0565OPOperation` → `JCCBatchEsbInterface.invokeService` with USECASE_ID="KKSV0565" → null inMap branch | `invokeService [C] KKSV056501CC-09CC batch` |
| 3 | Batch: JBSbatKKAdChgFinAddRun | `JBSbatKKAdChgFinAddRun.execute()` → calls `JBSbatKKAdChgSodUpd.execute()` at moved position | `executeKK_T_ADCHG_DTL_KK_SELECT_014 [R] KK_T_ADCHG_DTL`, `invokeService [C] KKSV0565 CC batch` |

## 6. Per-Branch Detail Blocks

**Block 1** — IF (null input branch) (L400)
> Input message is null — deferred processing mode. Pre-built CC maps from prior batch runs are assembled and emitted via ESB.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `if (inMap == null)` |
| 2 | IF | `if (outputInItem == null || outputInItem.getOutMapList().isEmpty())` → returns null |
| 3 | IF | `if (odr_hakko_svc_kei_list != null)` → calls `printDebugLog()` |
| 4 | SET | `paramMap.put(TELEGRAM_INFO_USECASE_ID, "KKSV0565")` [-> USECASE_ID="KKSV0565"] |
| 5 | SET | `paramMap.put(TELEGRAM_INFO_OPERATION_ID, "KKSV0565OP")` [-> OPERATION_ID="KKSV0565OP"] |
| 6 | SET | `mapKKSV056506CC.put("adchg_adchg_no", this.adchgNo)` |
| 7 | SET | `mapKKSV056506CC.put("func_code", "1")` — Address change confirmation CC |
| 8 | SET | `mapKKSV056506CC.put("func_cd", "1")` |
| 9 | SET | `mapKKSV056501CC.put("op_svc_kei_dsl_list", op_svc_kei_dsl_list)` — Op release CC |
| 10 | SET | `inputMap.put("HakkoSODCC", new HashMap())` — SOD emission CC |
| 11 | SET | `mapKKSV056505CC.put("op_svc_kei_cnsl_list", op_svc_kei_cnsl_list)` — Op cancel CC |
| 12 | SET | `mapKKSV056502CC.put("op_svc_hktgi_upd_list", op_svc_hktgi_upd_list)` — Op transfer CC |
| 13 | SET | `inputMap.put("KKSV056507CC", wrib_op_svc_hktgi_upd_map)` — Security pack CC |
| 14 | SET | `mapKKSV056503CC.put("wrisvc_auto_aply_list", wrisvc_auto_aply_list)` — Discount auto-apply CC |
| 15 | SET | `mapKKSV056504CC.put("odr_hakko_svc_kei_list", odr_hakko_svc_kei_list)` — SOD emission list CC |
| 16 | SET | `mapKKSV056504CC.put("func_code", "1")` |
| 17 | SET | `mapKKSV056509CC.put("targetList", enum_sod_target_list)` — ENUM cancel SOD CC |
| 18 | SET | `mapKKSV056509CC.put("func_code", "1")` |
| 19 | SET | `inputMap.put("KKSV056508CC", new HashMap())` — ENUM cancel SOD CC (port output end) |
| 20 | CALL | `JCCBatchEsbInterface.invokeService(super.commonItem, paramMap, inputMap, outputMap)` |
| 21 | CHECK | `if (!RETURN_CODE_SUCCESS.equals(returnCode))` → throws JBSbatBusinessException("Service order issuance part (address change)") |
| 22 | CALL | `warningBmp(outputMap)` — Banpo works warning check |

**Block 2** — ELSE (L613)
> Main processing branch — input map is provided.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inAdchgNo = inMap.getString(ADCHG_NO)` — Address change number |
| 2 | SET | `inMskmNo = inMap.getString(MSKM_NO)` — Contract number |
| 3 | SET | `inNewSvkeiKisuwNo = inMap.getString(NEW_SVKEI_KISUW_NO)` — New service contract line item number |
| 4 | SET | `inDslSvkeiKisuwNo = inMap.getString(DSL_SVKEI_KISUW_NO)` — Cancelled service contract line item number |
| 5 | SET | `inNewSvcKeiNo = inMap.getString(NEW_SVC_KEI_NO)` — New service contract number |
| 6 | SET | `inDslSvcKeiNo = inMap.getString(DSL_SVC_KEI_NO)` — Cancelled service contract number |
| 7 | SET | `inSvcKeiIdoSbtCd = inMap.getString(SVC_KEI_IDO_SBT_CD)` — Service contract change type code |
| 8 | SET | `inNewSvkeiKisuwGene = inMap.getString(NEW_SVKEI_KISUW_GENE)` — New service contract line item generation |
| 9 | SET | `inDslSvkeiKisuwGene = inMap.getString(DSL_SVKEI_KISUW_GENE)` — Cancelled service contract line item generation |
| 10 | SET | `inNewFinFlg = inMap.getString(NEW_FIN_FLG)` — New registration completion flag |
| 11 | SET | `inDslFinFlg = inMap.getString(DSL_FIN_FLG)` — Release completion flag |
| 12 | SET | `inWribExeFlg = inMap.getString(WRIB_EXE_FLG)` — Discount auto-apply flag |

**Block 3** — IF (Block 2.1) adchgNo capture for address change confirmation (L620)
> When new registration completion flag is "1", capture adchgNo for confirmation processing.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `if ("1".equals(inNewFinFlg))` [-> NEW_FIN_FLG="1"] |
| 2 | SET | `this.adchgNo = inAdchgNo` |

**Block 4** — IF (Block 2.2) discount auto-apply early exit (L628)
> When discount auto-apply flag is "1", delegate to discount CC and return early without processing address change details.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `if ("1".equals(inWribExeFlg))` [-> WRIB_EXE_FLG="1"] |
| 2 | CALL | `setWrisvcAutoAply(inAdchgNo, inMskmNo)` |
| 3 | EXEC | `outputInItem.addOutMapList(inMap)` |
| 4 | RETURN | `return outputInItem` |

**Block 5** — SET (L633)
> Prepare query condition values for new service contract number.

| # | Type | Code |
|---|------|------|
| 1 | SET | `cndNewSvcKeiNo = "ZZZZZZZZZZ"` — default sentinel value |
| 2 | IF | `if (!(inNewSvcKeiNo == null || "".equals(inNewSvcKeiNo.trim())))` → `cndNewSvcKeiNo = inNewSvcKeiNo` |
| 3 | SET | `cndDslSvcKeiNo = "ZZZZZZZZZZ"` — default sentinel value |
| 4 | IF | `if (!(inDslSvcKeiNo == null || "".equals(inDslSvcKeiNo.trim())))` → `cndDslSvcKeiNo = inDslSvcKeiNo` |

**Block 6** — SET (L641)
> Determine SOD emission trigger classification for multi-function rate handling.

| # | Type | Code |
|---|------|------|
| 1 | SET | `odrExecDivMfr = "x"` — default: no multi-function rate processing |
| 2 | IF | `if (isNetRlsAdd(inAdchgNo))` → `odrExecDivMfr = "2"` [-> ODR_EXEC_DIV_DSL_FIN="2"] — Release + New → DslFin only |
| 3 | IF | `if (isNetKeep(inAdchgNo))` → `odrExecDivMfr = "2"` — Inherit + DslFin → DslFin only |

**Block 7** — CALL (L654)
> Query address change details with multi-condition filter. This prepares the cursor for the main loop.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `executeKK_T_ADCHG_DTL_KK_SELECT_014(...)` — Large query with 40+ parameters covering 12+ filter combinations for odr_exec_div, opeDate, parent contract codes, address change sub-types, and service numbers |

**Block 8** — FOR LOOP (L723)
> Main processing loop — iterates over address change detail records.

| # | Type | Code |
|---|------|------|
| 1 | INIT | Initialize local variables: adchgNo, svcKeiIdoSbtCd, sysid, svcCd, svcKeiNo, svcKeiGeneAddDtm, svcKeiUcwkNo, svcKeiUcwkGeneAddDtm, kktkSvcKeiNo, kktkSvcKeiGeneAddDtm, opSvcKeiNo, opSvcKeiGeneAddDtm, opSvcCd, adchgDtlSbtCd, odrExecDiv, chbfSkbtNo, chafSkbtNo, sakiSvcKeiUcwkNo, sakiSvcKeiGeneAddDtm |
| 2 | SET | Read all fields from adchgDtlInfo with nullToBlank |
| 3 | IF | `if ("x".equals(odrExecDiv))` → continue [-> ODR_EXEC_DIV default="x"] — Skip records with no multi-function rate processing flag |

**Block 9** — IF (Block 8.2) operation transfer setup (L768)
> For operation service address change detail sub-type "04", if transfer fields are present, setup operation inheritance list.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `adchgDtlSbtCd == "04" && chbfSkbtNo present && chafSkbtNo present && inNewSvcKeiNo present && svcCd == "01"(NET)` |
| 2 | IF | `if (!isOpHktgiTrgt(chbfSkbtNo))` → continue [-> OM-2016-0001519 fix for mail op during address change] |
| 3 | CALL | `setHikOpSvcKeiList(opSvcKeiList, opSvcKeiNo, emailOpSvcKeiNoList, inNewSvcKeiNo, adchgNo, opSvcKeiSecurityOpList)` |
| 4 | IF | `if (OP_SVC_CD_FIXIPAD.equals(opSvcCd))` → `existFixIpOp = true` [-> "B004" Fixed IP Address] |

**Block 10** — IF/ELSE-IF (Block 8.3) skip conditions (L797)
> Skip records based on completion flags.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `if ("0".equals(inNewFinFlg) && ODR_EXEC_DIV_NEW_FIN.equals(odrExecDiv))` → continue [-> "0" and "3"](New registration not yet complete, skip new fin records) |
| 2 | CHECK | `if ("0".equals(inDslFinFlg) && ODR_EXEC_DIV_DSL_FIN.equals(odrExecDiv))` → continue [-> "0" and "2"](Release not yet complete, skip dsl fin records) |

**Block 11** — IF (Block 8.4) first iteration — initialize lists (L811)
> On first loop iteration, initialize the SOD trigger target lists.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `if (index < 1)` |
| 2 | SET | `hakko_trgr_trgt_list = new ArrayList()` — SOD emission trigger target list |
| 3 | SET | `kiki_trgt_data_list = new ArrayList()` — Device service target list |
| 4 | SET | `opt_trgt_data_list = new ArrayList()` — Operation target list |
| 5 | SET | `hakko_trgr_trgt_data_map = new HashMap()` — SOD emission trigger data map |
| 6 | SET | `curOdrExecDiv = odrExecDiv` — Track current classification |

**Block 12** — ELSE (Block 8.5) classification change — flush and reset (L820)
> When odr_exec_div changes, flush the previous group and reset.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `if (!curOdrExecDiv.equals(odrExecDiv))` — Trigger classification changed |
| 2 | SET | `hakko_trgr_trgt_data_map.put("kiki_trgt_data_list", kiki_trgt_data_list)` |
| 3 | SET | `hakko_trgr_trgt_data_map.put("opt_trgt_data_list", opt_trgt_data_list)` |
| 4 | IF | `if (ODR_EXEC_DIV_NEW_FIN.equals(odrExecDiv))` → put odr_exec_div = "3" |
| 5 | IF | `if (ODR_EXEC_DIV_DSL_FIN.equals(odrExecDiv))` → put odr_exec_div = "2" |
| 6 | SET | `hakko_trgr_trgt_list.add(hakko_trgr_trgt_data_map)` |
| 7 | SET | Re-initialize all lists and map |
| 8 | SET | `curOdrExecDiv = odrExecDiv` |

**Block 13** — Block (L842) Build SOD map
> Build the complete SOD target map with all service information.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sod_kihon_info.put("sysid", sysid)` |
| 2 | IF/ELSE-IF/ELSE — svc_kei_info (L847) | |
| 2.1 | CHECK | `ODR_EXEC_DIV_NEW_FIN.equals(odrExecDiv)` — New registration completion |
| 2.1.1 | IF | `SVC_CD_TEL.equals(svcCd)` → set svc_kei_no (before number for tel) |
| 2.1.2 | ELSE | → set saki_svc_kei_no (after number for non-tel) |
| 2.2 | ELSE-IF | `ODR_EXEC_DIV_DSL_FIN.equals(odrExecDiv)` — Release completion |
| 2.2.1 | IF | `svcKeiIdoSbtCd == "1" && inNewSvcKeiNo.equals(inDslSvcKeiNo)` — Course change |
| 2.2.1.1 | CALL | `executeKK_T_IDO_RSV_KK_SELECT_028()` — Query migration reservation |
| 2.2.1.2 | CALL | `executeKK_T_SVC_KEI_KK_SELECT_222()` — Query service contract for old date |
| 2.2.1.3 | SET | `oldCrsGeneAddDtm = svcKeiInfo.getString(GENE_ADD_DTM)` — Old course registration date |
| 2.2.2 | SET | `svc_kei_info.put("chbf_svc_kei_gene_add_dtm", oldCrsGeneAddDtm != null ? oldCrsGeneAddDtm : svcKeiGeneAddDtm)` |
| 2.3 | ELSE | → all empty strings |
| 3 | SET | `setOldNewSvcKeiNo(svc_kei_info, inAdchgNo)` — Set old/new service contract numbers |
| 4 | IF/ELSE-IF/ELSE — svc_kei_ucwk_info (L950) | |
| 4.1 | CHECK | `ODR_EXEC_DIV_NEW_FIN.equals(odrExecDiv)` |
| 4.1.1 | IF | `SVC_CD_TEL.equals(svcCd)` → use sakiSvcKeiUcwkNo [OT-2013-000311 mod] |
| 4.1.1.1 | IF | `adchgDtlSbtCd == "02"` → set moto_svc_kei_ucwk_no [IKK-2013-0001085] |
| 4.2 | ELSE-IF | `ODR_EXEC_DIV_DSL_FIN.equals(odrExecDiv)` → set chbf fields |
| 5 | IF/ELSE-IF/ELSE — kktsvkei_info (L1012) — only for adchgDtlSbtCd == "03" | |
| 6 | IF/ELSE-IF/ELSE — opsvkei_info (L1031) — for adchgDtlSbtCd == "04" | |
| 6.1 | IF | `adchgDtlSbtCd == "04"` |
| 6.1.1 | IF | `!isNullBlank(chbfSkbtNo) && isOpHktgiDlTrgt(chbfSkbtNo)` → all empty (skip op release during transfer) [OM-2018-0000517] |
| 6.1.2 | ELSE | → set chbf/chaf opSvcKeiNo and geneDtm via getOpSvcKeiGeneDtm() |
| 7 | SET | `sod_map.put("chbf_svc_kei_kaisen_ucwk_no", inDslSvkeiKisuwNo)` — Before change UCWK number |
| 8 | SET | `sod_map.put("chaf_svc_kei_kaisen_ucwk_no", inNewSvkeiKisuwNo)` — After change UCWK number |

**Block 14** — IF (L1058)
> Add SOD map to appropriate target lists based on address change sub-type.

| # | Type | Code |
|---|------|------|
| 1 | IF | `adchgDtlSbtCd == "03"` → `kiki_trgt_data_list.add(sod_map)` — KKTK device service |
| 2 | IF | `adchgDtlSbtCd == "04" || "02".equals(adchgDtlSbtCd)` → `opt_trgt_data_list.add(sod_map)` — Op or service line item |
| 3 | SET | `sod_map.put("adchg_no", inAdchgNo)` |

**Block 15** — IF (L1069)
> ENUM cancel SOD emission for telephone services — port output end processing.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `SVC_CD_TEL.equals(svcCd) && !sakiSvcKeiUcwkNo.isEmpty() && !inSvcKeiIdoSbtCd.equals("3") && !sakiSvcKeiUcwkNo.equals(svcKeiUcwkNo)` |
| 2 | CALL | `executeKK_T_SVKEIUW_EOH_TEL_KK_SELECT_013(new String[]{sakiSvcKeiUcwkNo})` — Query tel number |
| 3 | SET | `telno = svkeiuwEohTelInfo.getString(TELNO)` |
| 4 | CALL | `setEnumSodTarget(telno, svcKeiNo, sakiSvcKeiUcwkNo)` — Set ENUM cancel SOD target |

**Block 16** — SET (L1115)
> After loop: finalize last group.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `if (index > 0)` |
| 2 | SET | `hakko_trgr_trgt_data_map.put("kiki_trgt_data_list", kiki_trgt_data_list)` |
| 3 | SET | `hakko_trgr_trgt_data_map.put("opt_trgt_data_list", opt_trgt_data_list)` |
| 4 | IF | `inNewFinFlg == "1" && tempOdrExecDiv == "3"` → put odr_exec_div |
| 5 | IF | `inDslFinFlg == "1" && tempOdrExecDiv == "2"` → put odr_exec_div |
| 6 | SET | `hakko_trgr_trgt_list.add(hakko_trgr_trgt_data_map)` |

**Block 17** — IF (L1124)
> Build and add SOD emission target data to the odr_hakko_svc_kei_list.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `!hakko_trgr_trgt_list.isEmpty()` |
| 2 | SET | `trgt_data_map.put("hakko_trgr_trgt_list", hakko_trgr_trgt_list)` |
| 3 | SET | `trgt_data_map.put("use_svc_chg_div", inSvcKeiIdoSbtCd)` |
| 4 | IF | `!isNullBlank(inDslSvcKeiNo)` → `trgt_data_map.put("adchg_mskm_dtl_no", getCrcChgMskmDtlNo(inMskmNo))` |
| 5 | IF | `odr_hakko_svc_kei_list == null` → initialize |
| 6 | SET | `odr_hakko_svc_kei_list.add(trgt_data_map)` |
| 7 | EXEC | `outputInItem.addOutMapList(inMap)` |

**Block 18** — IF (L1141)
> Setup operation release CC for email-only operations.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `!emailOpSvcKeiNoList.isEmpty()` |
| 2 | CALL | `setKKSV056501CC_KKSV056505CC(inAdchgNo, emailOpSvcKeiNoList)` — Operation release + cancel CC setup |

**Block 19** — IF (L1149)
> Setup operation release CC for fixed IP operations.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `existFixIpOp` — Fixed IP Address service present |
| 2 | CALL | `setKKSV056501CC(inAdchgNo)` — Operation release CC setup |

**Block 20** — IF (L1157)
> Setup operation transfer CC.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `!opSvcKeiList.isEmpty()` |
| 2 | CALL | `setKKSV056502CC(inAdchgNo, opSvcKeiList)` — Operation transfer CC setup |

**Block 21** — IF (L1162)
> Security pack processing for release + add scenarios.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `inNewSvcKeiNo present && isRlsAdd(adchgNo, inNewSvcKeiNo)` |
| 2 | CALL | `executeKK_T_ADCHG_DTL_KK_SELECT_049(param)` — Query NET WRIB address change details |
| 3 | SET | Read netPackMap fields: adchgDtlSbtCd, chbfSkbtNo, chafSkbtNo, svcCd |
| 4 | IF | `adchgDtlSbtCd == "11"(NET_WRIB) && fields present && svcCd == "01"(NET)` → add to wribSvcKeiSecurityOpList |
| 5 | CHECK | `!opSvcKeiSecurityOpList.isEmpty() || !wribSvcKeiSecurityOpList.isEmpty()` |
| 6 | CALL | `isSecPackOpeMapCC(inAdchgNo, opSvcKeiSecurityOpList, wribSvcKeiSecurityOpList, inMskmNo)` |

**Block 22** — IF (L1204)
> Minus alarm emission for inherited operations that are already released — ANK-4642-00-00.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `!isNullBlank(inDslSvcKeiNo)` |
| 2 | CALL | `executeKK_T_SVC_KEI_KK_SELECT_012(new String[]{inDslSvcKeiNo, opeDate})` — Query service contract |
| 3 | SET | Read svcCd, svcKeiNo from db_KK_T_SVC_KEI |
| 4 | IF | `SVC_CD_TEL.equals(svcCd)` → `isTelRlsAdd(inAdchgNo, svcKeiNo)` — Tel release check |
| 5 | RETURN | `return outputInItem` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `adchgNo` | Field | Address change number — unique identifier for an address change record in KK_T_ADCHG |
| `adchgDtlSbtCd` | Field | Address change detail sub-type code — classifies the type of address change (01=service contract, 02=service line item, 03=KKTK device, 04=operation service, 11=NET WRIB) |
| `chbfSkbtNo` | Field | Before change service contract number — the service contract number before the address change |
| `chafSkbtNo` | Field | After change service contract number — the service contract number after the address change |
| `cndNewSvcKeiNo` | Field | Condition new service contract number — query condition value (default "ZZZZZZZZZZ" as wildcard) |
| `cndDslSvcKeiNo` | Field | Condition cancelled service contract number — query condition value (default "ZZZZZZZZZZ" as wildcard) |
| `curOdrExecDiv` | Field | Current order emission classification — tracks the odr_exec_div of the previous loop iteration |
| `dslFinFlg` | Field | Release completion flag — "1" means release completion has been confirmed |
| `enumSodTargetList` | Field | ENUM cancel SOD emission target list — accumulates targets for ENUM cancel SOD generation (port output end) |
| `existFixIpOp` | Field | Fixed IP operation flag — true when a fixed IP add-on service is present in the transfer target |
| `hakkoTrgrTrgtList` | Field | Emission trigger target list — grouped SOD emission target data sorted by odr_exec_div |
| `kikiTrgtDataList` | Field | Device target data list — SOD targets for KKTK device-provided services |
| `mskmNo` | Field | Contract number — identifies the customer contract |
| `newFinFlg` | Field | New registration completion flag — "1" means new registration has been confirmed |
| `opSvcKeiList` | Field | Operation inheritance (transfer) list — accumulates operation service contract numbers for transfer CC setup |
| `opSvcKeiSecurityOpList` | Field | Operation security pack list — security-related operation service contracts |
| `optTrgtDataList` | Field | Operation target data list — SOD targets for operation (add-on) services |
| `odrExecDiv` | Field | Order emission classification — "2"=release completion, "3"=new registration completion, "x"=no multi-function rate |
| `odrExecDivMfr` | Field | Order emission trigger manufacturer filter — "x"=default, "2"=filter for release/new combinations |
| `odrHakkoSvcKeiList` | Field | SOD emission target service contract list — final accumulated list of all SOD trigger data maps |
| `opeDate` | Field | Application date — batch processing date used in SQL queries |
| `opSvcKeiDslList` | Field | Operation release list — used in null-input mode for CC emission |
| `opSvcKeiCnslList` | Field | Operation cancel list — used in null-input mode for CC emission |
| `opSvcHktgi_updList` | Field | Operation transfer (inheritance) list — used in null-input mode for CC emission |
| `sakiSvcKeiUcwkNo` | Field | Before service contract line item number — the service line item number before the address change |
| `svcKeiIdoSbtCd` | Field | Service contract change type code — classifies the type of service change (e.g., "1"=course change, "3"=addition) |
| `svcKeiUcwkNo` | Field | Service contract line item number — internal tracking ID for service contract line items |
| `trgtDataMap` | Field | Target data map — assembled map containing hakko_trgr_trgt_list and use_svc_chg_div |
| `ucwkNo` | Field | Service line item UCWK number — unified contract work number for service line items |
| `useSvcChgDiv` | Field | Service change classification — the svcKeiIdoSbtCd value indicating the type of service change |
| `wrisvcAutoAplyList` | Field | Discount auto-apply CC list — used in null-input mode for CC emission |
| `WRBK_CD_3` | Field | Tel security pack: eo Kodenwa Pack 3 — "W00000007" |
| `WRBK_CD_7` | Field | Tel security pack: eo Kodenwa Pack 7 — "W00000008" |
| `WRBK_CD_ANSN` | Field | Tel security pack: Anshan Telephone Pack 7 — "W00000023" |
| `WRBK_STAT_KIYK` | Field | Discount service status: released/completed — "910" |
| `WRBK_STAT_CANCEL` | Field | Discount service status: cancelled — "920" |
| ADCHG_DTL_SBT_CD_OP | Constant | Address change detail sub-type: operation service contract number = "04" |
| ADCHG_DTL_SBT_CD_KKTK | Constant | Address change detail sub-type: KKTK service contract number = "03" |
| ADCHG_DTL_SBT_CD_NET_WRIB | Constant | Address change detail sub-type: NET WRIB discount service = "11" |
| ADCHG_DTL_SBT_CD_SVC_KEI | Constant | Address change detail sub-type: service contract number = "01" |
| ADCHG_DTL_SBT_CD_UCWK | Constant | Address change detail sub-type: service line item = "02" |
| ADCHG_DTL_SBT_CD_TEL_WRIB | Constant | Address change detail sub-type: Tel security pack discount = "10" |
| DLYD_TRN_REQ_NO | Constant | Deferred processing request number key |
| KKTK_OYA_KEI_SKBT_CD_SVC_KEI | Constant | KKTK parent contract identification code: service contract = "01" |
| KKTK_OYA_KEI_SKBT_CD_SVC_KEI_KAISEN_UCWK | Constant | KKTK parent contract identification code: service contract line item = "02" |
| KKTK_OYA_KEI_SKBT_CD_SVC_KEI_UCWK | Constant | KKTK parent contract identification code: service line item = "03" |
| KKSV0565 | Constant | Use case ID for address change SOD update processing |
| KKSV0565OP | Constant | Operation ID for address change SOD update processing |
| ODR_EXEC_DIV_DSL_FIN | Constant | Order emission trigger classification: release completion = "2" |
| ODR_EXEC_DIV_NEW_FIN | Constant | Order emission trigger classification: new registration completion = "3" |
| OP_OYA_KEI_SKBT_CD_SVC_KEI | Constant | Operation parent contract identification code: service contract = "01" |
| OP_OYA_KEI_SKBT_CD_SVC_KEI_UCWK | Constant | Operation parent contract identification code: service line item = "03" |
| OP_SVC_CD_FIXIPAD | Constant | Operation service code: Fixed IP Address = "B004" |
| OPE_DATE | Constant | Processing date format/field |
| SVC_CD_NET | Constant | Service code: Net (fiber-optic broadband) = "01" |
| SVC_CD_TEL | Constant | Service code: Tel (telephone) = "02" |
| USECASE_ID | Constant | Use case ID = "KKSV0565" |
| ADD_CHGE_DIV_KOJIHI_KAP_CP_DEL | Constant | Additional change division: non-standard capacity cancellation = "17" |
| BSOD | Acronym | Batch SOD — Batch Service Order Data processing |
| CC | Acronym | Common Component — shared business logic components in the KKSV0565 batch pipeline |
| CBS | Acronym | Common Business Service — shared business service layer |
| DTM | Acronym | Datetime — timestamp field suffix |
| ENUM | Acronym | E.165 Number Mapping — telephone number to service mapping protocol |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband service (corresponds to SVC_CD_NET="01") |
| KKTK | Acronym | K-Opticom Total Kit — device-provided service bundle (router/modem package) |
| NET | Business term | Net service — fiber-optic broadband (SVC_CD_NET="01") |
| OPE | Acronym | Operation — add-on services like security, email, fixed IP |
| ODR | Acronym | Order — refers to service order creation |
| SOD | Acronym | Service Order Data — order data for service contract creation/modification |
| TEL | Business term | Telephone service (SVC_CD_TEL="02") |
| UCWK | Acronym | Unified Contract Work — internal work number for service contract line items |
| WRIB | Acronym | Web Rebate — discount/auto-application service |
| WRBK | Acronym | Web Rebate Bundle — discount service package |
| KK_T_ADCHG_DTL | Table | Address Change Detail table — stores details of each address change operation |
| KK_T_ADCHG | Table | Address Change table — stores address change header records |
| KK_T_IDO_RSV | Table | Migration Reservation table — stores migration reservation data for course changes |
| KK_T_MSKM_DTL | Table | Contract Detail table — stores contract line item details |
| KK_T_OP_SVC_KEI | Table | Operation Service Contract table — stores add-on service contracts |
| KK_T_OPSVKEI_ISP | Table | Operation Service Contract (ISP) table — ISP-specific operation contracts |
| KK_T_SBOP_SVC_KEI | Table | Sub-Operation Service Contract table — sub-operation contracts |
| KK_T_SBOPSVKEI_ISP | Table | Sub-Operation Service Contract (ISP) table — sub-operation ISP contracts |
| KK_T_SVC_KEI | Table | Service Contract table — core service contract data |
| KK_T_SVC_KEI_UCWK | Table | Service Contract Line Item table — service line item details |
| KK_T_SVKEIUW_EOH_TEL | Table | Service Line Item (eo Kodenwa) Tel table — tel number info for eo Kodenwa line items |
| KK_T_SVKEI_EXC_CTRL | Table | Service Contract Exception Control table — control records for service contract exceptions |
| KK_T_WRIB_SVC_KEI | Table | WRIB Service Contract table — discount service contracts |
| KK_T_WRISVC_TG_KEI | Table | WRIB Service Target Service table — WRIB service target contracts |
| DK_T_HAISO | Table | Delivery table — delivery address records |
