# Business Logic — JBSbatKKKjClDataInTrn.insertKktkSvcKeiTakinoRouterDslCncl() [322 LOC]

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

## 1. Role

### JBSbatKKKjClDataInTrn.insertKktkSvcKeiTakinoRouterDslCncl()

This method registers a **device-provisioned service contract cancellation/cancel (multi-functional router)** — 機器提供サービス契約(解約・キャンセル)の登録(多機能ルーター). It processes cancellation or cancellation-with-cancellation (cancel-while-cancel) scenarios for service contracts involving multi-functional DSL routers in the K-Opticom telecommunications billing system. The method implements a **state-dispatch pattern**: it inspects the current contract status (`KKTK_SVC_KEI_STAT`) from the input map and applies cancellation-specific transformations based on that status, acting as a pre-processing transformer before the final insert operation.

The method handles two distinct service contract states: **status "020" (Irradiation Complete / 照射済)** — where the service is in an irradiation (trial/demonstration) phase, and **status "030" (Contracting Complete / 締済)** — where the service contract has been fully contracted. For status "020", it converts the state to "920" (Cancelled / キャンセル済) and resets the service cancellation date to the operation date. For status "030", it converts the state to "910" (Cancelled / 解約済) and computes all end dates (plan end, service end, plan charge end, service charge end) based on one day before the construction case cancellation date (`kojiakFinYmd`). After preparing all fields, it builds a comprehensive parameter array of over 150 fields and inserts the contract record via `executeKK_T_KKTK_SVC_KEI_PKINSERT`. Additionally, if this is a multi-functional router DSL cancellation, it performs a safety check by querying the associated phone contract's option service information and raises an error if any exists (to prevent conflicting concurrent contracts on the same line).

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["insertKktkSvcKeiTakinoRouterDslCncl"])
    
    START --> GET_SYS_DATE["Get System Date from JCCBatCommon"]
    GET_SYS_DATE --> GET_STAT["Get KKTK_SVC_KEI_STAT from input map"]
    GET_STAT --> CHECK_STAT{Status Check}
    
    CHECK_STAT -->|"Status 020"| BRANCH_020["Branch 020: Irradiation Complete"]
    CHECK_STAT -->|"Status 030"| BRANCH_030["Branch 030: Contracting Complete"]
    CHECK_STAT --> OTHER["Other: no match"]
    
    BRANCH_020 --> SET_STAT_020["Set KKTK_SVC_KEI_STAT to 920"]
    SET_STAT_020 --> SET_CANCEL_YMD_020["Set svcCancelYmd to super.opeDate"]
    SET_CANCEL_YMD_020 --> SET_RSN_020["Set svcCancelRsnCd to 05"]
    SET_RSN_020 --> SET_FLG_020["Set takinoRouterDslCnclFlg = true"]
    SET_FLG_020 --> MERGE_01
    
    BRANCH_030 --> SET_STAT_030["Set KKTK_SVC_KEI_STAT to 910"]
    SET_STAT_030 --> CALC_DATE["Calculate beforeDay = adjustDate(kojiakFinYmd, -1)"]
    CALC_DATE --> SET_DATES_030["Set end dates to beforeDay"]
    SET_DATES_030 --> SET_RSN_030["Set svcDlreCd to 01"]
    SET_RSN_030 --> SET_FLG_030["Set takinoRouterDslCnclFlg = true"]
    SET_FLG_030 --> MERGE_01
    
    OTHER --> MERGE_01
    
    MERGE_01["Merge branches"] --> BUILD_ARRAY["Build setParam array with 150+ fields"]
    BUILD_ARRAY --> EXEC_INSERT["CALL executeKK_T_KKTK_SVC_KEI_PKINSERT"]
    EXEC_INSERT --> CHECK_FLG{takinoRouterDslCnclFlg?}
    
    CHECK_FLG -->|"true"| GET_KAISEN["Get SVC_KEI_KAISEN_UCWK_NO"]
    GET_KAISEN --> CALL_SELECT["CALL executeKK_T_KAISEN_TG_SVKEI_KK_SELECT_048"]
    CALL_SELECT --> FETCH_RESULT["Fetch result from db_KK_T_KAISEN_TG_SVKEI"]
    FETCH_RESULT --> CHECK_NULL{Result not null?}
    CHECK_NULL -->|"yes"| LOG_ERROR["Log Error EKKB2070KW; setErrFlg true"]
    CHECK_NULL -->|"no"| END_METHOD
    LOG_ERROR --> END_METHOD
    
    CHECK_FLG -->|"false"| END_METHOD
```

**CRITICAL — Constant Resolution:**

| Constant | Actual Value | Business Meaning |
|----------|-------------|-----------------|
| `CD00056_KKTK_SVC_KEI_STAT_020` | `"020"` | Device-provisioned service contract status: Irradiation Complete (照射済) |
| `CD00056_KKTK_SVC_KEI_STAT_920` | `"920"` | Device-provisioned service contract status: Cancelled (キャンセル済) |
| `CD00056_KKTK_SVC_KEI_STAT_030` | `"030"` | Device-provisioned service contract status: Contracting Complete (締済) |
| `CD00056_KKTK_SVC_KEI_STAT_910` | `"910"` | Device-provisioned service contract status: Terminated (解約済) |
| `SVC_CANCEL_RSN_CD_OTHER` | `"05"` | Service cancellation reason code: Other reason cancellation (その他理由によるキャンセル) |
| `SVC_DLRE_CD_NORMAL` | `"01"` | Service termination reason code: Normal termination (通常解約) |
| `MK_FLG_YK` | `"0"` | Multi-purpose flag (Y/N) — "Y" used |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `kktkSvcKei_map` | `JBSbatCommonDBInterface` | Input message carrying device-provisioned service contract data — a key-value map containing all fields of the `KK_T_KKTK_SVC_KEI` table (150+ fields), including service contract number, status codes, device information, subscriber address, cancellation dates, and billing period information. |
| 2 | `kojiakFinYmd` | `String` | Construction case cancellation date (工事案件キャンセル年月日) — the date on which the construction/cancellation project is finalized. Used only in the "030" (Contracting Complete) branch to compute the day before as the effective end date for all billing and service periods. |

**Instance fields read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `super.opeDate` | `String` | Operation date (運用作業日) — the system batch processing date, used as the cancellation date, reservation application date, and query parameter values. |

## 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 | - | Reads system date/time stamp |
| R | `JBSbatKK_T_KKTK_SVC_KEI.getString` (×75+) | JBSbatKK_T_KKTK_SVC_KEI | KK_T_KKTK_SVC_KEI | Reads 75+ fields from the device-provisioned service contract input map |
| R | `JBSbatStringUtil.Rtrim` (×150+) | JBSbatStringUtil | - | Trims whitespace from all string values extracted from the input map |
| C | `executeKK_T_KKTK_SVC_KEI_PKINSERT` | JBSbatKKKjClDataInTrn | KK_T_KKTK_SVC_KEI | **Creates** a new record in the device-provisioned service contract table with computed cancellation values |
| R | `executeKK_T_KAISEN_TG_SVKEI_KK_SELECT_048` | JBSbatKKKjClDataInTrn | KK_T_KAISEN_TG_SVKEI | **Reads** associated line-shared phone contract option service information by `SVC_KEI_KAISEN_UCWK_NO` |
| R | `JBSbatKK_T_KAISEN_TG_SVKEI.selectNext` | JBSbatKKKjClDataInTrn | KK_T_KAISEN_TG_SVKEI | Retrieves the next result row from the multi-line query |
| R | `JBSbatKK_T_SVC_KEI.getString` | JBSbatKK_T_SVC_KEI | KK_T_SVC_KEI | Reads the service contract number from the query result |
| E | `JACBatCommon.printDebugLog` (via `super.logPrint`) | JACBatCommon | - | Logs debug messages for the cancellation date and day-before calculation |
| E | `JKKBatOneTimeLogWriter.printBusinessErrorLog` (via `super.commonItem`) | JKKBatOneTimeLogWriter | - | Logs a business error when conflicting option service is found on the same line |
| E | `JKKejbAdChecker.setErrFlg` (via `super.commonItem`) | JKKejbAdChecker | - | Sets the error flag to true when conflicting option service exists |
| - | `JBSbatDateUtil.adjustDate` | JBSbatDateUtil | - | Computes the day before `kojiakFinYmd` for use as end dates in the "030" branch |

### Detailed per-call CRUD analysis:

**C — Create**

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| C | `executeKK_T_KKTK_SVC_KEI_PKINSERT` | JBSbatKKKjClDataInTrn | KK_T_KKTK_SVC_KEI | Inserts a new device-provisioned service contract record with cancellation-transformed state and dates. Maps 150+ fields including contract number, auto-generated timestamp, transformed status code, service/device codes, plan codes, equipment details, subscriber address, cancellation/termination dates, and billing end dates. |

**R — Read**

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `executeKK_T_KAISEN_TG_SVKEI_KK_SELECT_048` | JBSbatKKKjClDataInTrn | KK_T_KAISEN_TG_SVKEI | Queries the line-shared target service contract table (KK_T_KAISEN_TG_SVKEI) by operation dates and `SVC_KEI_KAISEN_UCWK_NO` to find any phone contracts sharing the same line as the multi-functional router being cancelled. |

**E — Error/Logging (side-effect operations)**

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| E | `printBusinessErrorLog` | JKKBatOneTimeLogWriter | - | Logs business error `EKKB2070KW` with the service contract number when a conflicting option service is detected. |
| E | `setErrFlg(true)` | JKKejbAdChecker | - | Sets the global error flag to true, causing the batch process to halt or flag the record for review. |

## 5. Dependency Trace

### Direct callers:

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Method: `insertKktkSvcKeiTakinoRouter` (JBSbatKKKjClDataInTrn) | `insertKktkSvcKeiTakinoRouter(kktkSvcKeiMap, kojiakFinYmd, svcKeiNo)` → `insertKktkSvcKeiTakinoRouterDslCncl(kktkSvcKei_map, kojiakFinYmd)` | `executeKK_T_KKTK_SVC_KEI_PKINSERT [C] KK_T_KKTK_SVC_KEI`, `executeKK_T_KAISEN_TG_SVKEI_KK_SELECT_048 [R] KK_T_KAISEN_TG_SVKEI`, `setErrFlg [E] ErrorFlag`, `printBusinessErrorLog [E] EKKB2070KW` |

**Call chain detail:** The sole caller is `insertKktkSvcKeiTakinoRouter()`, a private method in the same class `JBSbatKKKjClDataInTrn` that orchestrates the full multi-functional router insertion flow. It delegates to `insertKktkSvcKeiTakinoRouterDslCncl` with the service contract data map and the construction cancellation date. `insertKktkSvcKeiTakinoRouter` itself is called from `KKSV0004` screen processing (16th invocation, variable `kktkSvcKeiMap_163`), within the larger batch/screen processing chain for device-provisioned service contract insertion.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] (L9416) System date acquisition

> Retrieves the current system date/time stamp for use as the auto-generated entry timestamp (GENE_ADD_DTM) in the inserted record.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sysDate = JCCBatCommon.getSysDateTimeStamp()` // Get current system date/time [-> GENE_ADD_DTM in insert] |

**Block 2** — [SET] (L9419) Read device-provisioned service contract status

> Reads the current status from the input map. This is the key dispatch field determining which cancellation branch to follow.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kktkSvcKeiStat = JBSbatStringUtil.Rtrim(kktkSvcKei_map.getString(KKTK_SVC_KEI_STAT))` // Trimmed status from input [-> KKTK_SVC_KEI_STAT] |

**Block 3** — [SET] (L9423–9433) OM-2014-0000957 countermeasure: reservation date mapping

> Per OM-2014-0000957 change: For cancellation/cancel record registration, the reservation application date (`rsvAplyYmd`) is set to the operation date and the reservation cancellation date (`rsvClYmd`) is cleared. This aligns the reservation fields with the batch processing date.

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsvAplyYmd = super.opeDate` // Reservation application date -> operation date |
| 2 | SET | `rsvClYmd = ""` // Reservation cancellation date -> empty |

**Block 4** — [SET] (L9436–L9448) Read cancellation-related fields from input map

> Extracts cancellation reason code, plan end date, service end date, plan charge end date, service charge end date, and service termination reason code from the input map. These are used for conditional transformations and as-is in the final insert.

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

**Block 5** — [SET] (L9451) Multi-functional router DSL cancellation flag initialization

> Initializes the DSL cancellation flag for multi-functional routers (多機能ルーター). Default to false; set to true if the status branch matches a cancellable router scenario.

| # | Type | Code |
|---|------|------|
| 1 | SET | `takinoRouterDslCnclFlg = false` // Multi-functional router DSL cancellation flag [ANK-3754-00-00] |

**Block 6** — [IF] `JBSbatKKConst.CD00056_KKTK_SVC_KEI_STAT_020.equals(kktkSvcKeiStat)` [Status = "020" (照射済 / Irradiation Complete)] (L9454)

> **Business:** When the device-provisioned service contract status is "020" (Irradiation Complete — 照射済), this branch converts the status to "920" (Cancelled / キャンセル済). This represents a cancellation during the irradiation/trial phase. The service cancellation date is set to the operation date, and the cancellation reason is set to "05" (Other reason cancellation). The DSL cancellation flag is raised.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kktkSvcKeiStat = CD00056_KKTK_SVC_KEI_STAT_920` // "920" — Cancelled (キャンセル済) [v20.00.00 constant change] |
| 2 | SET | `svcCancelYmd = super.opeDate` // Service cancellation date -> operation date |
| 3 | SET | `svcCancelRsnCd = SVC_CANCEL_RSN_CD_OTHER` // "05" — Other reason cancellation (その他理由によるキャンセル) [v20.00.00] |
| 4 | SET | `takinoRouterDslCnclFlg = true` // Mark as multi-functional router DSL cancellation [ANK-3754-00-00] |

**Block 7** — [ELSE IF] `JBSbatKKConst.CD00056_KKTK_SVC_KEI_STAT_030.equals(kktkSvcKeiStat)` [Status = "030" (締済 / Contracting Complete)] (L9478)

> **Business:** When the device-provisioned service contract status is "030" (Contracting Complete / 締済), this branch converts the status to "910" (Terminated / 解約済). This represents a formal service termination where the cancellation date is computed as the day before the construction case cancellation date (`kojiakFinYmd`). All end dates (plan end, service end, plan charge end, service charge end) are set to this computed day-before date. The termination reason is set to "01" (Normal termination / 通常解約). The DSL cancellation flag is raised.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kktkSvcKeiStat = CD00056_KKTK_SVC_KEI_STAT_910` // "910" — Terminated (解約済) [v20.00.00] |
| 2 | SET | `beforeDay = JBSbatDateUtil.adjustDate(kojiakFinYmd, -1)` // One day before construction case cancellation date |
| 3 | EXEC | `super.logPrint.printDebugLog("★★★工事案件キャンセル年月日--->" + kojiakFinYmd)` // Debug log |
| 4 | EXEC | `super.logPrint.printDebugLog("★★★工事案件キャンセル年月日の前日--->" + beforeDay)` // Debug log |
| 5 | SET | `planEndYmd = beforeDay` // Plan end date -> day before |
| 6 | SET | `svcEndYmd = beforeDay` // Service end date -> day before |
| 7 | SET | `planChrgEndYmd = beforeDay` // Plan charge end date -> day before |
| 8 | SET | `svcChrgEndYmd = beforeDay` // Service charge end date -> day before |
| 9 | SET | `svcDlreCd = SVC_DLRE_CD_NORMAL` // "01" — Normal termination (通常解約) [v20.00.00] |
| 10 | SET | `takinoRouterDslCnclFlg = true` // Mark as multi-functional router DSL cancellation [ANK-3754-00-00] |

**Block 8** — [SET] (L9499–L9661) Build the insert parameter array

> Constructs a parameter array of 150+ fields for the insert operation. Each field is extracted from the input map (`kktkSvcKei_map`) using the `KK_T_KKTK_SVC_KEI` field key constants, trimmed via `JBSbatStringUtil.Rtrim`, and placed into a string array. Key computed fields (instead of raw input values): `sysDate` (index 1), `kktkSvcKeiStat` (index 2, already transformed), `rsvAplyYmd`, `rsvClYmd`, `planEndYmd`, `svcCancelYmd`, `svcCancelRsnCd`, `svcEndYmd`, `svcChrgEndYmd`, `svcDlreCd`. Additional constant fields include `MK_FLG_YK` and empty strings for reserved/unused positions. This array covers all fields of the `KK_T_KKTK_SVC_KEI` table from contract number through the trial period fields.

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParam = new String[]{... 150+ fields ...}` // Full contract record with transformed values |
| 1.1 | SET | `setParam[0] = KKTK_SVC_KEI_NO` // Service contract number |
| 1.2 | SET | `setParam[1] = sysDate` // System date/time |
| 1.3 | SET | `setParam[2] = kktkSvcKeiStat` // Transformed status (920 or 910) |
| 1.4 | SET | `setParam[77] = rsvAplyYmd` // Reservation application date |
| 1.5 | SET | `setParam[78] = rsvClYmd` // Reservation cancellation date |
| 1.6 | SET | `setParam[95] = planEndYmd` // Plan end date |
| 1.7 | SET | `setParam[97] = svcCancelYmd` // Service cancellation date |
| 1.8 | SET | `setParam[98] = svcCancelRsnCd` // Cancellation reason code |
| 1.9 | SET | `setParam[113] = svcEndYmd` // Service end date |
| 1.10 | SET | `setParam[114] = svcChrgEndYmd` // Service charge end date |
| 1.11 | SET | `setParam[116] = svcDlreCd` // Termination reason code |
| 1.12 | SET | `setParam[147] = MK_FLG_YK` // Multi-purpose flag (v20.00.00 constant) |

**Block 9** — [CALL] (L9663) Execute insert

| # | Type | Code |
|---|------|------|
| 1 | CALL | `executeKK_T_KKTK_SVC_KEI_PKINSERT(setParam)` // Insert device-provisioned service contract record [C] KK_T_KKTK_SVC_KEI |

**Block 10** — [IF] `takinoRouterDslCnclFlg` (L9669) Multi-functional router DSL cancellation post-check

> **Business:** When the multi-functional router DSL cancellation flag is true (set in Blocks 6 or 7), this block performs a safety check. It queries the same-line phone contract's option service information to detect if any concurrent option services are active on the same telephone line. If a matching record exists, it logs a business error (EKKB2070KW) with the service contract number and sets the error flag to true, preventing the cancellation from proceeding with conflicting services.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiKaisenUcwkNo = JBSbatStringUtil.Rtrim(kktkSvcKei_map.getString(SVC_KEI_KAISEN_UCWK_NO))` // Service contract change work number |
| 2 | SET | `param048 = new String[]{opeDate, opeDate, opeDate, svcKeiKaisenUcwkNo, opeDate, opeDate}` // Query parameters: 3x op date + ucwk no + 2x op date |
| 3 | CALL | `executeKK_T_KAISEN_TG_SVKEI_KK_SELECT_048(param048)` // Query same-line target service contracts [R] KK_T_KAISEN_TG_SVKEI |
| 4 | SET | `kaisenTgSvkeiMap048 = db_KK_T_KAISEN_TG_SVKEI.selectNext()` // Get result row |

**Block 10.1** — [IF] `null != kaisenTgSvkeiMap048` (L9677)

> If a result was found, it means there is a conflicting phone contract option service on the same line. This is an error condition.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiNo = JBSbatStringUtil.Rtrim(kaisenTgSvkeiMap048.getString(SVC_KEI_NO))` // Service contract number |
| 2 | EXEC | `super.logPrint.printBusinessErrorLog(EKKB2070KW, new String[]{svcKeiNo})` // Log error [E] |
| 3 | EXEC | `super.commonItem.setErrFlg(true)` // Set error flag [E] |

**Block 11** — [RETURN] (L9685) Method end

> No return value — the method completes with `void` return. The inserted record and any error state are communicated through side effects (database insert, error flag, error log).

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return;` // Method completes (implicit) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `KKTK_SVC_KEI_STAT` | Field | Device-provisioned service contract status code — identifies the current lifecycle stage of the service contract (020=Irradiation Complete, 030=Contracting Complete, 910=Terminated, 920=Cancelled) |
| `SVC_CANCEL_YMD` | Field | Service cancellation date — the date when service cancellation takes effect |
| `SVC_CANCEL_RSN_CD` | Field | Service cancellation reason code — the reason why the service was cancelled (05=Other reason) |
| `SVC_DLRE_CD` | Field | Service termination reason code — the type of termination (01=Normal termination) |
| `PLAN_ENDYMD` | Field | Plan end date — the date when the service plan ends |
| `SVC_ENDYMD` | Field | Service end date — the date when the service itself ends |
| `PLAN_CHRG_ENDYMD` | Field | Plan charge end date — the date when plan-based billing ends |
| `SVC_CHRG_ENDYMD` | Field | Service charge end date — the date when service-based billing ends |
| `SVC_KEI_KAISEN_UCWK_NO` | Field | Service contract change work number — internal tracking ID for service contract modification line items, used to find related phone contracts on the same line |
| `SVC_KEI_NO` | Field | Service contract number — the primary identifier for a service contract |
| `KKTK_SVC_KEI_NO` | Field | Device-provisioned service contract number — unique identifier for the KK_T_KKTK_SVC_KEI table record |
| `GENE_ADD_DTM` | Field | Generated add date/time — auto-generated system timestamp for the inserted record |
| `kojiakFinYmd` | Field | Construction case cancellation date (工事案件キャンセル年月日) — the date when the construction/cancellation project is finalized; used as the reference point for computing end dates |
| `opeDate` | Field | Operation date (運用作業日) — the batch processing date used as the cancellation date and reservation application date |
| `takinoRouterDslCnclFlg` | Field | Multi-functional router DSL cancellation flag — indicates whether this cancellation involves a multi-functional DSL router (多機能ルーター) |
| `CD00056_KKTK_SVC_KEI_STAT_020` | Constant | Status code "020" — Irradiation Complete (照射済), trial/demonstration phase |
| `CD00056_KKTK_SVC_KEI_STAT_030` | Constant | Status code "030" — Contracting Complete (締済), fully contracted |
| `CD00056_KKTK_SVC_KEI_STAT_910` | Constant | Status code "910" — Terminated (解約済), after formal termination |
| `CD00056_KKTK_SVC_KEI_STAT_920` | Constant | Status code "920" — Cancelled (キャンセル済), after cancellation |
| `SVC_CANCEL_RSN_CD_OTHER` | Constant | Cancellation reason code "05" — Other reason cancellation (その他理由によるキャンセル) |
| `SVC_DLRE_CD_NORMAL` | Constant | Termination reason code "01" — Normal termination (通常解約) |
| `MK_FLG_YK` | Constant | Multi-purpose flag (Y/N) — Y/N type flag constant |
| KK_T_KKTK_SVC_KEI | DB Table | Device-provisioned service contract table — main table storing device-provisioned service contract records (the 150+ field record being inserted) |
| KK_T_KAISEN_TG_SVKEI | DB Table | Line-shared target service contract table — table of phone contracts sharing the same line as a service contract, used for the conflict check |
| KK_T_SVC_KEI | DB Table | Service contract table — master table of service contracts |
| EKKB2070KW | Error Code | Business error code — logged when a conflicting option service is found on the same line as the router being cancelled |
| 照射済 (Sousha-zumi) | Business term | Irradiation Complete — service is in the trial/demonstration irradiation phase |
| 締済 (Shime-zumi) | Business term | Contracting Complete — the service contract has been fully contracted |
| 解約済 (Kaisho-zumi) | Business term | Terminated — the service contract has been formally terminated |
| キャンセル済 (Kyanseru-zumi) | Business term | Cancelled — the service contract has been cancelled |
| 多機能ルーター (Takino Router) | Business term | Multi-functional router — a broadband router with integrated DSL/modem functionality, often associated with NTT Flet's Hikari service |
| 工事案件 (Kouji Anken) | Business term | Construction project/case — a field installation or construction work order in the telecom provisioning workflow |
| OM-2014-0000957 | Change ticket | Change request for reservation date mapping — ensures reservation application date maps to operation date and cancellation date is cleared for cancellation records |
| ANK-3754-00-00 | Change ticket | Change request for multi-functional router DSL cancellation flag — adds safety check for conflicting phone contract option services on the same line |
| v20.00.00 | Version | Version 20.00.00 — refactoring that replaced hardcoded magic strings with named constants for improved readability |
