# Business Logic — JBSbatKKSyuKeiJudgeTran.addSvckeiUcwk() [503 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.business.service.JBSbatKKSyuKeiJudgeTran` |
| Layer | Service (Batch processing service class extending `JBSbatBusinessService`) |
| Module | `service` (Package: `eo.business.service`) |

## 1. Role

### JBSbatKKSyuKeiJudgeTran.addSvckeiUcwk()

The `addSvckeiUcwk` method registers (inserts) a service contract detail record — specifically the **service contract line-item breakdown** (`KK_T_SVC_KEI_UCWK`) — into the database as part of the eo customer core system's batch contract judgment processing. It acts as a **routing and mapping dispatcher** that computes the correct date range for a service plan based on the type of contract change being performed, then packs 79 fields into an `Object[]` parameter array and delegates the actual database insert to `executeKK_T_SVC_KEI_UCWK_PKINSERT`, followed by sub-type registration via `createSubTypeKK0161`.

The method handles four distinct business scenarios based on the `result` parameter and whether `pplanCd` (post-change plan code) is empty: **New Contract / eo TV Change (STB Add) / Registration Fix / Construction Info Fix** (`result="1"`), **Course Change / Course Change (STB)** (`result="2"`), and **STB Removal** (`result="3"` or record absent from `judgeMap`). In each scenario it computes different plan start dates, plan end dates, and plan charge dates — reflecting whether the service is being created for the first time, replaced by a new plan, or terminated at month-end.

The method also handles the critical distinction between **pre-change plan registration** (`pplanCd` is empty, meaning the original/previous plan record is being finalized) and **post-change plan registration** (`pplanCd` is provided, meaning a new plan is being activated). In the pre-change case, end dates are computed by subtracting 1 day from the new plan's start, or by finding the month-end of the termination charge date. In the post-change case, end dates default to `"20991231"` (a sentinel "indefinite" value) and the start date is computed from the new plan's data.

In the larger batch processing pipeline, this method is called from `JBSbatKKSyuKeiJudgeTran.execute()` and is a core part of the **main contract judgment processing** that evaluates and registers service contract details after determining which plans apply to which contracts.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["addSvckeiUcwk START"])

    START --> INIT["Initialize local vars: geneAdd, pplanCdAdd, planStaYmd, planEndYmd, planChrgStaYmd, planChrgEndYmd, planEndSbtCd, rsvAplyYmd"]
    INIT --> GET_SYS["Get sysdate from system"]
    GET_SYS --> GET_UCWK["Get svckeiucwkno from outMap"]
    GET_UCWK --> GET_SVC["Get svckeino from outMap"]
    GET_SVC --> BR_PPLAN{pplanCd is empty?}

    BR_PPLAN -->|Yes| BR_NEWPPLAN["Register Pre-change plan"]
    BR_PPLAN -->|No| BR_CHGPPLAN["Register Post-change plan"]

    BR_NEWPPLAN --> BR_RESULT1{result is 1? AND judgeMap contains svckeiucwkno?}
    BR_RESULT1 -->|Yes| BR_NSCON["New Contract / eo TV Change / Registration Fix / Construction Info Fix"]
    BR_RESULT1 -->|No| BR_RESULT2{result is 2? AND judgeMap contains svckeiucwkno?}
    BR_RESULT2 -->|Yes| BR_CCHG["Course Change / Course Change STB"]
    BR_RESULT2 -->|No| BR_STBDEL["STB Removal"]

    BR_NSCON --> SET_GENE1["geneAdd = sysdate"]
    SET_GENE1 --> SET_PPCD1["pplanCdAdd = outMap PPLAN_CD"]
    SET_PPCD1 --> SET_PESC["planEndSbtCd = 1"]
    SET_PESC --> SET_PS1["planStaYmd = outMap PLAN_STAYMD"]
    SET_PS1 --> SET_SCS["planEndYmd = svcChrgStaymd minus 1 day"]
    SET_SCS --> SET_PCS1["planChrgStaYmd = outMap PLAN_CHRG_STAYMD"]
    SET_PCS1 --> SET_PCE1["planChrgEndYmd = planEndYmd"]

    BR_CCHG --> SET_GENE2["geneAdd = sysdate"]
    SET_GENE2 --> SET_PPCD2["pplanCdAdd = outMap PPLAN_CD"]
    SET_PPCD2 --> SET_PS2["planStaYmd = outMap PLAN_STAYMD"]
    SET_PS2 --> BR_IDO{isIdoRsvData?}
    BR_IDO -->|True| SET_PEND_IDO["planEndYmd = opeDate"]
    BR_IDO -->|False| SET_PEND_NIDO["planEndYmd = courseChgRecord PLAN_STAYMD minus 1"]
    SET_PEND_IDO --> SET_PEND_IDO2["planChrgEndYmd = planEndYmd"]
    SET_PEND_NIDO --> SET_PCE2["planChrgEndYmd = courseChgRecord PLAN_CHRG_STAYMD minus 1"]
    SET_PEND_IDO2 --> SET_PCS2["planChrgStaYmd = outMap PLAN_CHRG_STAYMD"]
    SET_PCE2 --> SET_PCS2
    SET_PCS2 --> SET_PESC2["planEndSbtCd = 1"]

    BR_STBDEL --> SET_GENE3["geneAdd = sysdate"]
    SET_GENE3 --> SET_PPCD3["pplanCdAdd = outMap PPLAN_CD"]
    SET_PPCD3 --> SET_PS3["planStaYmd = outMap PLAN_STAYMD"]
    SET_PS3 --> BR_DSL["Get svc_chrrg_endymd from dslRecord"]
    BR_DSL --> DSL_BLANK{svc_chrrg_endymd empty?}
    DSL_BLANK -->|Yes| ERR_DSL["ERROR: throw JBSbatBusinessError"]
    DSL_BLANK -->|No| SET_PEND3["planEndYmd = month-end of svc_chrrg_endymd"]
    SET_PEND3 --> SET_PCS3["planChrgStaYmd = outMap PLAN_CHRG_STAYMD"]
    SET_PCS3 --> SET_PCE3["planChrgEndYmd = planEndYmd"]
    SET_PCE3 --> SET_PESC3["planEndSbtCd = 1"]
    ERR_DSL --> PAR_ADD

    SET_PCE1 --> PAR_ADD
    SET_PESC2 --> PAR_ADD
    SET_PESC3 --> PAR_ADD

    BR_CHGPPLAN --> SET_GENE4["geneAdd = sysdate"]
    SET_GENE4 --> SET_PPCD4["pplanCdAdd = pplanCd input"]
    SET_PPCD4 --> SET_PEND4["planEndYmd = 20991231"]
    SET_PEND4 --> SET_PCE4["planChrgEndYmd = 20991231"]
    SET_PCE4 --> SET_PESC4["planEndSbtCd = empty"]
    SET_PESC4 --> BR_RESULT3{result is 1? AND judgeMap contains svckeiucwkno?}
    BR_RESULT3 -->|Yes| BR_NSCON2["New Contract / eo TV Change STB Add"]
    BR_RESULT3 -->|No| BR_RESULT4{result is 2? AND judgeMap contains svckeiucwkno?}
    BR_RESULT4 -->|Yes| BR_CCHG2["Course Change / Course Change STB"]
    BR_RESULT4 -->|No| BR_STBDEL2["STB Removal"]

    BR_NSCON2 --> SET_PS4["planStaYmd = stbAddRecord SVC_CHRG_STAYMD"]
    SET_PS4 --> SET_PCS4["planChrgStaYmd = planStaYmd"]
    SET_PCS4 --> PAR_ADD

    BR_CCHG2 --> BR_IDO2{isIdoRsvData?}
    BR_IDO2 -->|True| SET_PS_IDO["planStaYmd = opeDate plus 1"]
    BR_IDO2 -->|False| SET_PS_NIDO["planStaYmd = courseChgRecord PLAN_STAYMD"]
    SET_PS_IDO --> SET_PCS5["planChrgStaYmd = planStaYmd"]
    SET_PS_NIDO --> SET_PCS_NIDO["planChrgStaYmd = courseChgRecord PLAN_CHRG_STAYMD"]
    SET_PCS5 --> PAR_ADD
    SET_PCS_NIDO --> PAR_ADD

    BR_STBDEL2 --> BR_DSL2["Get chrgEndYmd from dslRecord"]
    BR_DSL2 --> LEN8{chrgEndYmd length is 8?}
    LEN8 -->|Yes| SET_PEND_STB["planStaYmd = next month 01"]
    LEN8 -->|No| ERR_DSL2["ERROR: throw JBSbatBusinessError"]
    SET_PEND_STB --> SET_PCS6["planChrgStaYmd = planStaYmd"]
    ERR_DSL2 --> PAR_ADD
    SET_PCS6 --> PAR_ADD

    PAR_ADD["Create param_add 79-element Object array"]

    PAR_ADD --> MAP0["param_add[0] = svckeiucwkno"]
    MAP0 --> MAP1["param_add[1] = geneAdd"]
    MAP1 --> MAP2["param_add[2..78] = outMap fields plus computed dates and constants"]

    MAP2 --> EXEC_PK["executeKK_T_SVC_KEI_UCWK_PKINSERT param_add"]
    EXEC_PK --> EXEC_SUB["createSubTypeKK0161 commonItem svckeiucwkno geneAdd sysdate"]
    EXEC_SUB --> LOG_END["Log END"]
    LOG_END --> RETURN["Return sysdate"]
```

**CRITICAL — Constant Resolution:**
- `pplanCd` empty check: No named constant; directly compares to `""` (L1538, L1654)
- `result` branches: `result = "1"` → New Contract / eo TV Change (STB Add) / Registration Fix / Construction Info Fix [-> result="1"] (L1547, L1678); `result = "2"` → Course Change / Course Change (STB) [-> result="2"] (L1568, L1697); `result = "3"` → STB Removal [-> result="3"] (L1595, L1724)
- `judgeMap.containsKey(svckeiucwkno)` → checks if the detail record exists in the judgment result map (L1547, L1568, L1595, L1678, L1697, L1724)
- `planEndSbtCd = "1"` → "1: Plan termination due to plan change" (L1560, L1589, L1608)
- `planEndYmd = "20991231"` → Sentinel value meaning "indefinite / no end date" (L1661)
- `param_add[72] = "0"` → Invalid flag: `"0": Valid` (L1906)
- `param_add[61] = IDO_DIV_TV_SYUJU_PRC_SET = "00066"` → Movement division "00066: TV Contract Sub-ordinate Charge Setting" [-> IDO_DIV_TV_SYUJU_PRC_SET="00066" (JBSbatKKSyuKeiJudgeTran.java:196)]
- `planChrgEndYmd = planEndYmd` → Plan charge end date mirrors plan end date in pre-change scenarios (multiple lines)

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `outMap` | `JBSbatCommonDBInterface` | Service contract detail search result — a key-value data map containing all fields of the `KK_T_SVC_KEI_UCWK` entity for the contract detail record being processed. Used to extract plan codes, service numbers, dates, and statuses for registration. |
| 2 | `pplanCd` | `String` | Post-change plan code. If empty (`""`), indicates this is a **pre-change plan registration** — the original plan is being finalized with computed end dates. If non-empty, indicates a **post-change plan registration** — a new plan is being activated with an indefinite end date (`20991231`). |
| 3 | `result` | `String` | Service contract detail status code that determines the type of contract change: `"1"` = New Contract / eo TV Change (STB Add) / Registration Fix / Construction Info Fix; `"2"` = Course Change / Course Change (STB); `"3"` = STB Removal. This drives all conditional branches. |

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

| Field | Type | Business Description |
|-------|------|---------------------|
| `stbAddRecord` | `JBSbatCommonDBInterface` | STB add record — contains the new plan's service charge start date for post-change new contract scenarios. |
| `courseChgRecord` | `JBSbatCommonDBInterface` | Course change record — contains the original plan's start and charge start dates for course change scenarios. |
| `dslRecord` | `JBSbatCommonDBInterface` | Termination record — contains the service charge end date for STB removal date computation. |
| `judgeMap` | `HashMap<String, String>` | Main-sub judgment service contract detail number map — determines whether a detail record is expected in the current batch run. |
| `isIdoRsvData` | `boolean` | Movement reservation course change reflection area flag — when true, date computation uses the operational date instead of the plan record date. |
| `commonItem` | `JBSbatCommonItem` | Batch common parameter — passed through to sub-type creation. |
| `batchUserId` | `String` (inherited) | Batch operation user account — written to registration operator fields. |
| `opeDate` | `String` (inherited) | Operational date — used as plan end date when processing movement reservation course change data. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JBSbatDateUtil.getSystemDateTimeStamp` | JBSbatDateUtil | - | Gets system date-time stamp for geneAdd and sysdate fields |
| R | `JBSbatStringUtil.Rtrim` (multiple) | JBSbatStringUtil | - | Trims whitespace from string values retrieved from outMap and dslRecord |
| R | `JBSbatDateUtil.adjustDate` (multiple) | JBSbatDateUtil | - | Adjusts dates by adding/subtracting days (e.g., -1 for end date computation, +1 for post-change plan start) |
| R | `JBSbatDateUtil.getEndOfMonth` | JBSbatDateUtil | - | Returns the last day of the month for a given date string (used in STB removal to compute month-end) |
| R | `JBSbatDateUtil.adjustMonth` | JBSbatDateUtil | - | Adds months to a date (used in STB removal post-change: plan start = charge end month + 1) |
| R | `JBSbatStringUtil.substring` (implicit Java) | - | - | Extracts month portion (first 6 characters) from date strings (YYYYMMDD → YYYYMM) |
| C | `executeKK_T_SVC_KEI_UCWK_PKINSERT` | EKK0001A010SC (inferred) | `KK_T_SVC_KEI_UCWK` | Inserts the full 79-field service contract detail record into the database via primary key insert |
| C | `createSubTypeKK0161` | EKK0001A010SC (inferred) | Sub-type entity (type `KK0161`) | Registers the sub-type record linked to the service contract detail number |
| - | `printDebugLog` (super.logPrint) | - | - | Debug logging at START, END, and each business scenario branch |
| - | `printBusinessErrorLog` (super.logPrint) | - | - | Business error logging when svc_chrrg_endymd or chrgEndYmd is invalid |

**Method call details:**

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| C | `executeKK_T_SVC_KEI_UCWK_PKINSERT` | (internal to JBSbatKKSyuKeiJudgeTran) | `KK_T_SVC_KEI_UCWK` | Primary Key INSERT — Creates a new service contract detail record with all 79 fields including dates, statuses, move divisions, and audit fields |
| C | `createSubTypeKK0161` (via `JKKBatCommon`) | - | Sub-type table `KK_T_*` (type KK0161: service contract detail sub-type) | Creates the sub-type registration linked to the service contract detail number using `geneAdd` and `sysdate` |
| R | `JBSbatDateUtil.getSystemDateTimeStamp` | - | - | Retrieves current system date-time for the generation (registration) timestamp |
| R | `JBSbatDateUtil.adjustDate(date, -1)` | - | - | Computes end date as one day before the given date (pre-change plan end = new plan start - 1) |
| R | `JBSbatDateUtil.adjustDate(date, +1)` | - | - | Computes start date as one day after the given date (post-change course change plan start = op date + 1) |
| R | `JBSbatDateUtil.getEndOfMonth(date)` | - | - | Returns the last calendar day of the month for end-of-month plan termination |
| R | `JBSbatDateUtil.adjustMonth(date, +1)` | - | - | Advances the date by one month (STB removal: plan start = next month's 1st) |
| R | `JBSbatStringUtil.Rtrim` | - | - | Trims trailing whitespace from all database-sourced string values |
| R | `outMap.getString(column)` | - | - | Reads service contract detail fields from the search result map |
| R | `dslRecord.getString(column)` | - | - | Reads termination/charge end date from the DSL record |
| R | `stbAddRecord.getString(column)` | - | - | Reads STB add plan's service charge start date |
| R | `courseChgRecord.getString(column)` | - | - | Reads course change plan's start and charge dates |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch: JBSbatKKSyuKeiJudgeTran | `execute()` -> `addSvckeiUcwk(outMap, pplanCd, result)` | `executeKK_T_SVC_KEI_UCWK_PKINSERT [C] KK_T_SVC_KEI_UCWK`, `createSubTypeKK0161 [C] sub-type KK0161` |

**Full call chain:** This method is called directly from `JBSbatKKSyuKeiJudgeTran.execute()` — the main execution entry point of the batch service. The `execute()` method iterates over service contract detail search results and delegates to `addSvckeiUcwk` for each record that requires registration.

## 6. Per-Branch Detail Blocks

**Block 1** — [IF] `(pplanCd is empty → Pre-change plan registration)` (L1537)

> When `pplanCd` is an empty string, the method registers the pre-change (original/previous) plan. It computes end dates that terminate the original plan before the new plan begins.

| # | Type | Code |
|---|------|------|
| 1 | SET | `geneAdd = ""` // Generation registration date-time |
| 2 | SET | `pplanCdAdd = ""` // Plan code (pre-change) |
| 3 | SET | `planStaYmd = ""` // Plan start date |
| 4 | SET | `planEndYmd = ""` // Plan end date |
| 5 | SET | `planChrgStaYmd = ""` // Plan charge start date |
| 6 | SET | `planChrgEndYmd = ""` // Plan charge end date |
| 7 | SET | `planEndSbtCd = ""` // Plan end type code |
| 8 | SET | `rsvAplyYmd = ""` // Reservation application date [-> OM-2014-0000125 added] |
| 9 | CALL | `sysdate = JBSbatDateUtil.getSystemDateTimeStamp()` // Get system date-time |
| 10 | CALL | `svckeiucwkno = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_KEI_UCWK_NO))` // Get service contract detail number |
| 11 | CALL | `svckeino = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_KEI_NO))` // Get service contract number |
| 12 | EXEC | `super.logPrint.printDebugLog("Pre-change plan registration START")` |
| 13 | SET | `rsvAplyYmd = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.RSV_APLY_YMD))` // Reservation application date [-> OM-2014-0000125] |

**Block 1.1** — [IF-ELSEIF-ELSE] `(result = "1" OR "2" OR else)` (L1545)

> Determines the specific contract change type within the pre-change plan registration context. Each branch computes different plan dates.

**Block 1.1.1** — [IF] `(result = "1" AND svckeiucwkno in judgeMap → New Contract / eo TV Change / Registration Fix / Construction Info Fix)` (L1546)

> When the result is "1" (new contract or similar) and the detail number exists in the judgment map, this registers the original plan that ends just before the new plan's service charge start date.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printDebugLog("New Contract, eo TV Change (STB Add), Registration Fix, Construction Info Fix")` |
| 2 | SET | `geneAdd = sysdate` // Generation registration date-time set to system date |
| 3 | CALL | `pplanCdAdd = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.PPLAN_CD))` // Original plan code from outMap |
| 4 | SET | `planEndSbtCd = "1"` // Plan end type code → "1: Plan termination due to plan change" [-> planEndSbtCd="1"] |
| 5 | CALL | `planStaYmd = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.PLAN_STAYMD))` // Plan start date = outMap PLAN_STAYMD |
| 6 | CALL | `svcChrgStaymd = JBSbatStringUtil.Rtrim(stbAddRecord.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_CHRG_STAYMD))` // Service charge start date from STB add record |
| 7 | CALL | `planEndYmd = JBSbatDateUtil.adjustDate(svcChrgStaymd, -1)` // Plan end date = new service charge start minus 1 day |
| 8 | CALL | `planChrgStaYmd = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.PLAN_CHRG_STAYMD))` // Plan charge start from outMap |
| 9 | SET | `planChrgEndYmd = planEndYmd` // Plan charge end = plan end |
| 10 | EXEC | `printDebugLog(planStaYmd, planEndYmd, planChrgStaYmd, planChrgEndYmd)` // Log computed dates |

**Block 1.1.2** — [ELSEIF] `(result = "2" AND svckeiucwkno in judgeMap → Course Change / Course Change STB)` (L1567)

> When the result is "2" (course change), computes the original plan's end date based on whether the data is a movement reservation course change (`isIdoRsvData`).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printDebugLog("Course Change, Course Change (STB)")` |
| 2 | SET | `geneAdd = sysdate` // Generation date |
| 3 | CALL | `pplanCdAdd = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.PPLAN_CD))` // Original plan code |
| 4 | CALL | `planStaYmd = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.PLAN_STAYMD))` // Plan start date |
| 5 | IF | `isIdoRsvData` (L1584) — Movement reservation course change reflection area |

**Block 1.1.2.A** — [IF] `(isIdoRsvData = true)` (L1586)

> For movement reservation data, the plan end date is set to the operational date directly.

| # | Type | Code |
|---|------|------|
| 1 | SET | `planEndYmd = opeDate` // Plan end date = operational date |
| 2 | SET | `planChrgEndYmd = planEndYmd` // Plan charge end = plan end |

**Block 1.1.2.B** — [ELSE] `(isIdoRsvData = false)` (L1590)

> For regular course changes, the plan end date is computed as 1 day before the course change record's plan start.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `planEndYmd = JBSbatDateUtil.adjustDate(courseChgRecord.getString(JBSbatKK_T_SVC_KEI_UCWK.PLAN_STAYMD), -1)` // Plan end = course plan start - 1 |
| 2 | CALL | `planChrgEndYmd = JBSbatDateUtil.adjustDate(courseChgRecord.getString(JBSbatKK_T_SVC_KEI_UCWK.PLAN_CHRG_STAYMD), -1)` // Charge end = course charge start - 1 |
| 3 | SET | `planEndSbtCd = "1"` // Plan end type code → "1: Plan termination due to plan change" |

**Block 1.1.2.end** — (shared after if/else) (L1600)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `planChrgStaYmd = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.PLAN_CHRG_STAYMD))` // Plan charge start from outMap |
| 2 | SET | `planEndSbtCd = "1"` // Plan end type code |
| 3 | EXEC | `printDebugLog(planStaYmd, planChrgStaYmd, planChrgEndYmd)` |

**Block 1.1.3** — [ELSEIF] `(result = "3" OR judgeMap does not contain svckeiucwkno → STB Removal)` (L1594)

> When the result is "3" (STB removal) OR the detail number is not in the judgment map, the original plan's end date is computed as the month-end of the termination record's service charge end date.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printDebugLog("STB Removal")` |
| 2 | SET | `geneAdd = sysdate` // Generation date |
| 3 | CALL | `pplanCdAdd = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.PPLAN_CD))` // Original plan code |
| 4 | CALL | `planStaYmd = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.PLAN_STAYMD))` // Plan start date |
| 5 | CALL | `svc_chrrg_endymd = JBSbatStringUtil.Rtrim(dslRecord.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_CHRG_ENDYMD))` // Service charge end date from DSL record |
| 6 | IF | `svc_chrrg_endymd is empty` (L1609)

**Block 1.1.3.A** — [IF] `(svc_chrrg_endymd is empty → error)` (L1609)

> Business error: the service charge end date could not be retrieved for the extracted service contract detail.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printBusinessErrorLog(EKKB0090TE, "Service contract detail service charge end date could not be retrieved. Service contract number: " + svckeino + ", detail number: " + dslRecord.SVC_KEI_UCWK_NO)` |
| 2 | EXEC | `throw new JBSbatBusinessError()` |

**Block 1.1.3.B** — [ELSE] `(svc_chrrg_endymd has value)` (L1615)

| # | Type | Code |
|---|------|------|
| 1 | SET | `planEndYmd = svc_chrrg_endymd.substring(0, 6) + JBSbatDateUtil.getEndOfMonth(svc_chrrg_endymd.substring(0, 6))` // Plan end = month-end of service charge end year-month |
| 2 | CALL | `planChrgStaYmd = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.PLAN_CHRG_STAYMD))` // Plan charge start |
| 3 | SET | `planChrgEndYmd = planEndYmd` // Plan charge end = plan end |
| 4 | SET | `planEndSbtCd = "1"` // Plan end type code |

**Block 2** — [ELSE] `(pplanCd is NOT empty → Post-change plan registration)` (L1653)

> When `pplanCd` is non-empty, the method registers the post-change (new) plan. End dates default to `"20991231"` (indefinite), and start dates are computed from the new plan's data.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printDebugLog("Post-change plan registration START")` |
| 2 | EXEC | `super.logPrint.printDebugLog("pplanCd: " + pplanCd)` |
| 3 | SET | `rsvAplyYmd = super.opeDate` // Reservation application date = operational date [-> OM-2014-0000125] |
| 4 | SET | `geneAdd = sysdate` // Generation registration date-time |
| 5 | SET | `pplanCdAdd = pplanCd` // Use input post-change plan code |
| 6 | SET | `planEndYmd = "20991231"` // Plan end date → sentinel "indefinite" value |
| 7 | SET | `planChrgEndYmd = "20991231"` // Plan charge end date → same sentinel |
| 8 | SET | `planEndSbtCd = ""` // Plan end type code → empty (no termination) |
| 9 | IF | `result = "1" AND judgeMap contains svckeiucwkno` (L1678)

**Block 2.1** — [IF] `(result = "1" → New Contract / eo TV Change STB Add)` (L1677)

> For post-change new contracts, the plan start date is taken from the STB add record's service charge start date.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printDebugLog("New Contract, eo TV Change (STB Add)")` |
| 2 | CALL | `planStaYmd = JBSbatStringUtil.Rtrim(stbAddRecord.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_CHRG_STAYMD))` // Plan start = STB add record service charge start |
| 3 | SET | `planChrgStaYmd = planStaYmd` // Plan charge start = plan start |

**Block 2.2** — [ELSEIF] `(result = "2" → Course Change / Course Change STB)` (L1696)

> Post-change course change: plan start is either operational date + 1 (for movement reservation) or from the course change record.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printDebugLog("Course Change, Course Change (STB)")` |
| 2 | IF | `isIdoRsvData` (L1705)

**Block 2.2.A** — [IF] `(isIdoRsvData = true)` (L1706)

> Plan start = operational date + 1 day.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `planStaYmd = JBSbatDateUtil.adjustDate(opeDate, 1)` // Plan start = op date + 1 |
| 2 | SET | `planChrgStaYmd = planStaYmd` // Charge start = plan start |

**Block 2.2.B** — [ELSE] `(isIdoRsvData = false)` (L1711)

> Plan start and charge start come from the course change record's plan dates.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `planStaYmd = JBSbatStringUtil.Rtrim(courseChgRecord.getString(JBSbatKK_T_SVC_KEI_UCWK.PLAN_STAYMD))` // Plan start from course record |
| 2 | CALL | `planChrgStaYmd = JBSbatStringUtil.Rtrim(courseChgRecord.getString(JBSbatKK_T_SVC_KEI_UCWK.PLAN_CHRG_STAYMD))` // Charge start from course record |
| 3 | EXEC | `printDebugLog(planStaYmd, planChrgStaYmd)` |

**Block 2.3** — [ELSEIF] `(result = "3" OR !judgeMap.containsKey → STB Removal)` (L1723)

> Post-change STB removal: plan start is computed as the 1st of the month following the service charge end date.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printDebugLog("STB Removal")` |
| 2 | CALL | `chrgEndYmd = JBSbatStringUtil.Rtrim(dslRecord.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_CHRG_ENDYMD))` // Charge end date from DSL record |
| 3 | IF | `chrgEndYmd.length() == 8` (L1734)

**Block 2.3.A** — [IF] `(chrgEndYmd length is 8 → valid YYYYMMDD format)` (L1735)

> Plan start = next month, day 01.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `planStaYmd = JBSbatDateUtil.adjustMonth(chrgEndYmd, 1).substring(0, 6) + "01"` // Plan start = next month's 1st |
| 2 | SET | `planChrgStaYmd = planStaYmd` // Charge start = plan start |

**Block 2.3.B** — [ELSE] `(chrgEndYmd length != 8 → invalid format)` (L1742)

> Business error: the service charge end date could not be retrieved.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printBusinessErrorLog(EKKB0090TE, "Service contract detail service charge end date could not be retrieved. Service contract number: " + svckeino + ", detail number: " + dslRecord.SVC_KEI_UCWK_NO)` |
| 2 | EXEC | `throw new JBSbatBusinessError()` |

**Block 3** — [PROCESSING] `(Registration data construction: 79-element Object[] param_add)` (L1755)

> After all conditional date computation, a 79-element `Object[]` parameter array is constructed with all fields required for the `KK_T_SVC_KEI_UCWK` entity insert.

| # | Type | Code |
|---|------|------|
| 1 | SET | `param_add = new Object[79]` // Create 79-element parameter array |
| 2 | SET | `param_add[0] = svckeiucwkno` // Service contract detail number |
| 3 | SET | `param_add[1] = geneAdd` // Generation registration date-time |
| 4 | CALL | `param_add[2] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_KEI_UCWK_STAT))` // Service contract detail status |
| 5 | CALL | `param_add[3] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_KEI_NO))` // Service contract number |
| 6 | CALL | `param_add[4] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.MSKM_DTL_NO))` // Application detail number |
| 7 | CALL | `param_add[5] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.PCRS_CD))` // Plan course code |
| 8 | SET | `param_add[6] = pplanCdAdd` // Plan code (computed above) |
| 9 | CALL | `param_add[7] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.TK_HOSHIKI_KEI_NO))` // Provider contract number |
| 10 | CALL | `param_add[8] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.PAYWAY_KEIZOKU_FLG))` // Payment method continuation flag |
| 11 | CALL | `param_add[9] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.WEB_OP_ADD_FAIL_FLG))` // Web option add impossible flag |
| 12 | CALL | `param_add[10] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.WORK_RRK_BIKO))` // Business liaison memo |
| 13 | CALL | `param_add[11] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_USE_STA_KIBO_YMD))` // Service use start desired date |
| 14 | CALL | `param_add[12] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_UEST_KBTMZ_CD))` // Service use start desired time zone code |
| 15 | CALL | `param_add[13] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_UEST_KBTM_CD))` // Service use start desired time code |
| 16 | CALL | `param_add[14] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.RSV_TSTA_KIBO_YMD))` // Reservation start desired date |
| 17 | CALL | `param_add[15] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SKEKKA_SEND_CD))` // Screening result send code |
| 18 | CALL | `param_add[16] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_KEI_UCWK_KZKWRK_REQYMD))` // Service contract detail follow-up work request date |
| 19 | CALL | `param_add[17] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SHOSA_YMD))` // Review date |
| 20 | CALL | `param_add[18] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SHOSA_CL_YMD))` // Review cancellation date |
| 21 | CALL | `param_add[19] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.FTRIAL_KANYU_YMD))` // Trial addition date |
| 22 | CALL | `param_add[20] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.FTRIAL_PRD_ENDYMD))` // Trial period end date |
| 23 | CALL | `param_add[21] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.HONKANYU_YMD))` // Full addition date |
| 24 | CALL | `param_add[22] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.HONKANYU_IKO_KIGEN_YMD))` // Full addition transfer deadline date |
| 25 | CALL | `param_add[23] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.KEI_CNC_YMD))` // Contract conclusion date |
| 26 | SET | `param_add[24] = rsvAplyYmd` // Reservation application date [-> OM-2014-0000125 fixed: was direct outMap access, now uses computed rsvAplyYmd] |
| 27 | CALL | `param_add[25] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.RSV_CL_YMD))` // Reservation cancellation date |
| 28 | CALL | `param_add[26] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.RSV_APLY_CD))` // Reservation application code |
| 29 | SET | `param_add[27] = planStaYmd` // Plan start date (computed) |
| 30 | SET | `param_add[28] = planEndYmd` // Plan end date (computed) |
| 31 | SET | `param_add[29] = planChrgStaYmd` // Plan charge start date (computed) |
| 32 | SET | `param_add[30] = planChrgEndYmd` // Plan charge end date (computed) |
| 33 | SET | `param_add[31] = planEndSbtCd` // Plan end type code (computed) |
| 34 | CALL | `param_add[32] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_CANCEL_YMD))` // Service cancellation date |
| 35 | CALL | `param_add[33] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_CANCEL_RSN_CD))` // Service cancellation reason code |
| 36 | CALL | `param_add[34] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_STA_YMD))` // Service start date |
| 37 | CALL | `param_add[35] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_CHRG_STAYMD))` // Service charge start date |
| 38 | CALL | `param_add[36] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_STP_YMD))` // Service stop date |
| 39 | CALL | `param_add[37] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_STP_RSN_CD))` // Service stop reason code |
| 40 | CALL | `param_add[38] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_STP_RLS_YMD))` // Service stop release date |
| 41 | CALL | `param_add[39] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_STP_RLS_RSN_CD))` // Service stop release reason code |
| 42 | CALL | `param_add[40] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.PAUSE_STP_CD))` // Pause stop code |
| 43 | CALL | `param_add[41] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_PAUSE_YMD))` // Service pause date |
| 44 | CALL | `param_add[42] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_PAUSE_RSN_CD))` // Service pause reason code |
| 45 | CALL | `param_add[43] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_PAUSE_RSN_MEMO))` // Service pause reason memo |
| 46 | CALL | `param_add[44] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_PAUSE_RLS_YMD))` // Service pause release date |
| 47 | CALL | `param_add[45] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_PAUSE_RLS_RSN_CD))` // Service pause release reason code |
| 48 | CALL | `param_add[46] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_PAUSE_RLS_RSN_MEMO))` // Service pause release reason memo |
| 49 | CALL | `param_add[47] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_ENDYMD))` // Service end date |
| 50 | CALL | `param_add[48] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_CHRG_ENDYMD))` // Service charge end date |
| 51 | CALL | `param_add[49] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_DSL_KISAN_YMD))` // Service dissolution calculation date |
| 52 | CALL | `param_add[50] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_DSL_YMD))` // Service dissolution date |
| 53 | CALL | `param_add[51] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_DLRE_CD))` // Service dissolution reason code |
| 54 | CALL | `param_add[52] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_DLRE_MEMO))` // Service dissolution reason memo |
| 55 | CALL | `param_add[53] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_DSL_TTDKI_FIN_FLG))` // Service dissolution procedure completion flag |
| 56 | CALL | `param_add[54] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.KAIHK_YMD))` // Restoration date |
| 57 | CALL | `param_add[55] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_CANCEL_CL_YMD))` // Service cancellation cancellation date |
| 58 | CALL | `param_add[56] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_DSL_CL_YMD))` // Service dissolution cancellation date |
| 59 | CALL | `param_add[57] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVKEIUW_HKHASYMD))` // Service contract detail occurrence date |
| 60 | CALL | `param_add[58] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.CHRG_STA_YMD_HOSEI_UM))` // Charge start date correction present/absent |
| 61 | CALL | `param_add[59] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_PAUSE_CHRG_STA_YMD))` // Service pause charge start date |
| 62 | CALL | `param_add[60] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.PNLTY_HASSEI_CD))` // Penalty occurrence code |
| 63 | SET | `param_add[61] = IDO_DIV_TV_SYUJU_PRC_SET = "00066"` // Movement division → "00066: TV Contract sub-ordinate charge setting" [-> IDO_DIV_TV_SYUJU_PRC_SET="00066" (JBSbatKKSyuKeiJudgeTran.java:196)] |
| 64 | CALL | `param_add[62] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SHOSA_DSL_FIN_CD))` // Review dissolution completion code |
| 65 | CALL | `param_add[63] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.SVCTK_BUT_DEL_TRN_JSSI_DTM))` // Service provision disposal processing execution date-time |
| 66 | CALL | `param_add[64] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.KEIZK_MT_SVC_KEI_UCWK_NO))` // Continuation source service contract detail number |
| 67 | CALL | `param_add[65] = JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.KEIZK_AF_KEI_CHGECHU_FLG))` // Continuation post-contract change in-progress flag |
| 68 | SET | `param_add[66] = sysdate` // Registration date-time |
| 69 | SET | `param_add[67] = batchUserId` // Registration operator account |
| 70 | SET | `param_add[68] = sysdate` // Update date-time |
| 71 | SET | `param_add[69] = batchUserId` // Update operator account |
| 72 | SET | `param_add[70] = ""` // Deletion date-time |
| 73 | SET | `param_add[71] = ""` // Deletion operator account |
| 74 | SET | `param_add[72] = "0"` // Invalid flag → "0": valid |
| 75 | SET | `param_add[73] = ""` // Registration operation date |
| 76 | SET | `param_add[74] = ""` // Registration process ID |
| 77 | SET | `param_add[75] = ""` // Update operation date |
| 78 | SET | `param_add[76] = ""` // Update process ID |
| 79 | SET | `param_add[77] = ""` // Deletion operation date |
| 80 | SET | `param_add[78] = ""` // Deletion process ID |

**Block 4** — [CALL] `(Database insert and sub-type registration)` (L1988)

> Delegates to the primary key insert method and sub-type creation, then returns.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `this.executeKK_T_SVC_KEI_UCWK_PKINSERT(param_add)` // Insert service contract detail record into KK_T_SVC_KEI_UCWK |
| 2 | CALL | `JKKBatCommon.createSubTypeKK0161(commonItem, svckeiucwkno, JBSbatStringUtil.Rtrim(outMap.getString(JBSbatKK_T_SVC_KEI_UCWK.GENE_ADD_DTM)), sysdate)` // Register sub-type linked to service contract detail number |
| 3 | EXEC | `super.logPrint.printDebugLog("addSvckeiUcwk_END")` |
| 4 | RETURN | `return sysdate` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svckeiucwkno` | Field | Service contract detail number — internal unique identifier for a service contract line-item breakdown record |
| `svckeino` | Field | Service contract number — identifies the parent service contract to which this detail belongs |
| `pplanCd` | Field | Plan code — the tariff/plan code that determines pricing and service terms for the contract |
| `geneAdd` | Field | Generation registration date-time — the timestamp when this record was generated/created |
| `planStaYmd` | Field | Plan start date (YYYYMMDD) — when the plan becomes active |
| `planEndYmd` | Field | Plan end date (YYYYMMDD) — when the plan terminates; `"20991231"` is a sentinel meaning "indefinite / no end" |
| `planChrgStaYmd` | Field | Plan charge start date (YYYYMMDD) — when billing for the plan begins |
| `planChrgEndYmd` | Field | Plan charge end date (YYYYMMDD) — when billing for the plan ends |
| `planEndSbtCd` | Field | Plan end type code — "1" indicates plan termination due to plan change |
| `rsvAplyYmd` | Field | Reservation application date (YYYYMMDD) — date the reservation was applied |
| `svcChrgStaymd` | Field | Service charge start date (YYYYMMDD) — when service billing begins |
| `svc_chrrg_endymd` | Field | Service charge end date (YYYYMMDD) — date service billing ends (from termination/DSL record) |
| `chrgEndYmd` | Field | Charge end date (YYYYMMDD) — used in STB removal to compute the next month's start |
| `svckeiucwkstat` | Field | Service contract detail status — lifecycle status of the detail record |
| `pcrs_cd` | Field | Plan course code — identifies the service type/course combination |
| `tk_hoshiki_kei_no` | Field | Provider contract number — identifies the provider's contract |
| `payway_keizoku_flg` | Field | Payment method continuation flag — whether payment method carries over |
| `web_op_add_fail_flg` | Field | Web option add impossible flag — whether web option addition is blocked |
| `work_rrk_biko` | Field | Business liaison memo — free-text notes for business operations |
| `ido_div` | Field | Movement division — classifies the type of contract change/movement (e.g., "00066" = TV Contract sub-ordinate charge setting) |
| `judgeMap` | Field | Main-sub judgment service contract detail number map — HashMap containing expected detail numbers for the batch run |
| `isIdoRsvData` | Field | Movement reservation course change reflection area flag — indicates if data is from a movement reservation |
| `isCourseChgData` | Field | Course change reflection area flag — indicates if data is from a course change |
| `stbAddRecord` | Field | STB add record — database record for STB (Set-Top Box) addition operations |
| `courseChgRecord` | Field | Course change record — database record for course change operations |
| `dslRecord` | Field | Termination (DSL) record — database record for service termination operations |
| `commonItem` | Field | Batch common parameter — shared batch processing context |
| `batchUserId` | Field | Batch operation user account — the user ID performing the batch operation |
| `opeDate` | Field | Operational date — the date on which batch operations are executed |
| `KK_T_SVC_KEI_UCWK` | Entity | Service contract detail table — the core database table storing service contract line-item breakdown records |
| `sub-type KK0161` | Entity | Service contract detail sub-type — a child entity linked to the service contract detail number |
| ZM_M_WORK_PARAM_KNRI | Entity | Business parameter management table — stores operational parameters |
| KK_M_PCRS | Entity | Plan course table — stores plan/course definitions |
| KK_M_PPLAN_KTTANKA | Entity | Plan fixed unit price table — stores plan pricing |
| KK_T_SVC_KEI | Entity | Service contract table — parent of service contract details |
| KK_T_SVKEI_EXC_CTRL | Entity | Service contract exclusion control table — controls service contract exclusions |
| KK_SETP_PRC_GRP_CD | Constant | Business parameter ID for eo light TV sub-ordinate charge setting target group code |
| IDO_DIV_TV_SYUJU_PRC_SET | Constant | Movement division "00066" — TV Contract sub-ordinate charge setting |
| SVC_KEI_UCWK_STAT_100 | Constant | Service contract detail status "100" — "Service in progress" |
| IDO_DIV_EO_TV_CHG | Constant | Movement division "00018" — eo TV change (STB add) |
| IDO_DIV_ADD_NYO_SHUSEI | Constant | Movement division "00032" — Registration content correction |
| IDO_DIV_KOJI_INFO_TEISE | Constant | Movement division "00035" — Construction information correction |
| IDO_DIV_COURSE_CHG_STB | Constant | Movement division "00068" — Course change (STB) |
| PRG_STAT_SYUJU_PRC_SET_FIN | Constant | Progress status "1430" — TV Contract sub-ordinate charge setting complete |
| result="1" | Value | New Contract / eo TV Change (STB Add) / Registration Fix / Construction Info Fix |
| result="2" | Value | Course Change / Course Change (STB) |
| result="3" | Value | STB Removal |
| STB | Abbreviation | Set-Top Box — set-top box for cable/digital television service |
| eo | Brand | eo — K-Opticom's brand for its telecommunications services (internet, TV, phone) |
| KK | Abbreviation | k-Opticom — the company name prefix in entity and class names |
| SVC_KEI | Abbreviation | Service contract (サービス契約) — short for service contract |
| UCWK | Abbreviation | Breakdown detail (内訳) — short for service contract line-item breakdown |
| PLAN | Abbreviation | Plan (プラン) — tariff/plan for billing |
| CHRG | Abbreviation | Charge (課金) — billing/charge |
| DSL | Abbreviation | Dissolution/termination (解約) — service cancellation/termination |
| RSV | Abbreviation | Reservation (予約) — reservation/application |
| HOSHIKI | Abbreviation | Provider method/arrangement (提供方式) — provider contract arrangement |
| SKEKKA | Abbreviation | Screening result (審査結果) — credit/application screening outcome |
| SHOSA | Abbreviation | Review (照会) — contract review/inquiry |
| FTRIAL | Abbreviation | Free trial (無料試用) — free trial period |
| HONKANYU | Abbreviation | Full addition/completion (本追加) — full contract activation |
| KEI_CNC | Abbreviation | Contract conclusion (契約確定) — contract signing/completion date |
| KEIZK | Abbreviation | Continuation (継続) — service continuation |
| SVKEIUW | Abbreviation | Service contract detail occurrence (サービス契約内訳発生) — new detail occurrence |
| PNLTY | Abbreviation | Penalty (違約金) — contractual penalty |
| KAIHK | Abbreviation | Restoration (復帰) — service restoration |
| MKSM | Abbreviation | Customer (顧客) — customer information |
| DTL | Abbreviation | Detail (詳細) — detailed/sub-record |
| BIKO | Abbreviation | Remarks (備考) — free-text notes |
| YMD | Abbreviation | Year-Month-Day (年月日) — date format YYYYMMDD |
| DTM | Abbreviation | Date-Time (日時) — timestamp format including time |
| CD | Abbreviation | Code — a coded value classification |
| FLG | Abbreviation | Flag — boolean indicator |
| MEMO | Field | Memo — free-text notes |
| RSN | Abbreviation | Reason (理由) — reason code or text |
| STA | Abbreviation | Start (開始) — start date |
| END | Abbreviation | End (終了) — end date |
| STP | Abbreviation | Stop (停止) — service suspension |
| RLS | Abbreviation | Release (解除) — suspension cancellation |
| HOSEI_UM | Abbreviation | Correction present/absent (補正有無) — whether correction was applied |
| HASSEI_CD | Abbreviation | Occurrence code (発生コード) — code indicating occurrence type |
| TTDKI | Abbreviation | Procedure completion (手続き完了) — procedural completion |
| FIN_FLG | Abbreviation | Completion flag (完了フラグ) — indicates if process is complete |
| CL | Abbreviation | Cancellation (取消) — cancellation of a previously applied value |
| AF | Abbreviation | After (後) — post-/after- |
| CHGECHU_FLG | Abbreviation | Change-in-progress flag (変更実行中フラグ) — whether change is being processed |
| JBSbatBusinessError | Class | Framework exception — thrown for business-level errors |
| KK_T_PRG | Entity | Progress table — tracks batch processing progress |
