# Business Logic — JBSbatKKKnytcsTrgtCst.outPutKktkSvcKei() [573 LOC]

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

## 1. Role

### JBSbatKKKnytcsTrgtCst.outPutKktkSvcKei()

This method is the core service contract detail output orchestrator for the device-provisioning service contract batch process. It retrieves device-provisioning service contract records (`KK_T_KKTK_SVC_KEI` table) through three parallel SQL queries, merges the results into a single search result list, and then applies a complex set of conditional output rules to determine which contract notification letters (契約書面通知書) should be produced for each customer.

The method handles three distinct query paths: (1) a base device-provisioning service contract skema search (KK_SELECT_220), (2) a PLC/STB (PCL/Remote Control, Optical Stick) supplementary query (KK_SELECT_229), and (3) an optional STB-only query (KK_SELECT_236) that executes only when the application type code is `"00022"` (Equipment Contract Change Application / 機器契約変更申込). Each query retrieves contract records with varying field granularity — the STB-only query omits certain fields like `TELNO_JUN` and `KEI_CNT` to avoid data duplication for STB-specific scenarios.

After collecting all search results into `serchResultList_KktkSvcKei`, the method iterates through each record and evaluates the `MNGN_DSP_JKN_KSITEI_CD` (Display Condition Individual Designation Code) to decide whether to output the record. The output determination logic branches into six major paths: NULL condition (general output), guarantee-related conditions (Xperia/ARROWS/LAVIE, MediaPad, EO Shopping Mall Point Prize), phone option column SDSL language, initial contract cancellation (once-only per batch), and dedicated tablet/TH (Television/Display Home?) language output control flags.

The method uses a routing/dispatch design pattern — it collects data from multiple SQL sources into a unified intermediate list, then dispatches each record through a decision tree based on business classification codes. Its role in the larger system is as the output-generation gateway for the batch processing pipeline, transforming raw database rows into the filtered, classified, and flagged output records consumed by downstream letter generation and file export processes.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["outPutKktkSvcKei(inMap, outputBean, svcMapList, tvDspMap, svcInfoMap)"])

    INIT["Initialize: serchResultList_KktkSvcKei, sqlBefore, mskmSbtCd, svcKeiKaisenUcwkNo, svcKeiList, outPutZumi flags"]

    Q1["Query 220: Device Provision Service Contract Skema Search"]
    EDIT1["Edit SQL: Bind variable addition with getEditSQL"]
    BIND1["Bind variables: svc_kei_no, ope_date, kaisen_ucwk_no, famipaKeiUm, mskmSbtCd"]
    EXE1["executeKK_T_KKTK_SVC_KEI_KK_SELECT_220(kktkSvcKei, svcKeiList)"]
    LOOP1["while dbKktkSvcKei != null"]
    MAP1["Create resultMap: KYTCS_NO, DSP_MNGN_CD, DSP_PST_SKCD, TELNO_JUN, TV_DSP_NO, MNGN_DSP_JKN_KSITEI_CD, KIKI_HUKA_INFO_CD, KKTK_SVC_KEI_NO, PLAN_CHRG_STAYMD"]
    CHK1["isTvDspMap tvDspMap filter"]
    ADD1["Add resultMap to serchResultList_KktkSvcKei"]
    NEXT1["dbKktkSvcKei = selectNext()"]

    Q2["Query 229: PLC/STB Supplementary Query"]
    EXE2["executeKK_T_KKTK_SVC_KEI_KK_SELECT_229(kktkSvcKei_Plc, svcKeiList)"]
    LOOP2["while dbInfKktkSvcKei_Plc != null"]
    MAP2["Create resultMap: KYTCS_NO, DSP_MNGN_CD, DSP_PST_SKCD, TELNO_JUN, TV_DSP_NO, KEI_CNT, MNGN_DSP_JKN_KSITEI_CD, KIKI_HUKA_INFO_CD"]
    ADD2["Add resultMap to serchResultList_KktkSvcKei"]
    NEXT2["dbInfKktkSvcKei_Plc = selectNext()"]

    Q3CHK["mskmSbtCd = 00022 (Equipment Contract Change)?"]
    Q3["Query 236: STB Supplementary Query"]
    EXE3["executeKK_T_KKTK_SVC_KEI_KK_SELECT_236(kktkSvcKeiStb, svcKeiList)"]
    LOOP3["while dbInfKktkSvcKeiStb != null"]
    MAP3["Create resultMap: KYTCS_NO, DSP_MNGN_CD, DSP_PST_SKCD, TV_DSP_NO, MNGN_DSP_JKN_KSITEI_CD, KIKI_HUKA_INFO_CD"]
    CHK3["isTvDspMap tvDspMap filter"]
    ADD3["Add resultMap to serchResultList_KktkSvcKei"]
    NEXT3["dbInfKktkSvcKeiStb = selectNext()"]

    LOOP4["for each resultMap in serchResultList_KktkSvcKei"]
    OUTMAP["Create outmap: KYTCS_NO, DSP_MNGN_CD, DSP_PST_SKCD, TELNO_JUN, TV_DSP_NO, KEI_CNT"]
    COND1["isOutPutTgDspPstSkcd dsp_pst_skcd match"]
    COND2["isNullBlank MNGN_DSP_JKN_KSITEI_CD"]
    OUTFLG1["setOutFlg true - Output: NULL condition"]

    COND3["MNGN_DSP_JKN_KSITEI_CD in 012/013/024"]
    COND4["isTnmtHosyouUmu kktk_svc_kei_no"]
    COND5["isTkyKkn PLAN_CHRG_STAYMD"]
    COND6["isOutPutkikiHukaInfoCdAnsin kiki_huka_info_cd"]
    OUTFLG2["setOutFlg true - Guarantee Xperia/ARROWS/LAVIE"]

    COND7["isOutPutkikiHukaInfoCdAnsinMediaPad kiki_huka_info_cd"]
    OUTFLG3["setOutFlg true - Guarantee MediaPad"]

    COND8["isOutPutAnsin/AnsinMediaPad AND !tnmtHosyou"]
    OUTFLG4["setOutFlg true - EO Shopping Mall Point Prize"]

    COND9["MNGN_DSP_JKN_KSITEI_CD = 016"]
    COND10["isNullBlank svcInfoMap net opt code CD00130_01"]
    OUTFLG5["setOutFlg true - SDSL language phone option"]

    COND11["MNGN_DSP_JKN_KSITEI_CD = 020"]
    COND12["!outPutZumiFlg"]
    OUTFLG6["setOutFlg true + TV_DSP_NO=1 - Initial contract cancellation"]

    COND13["MNGN_DSP_JKN_KSITEI_CD = 027"]
    COND14["!outPutZumiFlgTab"]
    OUTFLG7["setOutFlg true - Tablet language control"]

    COND15["MNGN_DSP_JKN_KSITEI_CD = 028"]
    COND16["!outPutZumiFlgGh"]
    OUTFLG8["setOutFlg true - TH language control"]

    ADDOUT["outputBean.addOutMapList outmap"]
    CREATELOG["createLog kynotcs_no, dsp_mngn_cd, dsp_pst_skcd, excludedMsg"]
    END(["Return void / Next"])

    START --> INIT --> Q1 --> EDIT1 --> BIND1 --> EXE1 --> LOOP1
    LOOP1 --> MAP1 --> CHK1
    CHK1 -- true --> ADD1 --> NEXT1 --> LOOP1
    CHK1 -- false --> NEXT1 --> LOOP1
    LOOP1 -- done --> Q2 --> EDIT1 --> BIND1 --> EXE2 --> LOOP2
    LOOP2 --> MAP2 --> ADD2 --> NEXT2 --> LOOP2
    LOOP2 -- done --> Q3CHK
    EXE2 --> EDIT1

    Q3CHK -- true --> Q3 --> EXE3 --> LOOP3
    Q3 -- done --> LOOP4
    LOOP3 --> MAP3 --> CHK3
    CHK3 -- true --> ADD3 --> NEXT3 --> LOOP3
    CHK3 -- false --> NEXT3 --> LOOP3
    LOOP3 -- done --> LOOP4
    Q3CHK -- false --> LOOP4

    LOOP4 --> OUTMAP --> COND1
    COND1 -- true --> COND2
    COND2 -- true --> OUTFLG1 --> ADDOUT
    COND2 -- false --> END
    OUTFLG1 --> END

    COND1 -- true --> COND3
    COND3 -- true --> COND4 --> COND5
    COND5 -- true --> COND6
    COND6 -- true --> OUTFLG2 --> ADDOUT
    COND6 -- false --> END
    COND5 -- false --> END

    COND4 -- false --> END
    COND3 -- true --> COND7
    COND7 -- true --> OUTFLG3 --> ADDOUT
    COND7 -- false --> COND8
    COND8 -- true --> OUTFLG4 --> ADDOUT
    COND8 -- false --> COND9

    COND9 -- true --> COND10
    COND10 -- true --> OUTFLG5 --> ADDOUT
    COND10 -- false --> COND11
    COND9 -- false --> COND11
    COND11 -- true --> COND12
    COND12 -- true --> OUTFLG6 --> ADDOUT
    COND12 -- false --> COND13
    COND11 -- false --> COND13
    COND13 -- true --> COND14
    COND14 -- true --> OUTFLG7 --> ADDOUT
    COND14 -- false --> COND15
    COND13 -- false --> COND15
    COND15 -- true --> COND16
    COND16 -- true --> OUTFLG8 --> ADDOUT
    COND16 -- false --> END
    OUTFLG2 --> END
    OUTFLG3 --> END
    OUTFLG4 --> END
    ADDOUT --> END
```

**Processing flow overview:**

1. **Initialization**: The method initializes an empty search result list (`serchResultList_KktkSvcKei`), retrieves the submission type code (`mskmSbtCd`) and service contract line item detail number (`svcKeiKaisenUcwkNo`) from `inMap`, and extracts the list of service contract numbers (`svcKeiList`). Three "already-output" flags are initialized to `false` to support one-time-only output control.

2. **Query 220 (Base Device Provision Search)**: The method retrieves SQL template `KK_SELECT_220`, edits it to add bind variables for the service contract numbers via `getEditSQL`, sets additional bind variables (including `famipaKeiUm` for Famipack contract presence), and executes the query. Results are iterated, filtered by `isTvDspMap` (TV display position presence check), and added to the search result list.

3. **Conditional STB exclusion**: If `mskmSbtCd` equals `"00022"` (Equipment Contract Change Application), the method modifies the Query 220 SQL to also exclude STB service code `'C009'` alongside the already-excluded PCL (`'C015'`) and Optical Stick (`'C023'`) codes.

4. **Query 229 (PLC/STB Supplementary)**: A second query retrieves PLC/STB-specific service contract records. Results are always added to the search result list (no `isTvDspMap` filtering), providing contract count (`KEI_CNT`) and other supplementary data.

5. **Query 236 (STB Supplementary, conditional)**: If `mskmSbtCd` equals `"00022"`, a third query retrieves STB-specific records. These are also filtered by `isTvDspMap` before being added.

6. **Output determination loop**: For each collected record, the method evaluates a cascade of conditional branches based on `MNGN_DSP_JKN_KSITEI_CD` to determine whether the record should be output and with what classification. Records not matching any output condition are logged via `createLog` as excluded.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `inMap` | `JBSbatServiceInterfaceMap` | The batch input parameter map containing key business data such as the application type code (`mskm_sbt_cd`), service contract line item detail number (`svc_kei_kaisen_ucwk_no`), and contract notification document number (`knytcs_no`). Drives which SQL queries and exclusion rules are applied. |
| 2 | `outputBean` | `JBSbatOutputItem` | The output collection container. Each record that passes the output determination logic is added to this bean's output map list via `addOutMapList`. This is the downstream consumer of the processed results. |
| 3 | `svcMapList` | `ArrayList<HashMap<String, String>>` | The service contract list — a collection of service contract detail records from which the method extracts the list of service contract numbers (`svc_kei_no`) used as bind variables in the SQL queries. |
| 4 | `tvDspMap` | `HashMap<String, String>` | TV display position map — maps service contract line item numbers to TV display position numbers. Used to filter records: only records with a matching TV display position in this map are retained from Query 220 and Query 236 results. |
| 5 | `svcInfoMap` | `HashMap<String, String>` | Service information map containing supplementary service metadata, notably the net optical code (`CD00130_01`) used in the phone option column SDSL language output condition. |

**Instance fields read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `db_KK_T_KKTK_SVC_KEI` | `JBSbatSQLAccess` | Database access layer for the `KK_T_KKTK_SVC_KEI` (Device Provision Service Contract) table. Used to retrieve, edit, and execute SQL templates. |
| `famipaKeiUm` | `String` | Famipack contract presence flag — populated during batch initialization, used as a bind variable in Query 220 to filter by Famipack status. |
| `super.opeDate` | `String` | Operation date — the batch processing date used as a parameter in SQL bind variables (applied date, contract content notice display language application start/end date). |
| `super.logPrint` | Log printer | Debug logging utility used throughout the method for logging output determinations and excluded records. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `db_KK_T_KKTK_SVC_KEI.getSql` | KKSELECT | KK_T_KKTK_SVC_KEI | Retrieves SQL template `KK_SELECT_220` (Query 220 base SQL) |
| R | `db_KK_T_KKTK_SVC_KEI.getSql` | KKSELECT | KK_T_KKTK_SVC_KEI | Retrieves SQL template `KK_SELECT_229` (PLC/STB supplementary query SQL) |
| R | `db_KK_T_KKTK_SVC_KEI.getSql` | KKSELECT | KK_T_KKTK_SVC_KEI | Retrieves SQL template `KK_SELECT_236` (STB supplementary query SQL) |
| R | `JBSbatKKKnytcsTrgtCst.getMapForList` | KKGETMAP | - | Extracts service contract numbers from `svcMapList` by `svc_kei_no` key for use as SQL bind variables |
| R | `JBSbatKKKnytcsTrgtCst.getEditSQL` | KKEDITSQL | - | Edits SQL template by replacing placeholder `SVC_KEI_NO IN (\?)` with actual service contract number bind list |
| R | `JBSbatCommonDBInterface.getString` | KKGETSTR | KK_T_KKTK_SVC_KEI | Retrieves field values from query result set: `knytcs_no`, `dsp_mngn_cd`, `dsp_pst_skcd`, `telno_jun`, `svc_kei_ucwk_no`, `mngn_dsp_jkn_ksitei_cd`, `kiki_huka_info_cd`, `kktk_svc_kei_no`, `plan_chrg_staymd` |
| C | `JBSbatOutputItem.addOutMapList` | KKADDTO | - | Adds output-ready record (with `outFlg=true`) to the output bean's result list |
| C | `JBSbatKKKnytcsTrgtCst.createLog` | KKLOG | - | Logs excluded records with notification document number, display language code, display position code, and exclusion reason |
| - | `JBSbatKKKnytcsTrgtCst.executeKK_T_KKTK_SVC_KEI_KK_SELECT_220` | KK220 | KK_T_KKTK_SVC_KEI | Executes the base device-provisioning service contract skema query with bind variables |
| - | `JBSbatKKKnytcsTrgtCst.executeKK_T_KKTK_SVC_KEI_KK_SELECT_229` | KK229 | KK_T_KKTK_SVC_KEI | Executes the PLC/STB supplementary query |
| - | `JBSbatKKKnytcsTrgtCst.executeKK_T_KKTK_SVC_KEI_KK_SELECT_236` | KK236 | KK_T_KKTK_SVC_KEI | Executes the STB supplementary query (conditional on `mskmSbtCd = "00022"`) |
| - | `JBSbatKKKnytcsTrgtCst.isOutPutTgDspPstSkcd` | KKISPST | - | Checks if a display position code matches the target output display position codes list |
| - | `JBSbatKKKnytcsTrgtCst.isTvDspMap` | KKISDTV | - | Checks if a service contract line item number + display position code combination exists in the TV display position map |
| - | `JBSbatKKKnytcsTrgtCst.isTnmtHosyouUmu` | KKISTNH | - | Checks if a device-provisioning service contract status matches active guarantee statuses (completed, reserved, in-progress, paused, stop) |
| - | `JBSbatKKKnytcsTrgtCst.isTkyKkn` | KKISTKY | - | Checks if the plan change stay month date (`plan_chrg_staymd`) is not null/blank, indicating plan change status |
| - | `JBSbatKKKnytcsTrgtCst.isOutPutkikiHukaInfoCdAnsin` | KKISANSEN | - | Checks if `kiki_huka_info_cd` is in the guarantee device list (Xperia/ARROWS/LAVIE: codes 066-069, 076-077, 900-901) |
| - | `JBSbatKKKnytcsTrgtCst.isOutPutkikiHukaInfoCdAnsinMediaPad` | KKISANSM | - | Checks if `kiki_huka_info_cd` is in the MediaPad guarantee device list (codes 074-075) |
| - | `JACBatCommon.printDebugLog` | JACLOG | - | Utility logging for debug messages |
| - | `JACbatDebugLogUtil.printDebugLog` | JACLOG | - | Utility logging for debug messages |
| - | `JCKLcsRenkeiUtil.printDebugLog` | JACLOG | - | Utility logging for debug messages |
| - | `JKKBatClarisAuthCrdt.isNullBlank` | JKKNULBL | - | Null/blank check utility (not directly called in this method's active code path) |
| - | `JKKHttpCommunicator.printDebugLog` | JACLOG | - | Utility logging for debug messages |
| - | `JBSbatACEoElectPrcInfoTrkm.isNullBlank` | JACNULBL | - | Null/blank check utility |
| - | `JBSbatACIcjknTrkmRsltHenshu.setOutFlg` | JACSET | - | Sets output flag on intermediate result |
| - | `JBSbatACTelnoGuideUseChrgInfoTrkmDataMake.setOutFlg` | JACSET | - | Sets output flag on telephone guide charge info |
| - | `JBSbatACTrgtSvcKeiMake.isNullBlank` | JACNULBL | - | Null/blank check utility |
| - | `JBSbatCHKssaidkCvsNkinInfoAdd.isNullBlank` | JACNULBL | - | Null/blank check utility |
| - | `JBSbatCHMakeEoElecKyseKiykList.isNullBlank` | JACNULBL | - | Null/blank check utility |
| - | `JBSbatKKCashPostAddMail.printDebugLog` | JACLOG | - | Utility logging for debug messages |
| - | `JBSbatZMAdDataSet.getString` | JACGET | - | Gets string value from data set |
| - | `JEKK0081C310TPMA.setString` | JKKECHO | - | Sets string value in echo parameter map |
| - | `JESC0101B010TPMA.getString` | JACGET | - | Gets string value from service parameter map |

**Key SC Codes:**
- `KK_SELECT_220` / `KK_SELECT_229` / `KK_SELECT_236` — SQL query templates for `KK_T_KKTK_SVC_KEI` table queries
- `KK_T_KKTK_SVC_KEI` — Database table: Device Provision Service Contract (機器提供サービス契約)

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 methods.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch: JBSbatKKKnytcsTrgtCst | `JBSbatKKKnytcsTrgtCst.execute()` -> `outPutKktkSvcKei()` | `getString [R] KK_T_KKTK_SVC_KEI`, `addOutMapList [C] -`, `createLog [C] -`, `setOutFlg [-] -`, `printDebugLog [-] -`, `setString [-] -` |

## 6. Per-Branch Detail Blocks

**Block 1** — INIT (Initial data acquisition) (L5819)

> Initializes all working variables and retrieves input data from the parameter map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `serchResultList_KktkSvcKei = new ArrayList<HashMap<String, String>>()` // Initialize search result list for merged output [-> "search result list for device provision service contract output"] |
| 2 | SET | `sqlBefore = db_KK_T_KKTK_SVC_KEI.getSql(KK_T_KKTK_SVC_KEI_KK_SELECT_220)` // Retrieve original SQL template [-> "KK_SELECT_220"] |
| 3 | SET | `sqlAfter = ""` // Placeholder for edited SQL |
| 4 | SET | `mskmSbtCd = inMap.getString(JBSbatKK_T_MSKM.MSKM_SBT_CD)` // Application type code [-> "Submission type code (申込種別コード)"] |
| 5 | SET | `svcKeiKaisenUcwkNo = inMap.getString(JBSbatKKIFM689.SVC_KEI_KAISEN_UCWK_NO)` // Service contract line item detail number [-> "Service contract line item detail number (サービス契約回線内訳番号)"] |
| 6 | SET | `svcKeiList = getMapForList(svcMapList, JBSbatKK_T_SVC_KEI_UCWK.SVC_KEI_NO)` // Extract service contract numbers [-> "Service contract number (サービス契約番号)"] |
| 7 | SET | `outPutZumiFlg = false` // Already-output flag [-> "Already-output flag (table)"] |
| 8 | SET | `outPutZumiFlgTab = false` // Already-output flag (tablet) [-> "Already-output flag (table)"] |
| 9 | SET | `outPutZumiFlgGh = false` // Already-output flag (TH) [-> "Already-output flag (TH)"] |

**Block 2** — INIT (Data editing, no data editing — SQL edit preparation) (L5852)

> Prepares the SQL template by adding bind variable placeholders for the service contract number list.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sqlAfter = getEditSQL(svcKeiList, sqlBefore, EDIT_BF_SQL_SVC_KEI, EDIT_AF_SQL_SVC_KEI)` // Edit SQL to add bind variables for service contract numbers [-> "SVC_KEI_NO IN (\?) replacement"] |

**Block 3** — IF [mskmSbtCd = "00022"] (Conditional STB exclusion) (L5858)

> When the application type is "00022" (Equipment Contract Change Application / 機器契約変更申込), STB service code `'C009'` is also excluded alongside the default PCL (`'C015'`) and Optical Stick (`'C023'`) codes.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sqlAfter = sqlAfter.replaceAll("'C015', 'C023'", "'C015', 'C023', 'C009'")` // Add STB to exclusion list [-> MSKM_SBT_CD_00022 = "00022" (Equipment Contract Change Application)] |

**Block 4** — EXEC [Query 220] (L5866-L5899)

> Executes the base device-provisioning service contract skema search query.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `db_KK_T_KKTK_SVC_KEI.setSqlMap(KK_T_KKTK_SVC_KEI_KK_SELECT_220, sqlAfter)` // Set edited SQL |
| 2 | SET | `kktkSvcKei = new Object[]{"", super.opeDate, svcKeiKaisenUcwkNo, super.opeDate, famipaKeiUm, mskmSbtCd, super.opeDate, super.opeDate, super.opeDate}` // Bind variables: svc_kei_no, ope_date, kaisen_ucwk_no, ope_date, famipaKeiUm, mskmSbtCd, ope_date, ope_date, ope_date |
| 3 | CALL | `this.executeKK_T_KKTK_SVC_KEI_KK_SELECT_220(kktkSvcKei, svcKeiList)` // Execute Query 220 |
| 4 | EXEC | `db_KK_T_KKTK_SVC_KEI.setSqlMap(KK_T_KKTK_SVC_KEI_KK_SELECT_220, sqlBefore)` // Restore original SQL |

**Block 5** — WHILE [dbKktkSvcKei != null] (Query 220 result iteration) (L5906)

> Iterates through Query 220 results, creates result maps, and filters by TV display position.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dbKktkSvcKei = db_KK_T_KKTK_SVC_KEI.selectNext()` // Fetch first result row |
| 2 | SET | `resultMap = new HashMap<String, String>()` // Create result map |
| 3 | SET | `resultMap.put(KNYTCS_NO, inMap.getString(JBSbatKK_T_KNYTCS.KNYTCS_NO))` // Contract notification document number |
| 4 | SET | `resultMap.put(KNYTCS_DSP_MNGN_CD, dbKktkSvcKei.getString(JBSbatKK_M_KNYTCS_DSP_MNGN.KNYTCS_DSP_MNGN_CD))` // Contract content notice display language code |
| 5 | SET | `resultMap.put(DSP_PST_SKCD, dbKktkSvcKei.getString(JBSbatKK_M_KNYTCS_DSP_MNGN.DSP_PST_SKCD))` // Display position identification code |
| 6 | SET | `resultMap.put(TELNO_JUN, dbKktkSvcKei.getString(JBSbatKK_T_SVKEIUW_EOH_TEL.TELNO_JUN))` // Telephone number sequence number |
| 7 | SET | `resultMap.put(TV_DSP_NO, tvDspMap.get(dbKktkSvcKei.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_KEI_UCWK_NO)))` // TV display position number |
| 8 | SET | `resultMap.put(MNGN_DSP_JKN_KSITEI_CD, dbKktkSvcKei.getString(JBSbatKK_M_KNYTCS_DSP_MNGN.MNGN_DSP_JKN_KSITEI_CD))` // Display condition individual designation code |
| 9 | SET | `resultMap.put(KIKI_HUKA_INFO_CD, dbKktkSvcKei.getString(JBSbatKK_T_KKTK_SVC_KEI.KIKI_HUKA_INFO_CD))` // Device additional information code |
| 10 | SET | `resultMap.put(KKTK_SVC_KEI_NO, dbKktkSvcKei.getString(JBSbatKK_T_KKTK_SVC_KEI.KKTK_SVC_KEI_NO))` // Device provision service contract number [v27.00.01] |
| 11 | SET | `resultMap.put(PLAN_CHRG_STAYMD, dbKktkSvcKei.getString(JBSbatKK_T_KKTK_SVC_KEI.PLAN_CHRG_STAYMD))` // Plan charge stay month [v29.00.03] |
| 12 | CALL | `isTvDspMap(tvDspMap, svc_kei_ucwk_no, dsp_pst_skcd)` // Check TV display position match |

**Block 5.1** — IF [isTvDspMap returns true] (L5967)

> When the TV display position map contains this record's combination, add it to the search result list.

| # | Type | Code |
|---|------|------|
| 1 | SET | `serchResultList_KktkSvcKei.add(resultMap)` // Add to merged search results |

**Block 5.2** — SET [Fetch next row] (L5975)

| # | Type | Code |
|---|------|------|
| 1 | SET | `dbKktkSvcKei = db_KK_T_KKTK_SVC_KEI.selectNext()` // Fetch next row, or null to exit loop |

**Block 6** — INIT (Query 229 preparation) (L5978)

> Prepares and executes the PLC/STB supplementary query. Note that SQL editing and bind variable setting reuse the same logic from Block 2-4.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sqlBefore = db_KK_T_KKTK_SVC_KEI.getSql(KK_T_KKTK_SVC_KEI_KK_SELECT_229)` // Retrieve SQL template [-> "KK_SELECT_229"] |
| 2 | SET | `sqlAfter = getEditSQL(svcKeiList, sqlBefore, EDIT_BF_SQL_SVC_KEI, EDIT_AF_SQL_SVC_KEI)` // Edit SQL |
| 3 | EXEC | `db_KK_T_KKTK_SVC_KEI.setSqlMap(KK_T_KKTK_SVC_KEI_KK_SELECT_229, sqlAfter)` |
| 4 | SET | `kktkSvcKei_Plc = new Object[]{"", super.opeDate, mskmSbtCd, super.opeDate, super.opeDate, super.opeDate}` // Bind variables (no kaisen_ucwk_no or famipaKeiUm) |
| 5 | CALL | `this.executeKK_T_KKTK_SVC_KEI_KK_SELECT_229(kktkSvcKei_Plc, svcKeiList)` |
| 6 | EXEC | `db_KK_T_KKTK_SVC_KEI.setSqlMap(KK_T_KKTK_SVC_KEI_KK_SELECT_229, sqlBefore)` // Restore |

**Block 7** — WHILE [dbInfKktkSvcKei_Plc != null] (Query 229 result iteration) (L6016)

> Iterates through Query 229 results. Unlike Query 220, all results are added without TV display position filtering.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dbInfKktkSvcKei_Plc = db_KK_T_KKTK_SVC_KEI.selectNext()` |
| 2 | SET | `resultMap = new HashMap<String, String>()` |
| 3 | SET | `resultMap.put(KNYTCS_NO, inMap.getString(JBSbatKK_T_KNYTCS.KNYTCS_NO))` |
| 4 | SET | `resultMap.put(KNYTCS_DSP_MNGN_CD, dbInfKktkSvcKei_Plc.getString(JBSbatKK_M_KNYTCS_DSP_MNGN.KNYTCS_DSP_MNGN_CD))` |
| 5 | SET | `resultMap.put(DSP_PST_SKCD, dbInfKktkSvcKei_Plc.getString(JBSbatKK_M_KNYTCS_DSP_MNGN.DSP_PST_SKCD))` |
| 6 | SET | `resultMap.put(TELNO_JUN, dbInfKktkSvcKei_Plc.getString(JBSbatKK_T_SVKEIUW_EOH_TEL.TELNO_JUN))` |
| 7 | SET | `resultMap.put(TV_DSP_NO, tvDspMap.get(dbInfKktkSvcKei_Plc.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_KEI_UCWK_NO)))` |
| 8 | SET | `resultMap.put(KEI_CNT, dbInfKktkSvcKei_Plc.getString(JBSbatKKIFM689.KEI_CNT))` // Contract count [-> "Contract count (契約数)"] |
| 9 | SET | `resultMap.put(MNGN_DSP_JKN_KSITEI_CD, dbInfKktkSvcKei_Plc.getString(JBSbatKK_M_KNYTCS_DSP_MNGN.MNGN_DSP_JKN_KSITEI_CD))` |
| 10 | SET | `resultMap.put(KIKI_HUKA_INFO_CD, dbInfKktkSvcKei_Plc.getString(JBSbatKK_T_KKTK_SVC_KEI.KIKI_HUKA_INFO_CD))` |
| 11 | SET | `serchResultList_KktkSvcKei.add(resultMap)` // Always add (no TV display filter) |
| 12 | SET | `dbInfKktkSvcKei_Plc = db_KK_T_KKTK_SVC_KEI.selectNext()` |

**Block 8** — IF [mskmSbtCd = "00022"] (Query 236 conditional block) (L6027)

> When `mskmSbtCd` equals `"00022"` (Equipment Contract Change Application / 機器契約変更申込), executes a third supplementary query specifically for STB records.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printDebugLog("Device provision service contract information processing: Submission type code='00022' STB information acquisition START")` |
| 2 | SET | `sqlBefore = db_KK_T_KKTK_SVC_KEI.getSql(KK_T_KKTK_SVC_KEI_KK_SELECT_236)` // Retrieve SQL template [-> "KK_SELECT_236"] |
| 3 | SET | `sqlAfter = getEditSQL(svcKeiList, sqlBefore, EDIT_BF_SQL_SVC_KEI, EDIT_AF_SQL_SVC_KEI)` // Edit SQL |
| 4 | EXEC | `db_KK_T_KKTK_SVC_KEI.setSqlMap(KK_T_KKTK_SVC_KEI_KK_SELECT_236, sqlAfter)` |
| 5 | SET | `kktkSvcKeiStb = new Object[]{"", mskmSbtCd, super.opeDate, super.opeDate, super.opeDate}` // Bind variables (fewer fields than other queries) |
| 6 | CALL | `this.executeKK_T_KKTK_SVC_KEI_KK_SELECT_236(kktkSvcKeiStb, svcKeiList)` |
| 7 | EXEC | `db_KK_T_KKTK_SVC_KEI.setSqlMap(KK_T_KKTK_SVC_KEI_KK_SELECT_236, sqlBefore)` // Restore |

**Block 8.1** — WHILE [dbInfKktkSvcKeiStb != null] (Query 236 result iteration) (L6072)

> Iterates Query 236 results. Similar to Query 220 — filtered by `isTvDspMap` before adding.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dbInfKktkSvcKeiStb = db_KK_T_KKTK_SVC_KEI.selectNext()` |
| 2 | SET | `resultMap = new HashMap<String, String>()` |
| 3 | SET | `resultMap.put(KNYTCS_NO, inMap.getString(JBSbatKK_T_KNYTCS.KNYTCS_NO))` |
| 4 | SET | `resultMap.put(KNYTCS_DSP_MNGN_CD, dbInfKktkSvcKeiStb.getString(JBSbatKK_M_KNYTCS_DSP_MNGN.KNYTCS_DSP_MNGN_CD))` |
| 5 | SET | `resultMap.put(DSP_PST_SKCD, dbInfKktkSvcKeiStb.getString(JBSbatKK_M_KNYTCS_DSP_MNGN.DSP_PST_SKCD))` |
| 6 | SET | `resultMap.put(TV_DSP_NO, tvDspMap.get(dbInfKktkSvcKeiStb.getString(JBSbatKK_T_SVC_KEI_UCWK.SVC_KEI_UCWK_NO)))` |
| 7 | SET | `resultMap.put(MNGN_DSP_JKN_KSITEI_CD, dbInfKktkSvcKeiStb.getString(JBSbatKK_M_KNYTCS_DSP_MNGN.MNGN_DSP_JKN_KSITEI_CD))` |
| 8 | SET | `resultMap.put(KIKI_HUKA_INFO_CD, dbInfKktkSvcKeiStb.getString(JBSbatKK_T_KKTK_SVC_KEI.KIKI_HUKA_INFO_CD))` |
| 9 | CALL | `isTvDspMap(tvDspMap, svc_kei_ucwk_no, dsp_pst_skcd)` // TV display position filter |

**Block 8.1.1** — IF [isTvDspMap returns true] (L6098)

| # | Type | Code |
|---|------|------|
| 1 | SET | `serchResultList_KktkSvcKei.add(resultMap)` // Add to merged search results |

**Block 8.2** — EXEC [Log end] (L6112)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printDebugLog("Device provision service contract information processing: Submission type code='00022' STB information acquisition END")` |

**Block 9** — INIT (Output determination preparation) (L6118)

> Creates a temporary map and initializes the output determination loop.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tmpMap = new HashMap<String, String>()` |

**Block 10** — FOR [i < serchResultList_KktkSvcKei.size()] (Output determination loop) (L6121)

> Core output determination logic. Iterates through all collected search results and evaluates output conditions based on the display condition individual designation code.

| # | Type | Code |
|---|------|------|
| 1 | SET | `outmap = new JBSbatServiceInterfaceMap()` |
| 2 | SET | `tmpMap = serchResultList_KktkSvcKei.get(i)` // Get current record |
| 3 | SET | `outmap.setString(KNYTCS_NO, tmpMap.get(JBSbatKK_T_KNYTCS.KNYTCS_NO))` |
| 4 | SET | `outmap.setString(KNYTCS_DSP_MNGN_CD, tmpMap.get(JBSbatKK_M_KNYTCS_DSP_MNGN.KNYTCS_DSP_MNGN_CD))` |
| 5 | SET | `outmap.setString(DSP_PST_SKCD, tmpMap.get(JBSbatKK_M_KNYTCS_DSP_MNGN.DSP_PST_SKCD))` |
| 6 | SET | `outmap.setString(TELNO_JUN, tmpMap.get(JBSbatKK_T_SVKEIUW_EOH_TEL.TELNO_JUN))` |
| 7 | SET | `outmap.setString(TV_DSP_NO, tmpMap.get(JBSbatKKIFM689.TV_DSP_NO))` // Uses pre-mapped TV display position number [v25.00.01] |
| 8 | SET | `outmap.setString(KEI_CNT, tmpMap.get(JBSbatKKIFM689.KEI_CNT))` // Contract count |

**Block 10.1** — IF [isOutPutTgDspPstSkcd matches] (L6143)

> When the display position code matches the target output list, evaluate further conditions.

| # | Type | Code |
|---|------|------|
| 1 | (enters nested condition tree) | See Blocks 10.1.1 through 10.1.7 below |

**Block 10.1.1** — IF [isNullBlank MNGN_DSP_JKN_KSITEI_CD] (NULL condition) (L6148)

> When the display condition individual designation code is null/blank, output the record as-is. This is the general output condition.

| # | Type | Code |
|---|------|------|
| 1 | SET | `outmap.setOutFlg(true)` // Mark for output |
| 2 | EXEC | `super.logPrint.printDebugLog("Device provision service contract [individual: NULL]: " + dsp_mngn_cd)` |
| 3 | CALL | `outputBean.addOutMapList(outmap)` // Add to output list |

**Block 10.1.2** — ELSE-IF [MNGN_DSP_JKN_KSITEI_CD in (012, 013, 024)] (Guarantee / EO Shopping conditions) (L6224)

> Handles three guarantee-related classification codes. Each requires specific device additional information code checks and terminal guarantee status verification.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ksiteiCd = tmpMap.get(MNGN_DSP_JKN_KSITEI_CD)` // Extract the display condition code |
| 2 | SET | `tnmtHosyou = isTnmtHosyouUmu(tmpMap.get(KKTK_SVC_KEI_NO))` // Check if device has active guarantee [-> "Terminal guarantee presence (端末保障あり)"] |
| 3 | SET | `planChgStaFlg = this.isTkyKkn(tmpMap.get(PLAN_CHRG_STAYMD))` // Check plan change status [v29.00.03] |
| 4 | SET | `kikiHukaInfCd = tmpMap.get(KIKI_HUKA_INFO_CD)` // Device additional info code |

**Block 10.1.2.1** — IF [guarantee Xperia/ARROWS/LAVIE] (L6242)

> Conditions: `MNGN_DSP_JKN_KSITEI_CD = "012"` AND `isOutPutkikiHukaInfoCdAnsin(kiki_huka_info_cd)` AND `tnmtHosyou == true` AND `planChgStaFlg == true`

| # | Type | Code |
|---|------|------|
| 1 | SET | `outmap.setOutFlg(true)` |
| 2 | EXEC | `super.logPrint.printDebugLog("Guarantee (Xperia/ARROWS/LAVIE): " + dsp_mngn_cd)` |
| 3 | CALL | `outputBean.addOutMapList(outmap)` |

**Block 10.1.2.2** — ELSE-IF [guarantee MediaPad] (L6256)

> Conditions: `MNGN_DSP_JKN_KSITEI_CD = "013"` AND `isOutPutkikiHukaInfoCdAnsinMediaPad(kiki_huka_info_cd)` AND `tnmtHosyou == true` AND `planChgStaFlg == true`

| # | Type | Code |
|---|------|------|
| 1 | SET | `outmap.setOutFlg(true)` |
| 2 | EXEC | `super.logPrint.printDebugLog("Guarantee (MediaPad): " + dsp_mngn_cd)` |
| 3 | CALL | `outputBean.addOutMapList(outmap)` |

**Block 10.1.2.3** — ELSE-IF [EO Shopping Mall Point Prize] (L6270)

> Conditions: (`MNGN_DSP_JKN_KSITEI_CD = "024"`) AND (`isOutPutkikiHukaInfoCdAnsin OR isOutPutkikiHukaInfoCdAnsinMediaPad`) AND `tnmtHosyou == false` AND `planChgStaFlg == true`

| # | Type | Code |
|---|------|------|
| 1 | SET | `outmap.setOutFlg(true)` |
| 2 | EXEC | `super.logPrint.printDebugLog("EO Shopping Mall Point Prize: " + dsp_mngn_cd)` |
| 3 | CALL | `outputBean.addOutMapList(outmap)` |

**Block 10.1.2.4** — ELSE [log excluded] (L6281)

> When guarantee-related conditions don't match, log the exclusion reason.

| # | Type | Code |
|---|------|------|
| 1 | IF [MNGN_DSP_JKN_KSITEI_CD = "012"] | `createLog(knytcs_no, dsp_mngn_cd, dsp_pst_skcd, "Guarantee (Xperia/ARROWS/LAVIE)")` |
| 2 | IF [MNGN_DSP_JKN_KSITEI_CD = "013"] | `createLog(knytcs_no, dsp_mngn_cd, dsp_pst_skcd, "Guarantee (MediaPad)")` |
| 3 | ELSE | `createLog(knytcs_no, dsp_mngn_cd, dsp_pst_skcd, "EO Shopping Mall Point Prize")` |

**Block 10.1.3** — ELSE-IF [MNGN_DSP_JKN_KSITEI_CD = "016"] (Phone option column SDSL language) (L6298)

> Output SDSL language to the phone option column when no net optical code exists in `svcInfoMap`.

| # | Type | Code |
|---|------|------|
| 1 | IF [isNullBlank(svcInfoMap.get(JKKStrConst.CD00130_01))] | Net optical code not present |
| 2 | SET | `outmap.setOutFlg(true)` // Mark for output |
| 3 | SET | `outmap.setString(TELNO_JUN, "1")` // Set telephone number sequence to "1" |
| 4 | EXEC | `super.logPrint.printDebugLog("SDSL language to phone option column: " + dsp_mngn_cd)` |
| 5 | CALL | `outputBean.addOutMapList(outmap)` |
| 6 | ELSE | `createLog(knytcs_no, dsp_mngn_cd, dsp_pst_skcd, "SDSL language to phone option column")` |

**Block 10.1.4** — ELSE-IF [MNGN_DSP_JKN_KSITEI_CD = "020"] (Initial contract cancellation) (L6318)

> One-time-only output: only outputs the initial contract cancellation message once per batch run, tracked by `outPutZumiFlg`.

| # | Type | Code |
|---|------|------|
| 1 | IF [!outPutZumiFlg] // Not yet output |
| 2 | SET | `outmap.setOutFlg(true)` |
| 3 | SET | `outmap.setString(TV_DSP_NO, TV_DSP_NO_01)` // Set TV display position to "1" [-> TV_DSP_NO_01 = "1"] |
| 4 | CALL | `outputBean.addOutMapList(outmap)` |
| 5 | SET | `outPutZumiFlg = true` // Mark as outputted — prevents future initial contract cancellation output |

**Block 10.1.5** — ELSE-IF [MNGN_DSP_JKN_KSITEI_CD = "027"] (Tablet language control) (L6338)

> One-time-only output for tablet language, tracked by `outPutZumiFlgTab`.

| # | Type | Code |
|---|------|------|
| 1 | IF [!outPutZumiFlgTab] |
| 2 | SET | `outmap.setOutFlg(true)` |
| 3 | CALL | `outputBean.addOutMapList(outmap)` |
| 4 | SET | `outPutZumiFlgTab = true` // Prevent duplicate tablet language output |

**Block 10.1.6** — ELSE-IF [MNGN_DSP_JKN_KSITEI_CD = "028"] (TH language control) (L6352)

> One-time-only output for TH (Television/Display Home) language, tracked by `outPutZumiFlgGh`.

| # | Type | Code |
|---|------|------|
| 1 | IF [!outPutZumiFlgGh] |
| 2 | SET | `outmap.setOutFlg(true)` |
| 3 | CALL | `outputBean.addOutMapList(outmap)` |
| 4 | SET | `outPutZumiFlgGh = true` // Prevent duplicate TH language output |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `mskm_sbt_cd` | Field | Submission type code — classifies the type of application/contract change being processed. Code "00022" specifically indicates Equipment Contract Change Application (機器契約変更申込). |
| `svc_kei_kaisen_ucwk_no` | Field | Service contract line item detail number — an internal tracking identifier for individual service contract line items within a multi-line contract. |
| `svc_kei_no` | Field | Service contract number — the primary key identifying a service contract record. |
| `knytcs_no` | Field | Contract notification document number — the identifier for a contract notification letter (契約書面通知書) sent to the customer. |
| `knytcs_dsp_mngn_cd` | Field | Contract content notice display language code — identifies the language/style of the contract notification letter to display. |
| `dsp_pst_skcd` | Field | Display position identification code — specifies where in the notification document the content should be displayed. |
| `telno_jun` | Field | Telephone number sequence number — the ordinal position of a telephone number in a multi-number contract (e.g., 1 for primary, 2 for secondary). |
| `mngn_dsp_jkn_ksitei_cd` | Field | Display condition individual designation code — a classification code that determines conditional output rules for contract notification letters. Codes: "012" = Guarantee (Xperia/ARROWS/LAVIE), "013" = Guarantee (MediaPad), "016" = SDSL language to phone option column, "020" = Initial contract cancellation, "024" = EO Shopping Mall Point Prize, "027" = Tablet language output control, "028" = TH language output control. |
| `kiki_huka_info_cd` | Field | Device additional information code — classifies the type of device protection/guarantee coverage. Codes "066"-069, "076"-077, "900"-901 indicate Xperia/ARROWS/LAVIE guarantee; codes "074"-075 indicate MediaPad guarantee. |
| `kktk_svc_kei_no` | Field | Device provision service contract number — the unique identifier for a device-provisioning service contract (機器提供サービス契約). |
| `plan_chrg_staymd` | Field | Plan charge stay month date — the date associated with a plan change, used to verify that a plan change has actually occurred. Non-null indicates the plan change status is active. |
| `famipaKeiUm` | Field | Famipack contract presence flag — indicates whether the customer has a Famipack (family package) contract. Used as a bind variable for SQL filtering. |
| `KEI_CNT` | Field | Contract count (契約数) — the number of contracts in the service contract line item. |
| TV_DSP_NO | Field | TV display position number — identifies the TV/display position associated with a service contract. Value "1" is used for initial contract cancellation display. |
| MNGN_DSP_JKN_KSITEI_CD_012 | Constant | Display condition code for Guarantee (Xperia/ARROWS/LAVIE) — matches device protection plans for Sony Xperia, FUJITSU ARROWS, and Sharp LAVIE devices. |
| MNGN_DSP_JKN_KSITEI_CD_013 | Constant | Display condition code for Guarantee (MediaPad) — matches device protection plans for Huawei MediaPad tablets. |
| MNGN_DSP_JKN_KSITEI_CD_016 | Constant | Display condition code for SDSL language in phone option column — used when outputting SDSL (Simple Digital Service Line) language to the phone option column in the notification. |
| MNGN_DSP_JKN_KSITEI_CD_020 | Constant | Display condition code for Initial contract cancellation language — used for outputting the initial contract cancellation message. |
| MNGN_DSP_JKN_KSITEI_CD_024 | Constant | Display condition code for EO Shopping Mall Point Prize — used for promotional point prize campaigns at the EO Shopping Mall. |
| MNGN_DSP_JKN_KSITEI_CD_027 | Constant | Display condition code for Tablet language output control — used for controlling tablet-specific notification language output. |
| MNGN_DSP_JKN_KSITEI_CD_028 | Constant | Display condition code for TH language output control — used for controlling TH (Television/Display Home) notification language output. |
| KK0971_MSKM_SBT_CD_00022 | Constant | Application type code "00022" — Equipment Contract Change Application (機器契約変更申込). When this code is set, additional STB-specific queries and SQL exclusions are triggered. |
| TV_DSP_NO_01 | Constant | TV display position number "1" — the default position number set for initial contract cancellation output. |
| KK_T_KKTK_SVC_KEI | Table | Device Provision Service Contract table — stores records of service contracts involving device provisioning (equipment bundled with service plans). |
| KK_T_KNYTCS | Table | Contract Notification Document table — stores contract notification letter records. |
| KK_T_MSKM | Table | Submission type master table — master reference for application/submission type codes. |
| KK_M_KNYTCS_DSP_MNGN | Table | Contract Notification Display Management master table — master reference for contract notification display language and position management. |
| KK_T_SVC_KEI_UCWK | Table | Service Contract Line Item table — stores detailed line item records within a service contract. |
| KK_T_SVKEIUW_EOH_TEL | Table | Service Involvement EOH Telephone table — stores telephone number records associated with service contracts. |
| KK_SELECT_220 | SQL | Base device-provisioning service contract skema search query — retrieves main service contract records. |
| KK_SELECT_229 | SQL | PLC/STB supplementary query — retrieves PLC/STB-specific service contract records as a supplementary data source. |
| KK_SELECT_236 | SQL | STB supplementary query — retrieves STB-specific records, executed only when `mskmSbtCd` = "00022". |
| Edit SQL (EDIT_BF_SQL_SVC_KEI) | SQL Pattern | SQL editing pattern that replaces `SVC_KEI_NO IN (\?)` placeholder with actual service contract number bind list for dynamic IN clause generation. |
| Equipment Contract Change Application | Business term | 機器契約変更申込 — a contract modification application type where the customer changes the bundled equipment. Code "00022". |
| Guarantee (Xperia/ARROWS/LAVIE) | Business term | 機器保証 — device protection/guarantee plan for Sony Xperia, FUJITSU ARROWS, and Sharp LAVIE devices. Requires active guarantee status and plan change verification for output. |
| Guarantee (MediaPad) | Business term | 機器保証（MediaPad）— device protection plan for Huawei MediaPad tablets. Requires active guarantee status and plan change verification for output. |
| EO Shopping Mall Point Prize | Business term | EOショッピングモールポイントプレゼント — a promotional campaign offering point prizes through the EO Shopping Mall. Requires no active guarantee. |
| SDSL language to phone option column | Business term | 電話オプション欄へのSDSL文言 — outputting Simple Digital Service Line (SDSL) language to the phone option section of the notification document. Triggered when no net optical code exists. |
| Initial contract cancellation language | Business term | 初期契約解除文言 — the contract cancellation language displayed in the notification. Output only once per batch run (one-time-only control). |
| Tablet language control | Business term | タブレットの文言出力制御 — control for tablet-specific notification language output. Output only once per batch run. |
| TH language control | Business term | THの文言出力制御 — control for TH (Television/Display Home) language output. Output only once per batch run. |
| isTnmtHosyouUmu | Method | Terminal guarantee presence check — determines if a device-provisioning service contract has an active guarantee status (completed, reserved, in-progress, paused, or stop). |
| isTkyKkn | Method | Plan change status check — determines if the plan change stay month date is non-null, indicating an active plan change. |
| isOutPutkikiHukaInfoCdAnsin | Method | Device guarantee code check (Xperia/ARROWS/LAVIE) — checks if the device additional info code matches guarantee device codes (066-069, 076-077, 900-901). |
| isOutPutkikiHukaInfoCdAnsinMediaPad | Method | Device guarantee code check (MediaPad) — checks if the device additional info code matches MediaPad guarantee codes (074-075). |
| isTvDspMap | Method | TV display position map check — verifies that a service contract line item number and display position code combination exists in the TV display position map. Used as a filter for Query 220 and Query 236 results. |
| isOutPutTgDspPstSkcd | Method | Target display position code check — verifies that a display position code matches the configured target output display position codes list. |
| outPutZumiFlg | Field | Already-output flag (初期出力済みフラグ) — boolean flag ensuring the initial contract cancellation message is output only once per batch run. |
| outPutZumiFlgTab | Field | Already-output flag (table) — boolean flag ensuring tablet language output occurs only once per batch run. |
| outPutZumiFlgGh | Field | Already-output flag (TH) — boolean flag ensuring TH language output occurs only once per batch run. |
| serchResultList_KktkSvcKei | Field | Search result list for device provision service contract output — the merged collection of all records from all three queries, used as input to the output determination loop. |
| PLC | Business term | PCL (Personal Computer/Laptop) Remote Control — remote control device bundled with service contracts. Service code "C015". Excluded from Query 220 when `mskmSbtCd` = "00022". |
| Optical Stick | Business term | 光スティック — fiber-optic signal conversion device. Service code "C023". Excluded from Query 220 when `mskmSbtCd` = "00022". |
| STB | Business term | Set-Top Box — cable set-top box device for television services. Service code "C009". Excluded from Query 220 when `mskmSbtCd` = "00022". |
| CD00130_01 | Constant | Net optical code — an NTT optical service code used to determine if net optical service is active. Used in the phone option column SDSL language condition. |
