# Business Logic — JBSbatKKKjClDataInTrn.kkOpSvcKeiAdd() [189 LOC]

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

## 1. Role

### JBSbatKKKjClDataInTrn.kkOpSvcKeiAdd()

This method performs the registration (update) of a **Equipment Option Service Contract cancellation (解約・キャンセル)** record in the `T_KKOP_SVC_KEI` (Equipment Option Service Contract) table. It serves as the batch-side service method that finalizes the cancellation lifecycle of an equipment option service contract by determining the appropriate cancellation strategy based on the current contract status, then persisting the updated record.

The method handles **two distinct service status types** via conditional branching: when the contract status is `"020" (照映済 / Mapping Complete — instrument provided service contract in mapped state)**, it performs a **cancel registration** by setting the status to `"920" (キャンセル済 / Cancellation Complete)**, recording the operation date as the service cancellation date, and marking the cancellation reason as `"05" (その他理由によるキャンセル / Cancellation for other reasons)`. When the status is `"030" (締結済 / Contracted — service fully contracted)**, it performs a **termination registration** by setting the status to `"910" (解約済 / Terminated)**, computing the day before the work cancellation date (`kojiakFinYmd - 1`) to serve as the effective end date for plan end date, service end date, plan charge end date, and service charge end date fields, and setting the service termination reason to `"01" (通常解約 / Normal Termination)`.

This method implements a **status-based routing/dispatch pattern**: it reads the current status from the input data map, branches based on that status, modifies the appropriate fields, then delegates to a single insert (upsert) method to persist all changes atomically. Its role in the larger system is a **batch service worker** called by higher-level batch entry methods such as `insertKkOpSvcKeiTakinoRouterDslCncl`, which orchestrates the broader cancellation flow across router and DSL-related entity updates.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["kkOpSvcKeiAdd()"])
    START --> GET_SYS_DATE["Get system date: sysDate = JCCBatCommon.getSysDateTimeStamp()"]
    GET_SYS_DATE --> GET_KKOP_SVC_STAT["Read kkopSvcKeiStat from dbMapKkOpSvcKeiPk (KKOP_SVC_KEI_STAT)"]
    GET_KKOP_SVC_STAT --> CHECK_020{"kkopSvcKeiStat = 020
(CD01616_KKOP_SVC_KEI_STAT_020: 照映済)"}
    CHECK_020 -- Yes --> BRANCH_020["Set kkopSvcKeiStat = 920 (CD01616_KKOP_SVC_KEI_STAT_920: キャンセル済)
Set svcCancelYmd = super.opeDate
Set svcCancelRsnCd = 05 (SVC_CANCEL_RSN_CD_OTHER: その他理由によるキャンセル)"]
    CHECK_020 -- No --> CHECK_030{"kkopSvcKeiStat = 030
(CD01616_KKOP_SVC_KEI_STAT_030: 締結済)"}
    CHECK_030 -- Yes --> BRANCH_030["Set kkopSvcKeiStat = 910 (CD01616_KKOP_SVC_KEI_STAT_910: 解約済)
Calculate beforeDay = adjustDate(kojiakFinYmd, -1)
Set planEndYmd, svcEndYmd, planChrgEndYmd, svcChrgEndYmd = beforeDay
Set svcDlreCd = 01 (SVC_DLRE_CD_NORMAL: 通常解約)"]
    BRANCH_020 --> BUILD_PARAM["Build setParam array from dbMapKkOpSvcKeiPk fields"]
    BRANCH_030 --> BUILD_PARAM
    CHECK_030 -- No --> BUILD_PARAM
    BUILD_PARAM --> CALL_INSERT["executeKK_T_KKOP_SVC_KEI_PKINSERT(setParam)"]
    CALL_INSERT --> END_NODE(["Return void"])
```

**Constant Resolution:**

| Constant | Value | Business Meaning |
|----------|-------|------------------|
| `CD01616_KKOP_SVC_KEI_STAT_020` | `"020"` | Equipment Option Service Contract Status: Mapping Complete (照映済) |
| `CD01616_KKOP_SVC_KEI_STAT_920` | `"920"` | Equipment Option Service Contract Status: Cancellation Complete (キャンセル済) |
| `CD01616_KKOP_SVC_KEI_STAT_030` | `"030"` | Equipment Option Service Contract Status: Contracted (締結済) |
| `CD01616_KKOP_SVC_KEI_STAT_910` | `"910"` | Equipment Option Service Contract Status: Terminated (解約済) |
| `SVC_CANCEL_RSN_CD_OTHER` | `"05"` | Service Cancellation Reason Code: Cancellation for other reasons (その他理由によるキャンセル) |
| `SVC_DLRE_CD_NORMAL` | `"01"` | Service Termination Reason Code: Normal Termination (通常解約) |
| `MK_FLG_YK` | `"0"` | Invalid Flag: Valid (有効) |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `dbMapKkOpSvcKeiPk` | `JBSbatCommonDBInterface` | Equipment Option Service Contract data map — a database interface carrying the full record of the equipment option service contract (T_KKOP_SVC_KEI table). Used to read all contract fields and pass them (after transformation) to the insert method. This is the primary input entity for the cancellation update operation. |
| 2 | `kojiakFinYmd` | `String` | Work completion date (工事完了日), used as the **work item cancellation date** (工事案件キャンセル年月日). In the "030: Contracted" status branch, the day before this date (`kojiakFinYmd - 1`) is computed as the effective end date for plan/service/charge fields. In the "020: Mapping Complete" branch, this parameter is not used. |

**Instance fields read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `super.opeDate` | `String` | Operation date — used as the system-operational date for setting service cancellation date and reservation effective date when the contract status is "020: Mapping Complete" |
| `super.logPrint` | Log interface | Debug logging utility — used to output debug messages for the work cancellation date and its day-before computation in the "030: Contracted" branch |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JCCBatCommon.getSysDateTimeStamp` | JCCBatCommon | - | Retrieves the current system date/time stamp for the registration date field |
| R | `JBSbatStringUtil.Rtrim` | JBSbatStringUtil | - | Trims whitespace from database string values read from the data map |
| R | `dbMapKkOpSvcKeiPk.getString(KKOP_SVC_KEI_STAT)` | JBSbatKK_T_KKOP_SVC_KEI | KKOP_SVC_KEI_STAT | Reads the current equipment option service contract status from the input data map |
| R | `dbMapKkOpSvcKeiPk.getString(SVC_CANCEL_YMD)` | JBSbatKK_T_KKOP_SVC_KEI | SVC_CANCEL_YMD | Reads the service cancellation date |
| R | `dbMapKkOpSvcKeiPk.getString(SVC_CANCEL_RSN_CD)` | JBSbatKK_T_KKOP_SVC_KEI | SVC_CANCEL_RSN_CD | Reads the service cancellation reason code |
| R | `dbMapKkOpSvcKeiPk.getString(PLAN_ENDYMD)` | JBSbatKK_T_KKOP_SVC_KEI | PLAN_ENDYMD | Reads the plan end date |
| R | `dbMapKkOpSvcKeiPk.getString(SVC_ENDYMD)` | JBSbatKK_T_KKOP_SVC_KEI | SVC_ENDYMD | Reads the service end date |
| R | `dbMapKkOpSvcKeiPk.getString(PLAN_CHRG_ENDYMD)` | JBSbatKK_T_KKOP_SVC_KEI | PLAN_CHRG_ENDYMD | Reads the plan charge end date |
| R | `dbMapKkOpSvcKeiPk.getString(SVC_CHRG_ENDYMD)` | JBSbatKK_T_KKOP_SVC_KEI | SVC_CHRG_ENDYMD | Reads the service charge end date |
| R | `dbMapKkOpSvcKeiPk.getString(SVC_DLRE_CD)` | JBSbatKK_T_KKOP_SVC_KEI | SVC_DLRE_CD | Reads the service termination reason code |
| R | `JBSbatDateUtil.adjustDate` | JBSbatDateUtil | - | Calculates the day before a given date (used when status is "030") |
| C | `executeKK_T_KKOP_SVC_KEI_PKINSERT` | JBSbatKKKjClDataInTrn | **T_KKOP_SVC_KEI** | Inserts (upsert) the full equipment option service contract record with all updated fields into the database |
| - | `super.logPrint.printDebugLog` | JACBatDebugLogUtil | - | Outputs debug log messages for the work cancellation date and its day-before value |

**CRUD Summary:**
- **Read (R):** The method reads the current status from the data map, extracts all existing contract fields (contract number, service code, price code, plan code, dates, flags, etc.), and calls utility methods for date trimming and adjustment.
- **Create (C):** The method delegates to `executeKK_T_KKOP_SVC_KEI_PKINSERT()` which performs an upsert (insert/update) of the complete `T_KKOP_SVC_KEI` record with the transformed data.
- **No Update or Delete operations** are performed directly in this method — all changes are funneled through the single insert call.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch: `JBSbatKKKjClDataInTrn.insertKkOpSvcKeiTakinoRouterDslCncl` | `insertKkOpSvcKeiTakinoRouterDslCncl` -> `kkOpSvcKeiAdd` | `executeKK_T_KKOP_SVC_KEI_PKINSERT [C] T_KKOP_SVC_KEI` |

**Caller Details:**

The method is called by `insertKkOpSvcKeiTakinoRouterDslCncl` within the same class (`JBSbatKKKjClDataInTrn`), which is a batch service method. This caller orchestrates cancellation processing for Takino router and DSL-related service contracts. The method operates as a **private batch service worker** — it has no screen or external entry points within 8 hops, and is exclusively invoked by internal batch orchestration logic.

**Call Sites in Source (lines 9866 and 9904):**
- Line 9866: Called from within the same batch method (likely under a first cancellation branch for one service type)
- Line 9904: Called from within the same batch method (likely under a second cancellation branch for another service type)

Both call sites pass `dbMapKkOpSvcKeiPk` (the contract data map) and `kojiakFinYmd` (the work cancellation date) as parameters.

## 6. Per-Branch Detail Blocks

**Block 1** — [GET SYSTEM DATE] (L9928)

> Retrieves the current system date/time stamp to populate the registration date field.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `sysDate = JCCBatCommon.getSysDateTimeStamp()` // Get system date/time stamp for registration date |

**Block 2** — [READ CONTRACT STATUS] (L9931)

> Reads the current equipment option service contract status from the input data map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kkopSvcKeiStat = Rtrim(dbMapKkOpSvcKeiPk.getString(KKOP_SVC_KEI_STAT))` // Equipment option service contract status |

**Block 3** — [RESERVATION DATE ASSIGNMENT - OM-2014-0000957] (L9934–L9946)

> Per ticket OM-2014-0000957: For cancellation/cancel record registration, the reservation effective date is set to the operation date, and the reservation cancellation date is set to empty string.
> Original behavior (commented out): reservation effective date → "" and reservation cancellation date → operation date.

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsvAplyYmd = super.opeDate` // Reservation effective date → operation date (operation date) |
| 2 | SET | `rsvClYmd = ""` // Reservation cancellation date → empty string |

**Block 4** — [READ CANCELLATION AND END-DATE FIELDS] (L9949–L9968)

> Reads service cancellation date, cancellation reason code, plan end date, service end date, plan charge end date, service charge end date, and service termination reason code from the data map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcCancelYmd = Rtrim(dbMapKkOpSvcKeiPk.getString(SVC_CANCEL_YMD))` // Service cancellation date |
| 2 | SET | `svcCancelRsnCd = Rtrim(dbMapKkOpSvcKeiPk.getString(SVC_CANCEL_RSN_CD))` // Service cancellation reason code |
| 3 | SET | `planEndYmd = Rtrim(dbMapKkOpSvcKeiPk.getString(PLAN_ENDYMD))` // Plan end date |
| 4 | SET | `svcEndYmd = Rtrim(dbMapKkOpSvcKeiPk.getString(SVC_ENDYMD))` // Service end date |
| 5 | SET | `planChrgEndYmd = Rtrim(dbMapKkOpSvcKeiPk.getString(PLAN_CHRG_ENDYMD))` // Plan charge end date |
| 6 | SET | `svcChrgEndYmd = Rtrim(dbMapKkOpSvcKeiPk.getString(SVC_CHRG_ENDYMD))` // Service charge end date |
| 7 | SET | `svcDlreCd = Rtrim(dbMapKkOpSvcKeiPk.getString(SVC_DLRE_CD))` // Service termination reason code |

**Block 5** — [IF Status = "020: Mapping Complete"] (L9974)

> Branch: When the equipment option service contract status is "020: Mapping Complete" (照映済), the method performs a cancel registration. It sets the status to "920: Cancellation Complete", the service cancellation date to the operation date, and the cancellation reason to "05: Other reasons".
> **CONSTANT:** `CD01616_KKOP_SVC_KEI_STAT_020 = "020"`

| # | Type | Code |
|---|------|------|
| 1 | SET | `kkopSvcKeiStat = "920" (CD01616_KKOP_SVC_KEI_STAT_920: キャンセル済)` // Equipment provided service contract status → "920: Cancellation Complete" |
| 2 | SET | `svcCancelYmd = super.opeDate` // Service cancellation date → operation date |
| 3 | SET | `svcCancelRsnCd = "05" (SVC_CANCEL_RSN_CD_OTHER: その他理由によるキャンセル)` // Service cancellation reason code → "05: Cancellation for other reasons" |

**Block 6** — [ELSE-IF Status = "030: Contracted"] (L9988)

> Branch: When the equipment option service contract status is "030: Contracted" (締結済), the method performs a termination registration. It sets the status to "910: Terminated", computes the day before the work cancellation date, and uses it as the effective end date for plan and service end/charge fields. Sets the termination reason to "01: Normal Termination".
> **CONSTANT:** `CD01616_KKOP_SVC_KEI_STAT_030 = "030"`

| # | Type | Code |
|---|------|------|
| 1 | SET | `kkopSvcKeiStat = "910" (CD01616_KKOP_SVC_KEI_STAT_910: 解約済)` // Equipment option service contract status → "910: Terminated" |
| 2 | SET | `beforeDay = JBSbatDateUtil.adjustDate(kojiakFinYmd, -1)` // Calculate day before work cancellation date |
| 3 | EXEC | `super.logPrint.printDebugLog("★★★ Work cancellation date ---> " + kojiakFinYmd)` // Debug log: work cancellation date |
| 4 | EXEC | `super.logPrint.printDebugLog("★★★ Day before work cancellation date ---> " + beforeDay)` // Debug log: day before computation result |
| 5 | SET | `planEndYmd = beforeDay` // Plan end date → day before start date |
| 6 | SET | `svcEndYmd = beforeDay` // Service end date → day before start date |
| 7 | SET | `planChrgEndYmd = beforeDay` // Plan charge end date → day before start date |
| 8 | SET | `svcChrgEndYmd = beforeDay` // Service charge end date → day before start date |
| 9 | SET | `svcDlreCd = "01" (SVC_DLRE_CD_NORMAL: 通常解約)` // Service termination reason code → "01: Normal termination" |

**Block 7** — [BUILD INSERT PARAMETER ARRAY] (L10029)

> Constructs a parameter array (`setParam`) containing all fields to be inserted into the `T_KKOP_SVC_KEI` table. Fields are read from the input data map (after trimming), with certain date fields using transformed values (`kkopSvcKeiStat`, `rsvAplyYmd`, `rsvClYmd`, `planEndYmd`, `svcEndYmd`, `planChrgEndYmd`, `svcChrgEndYmd`, `svcCancelYmd`, `svcCancelRsnCd`, `svcDlreCd`). Empty strings and the valid flag constant are used for new/empty fields.
>
> **CONSTANT:** `MK_FLG_YK = "0"` (無効フラグ: 有効 — Invalid Flag: Valid)

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParam[0] = Rtrim(kkopSvcKeiNo)` // Equipment option service contract number |
| 2 | SET | `setParam[1] = sysDate` // System registration date/time stamp |
| 3 | SET | `setParam[2] = kkopSvcKeiStat` // Equipment option service contract status (transformed: "920" or "910") |
| 4 | SET | `setParam[3] = Rtrim(kkopSvcCd)` // Equipment option service code |
| 5 | SET | `setParam[4] = Rtrim(pcrsCd)` // Price course code |
| 6 | SET | `setParam[5] = Rtrim(pplanCd)` // Price plan code |
| 7 | SET | `setParam[6] = Rtrim(kkTkSvcKeiNo)` // Equipment provided service contract number |
| 8 | SET | `setParam[7] = Rtrim(sysid)` // System ID |
| 9 | SET | `setParam[8] = Rtrim(mskmDtlNo)` // Application detail number |
| 10 | SET | `setParam[9] = rsvAplyYmd` // Reservation effective date (set to operation date) |
| 11 | SET | `setParam[10] = rsvClYmd` // Reservation cancellation date (empty string) |
| 12 | SET | `setParam[11] = Rtrim(rsvAplyCd)` // Reservation application code |
| 13 | SET | `setParam[12] = Rtrim(ftrialKanyuYmd)` // Trial addition date |
| 14 | SET | `setParam[13] = Rtrim(ftrialPrdEndYmd)` // Trial period end date |
| 15 | SET | `setParam[14] = Rtrim(honkanyuYmd)` // Actual addition date |
| 16 | SET | `setParam[15] = Rtrim(honkanyuIkoKigenYmd)` // Actual addition migration deadline date |
| 17 | SET | `setParam[16] = Rtrim(svcUseStaKiboYmd)` // Service usage start desired date |
| 18 | SET | `setParam[17] = Rtrim(rsvTstaKiboYmd)` // Reservation effective start desired date |
| 19 | SET | `setParam[18] = Rtrim(shosaYmd)` // Confirmation date |
| 20 | SET | `setParam[19] = Rtrim(shosaClYmd)` // Confirmation cancellation date |
| 21 | SET | `setParam[20] = Rtrim(kekiSendCd)` // Screening result notification code |
| 22 | SET | `setParam[21] = Rtrim(keiCncYmd)` // Contract conclusion date |
| 23 | SET | `setParam[22] = Rtrim(svcStaymd)` // Service start date |
| 24 | SET | `setParam[23] = svcEndYmd` // Service end date (transformed) |
| 25 | SET | `setParam[24] = Rtrim(svcChrgStaymd)` // Service charge start date |
| 26 | SET | `setParam[25] = svcChrgEndYmd` // Service charge end date (transformed) |
| 27 | SET | `setParam[26] = Rtrim(kezokSvcStaymd)` // Continuation service start date |
| 28 | SET | `setParam[27] = Rtrim(kezokSvcChrgStaymd)` // Continuation service charge start date |
| 29 | SET | `setParam[28] = Rtrim(planStaymd)` // Plan start date |
| 30 | SET | `setParam[29] = planEndYmd` // Plan end date (transformed) |
| 31 | SET | `setParam[30] = Rtrim(planChrgStaymd)` // Plan charge start date |
| 32 | SET | `setParam[31] = planChrgEndYmd` // Plan charge end date (transformed) |
| 33 | SET | `setParam[32] = Rtrim(planEndSbtCd)` // Plan end type code |
| 34 | SET | `setParam[33] = svcCancelYmd` // Service cancellation date (transformed) |
| 35 | SET | `setParam[34] = svcCancelRsnCd` // Service cancellation reason code (transformed) |
| 36 | SET | `setParam[35] = Rtrim(svcCancelClYmd)` // Service cancellation cancellation date |
| 37 | SET | `setParam[36] = Rtrim(svcStpYmd)` // Service suspension date |
| 38 | SET | `setParam[37] = Rtrim(svcStpRsnCd)` // Service suspension reason code |
| 39 | SET | `setParam[38] = Rtrim(svcStpRlsYmd)` // Service suspension release date |
| 40 | SET | `setParam[39] = Rtrim(svcStpRlsRsnCd)` // Service suspension release reason code |
| 41 | SET | `setParam[40] = Rtrim(pauseStpCd)` // Pause stop code |
| 42 | SET | `setParam[41] = Rtrim(svcPauseYmd)` // Service suspension date |
| 43 | SET | `setParam[42] = Rtrim(svcPauseChrgStaYmd)` // Service suspension charge start date |
| 44 | SET | `setParam[43] = Rtrim(svcPauseRsnCd)` // Service suspension reason code |
| 45 | SET | `setParam[44] = Rtrim(svcPauseRsnMemo)` // Service suspension reason memo |
| 46 | SET | `setParam[45] = Rtrim(svcPauseRlsYmd)` // Service suspension release date |
| 47 | SET | `setParam[46] = Rtrim(svcPauseRlsRsnCd)` // Service suspension release reason code |
| 48 | SET | `setParam[47] = Rtrim(svcPauseRlsRsnMemo)` // Service suspension release reason memo |
| 49 | SET | `setParam[48] = svcChrgEndYmd` // Service termination date (mapped to svcChrgEndYmd per OM-2014-0000957) |
| 50 | SET | `setParam[49] = svcDlreCd` // Service termination reason code (transformed) |
| 51 | SET | `setParam[50] = Rtrim(svcDlreMemo)` // Service termination reason memo |
| 52 | SET | `setParam[51] = Rtrim(svcDslClYmd)` // Service cancellation cancellation date |
| 53 | SET | `setParam[52] = Rtrim(svcDslTtdkiFinFlg)` // Service termination procedure completion flag |
| 54 | SET | `setParam[53] = ""` // Recovery date (空文字 per OM-2014-0000400) |
| 55 | SET | `setParam[54] = Rtrim(chrgStaYmdHoseiUm)` // Charge start date correction (existence flag) |
| 56 | SET | `setParam[55] = Rtrim(kkopSvcKeiHkahYmd)` // Equipment option service contract occurrence date |
| 57 | SET | `setParam[56] = Rtrim(pnltyHasseiCd)` // Penalty occurrence code |
| 58 | SET | `setParam[57] = Rtrim(idoDiv)` // Migration classification |
| 59 | SET | `setParam[58] = Rtrim(shosaDslFinCd)` // Confirmation termination completion code |
| 60 | SET | `setParam[59] = Rtrim(kikiRentaiKeiChgeChuC_flg)` // Equipment carrier contract change processing in-progress flag |
| 61 | SET | `setParam[60] = ""` // Empty string |
| 62 | SET | `setParam[61] = ""` // Empty string |
| 63 | SET | `setParam[62] = ""` // Empty string |
| 64 | SET | `setParam[63] = ""` // Empty string |
| 65 | SET | `setParam[64] = ""` // Empty string |
| 66 | SET | `setParam[65] = ""` // Empty string |
| 67 | SET | `setParam[66] = "0" (MK_FLG_YK: 無効フラグ有効)` // Invalid flag: valid |
| 68 | SET | `setParam[67] = ""` // Empty string |
| 69 | SET | `setParam[68] = ""` // Empty string |
| 70 | SET | `setParam[69] = ""` // Empty string |
| 71 | SET | `setParam[70] = ""` // Empty string |
| 72 | SET | `setParam[71] = ""` // Empty string |
| 73 | SET | `setParam[72] = ""` // Empty string |
| 74 | SET | `setParam[73] = Rtrim(newPcrsAplyFlg)` // New price course application flag (ANK-4287-00-00) |

**Block 8** — [EXECUTE INSERT] (L10053)

> Calls the insert method to persist the transformed service contract data into the `T_KKOP_SVC_KEI` table.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `executeKK_T_KKOP_SVC_KEI_PKINSERT(setParam)` // Insert/update T_KKOP_SVC_KEI record with all set parameters |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `kkopSvcKeiStat` | Field | Equipment option service contract status — internal status code indicating the lifecycle stage of the contract (e.g., 020: Mapping Complete, 030: Contracted, 910: Terminated, 920: Cancellation Complete) |
| `kkopSvcKeiNo` | Field | Equipment option service contract number — unique identifier for the equipment option service contract |
| `kkopSvcCd` | Field | Equipment option service code — classification code for the type of equipment option service |
| `pcrsCd` | Field | Price course code — code identifying the pricing plan/course |
| `pplanCd` | Field | Price plan code — code identifying the pricing plan |
| `kkTkSvcKeiNo` | Field | Equipment provided service contract number — contract number for equipment-provided services |
| `sysid` | Field | System ID — identifier for the originating system |
| `mskmDtlNo` | Field | Application detail number — detail identifier for the service application |
| `rsvAplyYmd` | Field | Reservation effective date — date when the reservation becomes effective |
| `rsvClYmd` | Field | Reservation cancellation date — date when the reservation was cancelled |
| `rsvAplyCd` | Field | Reservation application code — code describing the reservation application type |
| `ftrialKanyuYmd` | Field | Trial addition date — date when the trial service was added |
| `ftrialPrdEndYmd` | Field | Trial period end date — date when the trial service period ends |
| `honkanyuYmd` | Field | Actual addition date — date when the full (actual) service was added |
| `honkanyuIkoKigenYmd` | Field | Actual addition migration deadline date — deadline for migrating to the actual service |
| `svcUseStaKiboYmd` | Field | Service usage start desired date — customer's desired service start date |
| `rsvTstaKiboYmd` | Field | Reservation effective start desired date — desired date for reservation effective start |
| `shosaYmd` | Field | Confirmation date — date of service confirmation |
| `shosaClYmd` | Field | Confirmation cancellation date — date when confirmation was cancelled |
| `kekiSendCd` | Field | Screening result notification code — code for screening result notification |
| `keiCncYmd` | Field | Contract conclusion date — date when the contract was concluded |
| `svcStaymd` | Field | Service start date — date when the service begins |
| `svcEndYmd` | Field | Service end date — date when the service ends |
| `svcChrgStaymd` | Field | Service charge start date — date when service charges begin |
| `svcChrgEndYmd` | Field | Service charge end date — date when service charges end |
| `kezokSvcStaymd` | Field | Continuation service start date — date when continuation service starts |
| `kezokSvcChrgStaymd` | Field | Continuation service charge start date — date when continuation service charges start |
| `planStaymd` | Field | Plan start date — date when the plan starts |
| `planEndYmd` | Field | Plan end date — date when the plan ends |
| `planChrgStaymd` | Field | Plan charge start date — date when plan charges start |
| `planChrgEndYmd` | Field | Plan charge end date — date when plan charges end |
| `planEndSbtCd` | Field | Plan end type code — code describing how/why the plan ended |
| `svcCancelYmd` | Field | Service cancellation date — date when the service was cancelled |
| `svcCancelRsnCd` | Field | Service cancellation reason code — code describing the reason for cancellation |
| `svcCancelClYmd` | Field | Service cancellation cancellation date — date when the cancellation was itself cancelled (reversed) |
| `svcStpYmd` | Field | Service suspension date — date when the service was suspended |
| `svcStpRsnCd` | Field | Service suspension reason code — code describing the reason for suspension |
| `svcStpRlsYmd` | Field | Service suspension release date — date when the suspension was lifted |
| `svcStpRlsRsnCd` | Field | Service suspension release reason code — code describing why suspension was released |
| `pauseStpCd` | Field | Pause stop code — code for pause/stop status |
| `svcPauseYmd` | Field | Service suspension date — date when the service suspension occurred |
| `svcPauseChrgStaYmd` | Field | Service suspension charge start date — date when charges start during suspension |
| `svcPauseRsnCd` | Field | Service suspension reason code — code for the reason of suspension |
| `svcPauseRsnMemo` | Field | Service suspension reason memo — free-text memo for suspension reason |
| `svcPauseRlsYmd` | Field | Service suspension release date — date when suspension was released |
| `svcPauseRlsRsnCd` | Field | Service suspension release reason code — code for why suspension was released |
| `svcPauseRlsRsnMemo` | Field | Service suspension release reason memo — free-text memo for suspension release |
| `svcDlreCd` | Field | Service termination reason code — code describing the reason for service termination |
| `svcDlreMemo` | Field | Service termination reason memo — free-text memo for termination reason |
| `svcDslClYmd` | Field | Service cancellation cancellation date — date when service cancellation was cancelled |
| `svcDslTtdkiFinFlg` | Field | Service termination procedure completion flag — indicates if termination procedure is complete |
| `chrgStaYmdHoseiUm` | Field | Charge start date correction (existence flag) — flag indicating whether charge start date was corrected |
| `kkopSvcKeiHkahYmd` | Field | Equipment option service contract occurrence date — date when the contract occurrence happened |
| `pnltyHasseiCd` | Field | Penalty occurrence code — code indicating penalty was applied |
| `idoDiv` | Field | Migration classification — classification of device/port migration |
| `shosaDslFinCd` | Field | Confirmation termination completion code — code indicating confirmation termination is complete |
| `kikiRentaiKeiChgeChuCFlg` | Field | Equipment carrier contract change processing in-progress flag — flag indicating contract change is in progress |
| `newPcrsAplyFlg` | Field | New price course application flag — indicates whether a new price course was applied (ANK-4287-00-00) |
| `kojiakFinYmd` | Parameter | Work completion date — date when the installation work was completed; used as work item cancellation date for computing effective end dates |
| `super.opeDate` | Field | Operation date — the operational date used for setting cancellation dates in the "020" status branch |
| `setParam` | Field | Insert parameter array — array of 74 fields passed to the insert method for T_KKOP_SVC_KEI record persistence |
| T_KKOP_SVC_KEI | Table | Equipment Option Service Contract table — main database table for equipment option service contract records |
| CD01616_KKOP_SVC_KEI_STAT_020 | Constant | "020" — Status: Mapping Complete (照映済) |
| CD01616_KKOP_SVC_KEI_STAT_920 | Constant | "920" — Status: Cancellation Complete (キャンセル済) |
| CD01616_KKOP_SVC_KEI_STAT_030 | Constant | "030" — Status: Contracted (締結済) |
| CD01616_KKOP_SVC_KEI_STAT_910 | Constant | "910" — Status: Terminated (解約済) |
| SVC_CANCEL_RSN_CD_OTHER | Constant | "05" — Cancellation reason: Other reasons (その他理由によるキャンセル) |
| SVC_DLRE_CD_NORMAL | Constant | "01" — Termination reason: Normal termination (通常解約) |
| MK_FLG_YK | Constant | "0" — Invalid flag: Valid (無効フラグ: 有効) |
| OM-2014-0000957 | Ticket | Change ticket: Reservation effective date → operation date, reservation cancellation date → empty string for cancellation registration |
| OM-2014-0000400 | Ticket | Change ticket: Set recovery date to empty string |
| ANK-4287-00-00 | Ticket | Change ticket: Added new price course application flag field (newPcrsAplyFlg) |
| v20.00.00 | Version | Version change: Replaced hardcoded status codes with constant references (CD01616_*) |
| 照映済 (Shouei-zumi) | Term | Mapping complete — status indicating the contract record has been mapped/loaded into the system |
| 締結済 (Te kketsu-zumi) | Term | Contracted — status indicating the service contract has been fully concluded |
| キャンセル済 (Kyanseru-zumi) | Term | Cancellation complete — status indicating the service has been cancelled |
| 解約済 (Kaiyaku-zumi) | Term | Terminated — status indicating the service contract has been terminated |
| 工事完了日 (Kouji kanryo bi) | Term | Work completion date — the date when installation/construction work was completed |
| 工事案件キャンセル (Kouji ankēn kyansel) | Term | Work item cancellation — cancellation of a work order/installation case |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband service |
| SOD | Acronym | Service Order Data — order fulfillment entity in telecom systems |
| JBSbatCommonDBInterface | Interface | Database data interface — a common interface for data maps used across batch service methods |
| `JBSbatKKConst` | Class | KK constant definitions — class containing all KK (K-Opticom) domain constant values |
| `JBSbatKK_T_KKOP_SVC_KEI` | Class | Table constant definitions for T_KKOP_SVC_KEI — contains column name constants for the equipment option service contract table |
