# Business Logic — JKKTicktUseSisakListUkCC.searchTicktUseSisakList() [277 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKTicktUseSisakListUkCC` |
| Layer | CC / Common Component (Controller layer — shared business component called from BPM Operation classes) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKTicktUseSisakListUkCC.searchTicktUseSisakList()

This method performs the **Ticket Usage Application Eligible Policy List Inquiry** — it retrieves a list of policies (discounts) that a customer is eligible to apply for when submitting a ticket-based service application. It serves as the central filtering engine for a shared common component called by multiple screens (e.g., KKSV0835, KKSV0834, KKSV0836) to determine which promotional discounts should be offered to a subscriber for a given service contract (`svc_kei_no`).

The method implements a **routing/dispatch pattern**: it first fetches all candidate policies via the `EKK3051B001` SC (Service Contract), then iterates through each policy's "individual designation code" (`sskssjk_ksitei_cd`) to apply branch-specific eligibility rules. Each code maps to a distinct discount category, and the method filters out policies that are not applicable based on the customer's current service contract status.

Specifically, the method handles four distinct discount branches:
- **Code "001"** — Multi-functional Router Exchange Service Handover Fee Discount: Checks if the service contract is the top-level contract on the same line, validating network/phone service states and priority levels.
- **Code "002"** — 5Giga/10Giga Grade Upgrade Fee Discount: Delegates to `JKKUpgradeSisakAppliedJudgementCC.upgradeSisakAppliedJudge` to check if the customer has already applied a similar upgrade policy.
- **Codes "003" and "004"** — eo光 Multi-functional Router (Wireless Function) Fee Discount and eo Security Package Fee Discount: Delegates to the private `sisakReturnJudge()` method which cross-references premium service eligibility and existing discount contracts.

The method's **role in the larger system** is that of a gatekeeper: it sits between the screen-level BPM Operation class (e.g., `KKSV0835OPOperation`) and the SC layer, providing business-rule-based policy filtering so that only eligible discounts appear on the customer-facing policy selection screen. It returns the filtered record list embedded in the request parameter map.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["searchTicktUseSisakList(handle, param, fixedText)"])
    START --> GET["Get ccMsg from param.getData(fixedText)"]
    GET --> EXTRACT["Extract funcCode, svc_kei_no from ccMsg"]
    EXTRACT --> INVoker["Create ServiceComponentRequestInvoker scCall"]
    INVoker --> EKK3051["Call SC: EKK3051B001<br/>Policy List Inquiry"]
    EKK3051 --> INIT["Initialize record ArrayList"]
    INIT --> LOOP_START{"Loop: ekk3051b001Msg1List"}
    LOOP_START --> NEXT_REC["Get next record"]
    NEXT_REC --> CHECK_SSKSSJK{"sskssjk_ksitei_cd<br/>not null and not empty?"}
    CHECK_SSKSSJK --> NO["No"]
    NO --> SKIP_CHECK["Skip condition check"]
    SKIP_CHECK --> RETURN_FLG_CHECK{"returnFlg is true?"}
    CHECK_SSKSSJK --> YES["Yes"]
    YES --> COND_001{"sskssjk_ksitei_cd<br/>== 001?"}
    COND_001 --> NO_001["No"]
    NO_001 --> COND_002{"sskssjk_ksitei_cd<br/>== 002?"}
    COND_002 --> NO_002["No"]
    NO_002 --> COND_003_004{"sskssjk_ksitei_cd<br/>== 003 or 004?"}
    COND_003_004 --> NO_003["No"]
    NO_003 --> SKIP_CHECK
    COND_003_004 --> YES_003_004["Yes"]
    YES_003_004 --> SISAK_JUDGE["Call sisakReturnJudge()"]
    SISAK_JUDGE --> SET_RETURN["Set returnFlg from sisakReturnJudge"]
    SET_RETURN --> SKIP_CHECK
    COND_002 --> YES_002["Yes"]
    YES_002 --> SET_FALSE["returnFlg = false"]
    SET_FALSE --> EKK0081A010_002["Call SC: EKK0081A010<br/>Service Contract Inquiry (Cancel)"]
    EKK0081A010_002 --> CHECK_LIST002{"eKK0081a010List<br/>empty?"}
    CHECK_LIST002 --> EMPTY["Yes - continue"]
    EMPTY --> NEXT_LOOP
    CHECK_LIST002 --> NOT_EMPTY["No"]
    NOT_EMPTY --> UPGRADE["Call JKKUpgradeSisakAppliedJudgementCC<br/>.upgradeSisakAppliedJudge"]
    UPGRADE --> GET_RESULT["Get result Boolean from map"]
    GET_RESULT --> REMOVE_MAP["Remove CHECKCC2 from param"]
    REMOVE_MAP --> SET_RETURN_002["Set returnFlg"]
    SET_RETURN_002 --> SKIP_CHECK
    COND_001 --> YES_001["Yes"]
    YES_001 --> SET_FALSE_001["returnFlg = false"]
    SET_FALSE_001 --> EKK0081B029["Call SC: EKK0081B029<br/>Same-Line Service List"]
    EKK0081B029 --> INIT_LEVEL["dateAdvantageLv = 1"]
    INIT_LEVEL --> LOOP_SVC{"eKK0081B029Msg1List<br/>has records?"}
    LOOP_SVC --> NO_SVC["No"]
    NO_SVC --> FINAL_MATCH{"headSvcKeino<br/>equals svc_kei_no?"}
    FINAL_MATCH --> MATCH["Yes"]
    MATCH --> SET_TRUE_RETURN["returnFlg = true"]
    SET_TRUE_RETURN --> SKIP_CHECK
    FINAL_MATCH --> NO_MATCH["No"]
    NO_MATCH --> SKIP_CHECK
    LOOP_SVC --> YES_SVC["Yes - inner loop"]
    YES_SVC --> GET_SVC_NO["Get tgSvkeiNo"]
    GET_SVC_NO --> EKK0081A010["Call SC: EKK0081A010<br/>Service Contract Inquiry"]
    EKK0081A010 --> GET_PRCS["Get prc_grp_cd, svc_kei_stat"]
    GET_PRCS --> CHECK_STAT{"svc_kei_stat<br/>== 910 or 920?"}
    CHECK_STAT --> YES_STAT["Yes - skip"]
    YES_STAT --> CONTINUE
    CHECK_STAT --> NO_STAT["No"]
    NO_STAT --> TEL_CHECK{"prc_grp_cd<br/>== TEL?"}
    TEL_CHECK --> TEL_HIT_CAND["Check TEL priority"]
    TEL_CHECK --> NET_CAND["Check NET priority"]
    NET_CAND --> NET_HIT_CAND["Check NET level"]
    NET_HIT_CAND --> TEL_ACTIVE_CAND["Check TEL active"]
    TEL_ACTIVE_CAND --> NET_ACTIVE_CAND["Check NET active"]
    NET_ACTIVE_CAND --> CONTINUE
    CONTINUE --> NEXT_REC2["Next sub-record"]
    NEXT_REC2 --> MORE_REC{"More records?"}
    MORE_REC --> YES_REC["Yes"]
    MORE_REC --> NO_REC["No"]
    NO_REC --> FINAL_MATCH2{"headSvcKeino<br/>equals svc_kei_no?"}
    FINAL_MATCH2 --> MATCH2["Yes"]
    MATCH2 --> SET_TRUE_RETURN2["returnFlg = true"]
    SET_TRUE_RETURN2 --> SKIP_CHECK
    FINAL_MATCH2 --> NO_MATCH2["No"]
    NO_MATCH2 --> SKIP_CHECK
    SKIP_CHECK --> RETURN_FLG_CHECK
    RETURN_FLG_CHECK --> TRUE["Yes"]
    TRUE --> ADD_RECORD["Add recordMap to record"]
    TRUE --> NEXT_LOOP
    RETURN_FLG_CHECK --> FALSE["No"]
    FALSE --> NEXT_LOOP
    NEXT_LOOP --> MORE_MAIN{"More main records?"}
    MORE_MAIN --> YES_MAIN["Yes"]
    MORE_MAIN --> NO_MAIN["No"]
    NO_MAIN --> PUT_RECORD{"record size > 0?"}
    PUT_RECORD --> HAS_REC["Yes"]
    HAS_REC --> PUT_MAP["ccMsg.put(record, record)"]
    PUT_MAP --> RETURN_PARAM["Return param"]
    PUT_RECORD --> NO_REC_MAP["No"]
    NO_REC_MAP --> RETURN_PARAM
    ADD_RECORD --> NEXT_LOOP
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database session handle for executing Service Component (SC) calls. Carries DB connection context, operator info, and operation date/time for service queries. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object that carries both input context (func_code, svc_kei_no via a user-defined key) and output data (filtered policy record list, error info, check maps). Serves as the primary data carrier throughout the method's execution. |
| 3 | `fixedText` | `String` | User-defined string used as a map key to retrieve the `ccMsg` HashMap from `param`. Represents the namespace/context for this particular call — typically a screen-specific or scenario-specific key that isolates data within the shared `param` object. |

**Instance fields / external state read:**
- None directly — this method is stateless with respect to instance fields. All state flows through parameters and the private `callSC()` helper.

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `callSC` (EKK3051B001CBSMsg) | EKK3051B001 | KK_T_EOPRMCL_SISAK (Policy Master) | Inquiry: Retrieves the list of candidate policies (discounts) eligible for the given service contract. |
| R | `callSC` (EKK0081B029CBSMsg) | EKK0081B029 | KK_T_SVC_KEI (Service Contract) | Inquiry: Retrieves all service contracts on the same line as the target contract (for multi-functional router exchange discount filtering). |
| R | `callSC` (EKK0081A010CBSMsg) | EKK0081A010 | KK_T_SVC_KEI (Service Contract) | Inquiry: Retrieves details of a specific service contract — price group code and service contract status — to determine eligibility. Called twice: once within the EKK0081B029 loop (line-matching), once for code "002" upgrade eligibility. |
| R | `callSC` (EKK3061B501CBSMsg) | EKK3061B501 | KK_T_EOPRMCL_SISAK_JOKEN (Premium Service Policy Conditions) | Inquiry: Called via `sisakReturnJudge()` to retrieve eligible premium service policy conditions for codes "003" and "004". |
| R | `callSC` (EKK0451B002CBSMsg) | EKK0451B002 | KK_T_WRIB_SVC_KEI (Discount Service Contract) | Inquiry: Called via `sisakReturnJudge()` to retrieve existing discount service contracts and determine if the customer already has an overlapping discount. |
| C | `upgradeSisakAppliedJudge` | JKKUpgradeSisakAppliedJudgementCC | — | Create/Check: Delegates to the upgrade policy application judgment component to check if an upgrade discount was already applied for the same service contract. |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0835 | `KKSV0835OPOperation.run()` -> `CCRequestBroker` -> `JKKTicktUseSisakListUkCC.searchTicktUseSisakList` | `callSC(EKK3051B001) [R] KK_T_EOPRMCL_SISAK`, `callSC(EKK0081B029) [R] KK_T_SVC_KEI`, `callSC(EKK0081A010) [R] KK_T_SVC_KEI`, `sisakReturnJudge()->callSC(EKK3061B501) [R] KK_T_EOPRMCL_SISAK_JOKEN`, `sisakReturnJudge()->callSC(EKK0451B002) [R] KK_T_WRIB_SVC_KEI` |

## 6. Per-Branch Detail Blocks

### Block 1 — INIT `(setup)` (L110)

> Extract input data and prepare SC invocation infrastructure.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ccMsg = (HashMap)param.getData(fixedText)` // Get the context map from param using fixedText key |
| 2 | SET | `funcCode = (String)ccMsg.get("func_code")` // Function code from context map |
| 3 | SET | `svc_kei_no = (String)ccMsg.get("svc_kei_no")` // Service contract number — key identifier for the customer's service |
| 4 | SET | `scCall = new ServiceComponentRequestInvoker()` // Create SC call instance [-> log class name passed to constructor] |
| 5 | SET | `ekk3051b001In = {TEMPLATE_ID_EKK3051B001="EKK3051B001", funcCode, svc_kei_no}` // Mapping for Policy List Inquiry SC |
| 6 | CALL | `ekk3051b001Msg1List = callSC(handle, scCall, param, fixedText, ekk3051b001In, EKK3051B001CBSMsg.contents)` // SC call for policy list |
| 7 | EXEC | `record = new ArrayList<HashMap<String, String>>()` // Initialize result list |

### Block 2 — FOR LOOP `(for i = 0; i < ekk3051b001Msg1List.length)` `(iterate candidate policies)` (L125)

> Iterate through each candidate policy record returned by EKK3051B001.

| # | Type | Code |
|---|------|------|
| 1 | SET | `recordMap = new HashMap<String, String>()` // Per-record map |
| 2 | SET | `childTemplate = ekk3051b001Msg1List[i]` // Current policy record |
| 3 | SET | `sskssjk_ksitei_cd = childTemplate.getString(SSKSSJK_KSITEI_CD)` // Individual designation code — classifies the policy type |
| 4 | SET | `returnFlg = true` // Default: policy is eligible unless proven otherwise |

#### Block 2.1 — IF `sskssjk_ksitei_cd != null && !"".equals(sskssjk_ksitei_cd)` `(L139)` `[SSKSSJK_KSITEI_CD has value]`

> The policy has individual designation conditions. Apply type-specific eligibility rules.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sskssjk_ksitei_cd = childTemplate.getString(SSKSSJK_KSITEI_CD)` // Read the designation code |
| 2 | SET | `returnFlg = true` // Default eligible |

##### Block 2.1.1 — IF `[SSKSSJK_KSITEI_CD_001 = "001"]` `(L144)` `[Multi-functional Router Exchange Service Handover Fee Discount]`

> Check if the customer's service contract qualifies for the router exchange discount. This requires that the target contract is the top-level contract on the same line.

| # | Type | Code |
|---|------|------|
| 1 | SET | `returnFlg = false` // Default: not eligible |
| 2 | SET | `EKK0081B029Hash = {TEMPLATE_ID_EKK0081B029="EKK0081B029", FUNC_CODE="2", svc_kei_no, JCCBPCommon.getOpeDate(null)}` // Mapping for same-line service contract list inquiry |
| 3 | CALL | `eKK0081B029Msg1List = callSC(handle, scCall, param, fixedText, EKK0081B029Hash, EKK0081B029CBSMsg.contents)` // Get same-line contracts |
| 4 | SET | `dateAdvantageLv = 1` // Data priority level — starts at bottom level |

###### Block 2.1.1.A — IF `eKK0081B029Msg1List != null && eKK0081B029Msg1List.length > 0` `(L172)` `[Same-line contracts exist]`

> There are other service contracts on the same line. Validate priority.

| # | Type | Code |
|---|------|------|
| 1 | SET | `headSvcKeino = new String()` // Will hold the top-level service contract number |
| 2 | FOR | Loop through `eKK0081B029Msg1List` to find the priority contract |

####### Block 2.1.1.A.1 — FOR INNER LOOP `(for j = 0; j < eKK0081B029Msg1List.length)` `(L177)`

| # | Type | Code |
|---|------|------|
| 1 | SET | `childKaisenSvcTemplate = eKK0081B029Msg1List[j]` // Current same-line contract |
| 2 | SET | `tgSvkeiNo = childKaisenSvcTemplate.getString(SVC_KEI_NO)` // Target service contract number |
| 3 | SET | `EKK0081A010Hash = {TEMPLATE_ID_EKK0081A010="EKK0081A010", FUNC_CODE="2", tgSvkeiNo, JCCBPCommon.getOpeDate(null)}` // Contract details inquiry |
| 4 | CALL | `eKK0081A010Msg1List = callSC(handle, scCall, param, fixedText, EKK0081A010Hash, EKK0081A010CBSMsg.contents)` // Get contract details |
| 5 | SET | `prc_grp_cd = eKK0081A010Msg1List[0].getString(PRC_GRP_CD)` // Price group code |
| 6 | SET | `svc_kei_stat = eKK0081A010Msg1List[0].getString(SVC_KEI_STAT)` // Service contract status |

######## Block 2.1.1.A.1.a — IF `!JKKSvcConst.SVC_KEI_STAT_910.equals(svc_kei_stat) && !JKKSvcConst.SVC_KEI_STAT_920.equals(svc_kei_stat)` `(L192)` `[Status is NOT 910 (Terminated) and NOT 920 (Cancelled)]`

> The service contract is in an active state. Check priority by service type and status.

| # | Type | Code |
|---|------|------|
| 1 | IF-ELSEIF-ELSEIF-ELSEIF-ELSEIF — nested priority ladder | See sub-blocks 2.1.1.A.1.a.i through 2.1.1.A.1.a.iii below |

######### Block 2.1.1.A.1.a.i — IF `[PRC_GRP_CD_TEL] && [SVC_KEI_STAT_010/020/030] && dateAdvantageLv < 2` `(L198)` `[Phone Service, Pending/Reviewed/Contracted, Level 1]`

> Top-level contract is a phone service in early state — lowest priority (level 1).

| # | Type | Code |
|---|------|------|
| 1 | SET | `headSvcKeino = tgSvkeiNo` |
| 2 | SET | `dateAdvantageLv = 2` (not set here — stays at 1) |

######### Block 2.1.1.A.1.a.ii — ELSEIF `[PRC_GRP_CD_NET_HM/NET_MZ/NET_MT] && [SVC_KEI_STAT_010/020/030] && dateAdvantageLv < 3` `(L214)` `[Network Service, Pending/Reviewed/Contracted, Level 2]`

> Network service in early state — higher priority (level 2).

| # | Type | Code |
|---|------|------|
| 1 | SET | `headSvcKeino = tgSvkeiNo` |
| 2 | SET | `dateAdvantageLv = 2` |

######### Block 2.1.1.A.1.a.iii — ELSEIF `[PRC_GRP_CD_TEL] && [SVC_KEI_STAT_100/210/220] && dateAdvantageLv < 4` `(L226)` `[Phone Service, In-Service/Suspended/Stopped, Level 3]`

> Phone service in active or stopped state — higher priority (level 3).

| # | Type | Code |
|---|------|------|
| 1 | SET | `headSvcKeino = tgSvkeiNo` |
| 2 | SET | `dateAdvantageLv = 3` |

######### Block 2.1.1.A.1.a.iv — ELSEIF `[PRC_GRP_CD_NET_HM/NET_MZ/NET_MT] && [SVC_KEI_STAT_100/210/220]` `(L238)` `[Network Service, In-Service/Suspended/Stopped, Level 4]`

> Network service in active or stopped state — highest priority (level 4).

| # | Type | Code |
|---|------|------|
| 1 | SET | `headSvcKeino = tgSvkeiNo` |
| 2 | SET | `dateAdvantageLv = 4` |
| 3 | EXEC | `break` // Stop inner loop — highest priority found |

######## Block 2.1.1.A.1.a.v — ELSE `(L249)` `[Other service types like TV — not applicable]`

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `continue` // Skip non-network/non-phone services |

######## Block 2.1.1.A.1.a.vi — ELSE `(L254)` `[Status is 910 or 920]`

> Service is terminated or cancelled — not eligible.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `continue` // Skip invalid states |

###### Block 2.1.1.A.2 — IF `headSvcKeino != null && !"".equals(headSvcKeino) && svc_kei_no.equals(headSvcKeino)` `(L258)` `[Top-level contract matches target]`

> The target contract IS the top-level contract on the same line.

| # | Type | Code |
|---|------|------|
| 1 | SET | `returnFlg = true` // Mark as eligible |

##### Block 2.1.2 — ELSEIF `[SSKSSJK_KSITEI_CD_002 = "002"]` `(L264)` `[5Giga/10Giga Grade Upgrade Fee Discount (Change Procedure, 6-Month Difference)]`

> Check if the customer already applied a similar upgrade discount.

| # | Type | Code |
|---|------|------|
| 1 | SET | `returnFlg = false` // Default: not eligible |
| 2 | SET | `paramMap = new HashMap<String, Object>()` |
| 3 | EXEC | `param.setData(CHECK_MAP_KEY="CHECKCC", paramMap)` // Set check map in param |
| 4 | SET | `paramMap.put(RELATION_CHECK_SERVICE_ID_KEY="relation_check_service_id_key", "KKSV0835")` // Service ID for the check |
| 5 | SET | `ekk0081a010In = {TEMPLATE_ID_EKK0081A010="EKK0081A010", FUNC_CODE="2", svc_kei_no, JCCBPCommon.getOpeDate(null)}` |
| 6 | CALL | `ekk0081a010List = callSC(handle, scCall, param, fixedText, ekk0081a010In, EKK0081B010CBSMsg.contents)` // Service contract inquiry (Cancel) |
| 7 | IF `ekk0081a010List == null || ekk0081a010List.length == 0` `(L306)` `[No service contract found]` |
|   | EXEC | `continue` // Skip this policy — no service contract exists |
| 8 | SET | `sysid = ekk0081a010List[0].getString("sysid")` |
| 9 | SET | `checkCCMap2 = new HashMap<String, Object>()` |
| 10 | EXEC | `param.setData(CHECK_MAP_KEY2="CHECKCC2", checkCCMap2)` |
| 11 | SET | `checkCCMap2.put("key_sysid", sysid)` |
| 12 | CALL | `cc = new JKKUpgradeSisakAppliedJudgementCC()` |
| 13 | CALL | `param = cc.upgradeSisakAppliedJudge(handle, param, CHECK_MAP_KEY2)` // Delegate to upgrade judgment CC |
| 14 | SET | `resultMap = (Map)param.getData(CHECK_MAP_KEY2)` |
| 15 | SET | `returnFlg = (Boolean)resultMap.get("result")` |
| 16 | EXEC | `param.removeData(CHECK_MAP_KEY2)` // Clean up check map |

##### Block 2.1.3 — ELSEIF `[SSKSSJK_KSITEI_CD_003 = "003"]` OR `[SSKSSJK_KSITEI_CD_004 = "004"]` `(L321)` `[eo光 Multi-functional Router Fee Discount OR eo Security Package Fee Discount]`

> Delegates to the private `sisakReturnJudge()` for premium service eligibility checking.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `returnFlg = sisakReturnJudge(handle, param, fixedText, scCall, sskssjk_ksitei_cd, svc_kei_no)` |

#### Block 2.2 — IF `returnFlg` `(L329)` `[Eligible record]`

> Only include eligible policies in the result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `recordMap.put("sisak_cd", childTemplate.getString(EOPRMCL_SISAK_CD))` // Policy code |
| 2 | SET | `recordMap.put("cmp_add_optnty_cd", childTemplate.getString(CMP_ADD_OPTNTY_CD))` // Additional option code |
| 3 | SET | `recordMap.put("cmp_add_optnty_tg_key_1", childTemplate.getString(CMP_ADD_OPTNTY_TG_KEY_1))` // Option target key 1 |
| 4 | SET | `recordMap.put("cmp_add_optnty_tg_key_2", childTemplate.getString(CMP_ADD_OPTNTY_TG_KEY_2))` // Option target key 2 |
| 5 | SET | `recordMap.put("cmp_add_optnty_tg_key_3", childTemplate.getString(CMP_ADD_OPTNTY_TG_KEY_3))` // Option target key 3 |
| 6 | SET | `recordMap.put("cmp_add_optnty_tg_key_4", childTemplate.getString(CMP_ADD_OPTNTY_TG_KEY_4))` // Option target key 4 |
| 7 | SET | `recordMap.put("cmp_add_optnty_tg_key_5", childTemplate.getString(CMP_ADD_OPTNTY_TG_KEY_5))` // Option target key 5 |
| 8 | EXEC | `record.add(recordMap)` // Add eligible record to result list |

### Block 3 — IF `record.size() > 0` `(L338)` `[Results available]`

> Embed the filtered record list into the output.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ccMsg.put("record", record)` // Store result list in context map |

### Block 4 — RETURN `(L342)`

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return param` // Return the parameter with embedded record list |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_no` | Field | Service contract number — the unique identifier for a customer's service line (e.g., fiber, phone, network). Used throughout the method as the primary lookup key. |
| `svc_kei_stat` | Field | Service contract status — indicates the current state of a service contract (e.g., 010=Received, 020=Reviewed, 030=Contracted, 100=In-service, 210=Suspended, 220=Stopped, 910=Terminated, 920=Cancelled). |
| `prc_grp_cd` | Field | Price group code — classifies the type of service pricing: TEL (Phone), NET_HM (eo光 Net Home Type), NET_MZ (eo光 Net Mesh Type), NET_MT (eo光 Net Mansion Type). |
| `sskssjk_ksitei_cd` | Field | Policy application condition individual designation code — a classification code that determines which type of discount rule applies to a policy. Values: "001"=Multi-functional Router Exchange, "002"=5Giga/10Giga Upgrade, "003"=eo光 Multi-functional Router Fee, "004"=eo Security Package Fee. |
| `sisak_cd` | Field | Policy code — the identifier for a specific promotional discount policy returned to the screen. |
| `cmp_add_optnty_cd` | Field | Comparison additional option code — code for additional options tied to the policy. |
| `cmp_add_optnty_tg_key_1` through `5` | Field | Comparison additional option target keys — up to 5 keys that define the conditions or scope of an additional option. |
| `headSvcKeino` | Field | Top-level service contract number — the service contract number of the highest-priority contract on the same line, used to verify that the target contract is the primary one. |
| `dateAdvantageLv` | Field | Data priority level — an integer (1-4) representing the priority of a service contract: 1=Bottom/Phone Not Provided, 2=Second Level/Network Not Provided, 3=Third Level/Phone Provided, 4=Top Level/Network Provided. Higher levels override lower ones. |
| `returnFlg` | Field | Return judgment flag — a boolean indicating whether a policy should be included in the final result (true = eligible, false = filtered out). |
| `sysid` | Field | System ID — the unique system identifier for a service contract record, used as a key in upgrade application checks. |
| `wrib_svc_cd` | Field | Discount service code — the service code of a discount service contract, used in `sisakReturnJudge()` to detect overlapping discounts. |
| `wrib_svc_kei_stat` | Field | Discount service contract status — status of a discount service contract (e.g., accepted, in-progress). |
| EKK3051B001 | SC | Policy List Inquiry Service Component — retrieves all candidate discount policies for a given service contract and function code. |
| EKK3081B029 | SC | Same-Line Service Contract List Inquiry — retrieves all service contracts on the same line (physical connection) as a given contract, used for multi-functional router exchange eligibility. |
| EKK0081A010 | SC | Service Contract Inquiry (Cancel) — retrieves detailed status of a specific service contract, including price group and service status. |
| EKK3061B501 | SC | Premium Service Policy Condition List Inquiry — retrieves eligible premium service policy conditions (for codes "003"/"004"). |
| EKK0451B002 | SC | Discount Service Contract List Inquiry (Discount Service) — retrieves existing discount service contracts to check for overlapping discounts. |
| JKKSvcConst | Class | Service contract constant definitions — contains constants for price group codes (PRC_GRP_CD_TEL, PRC_GRP_CD_NET_HM, etc.) and service status codes (SVC_KEI_STAT_*). |
| SSKSSJK_KSITEI_CD_001 | Constant | "001" — Multi-functional Router Exchange Service Handover Fee Discount. |
| SSKSSJK_KSITEI_CD_002 | Constant | "002" — 5Giga/10Giga Grade Upgrade Fee Discount. |
| SSKSSJK_KSITEI_CD_003 | Constant | "003" — eo光 Multi-functional Router (Wireless Function) Fee Discount. |
| SSKSSJK_KSITEI_CD_004 | Constant | "004" — eo Security Package Fee Discount. |
| SVC_KEI_STAT_910 | Constant | "910" — Service contract status: Terminated (解約済). |
| SVC_KEI_STAT_920 | Constant | "920" — Service contract status: Cancelled (キャンセル済). |
| SVC_KEI_STAT_010 | Constant | "010" — Service contract status: Received (受注済). |
| SVC_KEI_STAT_020 | Constant | "020" — Service contract status: Reviewed (照査済). |
| SVC_KEI_STAT_030 | Constant | "030" — Service contract status: Contracted (締結済). |
| SVC_KEI_STAT_100 | Constant | "100" — Service contract status: In-service (サービス提供中). |
| SVC_KEI_STAT_210 | Constant | "210" — Service contract status: Suspended/Paused (休止・中断中). |
| SVC_KEI_STAT_220 | Constant | "220" — Service contract status: Stopped (停止中). |
| PRC_GRP_CD_TEL | Constant | Phone service price group code — indicates a traditional phone service type. |
| PRC_GRP_CD_NET_HM | Constant | eo光 Net Home Type price group — fiber-to-home network service. |
| PRC_GRP_CD_NET_MZ | Constant | eo光 Net Mesh Type price group — mesh network service. |
| PRC_GRP_CD_NET_MT | Constant | eo光 Net Mansion Type price group — fiber-to-mansion network service. |
| CHECK_MAP_KEY | Constant | "CHECKCC" — Map key in param for the first check context used by code "002" upgrade judgment. |
| CHECK_MAP_KEY2 | Constant | "CHECKCC2" — Map key in param for the second check context used by code "002" upgrade judgment. |
| RELATION_CHECK_SERVICE_ID_KEY | Constant | "relation_check_service_id" — Key for specifying which service ID (KKSV0835) the relation check applies to. |
| BLANK | Constant | "" — Empty string constant used for initialization. |
| sisakReturnJudge | Method | Private method that determines whether a policy should be returned for codes "003" and "004" by checking premium service conditions against existing discount contracts. |
| upgradeSisakAppliedJudge | Method | Method in `JKKUpgradeSisakAppliedJudgementCC` that checks whether an upgrade policy was already applied for a service contract, returning true if eligible and false if not. |
| KKSV0835 | Screen | Policy selection screen — the primary screen that calls this method to display eligible policies to the customer. |
| SC | Acronym | Service Component — Fujitsu's microservice architecture for telecom BSS, providing atomic business operations. |
| CC | Acronym | Common Component — shared business component class that provides reusable logic across BPM operations. |
| CAANMsg | Class | CAAN message class — the standard message wrapper used to communicate between CC layers and SC layers. |
| TRANK | Acronym | External system — an external billing/ordering system that provides service contract information via integration. |
| eo光 | Business term | eo Hikari — K-Opticom's fiber-to-the-home broadband service brand. |
| 5Giga/10Giga | Business term | 5Giga/10Giga — internet speed tiers (5 Gbps / 10 Gbps) offered by eo光. |
| FTTH | Business term | Fiber To The Home — the underlying network technology for eo光 services. |
