# Business Logic — JBSbatKKSmtvlMskmInfoTrkm.chkDsl() [136 LOC]

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

## 1. Role

### JBSbatKKSmtvlMskmInfoTrkm.chkDsl()

This method performs the **DSL (Fiber-to-the-Home) cancellation pre-check** processing for a customer service contract. It is invoked as part of the batch cancellation workflow (解約チェック処理) and serves as a gatekeeper that validates all required preconditions before allowing the DSL line cancellation to proceed. The method orchestrates a multi-stage validation pipeline across two distinct business domains: (1) service contract existence and type classification, and (2) third-party carrier discount contract status verification. It queries service contract data from the `KK_T_SVC_KEI` table using the discount price group code as the lookup key, applies a rule engine (`RULE0086001`) to classify each contract as either "EO HNT" (eo HIKARI Home Noodle — fiber broadband) or "EO HTL" (eo HIKARI Telephone — voice phone service), and validates that at least one service contract line is found. In the second stage, it verifies the third-party carrier discount contract (`KK_T_TAJGS_WRIB_KEI`) exists, confirms the contract completion date is set (smart balance tied up), confirms the contract is NOT yet cancelled (smart balance uncancelled check), and validates that the KDDI business contract management number on the discount record matches the one provided in the work map. The method follows the **guard clause / early-return** design pattern — each validation failure immediately logs a descriptive debug message, sets appropriate error codes (`ERR_CD` and `KDDI_ERR_CD`), and returns `false`. Only when all checks pass does it populate the `workMap` with the extracted third-party discount contract fields and return `true`. This method is the critical integrity checkpoint in the batch cancellation pipeline, ensuring no DSL cancellation proceeds without verified, consistent contract and discount data.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["chkDsl workMap"])

    START --> DECL["Declare local variables"]
    DECL --> GET_WMAP["Get WRIBPRC_GRP_CD from workMap"]
    GET_WMAP --> TRIM["kddiValcd.trim"]
    TRIM --> CALL_SC1["selectSvcKeiByKddiValCd kddiValcd"]
    CALL_SC1 --> CHECK_SC1["svcKeiList == null or empty"]

    CHECK_SC1 -- "Yes" --> LOG_ERR1["Debug log: Cannot retrieve service contract"]
    LOG_ERR1 --> SET_ERR1["Set ERR_CD = E03, KDDI_ERR_CD = 205"]
    SET_ERR1 --> RET_FALSE1["Return false"]

    CHECK_SC1 -- "No" --> FOR_LOOP["For each svcKeiMap in svcKeiList"]
    FOR_LOOP --> EXEC_RULE["executeRULE0086001 svcKeiMap"]
    EXEC_RULE --> GET_APLY["Get APLY_SVC_KEI from ruleResult"]
    GET_APLY --> DIV_EOHNT{"APLY_SVC_KEI == 01"}

    DIV_EOHNT -- "Yes (EOHNT)" --> SET_NET["Set SYSID and SVC_KEI_NO_NET from svcKeiMap"]
    DIV_EOHNT -- "No" --> DIV_EOHTL{"APLY_SVC_KEI == 02"}
    DIV_EOHTL -- "Yes (EOHTL)" --> SET_TEL["Set SVC_KEI_NO_TEL from svcKeiMap"]
    DIV_EOHTL -- "No" --> NEXT_LOOP["Continue to next svcKeiMap"]
    SET_NET --> NEXT_LOOP
    SET_TEL --> NEXT_LOOP
    NEXT_LOOP --> NEXT_LOOP_END["End of iteration"]

    NEXT_LOOP_END --> CHECK_NULL["isNullSpace SVC_KEI_NO_NET or SVC_KEI_NO_TEL"]
    CHECK_NULL -- "true" --> LOG_ERR2["Debug log: Service contract not found"]
    LOG_ERR2 --> SET_ERR2["Set ERR_CD = E03, KDDI_ERR_CD = 205"]
    SET_ERR2 --> RET_FALSE2["Return false"]
    CHECK_NULL -- "false" --> CALL_SC2["selectTajgsWribKeiByValCd wribprc_grp_cd"]

    CALL_SC2 --> CHECK_TAJGS{"tajgsWribKeiList != null and not empty"}
    CHECK_TAJGS -- "No" --> LOG_ERR3["Debug log: Other carrier contract not found"]
    LOG_ERR3 --> SET_ERR3["Set ERR_CD = E13, KDDI_ERR_CD = 208"]
    SET_ERR3 --> RET_FALSE3["Return false"]

    CHECK_TAJGS -- "Yes" --> GET_TAJGS_MAP["Get tajgsWribKeiMap from list.get 0"]
    GET_TAJGS_MAP --> CHECK_CNC_YMD{"CNC_YMD valid YMD"}
    CHECK_CNC_YMD -- "No" --> LOG_ERR4["Debug log: Smart Balance completion check"]
    LOG_ERR4 --> SET_ERR4["Set ERR_CD = E13, KDDI_ERR_CD = 208"]
    SET_ERR4 --> RET_FALSE4["Return false"]

    CHECK_CNC_YMD -- "Yes" --> CHECK_DSL_YMD{"DSL_YMD valid YMD"}
    CHECK_DSL_YMD -- "Yes" --> LOG_ERR5["Debug log: Smart Balance uncancelled check"]
    LOG_ERR5 --> SET_ERR5["Set ERR_CD = E14, KDDI_ERR_CD = 208"]
    SET_ERR5 --> RET_FALSE5["Return false"]

    CHECK_DSL_YMD -- "No" --> GET_KDDI_NO["Get KDDI_JGS_KEI_KANRI_NO from tajgsWribKeiMap"]
    GET_KDDI_NO --> GET_WORK_JGSNO["Get JIGYOSHA_KEI_KNRI_NO from workMap"]
    GET_WORK_JGSNO --> SUBSTR_JGSNO["inJgsKeiKanriNo.substring 0 10"]
    SUBSTR_JGSNO --> COMPARE_JGSNO{"workJgsKeiKanriNo == kddiJgsKeiKanriNo"}
    COMPARE_JGSNO -- "No" --> LOG_ERR6["Debug log: Discount management info check"]
    LOG_ERR6 --> SET_ERR6["Set ERR_CD = E15, KDDI_ERR_CD = 999"]
    SET_ERR6 --> RET_FALSE6["Return false"]

    COMPARE_JGSNO -- "Yes" --> GET_TAJGS_FIELDS["Get TAJGS_WRIB_KEI_NO UPD_DTM GENE_ADD_DTM"]
    GET_TAJGS_FIELDS --> PUT_TAJGS_FIELDS["Put tajgs_wrib_kei_no upd_dtm etc into workMap"]
    PUT_TAJGS_FIELDS --> RET_TRUE["Return true"]

    RET_FALSE1 --> END(["chkDsl end"])
    RET_FALSE2 --> END
    RET_FALSE3 --> END
    RET_FALSE4 --> END
    RET_FALSE5 --> END
    RET_FALSE6 --> END
    RET_TRUE --> END
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `workMap` | `HashMap<String, Object>` | The batch execution context map carrying all service execution data. For this method, it must contain `wribprc_grp_cd` (discount price group code — the KDDI billing group identifier used to look up service contracts and third-party discount agreements). It may also contain `jigyosha_kei_knri_no` (business contract management number — the KDDI-side contract management identifier, truncated to 10 characters for comparison). On return, the method populates `svc_kei_no_net` (fiber broadband service contract number), `svc_kei_no_tel` (phone service contract number), `sysid` (system ID), `tajgs_wrib_kei_no` (third-party discount contract number), `tajgs_wrib_kei_upd_dtm` (last update timestamp), `kddi_jgs_kei_kanri_no` (KDDI business contract management number), and `tajgs_wrib_kei_gene_add_dtm` (third-party discount contract creation timestamp). Error codes `err_cd` and `kddi_err_cd` are set on failure. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JBSbatKKSmtvlMskmInfoTrkm.selectSvcKeiByKddiValCd` | `KK_T_SVC_KEI_KK_SELECT_207` | `KK_T_SVC_KEI` | Queries service contract records (`KK_T_SVC_KEI`) filtered by KDDI billing group code (discount price group code) |
| R | `JBSbatKKSmtvlMskmInfoTrkm.selectTajgsWribKeiByValCd` | `KK_T_TAJGS_WRIB_KEI_KK_SELECT_001` | `KK_T_TAJGS_WRIB_KEI` | Queries third-party carrier discount contract records (`KK_T_TAJGS_WRIB_KEI`) filtered by KDDI billing group code |
| - | `JBSbatKKSmtvlMskmInfoTrkm.executeRULE0086001` | — | — | Executes DSL service type classification rule engine using pricing group, cost code, plan code, and service status data |
| - | `JBSbatCommon.printDebugLog` | — | — | Logs debug messages for validation failures and data retrieval |
| - | `JBSbatKKSmtvlMskmInfoTrkm.isNullSpace` | — | — | Validates whether a string value is null or blank |
| - | `JBSbatKKSmtvlMskmInfoTrkm.isValidYmd` | — | — | Validates whether a string is a valid year-month-day date format |
| - | `java.lang.String.trim` | — | — | Trims whitespace from the discount group code string |
| - | `java.lang.String.substring` | — | — | Truncates the business contract management number to 10 characters |

### DB Entity Details:

| Entity / DB | Table Name | Fields Accessed |
|-------------|-----------|-----------------|
| `KK_T_SVC_KEI` | Service Contract | `SYSID`, `SVC_KEI_NO`, `PRC_GRP_CD`, `PCRS_CD`, `PPLAN_CD`, `SVC_KEI_STAT`, `PAUSE_STP_CD`, `SHOSA_DSL_FIN_CD` (via executeRULE0086001) |
| `KK_T_TAJGS_WRIB_KEI` | Third-Party Discount Contract | `TAJGS_WRIB_KEI_NO`, `TAJGS_WRIB_KEI_CNC_YMD` (contract completion date), `TAJGS_WRIB_KEI_DSL_YMD` (contract cancellation date), `KDDI_JGS_KEI_KANRI_NO`, `UPD_DTM`, `GENE_ADD_DTM` |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch: chkMain | `JBSbatKKSmtvlMskmInfoTrkm.chkMain()` -> `chkDsl(workMap)` | `selectSvcKeiByKddiValCd [R] KK_T_SVC_KEI`, `selectTajgsWribKeiByValCd [R] KK_T_TAJGS_WRIB_KEI` |

**Notes:**
- The direct caller is `chkMain()` within the same class `JBSbatKKSmtvlMskmInfoTrkm`, which is a batch processing method (the class name prefix `JBSbat` indicates a batch service component).
- This method is a private utility called by the batch cancellation entry point; it is not directly invoked by any screen.
- Terminal operations: `printDebugLog` (logging), `trim`/`substring` (string operations), `isNullSpace`/`isValidYmd` (validation).

## 6. Per-Branch Detail Blocks

**Block 1** — [VARIABLE DECLARATION] (L2667)

> Declares local working variables extracted from the third-party discount contract data.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tajgsWribKeiNo = ""` // Third-party carrier discount contract number (他事業者割引契約番号) |
| 2 | SET | `tajgsWribKeiUpdDtm = ""` // Update year-month-day time-seconds (更新年月日時分秒) |
| 3 | SET | `tajgsWribKeiGeneAddDtm = ""` // Creation registration year-month-day time-seconds (登録登録年月日時分秒) |
| 4 | SET | `kddiJgsKeiKanriNo = ""` // KDDI business contract management number (KDDI事業者契約管理番号) |

**Block 2** — [SERVICE CONTRACT EXISTENCE CHECK — Step 1: Retrieve service contract list] (L2682)

> Queries service contract records using the discount price group code from workMap. This is the first validation gate: the service contract MUST exist to proceed.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiList = new ArrayList<HashMap<String, Object>>()` // Initialize empty service contract list |
| 2 | EXEC | `kddiValcd = (String) workMap.get(WRIBPRC_GRP_CD = "wribprc_grp_cd")` // Get discount price group code from workMap |
| 3 | EXEC | `svcKeiList = selectSvcKeiByKddiValCd(kddiValcd.trim())` // [CALL] Query service contracts by KDDI billing group code → KK_T_SVC_KEI table |

**Block 3** — [IF] Service contract list is null or empty (svcKeiList == null or svcKeiList.size() == 0) (L2685)

> If no service contracts were found for the given discount price group code, this is a fatal error. The customer has no active service line to cancel.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `commonItem.getLogPrint().printDebugLog("照合チェックエラー（解約）「割引料金グループ番号でサービス契約情報が取得できませんでした」")` // Validation check error (cancellation) "Cannot retrieve service contract information with the discount price group number" |
| 2 | SET | `workMap.put(ERR_CD = "err_cd", ERR_CD_E03 = "E03")` // Set general error code: E03 = service contract not found |
| 3 | SET | `workMap.put(KDDI_ERR_CD = "kddi_err_cd", KDDI_ERR_CD_205 = "205")` // Set KDDI-specific error code: 205 = contract not found |
| 4 | RETURN | `return false` // Abandon cancellation processing |

**Block 4** — [FOR LOOP] Iterate over service contract list (L2690)

> For each service contract in the list, applies a rule engine to determine the service type and extracts the relevant service contract number into workMap. This handles both broadband (eo HIKARI) and telephone (eo HIKARI Telephone) service lines that may coexist under the same discount group.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiMap` for each element in `svcKeiList` // Iterate over each service contract |
| 2 | CALL | `ruleResult = executeRULE0086001(svcKeiMap)` // [CALL] Execute rule engine RULE0086001 to classify service type |
| 3 | SET | `aplySvcKei = (String) ruleResult.get("APLY_SVC_KEI")` // Get classified service type code from rule result |

**Block 5** — [IF] Service type is "01" (APLY_SVC_KEI_EOHNT = "01" — eo HIKARI Home Noodle / Fiber Broadband) (L2697)

> The rule engine classified this as fiber broadband service. Extract the SYSID and service contract number, storing the contract number under the `svc_kei_no_net` key in workMap.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workMap.put(SYSID = "SYSID", (String) svcKeiMap.get(JBSbatKK_T_SVC_KEI.SYSID = "SYSID"))` // Store system ID |
| 2 | SET | `workMap.put(SVC_KEI_NO_NET = "svc_kei_no_net", (String) svcKeiMap.get(JBSbatKK_T_SVC_KEI.SVC_KEI_NO = "SVC_KEI_NO"))` // Store fiber broadband service contract number |

**Block 6** — [ELSE-IF] Service type is "02" (APLY_SVC_KEI_EOHTL = "02" — eo HIKARI Telephone) (L2702)

> The rule engine classified this as telephone service. Extract the service contract number, storing it under the `svc_kei_no_tel` key in workMap.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workMap.put(SVC_KEI_NO_TEL = "svc_kei_no_tel", (String) svcKeiMap.get(JBSbatKK_T_SVC_KEI.SVC_KEI_NO = "SVC_KEI_NO"))` // Store phone service contract number |

**Block 7** — [IF] Either service contract number is null or blank (isNullSpace(SVC_KEI_NO_NET) || isNullSpace(SVC_KEI_NO_TEL)) (L2709)

> After iterating all service contracts, at least one valid service contract number (either broadband or telephone) must be present. If neither was found (or all were of an unrecognized type), this indicates a data inconsistency — the service contract records exist but are not of a recognized DSL-related type.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `commonItem.getLogPrint().printDebugLog("照合チェックエラー（解約）「割引料金グループ番号でサービス契約情報が取得できませんでした（データ矛盾）」")` // Validation check error (cancellation) "Cannot retrieve service contract information with discount price group number (data inconsistency)" |
| 2 | SET | `workMap.put(ERR_CD = "err_cd", ERR_CD_E03 = "E03")` // Set error code: service contract not found |
| 3 | SET | `workMap.put(KDDI_ERR_CD = "kddi_err_cd", KDDI_ERR_CD_205 = "205")` // Set KDDI error code: contract not found |
| 4 | RETURN | `return false` // Abandon cancellation processing |

**Block 8** — [THIRD-PARTY DISCOUNT CONTRACT CHECK — Step 1: Retrieve discount contract list] (L2717)

> Queries the third-party carrier discount contract table using the same discount price group code. This contract represents a binding agreement between the carrier and a third-party provider that provides discounts to the customer.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tajgsWribKeiList = new ArrayList<HashMap<String, Object>>()` // Initialize empty discount contract list |
| 2 | CALL | `tajgsWribKeiList = selectTajgsWribKeiByValCd((String) workMap.get(WRIBPRC_GRP_CD = "wribprc_grp_cd"))` // [CALL] Query third-party discount contracts → KK_T_TAJGS_WRIB_KEI table |

**Block 9** — [IF] Discount contract list is null or empty (tajgsWribKeiList != null && tajgsWribKeiList.size() > 0 evaluates to false) (L2719)

> No third-party discount contract exists for this service. This is unexpected — the discount management information should exist for DSL cancellation processing.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `commonItem.getLogPrint().printDebugLog("照合チェックエラー（解約）「他事業者割引契約が存在しない」")` // Validation check error (cancellation) "Other carrier discount contract does not exist" |
| 2 | SET | `workMap.put(ERR_CD = "err_cd", ERR_CD_E13 = "E13")` // Set error code: discount contract not found |
| 3 | SET | `workMap.put(KDDI_ERR_CD = "kddi_err_cd", KDDI_ERR_CD_208 = "208")` // Set KDDI error code: third-party contract error |
| 4 | RETURN | `return false` // Abandon cancellation processing |

**Block 10** — [ELSE] Discount contract list has records (L2719 else branch)

> A third-party discount contract was found. Extract the first record and perform detailed status validation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tajgsWribKeiMap = tajgsWribKeiList.get(0)` // Get the first discount contract record |

**Block 10.1** — [IF] Contract completion date is NOT valid YMD (!isValidYmd(CNC_YMD)) (L2727)

> Validates that the third-party discount contract has been formally completed (結済). The contract completion date (`TAJGS_WRIB_KEI_CNC_YMD`) must be set — if it is not, the discount contract is still in an incomplete/pendng state, and cancellation cannot proceed.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `isValidYmd((String) tajgsWribKeiMap.get(JBSbatKK_T_TAJGS_WRIB_KEI.TAJGS_WRIB_KEI_CNC_YMD = "TAJGS_WRIB_KEI_CNC_YMD"))` // Check if contract completion date is valid |
| 2 | EXEC | `commonItem.getLogPrint().printDebugLog("照合チェックエラー（解約）「スマートバリュー締結済チェック」")` // Validation check error (cancellation) "Smart Balance completion check" |
| 3 | SET | `workMap.put(ERR_CD = "err_cd", ERR_CD_E13 = "E13")` // Set error code: discount contract not found |
| 4 | SET | `workMap.put(KDDI_ERR_CD = "kddi_err_cd", KDDI_ERR_CD_208 = "208")` // Set KDDI error code: third-party contract error |
| 5 | RETURN | `return false` // Abandon cancellation processing |

**Block 10.2** — [IF] Contract cancellation date IS valid YMD (isValidYmd(DSL_YMD)) (L2737)

> Validates that the third-party discount contract has NOT been cancelled. If the cancellation date (`TAJGS_WRIB_KEI_DSL_YMD`) is already set, the discount has already been terminated, meaning the smart balance (割引管理情報) is in a cancelled state. Cancellation of the DSL line cannot proceed with a cancelled discount.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `isValidYmd((String) tajgsWribKeiMap.get(JBSbatKK_T_TAJGS_WRIB_KEI.TAJGS_WRIB_KEI_DSL_YMD = "TAJGS_WRIB_KEI_DSL_YMD"))` // Check if contract cancellation date is valid |
| 2 | EXEC | `commonItem.getLogPrint().printDebugLog("照合チェックエラー（解約）「スマートバリュー未解約チェック」")` // Validation check error (cancellation) "Smart Balance uncancelled check" |
| 3 | SET | `workMap.put(ERR_CD = "err_cd", ERR_CD_E14 = "E14")` // Set error code: discount already cancelled |
| 4 | SET | `workMap.put(KDDI_ERR_CD = "kddi_err_cd", KDDI_ERR_CD_208 = "208")` // Set KDDI error code: third-party contract error |
| 5 | RETURN | `return false` // Abandon cancellation processing |

**Block 10.3** — [KDDI Business Contract Management Number Comparison] (L2747, ANK-1272-00-00 ADD)

> Compares the KDDI business contract management number from the discount contract record against the one in the work map. This ensures the discount contract belongs to the same business entity as the cancellation request.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kddiJgsKeiKanriNo = (String) tajgsWribKeiMap.get(JBSbatKK_T_TAJGS_WRIB_KEI.KDDI_JGS_KEI_KANRI_NO = "KDDI_JGS_KEI_KANRI_NO")` // [SET] Get KDDI business contract management number from discount contract |
| 2 | SET | `inJgsKeiKanriNo = (String) workMap.get(JIGYOSHA_KEI_KNRI_NO = "jigyosha_kei_knri_no")` // [SET] Get business contract management number from work map |
| 3 | SET | `workJgsKeiKanriNo = inJgsKeiKanriNo.substring(0, 10)` // [SET] Truncate to 10 characters from the left |
| 4 | EXEC | `workJgsKeiKanriNo.equals(kddiJgsKeiKanriNo)` // [EXEC] Compare the truncated work map value against the discount contract value |

**Block 10.3.1** — [IF] Management numbers DO NOT match (!workJgsKeiKanriNo.equals(kddiJgsKeiKanriNo)) (L2754)

> The KDDI-side contract management number on the discount record does not match the one in the work map. This indicates the discount contract and the cancellation request belong to different business entities — a mismatch that prevents cancellation.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `commonItem.getLogPrint().printDebugLog("照合チェックエラー（解約）「割引管理情報存在チェック」")` // Validation check error (cancellation) "Discount management info existence check" |
| 2 | SET | `workMap.put(ERR_CD = "err_cd", ERR_CD_E15 = "E15")` // Set error code: discount management mismatch |
| 3 | SET | `workMap.put(KDDI_ERR_CD = "kddi_err_cd", KDDI_ERR_CD_999 = "999")` // Set KDDI error code: generic error |
| 4 | RETURN | `return false` // Abandon cancellation processing |

**Block 10.4** — [Field Extraction from Discount Contract] (L2767)

> After all validations pass, extract the key fields from the third-party discount contract record for downstream use.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tajgsWribKeiNo = (String) tajgsWribKeiMap.get(JBSbatKK_T_TAJGS_WRIB_KEI.TAJGS_WRIB_KEI_NO = "TAJGS_WRIB_KEI_NO")` // Third-party discount contract number |
| 2 | SET | `tajgsWribKeiUpdDtm = (String) tajgsWribKeiMap.get(JBSbatKK_T_TAJGS_WRIB_KEI.UPD_DTM = "UPD_DTM")` // Last update timestamp |
| 3 | SET | `tajgsWribKeiGeneAddDtm = (String) tajgsWribKeiMap.get(JBSbatKK_T_TAJGS_WRIB_KEI.GENE_ADD_DTM = "GENE_ADD_DTM")` // Contract creation timestamp |

**Block 11** — [SUCCESS — Populate workMap and return] (L2782)

> All validation checks passed. Populate the workMap with the extracted third-party discount contract fields for use by subsequent cancellation processing steps.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workMap.put(TAJGS_WRIB_KEI_NO = "tajgs_wrib_kei_no", tajgsWribKeiNo)` // [SET] Store third-party discount contract number into workMap |
| 2 | SET | `workMap.put(TAJGS_WRIB_KEI_UPD_DTM = "tajgs_wrib_kei_upd_dtm", tajgsWribKeiUpdDtm)` // [SET] Store update timestamp |
| 3 | SET | `workMap.put(KDDI_JGS_KEI_KANRI_NO = "kddi_jgs_kei_kanri_no", kddiJgsKeiKanriNo)` // [SET] Store KDDI business contract management number |
| 4 | SET | `workMap.put(TAJGS_WRIB_KEI_GENE_ADD_DTM = "tajgs_wrib_kei_gene_add_dtm", tajgsWribKeiGeneAddDtm)` // [SET] Store creation timestamp |
| 5 | RETURN | `return true` // All checks passed — cancellation may proceed |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `chkDsl` | Method | DSL cancellation pre-check method — validates all preconditions before cancelling a fiber broadband line |
| `wribprc_grp_cd` | Field | Wriburing (WariBiki = discount) Price Group Code — KDDI's internal billing group identifier used to link service contracts with third-party discount agreements |
| `svc_kei_no_net` | Field | Service contract number for eo HIKARI Noodle (NET) — the fiber broadband service line |
| `svc_kei_no_tel` | Field | Service contract number for eo HIKARI Telephone (TEL) — the voice telephone service line |
| `tajgs_wrib_kei_no` | Field | Tajishisha (Other Carrier) Wriburing (Discount) Keiyaku (Contract) No. — the third-party carrier discount contract number |
| `kddi_jgs_kei_kanri_no` | Field | KDDI Shigyosha (Business) Keiyaku (Contract) Kanri (Management) No. — the KDDI-side business contract management identifier |
| `jigyosha_kei_knri_no` | Field | Shigyosha (Business) Keiyaku (Contract) Kanri (Management) No. — business contract management number from the work map input |
| `ERR_CD` | Field | Error Code — the general error code key in the workMap |
| `KDDI_ERR_CD` | Field | KDDI-specific error code key in the workMap |
| E03 | Error Code | Service contract not found for the given discount price group code |
| E13 | Error Code | Third-party discount contract does not exist or is incomplete (contract completion date not set) |
| E14 | Error Code | Third-party discount contract has already been cancelled (cancellation date is set) |
| E15 | Error Code | Discount management information mismatch — KDDI business contract number on the discount record does not match the work map |
| 205 | KDDI Error | Contract information not found |
| 208 | KDDI Error | Third-party carrier discount contract error |
| 999 | KDDI Error | Generic KDDI-side error (used for management number mismatch) |
| APLY_SVC_KEI_EOHNT = "01" | Constant | Service type code for eo HIKARI Home Noodle — fiber-to-the-home broadband service |
| APLY_SVC_KEI_EOHTL = "02" | Constant | Service type code for eo HIKARI Telephone — voice telephone service |
| `KK_T_SVC_KEI` | DB Table | Service Contract table — stores active service contract records including broadband and telephone lines |
| `KK_T_TAJGS_WRIB_KEI` | DB Table | Third-Party Carrier Discount Contract table — stores discount agreements between KDDI and third-party providers |
| `TAJGS_WRIB_KEI_CNC_YMD` | Field | Third-party discount contract completion date — when the discount contract was formally completed (tied up) |
| `TAJGS_WRIB_KEI_DSL_YMD` | Field | Third-party discount contract cancellation date — when the discount contract was cancelled |
| `RULE0086001` | Rule Engine | Business rule that classifies a service contract into a service type code (EOHNT, EOHTL, etc.) based on pricing group, cost code, plan code, and service status |
| Smart Balance | Business term | A discount management program — a promotional pricing arrangement that reduces monthly service charges for customers bundled with third-party services |
| DSL | Business term | Digital Subscriber Line — in this context, refers to eo HIKARI fiber broadband service |
| `commonItem` | Instance Field | Common batch item containing framework-level utilities including debug logging and database access configuration |
| `opeDate` | Instance Field | Operating date — the batch processing date used as a parameter in database queries |