# Business Logic — JKKWribSvcKeiOperateCC.getPnltyHasseiCd() [285 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKWribSvcKeiOperateCC` |
| Layer | CC / Common Component — shared business logic class in the `com.fujitsu.futurity.bp.custom.common` package |
| Module | `common` |

## 1. Role

### JKKWribSvcKeiOperateCC.getPnltyHasseiCd()

This method determines whether a **penalty charge applies** ("違約金発生" — breach of contract fee) when a customer cancels a service contract that includes a **discount subscription** (割引サービス契約) under a long-term agreement. It implements a **routing/dispatch pattern**: based on the `wribTypeCd` parameter (penalty type code), it branches into two primary business paths — (1) long-term continuous discount cancellation (`CHOUKI_KEIZOKU_WRIB`) and (2) instant-use penalty or high-speed penalty cancellation (`SOKUJI_USE_WRIB` / `KOSOKU_WRIB`) — and within each path, evaluates whether the cancellation falls within the discount eligibility period. If the cancellation occurs inside the contracted discount period, the method calls `getPnltyPrcIti` to look up the actual penalty amount via a service component query; if a non-empty result is returned, it sets the penalty flag to "Y" (penalty applies); otherwise, it sets it to "N" (no penalty). It also sets boolean flags on the class instance (`chokiKeizokuWribCancelFlg`, `chokiKeizokuRiyoWribAplyGaiFlg`) that are consumed by downstream processing in the dissolution flow. The method plays a central role in the **early termination / dissolution workflow**, acting as the penalty gatekeeper before cancellation proceeds.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["getPnltyHasseiCd"])
    
    START --> S1["S1: pnltyHasseiCd = null"]
    S1 --> COND1{"wribTypeCd == CHOUKI_KEIZOKU_WRIB ?"}
    
    COND1 -->|No| FALLTHROUGH["Fall through to return"]
    COND1 -->|Yes| S2["Query resolveWribSvcKei"]
    
    S2 --> S3["Get wribStdardymd"]
    S3 --> S4["Get wribSvcKeiAtKeizkSkCd"]
    S4 --> S5["Calc nowKeizokuGetuNum"]
    S5 --> S6["Calc keizokuGetuNum"]
    S6 --> COND2{"keizokuGetuNum < 0 ?"}
    
    COND2 -->|Yes| S6_NEG["keizokuGetuNum = 0"]
    S6_NEG --> COND3{"mskmKisanYmd month >= mskmYmd month ?"}
    
    COND3 -->|Yes| PENALTY_N_1["pnltyHasseiCd = PNLTY_HASSEI_CD_N"]
    PENALTY_N_1 --> FLAG_1["chokiKeizokuWribCancelFlg = true"]
    FLAG_1 --> RETURN_1["Return pnltyHasseiCd"]
    
    COND3 -->|No| COND4{"autoContinuation == 0 ?"}
    
    COND4 -->|Yes| S7["nowKeizokuGetuNum -= 25"]
    S7 --> S8["month1 = ceil(nowKeizokuGetuNum / 36)"]
    S8 --> S9["calcKeizokuGetuNum -= 25"]
    S9 --> S10["month2 = ceil(calcKeizokuGetuNum / 36)"]
    S10 --> COND5{"month1 != month2 OR month1 < 0 ?"}
    
    COND5 -->|Yes| PENALTY_N_2["pnltyHasseiCd = PNLTY_HASSEI_CD_N"]
    PENALTY_N_2 --> FLAG_2["chokiKeizokuRiyoWribAplyGaiFlg = true"]
    FLAG_2 --> RETURN_2["Return pnltyHasseiCd"]
    
    COND5 -->|No| S11["Fetch service agreement"]
    S11 --> S12["Get pcrsCd, pplanCd"]
    S12 --> S13["Set wribSvcCd = CHOKI_KEIZOKU_WRI"]
    S13 --> S14["Query getWribSvcTankaIcrn"]
    S14 --> S15["Match pcrsCd + pplanCd"]
    S15 --> S16["Get wribSvcTankaNo"]
    S16 --> S17["Call getPnltyPrcIti"]
    S17 --> COND6{"eAC0221A010List has items ?"}
    
    COND6 -->|Yes| PENALTY_Y_1["pnltyHasseiCd = PNLTY_HASSEI_CD_Y"]
    COND6 -->|No| PENALTY_N_3["pnltyHasseiCd = PNLTY_HASSEI_CD_N"]
    PENALTY_Y_1 --> FALLTHROUGH
    PENALTY_N_3 --> FALLTHROUGH
    
    COND4 -->|No| COND8{"wribTypeCd == KOSOKU_WRIB ?"}
    
    COND8 -->|Yes| PENALTY_N_4["pnltyHasseiCd = PNLTY_HASSEI_CD_N"]
    PENALTY_N_4 --> RETURN_4["Return pnltyHasseiCd"]
    
    COND8 -->|No| S18["Calc keizokuGetuNum"]
    S18 --> S19["Fetch service agreement"]
    S19 --> S20["Get pcrsCd, prcGrpCd"]
    S20 --> S21["Set wribSvcCd = SOK_WRI"]
    S21 --> S22["Query getWribSvcTankaIcrn"]
    S22 --> S23["Match prcGrpCd"]
    S23 --> S24["Get wribSvcTankaNo"]
    S24 --> S25["Call getPnltyPrcIti"]
    S25 --> COND7{"eAC0221A010List has items ?"}
    
    COND7 -->|Yes| PENALTY_Y_2["pnltyHasseiCd = PNLTY_HASSEI_CD_Y"]
    COND7 -->|No| PENALTY_N_5["pnltyHasseiCd = PNLTY_HASSEI_CD_N"]
    PENALTY_Y_2 --> FALLTHROUGH
    PENALTY_N_5 --> FALLTHROUGH
    
    FALLTHROUGH --> END_RETURN(["Return pnltyHasseiCd"])
```

**Processing narrative:**

1. **Initialization (L10110):** The penalty code is set to `null`.
2. **Branch 1 — Long-term continuous discount cancellation (`CHOUKI_KEIZOKU_WRIB`)** (L10112): The method queries the discount service contract agreement via `resolveWribSvcKei` to obtain the penalty amount standard reference date (`wribStdardymd`) and the auto-continuation identification code (`wribSvcKeiAtKeizkSkCd`). It then calculates the continuation months (both as of the operation date and as of the cancellation request date).
3. **Early return — same-month cancellation** (L10138-10144): If the cancellation application date month is the same as or after the cancellation date month, no penalty applies. Sets `chokiKeizokuWribCancelFlg = true` and returns `"N"`.
4. **Branch 1.1 — No auto-continuation** (`WRIB_SVC_KEI_AT_KEIZK_SKCD_0 = "0"`) (L10153-10172): Calculates the contract quarters remaining by subtracting 25 months and dividing by 36 (ceiling). If the current quarters differ from the cancellation quarters, or if quarters are negative, no penalty applies. Sets `chokiKeizokuRiyoWribAplyGaiFlg = true` and returns `"N"`.
5. **Branch 1.2 — With auto-continuation (default path)** (L10178-10227): When auto-continuation is active, the method queries the service agreement to obtain the pricing code (`pcrsCd`) and pricing plan code (`pplanCd`), then queries discount service unit pricing list, matches by pricing code and plan code to find the discount service unit price number, and finally calls `getPnltyPrcIti` to determine if a penalty amount exists.
6. **Branch 2 — Instant-use penalty / high-speed penalty** (`SOKUJI_USE_WRIB` or `KOSOKU_WRIB`) (L10238-10297): If the type is high-speed penalty (`KOSOKU_WRIB`), no penalty applies — return `"N"` immediately. Otherwise (instant-use), the method calculates continuation months from the standard date, fetches the service agreement to obtain pricing code and pricing group code, queries discount service unit pricing by pricing group code, and calls `getPnltyPrcIti` to determine penalty applicability.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `wribSvcKeiNo` | `String` | Discount service contract number — the unique identifier of the service contract line that includes a discount provision and is being cancelled. Used to query the discount service contract agreement and identify target contracts. |
| 2 | `mskmYmd` | `String` | Cancellation date (YearMonthDay, e.g., "20130301") — the date on which the customer is cancelling the service contract. Used to calculate continuation months and determine whether the cancellation falls within the discount eligibility period. |
| 3 | `wribTypeCd` | `String` | Penalty type code — classifies the type of cancellation penalty. Values: `CHOUKI_KEIZOKU_WRIB` (long-term continuous discount penalty), `SOKUJI_USE_WRIB` (instant-use penalty), `KOSOKU_WRIB` (high-speed penalty). Each value triggers different business evaluation logic. |
| 4 | `mskmKisanYmd` | `String` | Cancellation application date (YearMonthDay) — the date when the cancellation request was submitted. Compared against `mskmYmd` to determine whether the cancellation application and cancellation occur in the same month (which exempts from penalty). |

**Instance fields / external state read by this method:**
- `chokiKeizokuWribCancelFlg` — boolean flag set to `true` when long-term continuous discount cancellation qualifies for no-penalty (L10143).
- `chokiKeizokuRiyoWribAplyGaiFlg` — boolean flag set to `true` when the long-term continuous discount is outside the applicable period (L10168).

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JKKWribSvcKeiOperateCC.resolveWribSvcKei` | EKK0451A010CBS | Discount service contract agreement table | Queries the discount service contract agreement by contract number to obtain `wribStdardymd` (penalty amount standard date) and `wribSvcKeiAtKeizkSkCd` (auto-continuation identification code) |
| R | `JKKWribSvcKeiOperateCC.resolveWribSvcTrgtKeis` | EKK* | Discount service target contract table | Retrieves target service contracts for the discount service contract number |
| R | `JKKWribSvcKeiOperateCC.resolveSvcKei` | EKK0081A010CBS | Service agreement table | Queries the service agreement by service contract number to obtain `pcrsCd` (pricing code) and `pplanCd`/`prcGrpCd` (pricing plan/group code) |
| R | `JKKWribSvcKeiOperateCC.getWribSvcTankaIcrn` | EKK0711B001CBS | Discount service unit pricing table | Queries the discount service unit pricing list filtered by discount service code to match pricing codes and plan/group codes |
| R | `JKKWribSvcKeiOperateCC.getPnltyPrcIti` | EAC0221A010CBS | Penalty price inquiry table | Looks up the actual penalty amount given pricing code, unit price number, cancellation date, continuation months, and function code. Non-empty result means penalty applies. |
| - | `JKKStringUtil.nullToBlank` | JKKStringUtil | - | Utility: converts null strings to blank strings to prevent NPE |
| - | `JPCDateUtil.subtractMonth` | JPCDate | - | Utility: calculates the number of months between two dates in YYYYMMDD format |
| - | `JPCBPCommon.getOpeDate` | JCCBPCommon | - | Utility: returns the current operation date |

**How to classify:**
- All database operations in this method are **Read (R)**. The method never writes, creates, updates, or deletes data — it only queries existing records to determine whether a penalty applies.
- SC Codes are inferred from the message/list class names used in method calls (e.g., `EKK0451A010CBSMsg1List` → SC Code `EKK0451A010CBS`).

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 method.
Terminal operations from this method: `getPnltyPrcIti` [R], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `getWribSvcTankaIcrn` [R], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `getString` [R], `getString` [R], `getString` [R]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `JKKWribSvcKeiOperateCC.dissolutionWribSvcKei()` | `dissolutionWribSvcKei()` -> `getPnltyHasseiCd()` | `getPnltyPrcIti [R] EAC0221A010CBS (penalty inquiry), getWribSvcTankaIcrn [R] EKK0711B001CBS (discount pricing), resolveWribSvcKei [R] EKK0451A010CBS (discount contract), resolveSvcKei [R] EKK0081A010CBS (service agreement)` |

**Call context:** This method is called by `dissolutionWribSvcKei()`, which orchestrates the full service contract dissolution workflow. The penalty determination gate determines whether breach-of-contract fees are triggered before the dissolution proceeds.

## 6. Per-Branch Detail Blocks

**Block 1** — [INITIALIZATION] (L10110)

> Initialize the penalty code to null.

| # | Type | Code |
|---|------|------|
| 1 | SET | `pnltyHasseiCd = null` |

**Block 2** — [IF] `(WribTypeCd.CHOUKI_KEIZOKU_WRIB.isMatch(wribTypeCd))` [CHOUKI_KEIZOKU_WRIB = "long-term continuous discount"] (L10112-10236)

> Branch for long-term continuous discount cancellation. This is the primary penalty evaluation path.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `resolveWribSvcKei(wribSvcKeiNo)` | EKK0451A010CBS - Query discount service contract agreement |
| 2 | CALL | `ekk0451A010CBSMsgList.getString("wrib_amnt_snst_stdardymd")` | Get penalty amount standard reference date |
| 3 | CALL | `ekk0451A010CBSMsgList.getString("wrib_svc_kei_at_keizk_skcd")` | Get auto-continuation identification code |
| 4 | CALL | `JPCBPCommon.getOpeDate(null)` | Get current operation date |
| 5 | CALL | `JPCDateUtil.subtractMonth(opeDate, wribStdardymd)` | Calculate continuation months as of operation date |
| 6 | CALL | `JPCDateUtil.subtractMonth(mskmYmd, wribStdardymd)` | Calculate continuation months as of cancellation date |

**Block 2.1** — [IF] `(keizokuGetuNum < 0)` (L10125-10128)

> Clamp negative continuation months to zero.

| # | Type | Code |
|---|------|------|
| 1 | SET | `keizokuGetuNum = 0` |

**Block 2.2** — [IF] `(mskmKisanYmd.substring(0,6).compareTo(mskmYmd.substring(0,6)) >= 0)` [same-month cancellation check] (L10138-10146)

> If the cancellation application date month is the same as or after the cancellation date month, no penalty applies. This is a business rule protecting customers who apply for cancellation in the same month their contract ends.

| # | Type | Code |
|---|------|------|
| 1 | SET | `pnltyHasseiCd = PNLTY_HASSEI_CD_N` [-> "N"] |
| 2 | SET | `chokiKeizokuWribCancelFlg = true` |
| 3 | RETURN | `return pnltyHasseiCd` |

**Block 2.3** — [IF] `(WRIB_SVC_KEI_AT_KEIZK_SKCD_0.equals(wribSvcKeiAtKeizkSkCd))` [WRIB_SVC_KEI_AT_KEIZK_SKCD_0 = "0" (auto-continuation disabled)] (L10153-10174)

> When the discount service contract does NOT have auto-continuation enabled, calculate contract quarters. If the customer has completed fewer quarters than required at cancellation, no penalty applies. This protects customers who cancel before the long-term contract commitment period.

| # | Type | Code |
|---|------|------|
| 1 | SET | `nowKeizokuGetuNum -= 25` |
| 2 | SET | `month1 = Math.ceil(nowKeizokuGetuNum / 36)` |
| 3 | SET | `calcKeizokuGetuNum = keizokuGetuNum` |
| 4 | SET | `calcKeizokuGetuNum -= 25` |
| 5 | SET | `month2 = Math.ceil(calcKeizokuGetuNum / 36)` |

**Block 2.3.1** — [IF] `(!(month1 == month2 && 0 <= month1))` (L10164-10172)

> If the current quarters differ from the cancellation quarters, or if quarters are negative, no penalty. Sets flag indicating discount was outside applicable period.

| # | Type | Code |
|---|------|------|
| 1 | SET | `pnltyHasseiCd = PNLTY_HASSEI_CD_N` [-> "N"] |
| 2 | SET | `chokiKeizokuRiyoWribAplyGaiFlg = true` |
| 3 | RETURN | `return pnltyHasseiCd` |

**Block 2.4** — [DEFAULT PATH within CHOUKI_KEIZOKU_WRIB branch] (L10178-10227)

> When auto-continuation IS active (or not explicitly "0"), perform a full penalty inquiry. Query service agreement to get pricing code and plan code, look up discount service unit pricing by matching pricing codes, then call `getPnltyPrcIti` to check if a penalty amount exists.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eAC0221A010List = new ArrayList<HashMap<String, Object>>()` |
| 2 | SET | `pcrsCd = ""` |
| 3 | SET | `pplanCd = ""` |
| 4 | SET | `wribSvcTankaNo = ""` |
| 5 | SET | `wribSvcCd = ""` |
| 6 | CALL | `resolveWribSvcTrgtKeis(wribSvcKeiNo)[0].getString("svc_kei_no")` |
| 7 | CALL | `resolveSvcKei(...)` | EKK0081A010CBS - Query service agreement |
| 8 | CALL | `eKK0081A010List.getString(EKK0081A010CBSMsg1List.PCRS_CD)` |
| 9 | SET | `pcrsCd = JKKStringUtil.nullToBlank(...)` |
| 10 | CALL | `eKK0081A010List.getString(EKK0081A010CBSMsg1List.PPLAN_CD)` |
| 11 | SET | `pplanCd = JKKStringUtil.nullToBlank(...)` |
| 12 | SET | `wribSvcCd = WRIB_SVC_CD_CHOKI_KEIZOKU_WRI` |
| 13 | CALL | `getWribSvcTankaIcrn(wribSvcCd, JPCModelConstant.FUNC_CD_1)` | EKK0711B001CBS - Query discount pricing list |
| 14 | FOR | `j = 0` to `eKK0711B001List.size()` |
| 15 | SET | `eKK0711B001Msg = eKK0711B001List.get(j)` |
| 16 | CALL | `eKK0711B001Msg.get(EKK0711B001CBSMsg1List.PCRS_CD)` |
| 17 | SET | `eKK0711B001_pcrsCd = JKKStringUtil.nullToBlank(...)` |
| 18 | CALL | `eKK0711B001Msg.get(EKK0711B001CBSMsg1List.PPLAN_CD)` |
| 19 | SET | `eKK0711B001_pplanCd = JKKStringUtil.nullToBlank(...)` |
| 20 | IF | `eKK0711B001_pcrsCd.equals(pcrsCd) && eKK0711B001_pplanCd.equals(pplanCd)` |
| 21 | SET | `wribSvcTankaNo = ...getString(EKK0711B001CBSMsg1List.WRIB_SVC_TANKA_NO)` |
| 22 | BREAK | from loop |
| 23 | CALL | `getPnltyPrcIti(pcrsCd, wribSvcTankaNo, mskmYmd, keizokuGetuNum, JPCModelConstant.FUNC_CD_1)` | EAC0221A010CBS - Penalty price inquiry |
| 24 | IF | `eAC0221A010List != null && eAC0221A010List.size() > 0` |
| 25 | SET | `pnltyHasseiCd = PNLTY_HASSEI_CD_Y` [-> "Y"] |
| 26 | ELSE | |
| 27 | SET | `pnltyHasseiCd = PNLTY_HASSEI_CD_N` [-> "N"] |

**Block 3** — [ELSE IF] `(WribTypeCd.SOKUJI_USE_WRIB.isMatch(wribTypeCd) || WribTypeCd.KOSOKU_WRIB.isMatch(wribTypeCd))` [SOKUJI_USE_WRIB = "instant-use penalty", KOSOKU_WRIB = "high-speed penalty"] (L10238-10297)

> Branch for instant-use penalty and high-speed penalty cancellation types.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `resolveWribSvcKei(wribSvcKeiNo)` |
| 2 | CALL | `ekk0451A010CBSMsgList.getString("wrib_amnt_snst_stdardymd")` |

**Block 3.1** — [IF] `(WribTypeCd.KOSOKU_WRIB.isMatch(wribTypeCd))` [high-speed penalty] (L10250-10256)

> High-speed penalty: no penalty applies. Immediate return with "N". This is a simplified exemption — the high-speed penalty type inherently means no penalty fee.

| # | Type | Code |
|---|------|------|
| 1 | SET | `pnltyHasseiCd = PNLTY_HASSEI_CD_N` [-> "N"] |
| 2 | RETURN | `return pnltyHasseiCd` |

**Block 3.2** — [ELSE] (instant-use penalty path, SOKUJI_USE_WRIB) (L10275-10297)

> For instant-use penalty: calculate continuation months, query service agreement to get pricing code and pricing group code, query discount pricing by pricing group code (instead of plan code like the long-term path), match and look up penalty amount.

| # | Type | Code |
|---|------|------|
| 1 | SET | `keizokuGetuNum = JPCDateUtil.subtractMonth(mskmYmd, wribStdardymd)` |
| 2 | IF | `keizokuGetuNum < 0` |
| 3 | SET | `keizokuGetuNum = 0` |
| 4 | SET | `eAC0221A010List = new ArrayList<HashMap<String, Object>>()` |
| 5 | SET | `pcrsCd = ""` |
| 6 | SET | `prcGrpCd = ""` |
| 7 | SET | `wribSvcCd = ""` |
| 8 | SET | `wribSvcTankaNo = ""` |
| 9 | CALL | `resolveWribSvcTrgtKeis(wribSvcKeiNo)[0].getString("svc_kei_no")` |
| 10 | CALL | `resolveSvcKei(...)` | EKK0081A010CBS |
| 11 | CALL | `eKK0081A010List.getString(EKK0081A010CBSMsg1List.PCRS_CD)` |
| 12 | SET | `pcrsCd = JKKStringUtil.nullToBlank(...)` |
| 13 | CALL | `eKK0081A010List.getString(EKK0081A010CBSMsg1List.PRC_GRP_CD)` |
| 14 | SET | `prcGrpCd = JKKStringUtil.nullToBlank(...)` |
| 15 | SET | `wribSvcCd = WRIB_SVC_CD_SOK_WRI` |
| 16 | CALL | `getWribSvcTankaIcrn(wribSvcCd, JPCModelConstant.FUNC_CD_1)` |
| 17 | FOR | `j = 0` to `eKK0711B001List.size()` |
| 18 | CALL | `eKK0711B001Msg.get(EKK0711B001CBSMsg1List.PRC_GRP_CD)` |
| 19 | SET | `eKK0711B001_prcGrpCd = JKKStringUtil.nullToBlank(...)` |
| 20 | IF | `eKK0711B001_prcGrpCd.equals(prcGrpCd)` |
| 21 | SET | `wribSvcTankaNo = ...getString(EKK0711B001CBSMsg1List.WRIB_SVC_TANKA_NO)` |
| 22 | BREAK | from loop |
| 23 | CALL | `getPnltyPrcIti(pcrsCd, wribSvcTankaNo, mskmYmd, keizokuGetuNum, JPCModelConstant.FUNC_CD_1)` | EAC0221A010CBS |
| 24 | IF | `eAC0221A010List != null && eAC0221A010List.size() > 0` |
| 25 | SET | `pnltyHasseiCd = PNLTY_HASSEI_CD_Y` [-> "Y"] |
| 26 | ELSE | |
| 27 | SET | `pnltyHasseiCd = PNLTY_HASSEI_CD_N` [-> "N"] |

**Block 4** — [RETURN] (L10301)

> Default return of the computed penalty code.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return pnltyHasseiCd` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `pnltyHasseiCd` | Field | Penalty issuance code — the return value. "Y" means a penalty charge applies; "N" means no penalty; null means undetermined. |
| `wribSvcKeiNo` | Field | Discount service contract number — unique identifier of a service contract line with an attached discount provision. |
| `mskmYmd` | Field | Cancellation date (YYYYMMDD format) — the effective date the service contract is terminated. |
| `wribTypeCd` | Field | Penalty type code — determines which penalty evaluation path is used. |
| `mskmKisanYmd` | Field | Cancellation application date (YYYYMMDD format) — when the customer submitted the cancellation request. |
| `wribStdardymd` | Field | Penalty amount standard reference date (YYYYMMDD format) — the baseline date from which continuation months are calculated for the discount. |
| `wribSvcKeiAtKeizkSkCd` | Field | Discount service contract auto-continuation identification code — identifies whether the discount subscription auto-renews ("0" = no auto-continuation). |
| `nowKeizokuGetuNum` | Field | Continuation months as of the operation date — months elapsed between the penalty standard date and today's date. |
| `keizokuGetuNum` | Field | Continuation months as of the cancellation date — months elapsed between the penalty standard date and the cancellation date. |
| `chokiKeizokuWribCancelFlg` | Field | Long-term continuous discount cancellation flag — set to true when a same-month cancellation exempts the customer from penalty. |
| `chokiKeizokuRiyoWribAplyGaiFlg` | Field | Long-term continuous discount application outside flag — set to true when the cancellation falls outside the discount applicable period. |
| `pcrsCd` | Field | Pricing code (Price Code) — identifies the pricing category for a service. |
| `pplanCd` | Field | Pricing plan code (Pricing Plan Code) — identifies the specific pricing plan within a pricing code. |
| `prcGrpCd` | Field | Pricing group code (Pricing Group Code) — groups pricing plans for discount service unit pricing lookup. |
| `wribSvcTankaNo` | Field | Discount service unit price number — the identifier for a specific discount service pricing entry. |
| `wribSvcCd` | Field | Discount service code — classifies the type of discount service (e.g., long-term continuous discount vs. instant-use). |
| `CHOUKI_KEIZOKU_WRIB` | Constant | Long-term continuous discount penalty — cancellation type for long-term discount subscription contracts. |
| `SOKUJI_USE_WRIB` | Constant | Instant-use penalty — immediate penalty type for certain cancellation scenarios. |
| `KOSOKU_WRIB` | Constant | High-speed penalty — a penalty type where no penalty fee applies (exempt). |
| `PNLTY_HASSEI_CD_Y` | Constant | Penalty issuance code "Y" — penalty applies (違約金発生あり). |
| `PNLTY_HASSEI_CD_N` | Constant | Penalty issuance code "N" — no penalty (違約金発生なし). |
| `WRIB_SVC_KEI_AT_KEIZK_SKCD_0` | Constant | Auto-continuation identification code "0" — no auto-continuation. |
| `WRIB_SVC_CD_CHOKI_KEIZOKU_WRI` | Constant | Discount service code for long-term continuous discount service. |
| `WRIB_SVC_CD_SOK_WRI` | Constant | Discount service code for instant-use discount service. |
| `FUNC_CD_1` | Constant | Function code "1" — used to qualify pricing list queries. |
| `CHOUWARI_YUUYO_MONTH` | Constant | Required months for discount eligibility — the minimum number of months a customer must remain under contract for the discount to be valid. |
| `CHOUKI_KEIZOKU` | Constant | Long-term continuous — refers to a long-term discount subscription with continuous auto-renewal. |
| `getPnltyPrcIti` | Method | Get penalty price inquiry — queries the penalty price inquiry table (EAC0221A010CBS) to determine if a penalty amount exists for the given pricing code, unit price number, cancellation date, and continuation months. |
| `resolveWribSvcKei` | Method | Resolve discount service contract — queries the discount service contract agreement (EKK0451A010CBS) to retrieve contract details. |
| `resolveWribSvcTrgtKeis` | Method | Resolve discount service target contracts — retrieves target service contract entries for a discount service contract. |
| `resolveSvcKei` | Method | Resolve service contract — queries the service agreement (EKK0081A010CBS) to retrieve service details including pricing codes. |
| `getWribSvcTankaIcrn` | Method | Get discount service unit pricing inquiry — queries the discount service unit pricing table (EKK0711B001CBS) to find matching pricing entries. |
| `JPCDateUtil.subtractMonth` | Utility | Calculates the number of months between two YYYYMMDD-formatted dates. |
| `JKKStringUtil.nullToBlank` | Utility | Converts null string values to empty strings to prevent NullPointerException. |
| EKK0451A010CBS | SC Code | Discount service contract agreement SC — service component for querying discount service contract agreements. |
| EKK0081A010CBS | SC Code | Service agreement SC — service component for querying service agreements. |
| EKK0711B001CBS | SC Code | Discount service unit pricing SC — service component for querying discount service unit pricing lists. |
| EAC0221A010CBS | SC Code | Penalty price inquiry SC — service component for querying penalty price amounts. |
| 違約金 (iayakkin) | Business term | Penalty charge / breach of contract fee — a fee charged when a customer terminates a service contract before the end of the discount eligibility period. |
| 割引サービス契約 (waribiki saabisu keiyaku) | Business term | Discount service contract — a service contract with a pricing discount that requires a minimum commitment period. |
| 長期継続割引 (chouki keizoku waribiki) | Business term | Long-term continuous discount — a discount type tied to a long-term auto-renewing contract. |
| 解約 (kaiyaku) | Business term | Contract termination / cancellation — the act of ending a service contract. |
| 継続月数 (keizoku gassuu) | Business term | Continuation months — the number of months a service contract has been active. |
| 料金コース (ryoukin koosu) | Business term | Pricing course / pricing code — a category of service pricing. |
| 料金プラン (ryoukin puran) | Business term | Pricing plan — a specific pricing option within a pricing course. |
