# Business Logic — FUW05401SFLogic.runVariJudge() [164 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW05401SF.FUW05401SFLogic` |
| Layer | Service Logic (Web layer business logic, inside `eo.web.webview`) |
| Module | `FUW05401SF` (Package: `eo.web.webview.FUW05401SF`) |

## 1. Role

### FUW05401SFLogic.runVariJudge()

This method performs a comprehensive set of validation checks (各種判定処理) for the eo Hikari Telephone Option Service Order/Cancellation screen (FUW05401). It serves as the central gatekeeper for option service subscription processing, ensuring that all business rules are satisfied before any record modifications proceed. Specifically, it validates six distinct business rule categories: (1) porting telephone service application blocking when the system is under certain logic screen conditions; (2) WEB option add prohibition check; (3) 050 Number Plan re-application restriction that prevents customers from re-subscribing to the 050 optional telephone service within the same month they have a cancellation on record; (4) option service subscription count cap enforcement, which limits the number of concurrent option services based on the customer's tariff plan (the "Number 2 Plan" at `CD00134_A32` halves the cap); (5) paid/free determination for option services, which sets the free flag (`MRYO_FLG`) based on whether the customer has remaining free option slots or whether the fixed plan amount is zero; and (6) sub-option application eligibility judgment and sub-option cancellation necessity determination. The method implements a cascade-rejection design pattern — each validation that fails immediately throws a business exception, short-circuiting further processing. It is called from `FUW05401SFLogic.init()` as part of the overall screen initialization logic for the option service order/cancellation workflow, and it delegates sub-option cancellation logic to the dedicated `sbopDslYhJudge()` method.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["runVariJudge Start"])
    READ_CNTS["Read kensuMap: rsvTtdkiCnt, keiyakuChuCnt, dougetuDslCnt"]
    CHECK_PORTING{"Porting Check:
RONRI_SCREEN_ID_FUW055
AND TRAN_DIV = '1'"}
    PORTING_ERR["Throw System Error (ERROR_CODE_0002)"]
    CHECK_WEB_ADD{"WEB Option Add Check:
TRAN_DIV = '1'
AND WEB_OP_ADD_FAIL_FLG = '1'"}
    WEB_ADD_ERR["Throw Usage Restriction Error (ERROR_CODE_0101)"]
    CHECK_050{"050 Number Plan Reapp Check:
TRAN_DIV = '1'
AND N_050_OP_TELNO_TRAN_FLG = '1'
AND dougetuDslCnt > 0"}
    _050_ERR["Throw Usage Restriction Error (ERROR_CODE_0101)"]
    CHECK_TRAN_DIV{"TRAN_DIV = '1'?
(Option cap check)"}
    GET_MAX_CNT["Get maxOpSvcCnt from PCRS_OP_SVC_LIST"]
    GET_MAX_CNT_03["Parse MAX_OP_SVC_CNT_03"]
    CHECK_A32_1{"kk0081_pcrs_cd = 'A32'?
(Number 2 Plan)"}
    DIVIDE_MAX["inMaxOpSvcCnt = inMaxOpSvcCnt / 2"]
    CHECK_CAP{"keiyakuChuCnt >= inMaxOpSvcCnt?"}
    CAP_ERR["Throw Max Option Count Error (ERROR_CODE_0101)"]
    CHECK_CAP_NO["Skip cap check (non-subscription)"]
    GET_FREE_CNT["Get mryoOpSvcCnt from PCRS_OP_SVC_LIST"]
    GET_FREE_CNT_03["Parse MRYO_OP_SVC_CNT_03"]
    CHECK_A32_2{"kk0081_pcrs_cd = 'A32'?"}
    DIVIDE_FREE["inMryoOpSvcCnt = inMryoOpSvcCnt / 2"]
    FREE_CONDITION{"(tran_div = '1')
AND (keiyakuChuCnt + rsvTtdkiCnt < mryoOpSvcCnt)"}
    SET_FREE_1["Set MRYO_FLG = '1' (Free)"]
    DSL_CHG_CONDITION{"(tran_div = '2') AND (keiyakuChuCnt + rsvTtdkiCnt <= mryoOpSvcCnt)
OR
(tran_div = '3') AND (keiyakuChuCnt + rsvTtdkiCnt <= mryoOpSvcCnt)"}
    SET_FREE_2["Set MRYO_FLG = '1' (Free)"]
    GET_FIXED["Get koteiAmount from KIHON_PRC_LIST"]
    CHECK_FIXED{"koteiAmount IS NULL OR koteiAmount = '0'?"}
    SET_FREE_3["Set MRYO_FLG = '1' (Free)"]
    SET_PAID["Set MRYO_FLG = '0' (Paid)"]
    CHECK_SBOP{"SBOP Apply Check:
TRAN_DIV = '1'
AND SBOP_TRAN_FLG = '1'"}
    CHECK_SBOP_ARR{"Array empty OR
op_svc_kei_stat = '910'?"}
    SBOP_ERR["Throw Contract Status Error (ERROR_CODE_0102)"]
    SBOP_DSL_JUDGE["sbopDslYhJudge(bean, tranTrgtRecOpArray)"]
    END_NODE(["runVariJudge End"])

    START --> READ_CNTS
    READ_CNTS --> CHECK_PORTING
    CHECK_PORTING -- Yes --> PORTING_ERR
    CHECK_PORTING -- No --> CHECK_WEB_ADD
    CHECK_WEB_ADD -- Yes --> WEB_ADD_ERR
    CHECK_WEB_ADD -- No --> CHECK_050
    CHECK_050 -- Yes --> _050_ERR
    CHECK_050 -- No --> CHECK_TRAN_DIV
    CHECK_TRAN_DIV -- Yes --> GET_MAX_CNT
    CHECK_TRAN_DIV -- No --> GET_FREE_CNT
    GET_MAX_CNT --> GET_MAX_CNT_03
    GET_MAX_CNT_03 --> CHECK_A32_1
    CHECK_A32_1 -- Yes --> DIVIDE_MAX
    CHECK_A32_1 -- No --> CHECK_CAP
    DIVIDE_MAX --> CHECK_CAP
    CHECK_CAP -- Yes --> CAP_ERR
    CHECK_CAP -- No --> GET_FREE_CNT
    GET_FREE_CNT --> GET_FREE_CNT_03
    GET_FREE_CNT_03 --> CHECK_A32_2
    CHECK_A32_2 -- Yes --> DIVIDE_FREE
    CHECK_A32_2 -- No --> FREE_CONDITION
    DIVIDE_FREE --> FREE_CONDITION
    FREE_CONDITION -- Yes --> SET_FREE_1
    FREE_CONDITION -- No --> DSL_CHG_CONDITION
    DSL_CHG_CONDITION -- Yes --> SET_FREE_2
    DSL_CHG_CONDITION -- No --> GET_FIXED
    GET_FIXED --> CHECK_FIXED
    CHECK_FIXED -- Yes --> SET_FREE_3
    CHECK_FIXED -- No --> SET_PAID
    SET_FREE_1 --> CHECK_SBOP
    SET_FREE_2 --> CHECK_SBOP
    SET_FREE_3 --> CHECK_SBOP
    SET_PAID --> CHECK_SBOP
    CHECK_SBOP -- Yes --> CHECK_SBOP_ARR
    CHECK_SBOP -- No --> SBOP_DSL_JUDGE
    CHECK_SBOP_ARR -- Yes --> SBOP_ERR
    CHECK_SBOP_ARR -- No --> SBOP_DSL_JUDGE
    SBOP_ERR --> END_NODE
    WEB_ADD_ERR --> END_NODE
    PORTING_ERR --> END_NODE
    _050_ERR --> END_NODE
    CAP_ERR --> END_NODE
    SBOP_DSL_JUDGE --> END_NODE
```

**Conditional Branch Summary:**

| # | Branch | Condition | Action |
|---|--------|-----------|--------|
| 1 | Porting blocking | `ronriScreenId = "FUW055"` AND `TRAN_DIV = "1"` | Throw System Error `ERROR_CODE_0002` |
| 2 | WEB option add fail | `TRAN_DIV = "1"` AND `WEB_OP_ADD_FAIL_FLG = "1"` | Throw Usage Restriction Error `ERROR_CODE_0101` |
| 3 | 050 Number Plan reapp | `TRAN_DIV = "1"` AND `N_050_OP_TELNO_TRAN_FLG = "1"` AND `dougetuDslCnt > 0` | Throw Usage Restriction Error `ERROR_CODE_0101` |
| 4 | Option count cap | `TRAN_DIV = "1"` AND `keiyakuChuCnt >= maxOpSvcCnt` | Throw Max Option Count Error `ERROR_CODE_0101` |
| 5.1 | Free flag: subscription under free cap | `TRAN_DIV = "1"` AND `keiyakuChuCnt + rsvTtdkiCnt < mryoOpSvcCnt` | Set `MRYO_FLG = "1"` (Free) |
| 5.2 | Free flag: cancellation/change under free cap | `TRAN_DIV = "2"` or `"3"` AND `keiyakuChuCnt + rsvTtdkiCnt <= mryoOpSvcCnt` | Set `MRYO_FLG = "1"` (Free) |
| 5.3 | Free flag: zero fixed amount | `koteiAmount` IS NULL OR `"0"` | Set `MRYO_FLG = "1"` (Free) |
| 5.4 | Free flag: paid | Else (non-zero fixed amount) | Set `MRYO_FLG = "0"` (Paid) |
| 6.1 | Sub-option ineligibility | `TRAN_DIV = "1"` AND `SBOP_TRAN_FLG = "1"` AND (array empty OR `op_svc_kei_stat = "910"`) | Throw Contract Status Error `ERROR_CODE_0102` |
| 7 | Sub-option cancellation | Always | Delegate to `sbopDslYhJudge(bean, tranTrgtRecOpArray)` |

**Constant Resolution:**

| Constant | Value | Business Meaning |
|----------|-------|-----------------|
| `TRAN_DIV_MSKM` | `"1"` | Transaction division code for "subscription/apply" (申込) |
| `TRAN_DIV_DSL` | `"2"` | Transaction division code for "cancellation" (解約) |
| `TRAN_DIV_CHG` | `"3"` | Transaction division code for "change/modification" (変更) |
| `RONRI_SCREEN_ID_FUW055` | `"FUW055"` | Logic screen ID for porting telephone service order/cancellation |
| `CD00001_1` | `"1"` | Yes/flag-true value |
| `CD00002_0` | `"0"` | No/flag-false value |
| `CD00002_1` | `"1"` | Yes/flag-true value (for free flag) |
| `CD00037_910` | `"910"` | Option service contract status: "cancelled" (解約済) |
| `CD00134_A32` | `"A32"` | Price code (Service Contract): "Number 2 Plan" (2番号コース) |
| `S_ZERO` | `"0"` | Zero string constant |
| `ERROR_CODE_0002` | `"0002"` | System Error |
| `ERROR_CODE_0101` | `"0101"` | Usage Restriction Error (利用制限エラー) |
| `ERROR_CODE_0102` | `"0102"` | Contract Status Error (契約状態エラー) |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `bean` | `X31SDataBeanAccess` | The service form data bean carrying all screen input data for the eo Hikari Telephone Option Service order/cancellation. Contains fields like `tran_div` (transaction division), `web_op_add_fail_flg` (WEB option add prohibit flag), `n_050_op_telno_tran_flg` (050 option telephone handling flag), `sbop_tran_flg` (sub-option processing flag), `kk0081_pcrs_cd` (price code for service contract), and lists for `pcrs_op_svc_list` (price code-option service list) and `kihon_prc_list` (basic price list). The `mryo_flg` field is set by this method to indicate whether the option service is free or paid. |
| 2 | `tranTrgtRecOpArray` | `X31SDataBeanAccess[]` | Array of target records for processing. Each element represents an option service record being acted upon in this transaction. Used primarily for sub-option eligibility judgment — checks whether the array is empty or if the first record's option service contract status (`op_svc_kei_stat`) equals `"910"` (already cancelled). |
| 3 | `kensuMap` | `HashMap<String, Integer>` | Count information map containing three pre-fetched counts: `RSV_TTDKI_CNT` (reservation procedure count), `KEIYAKU_CHU_CNT` (contract-in-progress count), and `DOUGETU_DSL_CNT` (same-month cancellation count). These counts are used to enforce option subscription caps and the 050 Number Plan re-application restriction. |

**Instance fields read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `DEBUG_LOG` | `Logger` | Debug logging instance for tracing method execution |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JACBatCommon.isNull` | JACBatCommon | - | Calls `isNull` in `JACBatCommon` (static null-check utility) |
| - | `JACbatRknBusinessUtil.isNull` | JACbatRknBusiness | - | Calls `isNull` in `JACbatRknBusinessUtil` (static null-check utility) |
| - | `JCHbatSeikyKaknoBusinessUtil.isNull` | JCHbatSeikyKaknoBusiness | - | Calls `isNull` in `JCHbatSeikyKaknoBusinessUtil` (static null-check utility) |
| - | `JBSbatACInsentetivePrcInfoSaksei.isNull` | JBSbatACInsentetivePrcInfoSaksei | - | Calls `isNull` in `JBSbatACInsentetivePrcInfoSaksei` (static null-check utility) |
| - | `JBSbatAKCHSeikyYsoInfMake.isNull` | JBSbatAKCHSeikyYsoInfMake | - | Calls `isNull` in `JBSbatAKCHSeikyYsoInfMake` (static null-check utility) |
| R | `JFUDataBeanAccessHelper.getDataBeanItemByPath` | JFUDataBeanAccess | JFUDataBeanAccess | Calls `getDataBeanItemByPath` in `JFUDataBeanAccessHelper` to read data bean items |
| R | `JFUWebCommon.getDataBeanItemByPath` | JFUWebCommon | - | Calls `getDataBeanItemByPath` in `JFUWebCommon` to read data from the service form bean by field path |
| - | `JFUWebCommon.setDataBeanItemByPath` | JFUWebCommon | - | Calls `setDataBeanItemByPath` in `JFUWebCommon` to write the free flag (`mryo_flg`) back to the service form bean |
| R | `FUW05401SFLogic.getRonriScreenId` | FUW05401SFLogic | - | Calls `getRonriScreenId` to retrieve the logic screen ID from the common info bean (used for porting check) |
| - | `FUW05401SFLogic.sbopDslYhJudge` | FUW05401SFLogic | - | Calls `sbopDslYhJudge` to perform sub-option cancellation necessity judgment |
| R | `super.getCommonInfoBean` | JCCWebBusinessLogic | - | Calls `getCommonInfoBean` in the parent class to retrieve the common information bean containing system context |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Logic: `FUW05401SFLogic.init()` | `init()` -> `runVariJudge(bean, tranTrgtRecOpArray, kensuMap)` | `sbopDslYhJudge [-]`, `getDataBeanItemByPath [R]`, `setDataBeanItemByPath [-]`, `getRonriScreenId [R]` |

**Notes:** No screen or batch entry points were found within 8 hops of this method. It is called exclusively by `FUW05401SFLogic.init()` as part of the screen initialization logic for the option service order/cancellation screen.

## 6. Per-Branch Detail Blocks

### Block 1 — Initialization (L970)

> Reads count values from the kensuMap into local variables for use in subsequent validation checks.

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsvTtdkiCnt = kensuMap.get(RSV_TTDKI_CNT)` // Reservation procedure count (予約手続件数) |
| 2 | SET | `keiyakuChuCnt = kensuMap.get(KEIYAKU_CHU_CNT)` // Contract-in-progress count (契約中件数) |
| 3 | SET | `dougetuDslCnt = kensuMap.get(DOUGETU_DSL_CNT)` // Same-month cancellation count (同月解約件数) |

### Block 2 — Porting Telephone Application Blocking Check (L978–L990)

> [ANK-3763-00-00 ADD] Prevents option service applications for porting telephone services. When the logic screen ID is `"FUW055"` (porting telephone service) and the transaction division is `"1"` (subscription), throws a system error. This is a front-end blocking rule.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `commonInfoBean = super.getCommonInfoBean()` // Get common info bean (共用フォームBean) |
| 2 | CALL | `ronriScreenId = getRonriScreenId(commonInfoBean)` // Get logic screen ID (論理画面ID) |
| 3 | IF | [TRAN_DIV="1"] `TRAN_DIV_MSKM.equals(getDataBeanItemByPath(bean, TRAN_DIV))` AND `RONRI_SCREEN_ID_FUW055.equals(ronriScreenId)` |
| 3.1 | SET | `DEBUG_LOG.info("...eo光電話オプションサービス申込解約：転送電話申込エラー...")` // Log porting application error |
| 3.2 | EXEC | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0002)` // System Error ("0002") |

### Block 3 — WEB Option Add Prohibition Check (L993–L1003)

> If transaction division is subscription (`"1"`) and the WEB option add prohibit flag is `"1"` (不可), throws a usage restriction error. This prevents WEB-based option service additions when the customer is flagged as prohibited.

| # | Type | Code |
|---|------|------|
| 1 | IF | [TRAN_DIV="1"] `TRAN_DIV_MSKM.equals(getDataBeanItemByPath(bean, TRAN_DIV))` AND [WEB_OP_ADD_FAIL_FLG="1"] `CD00001_1.equals(getDataBeanItemByPath(bean, WEB_OP_ADD_FAIL_FLG))` |
| 1.1 | SET | `DEBUG_LOG.info("...WEBオプション追加不可フラグエラー...")` // Log WEB option add prohibit error |
| 1.2 | EXEC | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0101)` // Usage Restriction Error ("0101") |

### Block 4 — 050 Number Plan Re-application Restriction Check (L1006–L1019)

> If transaction division is subscription (`"1"`), the 050 option telephone handling flag is `"1"` (要/required), AND the same-month cancellation count is greater than zero, throws a usage restriction error. This prevents re-subscribing to the 050 Number Plan option when the customer already has a cancellation in the same month.

| # | Type | Code |
|---|------|------|
| 1 | IF | [TRAN_DIV="1"] `TRAN_DIV_MSKM.equals(getDataBeanItemByPath(bean, TRAN_DIV))` AND [N_050_OP_TELNO_TRAN_FLG="1"] `CD00001_1.equals(getDataBeanItemByPath(bean, N_050_OP_TELNO_TRAN_FLG))` AND `dougetuDslCnt > 0` |
| 1.1 | SET | `DEBUG_LOG.info("...050オプション電話 同月解約エラー...")` // Log 050 option same-month cancellation error |
| 1.2 | EXEC | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0101)` // Usage Restriction Error ("0101") |

### Block 5 — Option Subscription Cap Check (L1022–L1053)

> When transaction division is subscription (`"1"`), checks that the contract-in-progress count does not exceed the maximum allowed option service count. If the price code is `"A32"` (Number 2 Plan), the cap is halved.

| # | Type | Code |
|---|------|------|
| 1 | IF | [TRAN_DIV="1"] `TRAN_DIV_MSKM.equals(getDataBeanItemByPath(bean, TRAN_DIV))` |
| 1.1 | SET | `strMaxOpSvcCnt = getDataBeanItemByPath(bean, PCRS_OP_SVC_LIST + SEP_0 + MAX_OP_SVC_CNT_03)` // Get max option service count from service form bean |
| 1.2 | SET | `inMaxOpSvcCnt = 0` // Initialize max count variable |
| 1.3 | IF | `!isNull(strMaxOpSvcCnt)` |
| 1.3.1 | SET | `inMaxOpSvcCnt = Integer.parseInt(strMaxOpSvcCnt)` // Parse string to integer |
| 1.4 | IF | [KK0081_PCRS_CD="A32"] `CD00134_A32.equals(getDataBeanItemByPath(bean, KK0081_PCRS_CD))` |
| 1.4.1 | SET | `inMaxOpSvcCnt = inMaxOpSvcCnt / 2` // Halve for Number 2 Plan |
| 1.5 | IF | `keiyakuChuCnt >= inMaxOpSvcCnt` |
| 1.5.1 | SET | `DEBUG_LOG.info("...最大オプション数エラー...")` // Log max option count error |
| 1.5.2 | EXEC | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0101)` // Usage Restriction Error ("0101") |

### Block 6 — Option Paid/Free Determination (L1056–L1111)

> Determines whether the option service is free or paid. First, reads the free option service count (`mryo_op_svc_cnt`) from the service form bean. If the price code is `"A32"` (Number 2 Plan), the free count is halved. Then evaluates three conditions across three transaction types:

| # | Type | Code |
|---|------|------|
| 1 | SET | `strMryoOpSvcCnt = getDataBeanItemByPath(bean, PCRS_OP_SVC_LIST + SEP_0 + MRYO_OP_SVC_CNT_03)` // Get free option service count |
| 2 | SET | `inMryoOpSvcCnt = 0` // Initialize free count |
| 3 | IF | `!isNull(strMryoOpSvcCnt)` |
| 3.1 | SET | `inMryoOpSvcCnt = Integer.parseInt(strMryoOpSvcCnt)` // Parse string to integer |
| 4 | IF | [KK0081_PCRS_CD="A32"] `CD00134_A32.equals(getDataBeanItemByPath(bean, KK0081_PCRS_CD))` |
| 4.1 | SET | `inMryoOpSvcCnt = inMryoOpSvcCnt / 2` // Halve for Number 2 Plan |
| 5 | IF | [Condition A] `TRAN_DIV_MSKM.equals(getDataBeanItemByPath(bean, TRAN_DIV))` AND `keiyakuChuCnt + rsvTtdkiCnt < inMryoOpSvcCnt` |
| 5.1 | SET | `setDataBeanItemByPath(bean, MRYO_FLG, CD00002_1)` // Set MRYO_FLG = "1" (Free/無料) |
| 6 | ELSE-IF | [Condition B] `(TRAN_DIV_DSL.equals(getDataBeanItemByPath(bean, TRAN_DIV)) AND keiyakuChuCnt + rsvTtdkiCnt <= inMryoOpSvcCnt)` OR `(TRAN_DIV_CHG.equals(getDataBeanItemByPath(bean, TRAN_DIV)) AND keiyakuChuCnt + rsvTtdkiCnt <= inMryoOpSvcCnt)` |
| 6.1 | SET | `setDataBeanItemByPath(bean, MRYO_FLG, CD00002_1)` // Set MRYO_FLG = "1" (Free/無料) |
| 7 | ELSE | // None of the above conditions match |
| 7.1 | SET | `koteiAmount = getDataBeanItemByPath(bean, KIHON_PRC_LIST + SEP_0 + PPLAN_KOTEI_AMNT_04)` // Get fixed plan amount (料金プラン固定金額) |
| 7.2 | IF | `isNull(koteiAmount)` OR `S_ZERO.equals(koteiAmount)` |
| 7.2.1 | SET | `setDataBeanItemByPath(bean, MRYO_FLG, CD00002_1)` // Set MRYO_FLG = "1" (Free/無料) |
| 7.3 | ELSE | |
| 7.3.1 | SET | `setDataBeanItemByPath(bean, MRYO_FLG, CD00002_0)` // Set MRYO_FLG = "0" (Paid/有料) |

### Block 7 — Sub-option Application Eligibility Judgment (L1114–L1132)

> If transaction division is subscription (`"1"`) and the sub-option processing flag is `"1"` (要/required), checks whether the target record array is empty or the first record's option service contract status is `"910"` (cancelled/解約済). If so, throws a contract status error.

| # | Type | Code |
|---|------|------|
| 1 | IF | [TRAN_DIV="1"] `TRAN_DIV_MSKM.equals(getDataBeanItemByPath(bean, TRAN_DIV))` AND [SBOP_TRAN_FLG="1"] `CD00001_1.equals(getDataBeanItemByPath(bean, SBOP_TRAN_FLG))` |
| 1.1 | IF | `tranTrgtRecOpArray.length == 0` OR [OP_SVC_KEI_STAT="910"] `CD00037_910.equals(getDataBeanItemByPath(tranTrgtRecOpArray[0], OP_SVC_KEI_STAT_01))` |
| 1.1.1 | SET | `DEBUG_LOG.info("...サブオプション申込可否エラー...")` // Log sub-option application eligibility error |
| 1.1.2 | EXEC | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0102)` // Contract Status Error ("0102") |

### Block 8 — Sub-option Cancellation Necessity Judgment (L1135)

> Delegates sub-option cancellation determination to the dedicated `sbopDslYhJudge` method, which analyzes each record in the target array and sets cancellation flags as needed.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `sbopDslYhJudge(bean, tranTrgtRecOpArray)` // Sub-option cancellation necessity judgment (サブオプション解約要否判定) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `tran_div` | Field | Transaction division — classifies the operation type: "1" = subscription (申込), "2" = cancellation (解約), "3" = change/modification (変更) |
| `mryo_flg` | Field | Free flag — "1" means the option service is free of charge (無料), "0" means it incurs a fee (有料) |
| `web_op_add_fail_flg` | Field | WEB Option add prohibit flag — when "1", prevents adding option services through WEB channels |
| `n_050_op_telno_tran_flg` | Field | 050 Option telephone handling flag — when "1", the customer has a 050-number-plan option telephone service |
| `sbop_tran_flg` | Field | Sub-option processing flag — when "1", sub-option application/cancellation judgment is required |
| `op_svc_kei_stat` | Field | Option service contract status — "910" means the service has been cancelled (解約済) |
| `kk0081_pcrs_cd` | Field | Price code (Service Contract) — "A32" identifies the "Number 2 Plan" (2番号コース), which halves the option service cap |
| `pcrs_op_svc_list` | Field | Price code-option service list — contains configuration data including max and free option service counts |
| `kihon_prc_list` | Field | Basic price list — contains fixed plan amount data for determining paid vs. free |
| `max_op_svc_cnt` | Field | Maximum option service count — the upper limit of concurrent option services for a customer |
| `mryo_op_svc_cnt` | Field | Free option service count — the number of option services a customer can obtain free of charge |
| `kotei_amount` | Field | Fixed plan amount — the monthly fixed charge for the selected plan; "0" indicates a free plan |
| `rsv_ttdki_cnt` | Field | Reservation procedure count — number of orders with pending reservation processing (予約手続件数) |
| `keiyaku_chu_cnt` | Field | Contract-in-progress count — number of active contracts currently in force (契約中件数) |
| `dougetu_dsl_cnt` | Field | Same-month cancellation count — number of option services cancelled within the current month (同月解約件数) |
| `kensuMap` | Field | Count information map — HashMap containing the three count values used for validation |
| `tranTrgtRecOpArray` | Field | Target record array for processing — array of option service record beans being operated on |
| `ronri_screen_id` | Field | Logic screen ID — identifies the overarching business process (FUW054 = option, FUW055 = porting, etc.) |
| FUW054 | Business term | eo Hikari Telephone Option Service Order/Cancellation (eo光電話オプションサービス申込解約) |
| FUW055 | Business term | Porting Telephone Service Order/Cancellation (転送電話サービス申込解約) |
| Number 2 Plan (2番号コース) | Business term | K-Opticom tariff plan identified by code "A32", which provides a reduced option service cap (halved from the standard maximum) |
| 050 Number Plan | Business term | 050 optional telephone number service plan — a premium telecommunication service offering a memorable phone number |
| SUBOP (サブオプション) | Acronym | Sub-option — secondary optional services bundled with the main option service |
| PCRS | Acronym | Price Code / Pricing (料金コード) |
| ERROR_CODE_0002 | Error | System Error — a critical system-level error that prevents any processing |
| ERROR_CODE_0101 | Error | Usage Restriction Error (利用制限エラー) — the customer's service usage is restricted per business rules |
| ERROR_CODE_0102 | Error | Contract Status Error (契約状態エラー) — the contract state does not permit the requested operation |
