# Business Logic — JKKWrisvcAutoAplyCC.delKojihiWrbkCp() [747 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKWrisvcAutoAplyCC` |
| Layer | Common Component / CC (Shared Business Logic) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKWrisvcAutoAplyCC.delKojihiWrbkCp()

The `delKojihiWrbkCp` method is the central eligibility gatekeeper for removing **standard construction cost discount coupons** (standard CPs) from a service registration target list (`tgList`) during automatic discount application processing. It is called just before registration, filtering out discount coupons that no longer qualify based on the current state of the customer's service contracts, discount campaign conditions, and operational context.

The method handles multiple business scenarios through conditional routing: external provider registration (where all standard CPs are excluded), bandwidth-change screen processing, post-delivery cancellation flows, and the primary new-contract path where it evaluates service-specific eligibility (NET, TEL, or combined) against active contract status, installment cancellation state, and cross-service dependencies (e.g., whether TEL is standalone).

As a **dispatch/routing pattern** implementation, the method branches by view context (VIEWID), service type (CD00130 codes), and operational state flags to apply different exclusion rules per business domain. It is a shared utility called by `addWribsvkDchskmst` and `sokanChkAndRegist` within `JKKWrisvcAutoAplyCC`, meaning it participates in the broader automatic discount application workflow across multiple registration screens.

The method also performs **cancellation record creation** -- when a discount coupon is being registered alongside an active cancellation or teardown, it automatically generates a corresponding cancellation record for the discount service contract, including appropriate cancellation reason codes and service end dates.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["delKojihiWrbkCp start"])

    START --> LOG1["Log: delKojihiWrbkCp_start"]
    LOG1 --> GET_STD["Get standard contract service list from ccMap"]
    GET_STD --> CHECK_FLG{"isFlagWrib(flg) != true?"}

    CHECK_FLG -->|Yes| EARLY_RET1["Return (not cancellable)"]
    CHECK_FLG -->|No| GET_IDO["Get idoDiv, viewId"]

    GET_IDO --> CHECK_VIEW1{"viewId == VIEWID_KKIFE386"}
    CHECK_VIEW1 -->|Yes| LOOP1["Loop tgList: remove standard discount CPs"]
    LOOP1 --> RET1["Return"]

    CHECK_VIEW1 -->|No| CHECK_BAND{"idoDiv == CD00576_00040 AND viewId == VIEWID_MSKMINF_CHG?"}
    CHECK_BAND -->|Yes| LOOP2["Loop tgList: remove standard discount CPs"]
    LOOP2 --> RET2["Return"]

    CHECK_BAND -->|No| GET_BASE["Get baseSvcKeiNo"]
    GET_BASE --> CALL_KK0241["callkk0241B004 (construction cost cap contract)"]
    CALL_KK0241 --> KK_NULL{"kk0241B004 == null?"}
    KK_NULL -->|Yes| RET3["Return"]
    KK_NULL -->|No| SET_VARS["Extract service/cap stats from kk0241B004"]

    SET_VARS --> SET_HJNK["Build hjnkjhMap with service data"]
    SET_HJNK --> CHK_ISFIRST{isFirstSeikySta?}

    CHK_ISFIRST -->|Yes| GET_ADCHG["adChgKojihiKapCp2 -> get geneAddDtmCp"]
    GET_ADCHG --> LOOP_SVC["Loop ekk0081B029List: fetch service contracts"]

    CHK_ISFIRST -->|No| CHK_ADCHG{"kojihiKapAdchgDiv == IDO_DIV_ADCHG_FIX AND viewId contains VIEWID_ADCHG_FIX?"}
    CHK_ADCHG -->|Yes| LOOP3["Loop tgList: remove standard discount CPs"]
    LOOP_ADCHG --> RET_ADCHG["Return"]
    CHK_ADCHG -->|No| LOOP_SVC

    LOOP_SVC --> CHECK_SVC_CD{"svcCd == NET or TEL?"}
    CHECK_SVC_CD -->|Yes| CHECK_DSL{"eKU0081B070List empty?"}
    CHECK_DSL -->|Yes| ADD_SVC["Add svcKeiNo to svcKeiNoAllList, svcMap"]
    CHECK_DSL -->|No| ADD_LIST["Add svcKeiNo to svcKeiNoList"]
    CHECK_SVC_CD -->|No| ADD_LIST

    ADD_SVC --> NEXT_SVC{"More services?"}
    ADD_LIST --> NEXT_SVC
    NEXT_SVC -->|Yes| LOOP_SVC
    NEXT_SVC -->|No| MAP_ENTRY["Set svcMap entries into hjnkjhMap"]

    MAP_ENTRY --> PUT_HJNK["ccMap.put(HJNKJH_MAP, hjnkjhMap)"]
    PUT_HJNK --> CHK_BASE_SVC{"BASE_SVC_KEI_KAISEN_UCWK_NO null?"}

    CHK_BASE_SVC -->|Yes| RCHK{"recheckDslAfJuhen() == true?"}
    RCHK -->|Yes| LOOP4["Loop tgList: remove standard discount CPs"]
    RCHK -->|No| CHK_ISFIRST2{isFirstSeikySta?}
    LOOP4 --> RET4["Return"]

    CHK_BASE_SVC -->|No| CHK_ISFIRST2

    CHK_ISFIRST2 -->|Yes| DEL_AF["delKojihiWrbkCpAfSeikySta (post-delivery)"]
    DEL_AF --> LOOP5["Loop tgList: remove standard discount CPs"]
    LOOP5 --> RET5["Return"]

    CHK_ISFIRST2 -->|No| CHK_DIGIT{"digitSize == 0?"}
    CHK_DIGIT -->|Yes| RET6["Return (no registration target)"]
    CHK_DIGIT -->|No| GET_MAX_CP["Get latest CP from ekk0451B012"]

    GET_MAX_CP --> LOOP_TG["Loop tgList: evaluate each CP"]
    LOOP_TG --> CHK_TG_HYOJUN{"is standard discount CP?"}

    CHK_TG_HYOJUN -->|Yes| CHK_LATEST_CP{"latest CP is ALL_KOJIHI?"}
    CHK_LATEST_CP -->|Yes| REMOVE_TG["Remove tgList item"]
    CHK_LATEST_CP -->|No| CHK_KAP_PLAN{"kapPlanCd == 24 months 10%?"}
    CHK_KAP_PLAN -->|No| REMOVE_TG
    CHK_KAP_PLAN -->|Yes| CHK_TEL_24{"wribSvcCd == TEL_24?"}
    CHK_TEL_24 -->|Yes| CHK_MSKM_YMD{"mskmYmdTel < newCpTelStaymd?"}
    CHK_MSKM_YMD -->|Yes| CHK_APLY{"callEKK2311B001 returns empty?"}
    CHK_APLY -->|Yes| REMOVE_TG

    CHK_TG_HYOJUN -->|No| CHK_NET{"wribSvcCd == NET_24?"}
    CHK_NET -->|Yes| CHK_NET_KAP{"kojihiKapOperateStat not empty?"}
    CHK_NET_KAP -->|Yes| CHK_NET_STAT{"kapKeiStat == DSL/CANCEL?"}
    CHK_NET_STAT -->|Yes| REMOVE_TG
    CHK_NET_STAT -->|No| CHK_TEL_TANDOKU{"isTelTandokuNew == true?"}
    CHK_TEL_TANDOKU -->|Yes| CHK_TEL_TANDOKU2{"isTelTandoku2New == true?"}
    CHK_TEL_TANDOKU2 -->|Yes| REMOVE_TG

    CHK_NET -->|No| CHK_TEL{"wribSvcCd == TEL_24?"}
    CHK_TEL -->|Yes| CHK_TEL_KAP{"kojihiKapOperateStat not empty?"}
    CHK_TEL_KAP -->|Yes| CHK_TEL_KAP_STAT{"kapKeiStat == UK/SHOSA/CNC/KANRYOU?"}
    CHK_TEL_KAP_STAT -->|Yes| CHK_TEL_TANDOKU2B{"isTelTandokuNew == true?"}
    CHK_TEL_TANDOKU2B -->|Yes| CHK_TEL_TANDOKU3{"isTelTandoku2New == true?"}
    CHK_TEL_TANDOKU3 -->|Yes| REMOVE_TG
    CHK_TEL_TANDOKU2B -->|No| CHK_NET_STAT2{"svcKeiStatNet == UK/SHOSA/CNC/SVCTK_CHU?"}
    CHK_NET_STAT2 -->|Yes| REMOVE_TG
    CHK_NET_STAT2 -->|No| CHK_TEL_TV{"svcKeiStatTel AND svcKeiStatTv active AND seikyKeiNoTel == seikyKeiNoTv?"}
    CHK_TEL_TV -->|No| REMOVE_TG
    CHK_TEL_KAP_STAT -->|No| REMOVE_TG
    CHK_TEL_KAP -->|No| CHK_HYOJUN2{"standard CP AND no operate AND not change?"}

    CHK_HYOJUN2 -->|Yes| CHK_LIST{"svcKeiNoList not empty?"}
    CHK_LIST -->|Yes| GET_MAXMAP["getKojihiKapCpNew2 -> check match/applied"]
    GET_MAXMAP -->|Matches| REMOVE_TG
    CHK_LIST -->|No| NEXT_TG{"More tgList items?"}

    REMOVE_TG --> NEXT_TG
    NEXT_TG -->|Yes| LOOP_TG
    NEXT_TG -->|No| CHK_OPERATE{"kojihiKapOperateStat not empty?"}

    CHK_OPERATE -->|Yes| CHK_CANCEL_NET{"NET_24 ukz OR TEL_24 ukz?"}
    CHK_CANCEL_NET -->|Yes| CHK_KAP_STAT{"kapKeiStat == null/DSL/CANCEL?"}
    CHK_KAP_STAT -->|Yes| SET_CNCL["Set cancel fields, createWribsvkDchskmstDslCncl"]
    SET_CNCL --> NEXT_CNCL{"More tgList?"}
    NEXT_CNCL -->|Yes| CHK_CANCEL_NET
    NEXT_CNCL -->|No| CHK_BASE_SVC2{"BASE_SVC_KEI_KAISEN_UCWK_NO null?"}

    CHK_BASE_SVC2 -->|Yes| LOOP6["Loop tgList: remove standard CPs"]
    LOOP6 --> RET6B["Return"]
    CHK_BASE_SVC2 -->|No| CHK_APLY_ZM{"hasFinishKojihiCp2 == true?"}

    CHK_APLY_ZM -->|Yes| LOOP7["Loop tgList: remove already-applied CPs"]
    LOOP7 --> RET7["Return"]

    CHK_APLY_ZM -->|No| LAST_CHECKS["Final branch checks: NET_24, TEL_24 conditions"]
    LAST_CHECKS --> END_TG{"More tgList?"}
    END_TG -->|Yes| LAST_CHECKS
    END_TG -->|No| LOG_END["Log: delKojihiWrbkCp_end"]
    LOG_END --> END(["delKojihiWrbkCp end"])
```

**CRITICAL - Constant Resolution:**

| Constant | Actual Value | Business Meaning |
|----------|-------------|------------------|
| `VIEWID_KKIFE386` | `"KKA182001PJP"` | External provider registration screen (new/add for contractor) |
| `VIEWID_MSKMINF_CHG` | `"KKW001330PJP"` | Registered information change screen |
| `VIEWID_ADCHG_FIX` | `"EO23I0320J0"` | Address change confirmation (preview batch) |
| `CD00576_00040` | (from `JKKStrConst`) | Bandwidth change type code |
| `GRP_DIV` | `"00"` | Group division - standard contract |
| `WRIB_ADD_JOKEN_CD_STDARD_KEI` | (from `KKSV0313_*` constants) | Discount registration condition code for standard contract |
| `CD00130_01` | `"01"` | Service code - Internet service |
| `CD00130_02` | `"02"` | Service code - Telephone service |
| `CD00130_03` | `"03"` | Service code - Television service |
| `CD00055_APLYZM` | `"300"` | Discount service status - Applied/Active |
| `CD00055_DSLZM` | `"910"` | Discount service status - Terminated/Cancelled |
| `CD00055_CSLZM` | `"920"` | Discount service status - Cancellation completed |
| `CD00055_UKZM` | `"010"` | Discount service status - Received (not yet active) |
| `CD00037_UK_ZM` | `"010"` | Service contract status - Received |
| `CD00037_SHOSA_ZUMI` | `"020"` | Service contract status - Under review |
| `CD00037_CNC_ZM` | `"030"` | Service contract status - Contracted |
| `CD00037_SVCTK_CHU` | `"100"` | Service contract status - Service in progress |
| `CD01471_DSL_ZM` | (from `JKKStrConst`) | Cap contract status - Terminated |
| `CD01471_CANCEL_ZM` | (from `JKKStrConst`) | Cap contract status - Cancellation completed |
| `CD01471_UK_ZM` | (from `JKKStrConst`) | Cap contract status - Received |
| `CD01471_SHOSA_ZUMI` | (from `JKKStrConst`) | Cap contract status - Under review |
| `CD01471_CNC_ZM` | (from `JKKStrConst`) | Cap contract status - Contracted |
| `CD01471_KANRYOU_ZM` | (from `JKKStrConst`) | Cap contract status - Completed |
| `CD01390_CL_TEISE` | (from `JKKStrConst`) | Cancel reason code - Cancellation revoked/rectified |
| `SVC_CANCEL_RSN_CD_OTHER` | (imported constant) | Cancel reason code - Other reason |
| `SVC_DLRE_CD_TUJYO_DSL` | (imported constant) | Service teardown reason code - Normal teardown |
| `WRIB_SVC_KOJIHI_WRBK_CP_NET_24` | `"W50000007"` | Standard discount CP code (24 installments, Net) |
| `WRIB_SVC_KOJIHI_WRBK_CP_TEL_24` | (from `JKKStrConst`) | Standard discount CP code (24 installments, Tel) |
| `HYOJUN_KOJIHI_WRBK_CP_LIST` | `["W50000007", TEL_24]` | List of standard construction cost discount CP codes |
| `ALL_KOJIHI_CP_LIST` | (Net, Tel, Net_24, Tel_24, Tel_IKT) | All construction cost discount CP codes (cap/standard) |
| `IDO_DIV_ADCHG_FIX` | (from `JKKDslRun`) | Move type: address change confirmation |
| `ADD_CHGE_DIV_KAIHK` | `"04"` | Register/change division - Recovery |
| `ADD_CHGE_DIV_CNCL` | `"05"` | Register/change division - Cancellation |
| `ADD_CHGE_DIV_DSL` | `"03"` | Register/change division - Termination |
| `ADD_CHGE_DIV_CRS_CHG` | `"06"` | Register/change division - Course change |
| `ADD_CHGE_DIV_CUST_PLS` | `"11"` | Register/change division - Customer merge |
| `ADD_CHGE_DIV_CUST_SLT` | `"12"` | Register/change division - Customer split |
| `ADD_CHGE_DIV_BILL_PLS` | `"13"` | Register/change division - Billing contract merge |
| `ADD_CHGE_DIV_BILL_SLT` | `"14"` | Register/change division - Billing contract split |
| `ADD_CHGE_DIV_LINE_PLS` | `"15"` | Register/change division - Line merge |
| `ADD_CHGE_DIV_PLAN_CHG` | `"02"` | Register/change division - Plan change |
| `KAP_PLAN_CD_BUNKATSU_24_10PER` | (from `JKKStrConst`) | Cap plan code: 24 months 10% discount |
| `MSKM_SBT_CD_00001` | `"00001"` | Registration type: New registration |
| `MSKM_SBT_CD_00002` | `"00002"` | Registration type: Service add-on registration |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `ccMap` | `HashMap<String, Object>` | Central context map carrying all business data for the automatic discount application session. Contains service contract lists, registration/change division codes, operational state flags, and intermediate processing results. Key fields include `SVC_KEI_GRP_LIST`, `ADD_CHGE_DIV`, `IDO_DIV`, `KOJIHI_KAP_ADCHG_DIV`, `HJNKJH_MAP`, `MSKM_SBT_CD`. |
| 2 | `tgList` | `ArrayList<HashMap<String, Object>>` | Target list of discount coupon registrations to be evaluated and potentially filtered. Each entry represents a discount coupon (CP) candidate for application, with fields like `WRIB_SVC_CD` (discount service code). Items are removed in-place when they fail eligibility checks. |
| 3 | `flg` | `String` | Cancellable flag indicating whether the current operation allows discount coupon cancellation. Value `"1"` means NOT cancellable (early return). Value `"0"` allows normal discount processing. |
| 4 | `funcCd` | `String` | Function code passed through to cancellation record creation. Identifies the calling function context for audit logging. |
| 5 | `wribsvkDchskmstList` | `ArrayList<HashMap<String, Object>>` | List of existing discount service contract registration target data. Used when cross-referencing existing TEL discount CPs against newly registered NET discount CPs to generate cancellation records. |

**External state read by this method:**

| Field | Source | Usage |
|-------|--------|-------|
| `mapper` | `JKKWrisvcAutoAplyCCMapper` (instance field) | Provides SC calls (callkk0241B004, callEKK0081B029, callSvcKeiIchiiShokai, etc.) |
| `iRparaReadW` | `IRequestParameterReadWrite` (instance field) | Reads `REQ_VIEWID` from request parameters |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `callkk0241B004` | EKK0241B004SC | Construction cost cap contract inquiry table | Queries cap contract status, service contract statuses (NET/TEL/TV), and related numbers for the base service contract |
| R | `callEKK0081B029` | EKK0081B029SC | Service contract line items | Retrieves service contract lines for the base service number to iterate over NET/TEL services |
| R | `callSvcKeiIchiiShokai` | EKK0081A010SC | Service contract master | Gets unified service contract details including service code (NET/TEL/TV) and generation timestamp |
| R | `callMskmSvcKeiShokai` | EKK0081B019CBS | Registration details - service contract inquiry | Retrieves service contract details at time of registration for generation timestamp comparison |
| R | `callEKU0081B070` | EKU0081B070SC | Service contract list inquiry | Checks whether service contract has been cancelled/terminated (empty result = not cancelled) |
| R | `adChgKojihiKapCp2` | (internal) | - | Gets the most recent construction cost discount CP for first billing |
| R | `getKojihiKapCpNew2` | (internal) | - | Gets maximum/latest discount CP from provided service list |
| R | `hasFinishKojihiCp2` | (internal) | - | Checks whether a discount coupon has already been applied |
| R | `getBaseSvcKeiNo` | (internal) | - | Retrieves base service contract number |
| R | `getMapper` | (internal) | - | Returns the mapper instance |
| R | `getSvcStaMskmYmd` | (internal) | - | Gets registration date of service contract |
| R | `callEKK0451B012ToAll` | EKK0451B012SC | Discount service contract inquiry (all) | Queries discount service contracts for the service list to find latest cap CP |
| R | `callEKK2311B001` | EKK2311B001SC | Discount application condition inquiry | Checks if the Tel 24-month CP meets application conditions against the registration date |
| R | `recheckDslAfJuhen` | (internal) | - | Rechecks discount eligibility after address change |
| C | `createWribsvkDchskmstDslCncl` | (internal) | Discount service contract termination/cancellation record | Creates cancellation records for discount service contracts during install contract scenarios |
| C | `delKojihiWrbkCpAfSeikySta` | (internal) | - | Post-delivery discount processing (registration of post-billing data) |
| R | `getOpeDate` | JCCBPCommon | - | Gets operation date (used in cancellation record creation) |

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 76 methods.
Terminal operations from this method: `printlnEjbLog` [-], `createWribsvkDchskmstDslCncl` [C], `getOpeDate` [R], `getOpeDate` [R], `getOpeDate` [R], `getOpeDate` [R], `getOpeDate` [R], `getOpeDate` [R], `getOpeDate` [R], `getOpeDate` [R], `getOpeDate` [R], `getOpeDate` [R], `printlnEjbLog` [-], `isNullBlank` [-], `isNullBlank` [-], `isNullBlank` [-], `isNullBlank` [-], `isNullBlank` [-], `getKojihiKapCpNew2` [R], `callSvcKeiIchiiShokai` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `addWribsvkDchskmst` | `JKKWrisvcAutoAplyCC.addWribsvkDchskmst` -> `JKKWrisvcAutoAplyCC.delKojihiWrbkCp` | `callkk0241B004 [R], callEKK0081B029 [R], createWribsvkDchskmstDslCncl [C]` |
| 2 | `sokanChkAndRegist` | `JKKWrisvcAutoAplyCC.sokanChkAndRegist` -> `JKKWrisvcAutoAplyCC.delKojihiWrbkCp` | `callkk0241B004 [R], callEKK0081B029 [R], createWribsvkDchskmstDslCncl [C]` |

### Call chain from entry point:

```
Screen (various via KKSV0313)
  -> JKKWrisvcAutoAplyCC.execute() (main entry)
    -> addWribsvkDchskmst() / sokanChkAndRegist()
      -> delKojihiWrbkCp()
        -> callkk0241B004 [R] -> Construction cost cap contract inquiry
        -> callEKK0081B029 [R] -> Service contract line items
        -> callSvcKeiIchiiShokai [R] -> Service contract master (unified inquiry)
        -> callMskmSvcKeiShokai [R] -> Registration details - service contract inquiry
        -> callEKU0081B070 [R] -> Service contract list inquiry
        -> callEKK0451B012ToAll [R] -> Discount service contract inquiry
        -> callEKK2311B001 [R] -> Discount application condition inquiry
        -> createWribsvkDchskmstDslCncl [C] -> Discount service contract cancellation
        -> delKojihiWrbkCpAfSeikySta [C] -> Post-delivery processing
```

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Initial setup and constant resolution (L21216)

| # | Type | Code |
|---|------|------|
| 1 | SET | `comWribSvcCd = KKSV0313_KKSV0313OP_KKSV031310SC_EKK0451A010CBSMsg1List.WRIB_SVC_CD` |
| 2 | SET | `comSvcKeiGrpList = KKSV0313_KKSV0313OP_WORK.SVC_KEI_GRP_LIST` |
| 3 | SET | `comSvcKeiList = KKSV0313_KKSV0313OP_WORK_SVC_KEI_GRP.SVC_KEI_LIST` |
| 4 | EXEC | `printlnEjbLog("業務log_delKojihiWrbkCp_start")` // Log: business log start (業務log_delKojihiWrbkCp_start) |

**Block 2** — [CALL] Get standard contract service list (L21223)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `getMapFromList(svcKeiGrpList, GRP_DIV="00" (Group division: standard contract), WRIB_ADD_JOKEN_CD_STDARD_KEI)` // Find standard contract group map |
| 2 | SET | `stdardMap = svcKeiList.get(0)` // Standard contract data |

**Block 3** — [IF] Cancellable flag check (L21228)
> (対象がキャンセルの場合の処理対象とする / Only process if cancellable)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!isFlagWrib(flg)` [WRIB_AUTO_NOT_TG_FLG="1" means not cancellable] (L21228) |
| 2 | RETURN | Return immediately if flag indicates non-cancellable |

**Block 4** — [SET] Get movement division and view ID (L21232)

| # | Type | Code |
|---|------|------|
| 1 | SET | `idoDiv = JKKStringUtil.nullToBlank(ccMap.get(KKSV0313_KKSV0313OP_WORK.IDO_DIV))` |
| 2 | SET | `viewId = JKKStringUtil.nullToBlank(iRparaReadW.getControlMapData(SCControlMapKeys.REQ_VIEWID))` |

**Block 5** — [IF] External provider registration screen (L21235)
> (呼び出し元サービスがKKIFE386（KKA182）: 情報登録連携(新規・追加)(専業者)の場合 / When caller service is KKA182 external provider registration)

| # | Type | Code |
|---|------|------|
| 1 | IF | `VIEWID_KKIFE386.equals(viewId)` [KKA182001PJP] (L21235) |
| 2 | FOR | Loop `i = 0` to `tgList.size()` (L21238) |
| 3 | IF | `HYOJUN_KOJIHI_WRBK_CP_LIST.contains(tgList.get(i).get(comWribSvcCd))` [Standard discount CP check] (L21240) |
| 4 | EXEC | `printlnEjbLog("業務log_除外対象割引サービスコード：" + ...)` // Log: excluded discount service code (業務log_除外対象割引サービスコード) |
| 5 | EXEC | `tgList.remove(i); i--` // Remove from target list |
| 6 | EXEC | `continue` |
| 7 | RETURN | Return after loop (all standard CPs excluded) |

**Block 6** — [IF] Bandwidth change info screen (L21252)
> (バンドル情報変更は処理しない / Do not process for bundle information change)

| # | Type | Code |
|---|------|------|
| 1 | IF | `CD00576_00040.equals(idoDiv) && VIEWID_MSKMINF_CHG.equals(viewId)` [KKW001330PJP] (L21252) |
| 2 | FOR | Loop `i = 0` to `tgList.size()` (v60.00.02 ADD START) (L21255) |
| 3 | IF | `HYOJUN_KOJIHI_WRBK_CP_LIST.contains(tgList.get(i).get(comWribSvcCd))` |
| 4 | EXEC | `printlnEjbLog("業務log_除外対象割引サービスコード：" + ...)` |
| 5 | EXEC | `tgList.remove(i); i--` |
| 6 | RETURN | Return after loop |

**Block 7** — [CALL] Get base service number and query cap contract (L21270)

| # | Type | Code |
|---|------|------|
| 1 | SET | `baseSvcKeiNo = (String)ccMap.get("JKKWrisvcAutoAplyCC_baseSvcKeiNo")` |
| 2 | IF | `JKKStringUtil.isNullBlank(baseSvcKeiNo)` |
| 3 | CALL | `getBaseSvcKeiNo(ccMap, stdardMap)` |
| 4 | CALL | `getMapper().callkk0241B004(ccMap, baseSvcKeiNo, EKK0241B004_FUNC_CD_3)` (L21278) |
| 5 | IF | `kk0241B004 == null` (L21279) |
| 6 | RETURN | Return if null |
| 7 | SET | `kapKeiStat, svcKeiStatNet, svcKeiStatTel, svcKeiStatTv, seikyKeiNoTel, seikyKeiNoTv, kojihiKapCpKeiNoNet, kojihiKapCpKeiNoTel, kojihiKapCpStatNet, kojihiKapCpStatTel, kapPlanCd, svcKeiKaisenUcwkNo` (L21281-21296) |

**Block 8** — [SET] Build hjnkjhMap with service data (L21297-21317)

| # | Type | Code |
|---|------|------|
| 1 | SET | `firstSeikySvcKeiNo = hjnkjhMap.get(EKK3131B060CBSMsg1List.FIRST_SEIKY_SVC_KEI_NO)` |
| 2-15 | SET | `hjnkjhMap.put(...)` x16 times (service numbers, statuses, SYSIDs for NET/TEL/TV) |
| 16 | SET | `isFirstSeikySta = !JKKStringUtil.isNullBlank(firstSeikySvcKeiNo)` |
| 17 | SET | `kojihiKapOperateStat = (String)ccMap.get("kojihi_kap_operate_stat")` |
| 18 | IF | `"2".equals(kojihiKapOperateStat)` (L21321) |
| 19 | SET | `kapKeiStat = ""` // Clear cap contract status when operate stat is "2" |

**Block 9** — [IF/ELSE] First billing status check (L21326)

| # | Type | Code |
|---|------|------|
| 1 | SET | `renban = 0` |
| 2 | SET | `digitSize = calcRenbanDigitSize(tgList.size())` |
| 3 | SET | `geneAddDtmCp = ""` |
| 4 | IF | `isFirstSeikySta` (L21328) |
| 5 | CALL | `adChgKojihiKapCp2(ccMap, firstSeikySvcKeiNo)` -> get `geneAddDtmCp` |
| 6 | ELSE | (L21336) |
| 7 | SET | `kojihiKapAdchgDiv = JKKStringUtil.nullToBlank(ccMap.get(KKSV0313_KKSV0313OP_WORK.KOJIHI_KAP_ADCHG_DIV))` |
| 8 | IF | `JKKDslRun.IDO_DIV_ADCHG_FIX.equals(kojihiKapAdchgDiv) && viewId.contains(VIEWID_ADCHG_FIX)` (L21338) |
| 9 | FOR | Loop `i = 0` to `tgList.size()` - remove standard CPs |
| 10 | RETURN | Return after loop |

**Block 10** — [FOR] Service contract iteration (L21350)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `getMapper().callEKK0081B029(baseSvcKeiNo)` |
| 2 | SET | `svcKeiNoList, svcKeiNoAllList, svcMap` |
| 3 | FOR | `for (CAANMsg ekk0081B029Map : ekk0081B029List)` (L21357) |
| 4 | SET | `renban++; renbanNo = WRIBSVK_DCHSKMST_GRP_SHOKI + String.format(...)` |
| 5 | SET | `svcKeiNo = ekk0081B029Map.getString(EKK0081B029CBSMsg1List.SVC_KEI_NO)` |
| 6 | CALL | `getMapper().callSvcKeiIchiiShokai(ccMap, svcKeiNo, SVC_KEI_ICHII_FUNC_CD="2", renbanNo)` |
| 7 | SET | `svcCd, geneAddDtm` |
| 8 | CALL | `getMapper().callMskmSvcKeiShokai(ccMap, svcKeiNo, FUNC_CD_1="1")` -> get `geneAddDtmOld` |
| 9 | IF | `JKKStrConst.CD00130_03.equals(svcCd)` [TV service] (L21368) |
| 10 | SET | `svcMapNow = svcMap.get(svcCd)` |
| 11 | IF | `geneAddDtmOld.compareTo(geneAddDtmCp) <= 0 && geneAddDtmNow.compareTo(geneAddDtm) < 0` |
| 12 | SET | `svcMapNow.put(SVC_KEI_NO, svcKeiNo); svcMapNow.put(GENE_ADD_DTM, geneAddDtm)` |
| 13 | IF | `!CD00130_01.equals(svcCd) && !CD00130_02.equals(svcCd)` [Not NET/TEL] |
| 14 | CONTINUE | Skip to next |
| 15 | IF | `CD00130_01` or `CD00130_02` [NET or TEL] |
| 16 | CALL | `getMapper().callEKU0081B070(ccMap, svcKeiNo, svcKeiKaisenUcwkNo)` |
| 17 | IF | `eKU0081B070List == null || empty` |
| 18 | SET | `svcKeiNoAllList.add(svcKeiNo); svcMapNow.put(...)` |
| 19 | SET | `svcKeiNoList.add(svcKeiNo)` |

**Block 11** — [FOR] Set svcMap entries into hjnkjhMap (L21384)

| # | Type | Code |
|---|------|------|
| 1 | FOR | `for (Map.Entry<String, Map<String, String>> entry : svcMap.entrySet())` |
| 2 | IF | `!isNullBlank(svcCd) && svcMapNow != null` |
| 3 | SET | `svKeiNo = svcMapNow.get(EKK0081A010CBSMsg1List.SVC_KEI_NO)` |
| 4 | IF | `!isNullBlank(svKeiNo)` |
| 5 | IF | `CD00130_01.equals(svcCd)` -> `hjnkjhMap.put(SVC_KEI_NO_NET, svKeiNo)` |
| 6 | ELSE-IF | `CD00130_02.equals(svcCd)` -> `hjnkjhMap.put(SVC_KEI_NO_TEL, svKeiNo)` |
| 7 | ELSE-IF | `CD00130_03.equals(svcCd)` -> `hjnkjhMap.put(SVC_KEI_NO_TV, svKeiNo)` |

**Block 12** — [SET] Save hjnkjhMap and recheck logic (L21397)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `ccMap.put(KKSV0313_KKSV0313OP_WORK.HJNKJH_MAP, hjnkjhMap)` |
| 2 | IF | `JKKStringUtil.isNullBlank(hjnkjhMap.get(BASE_SVC_KEI_KAISEN_UCWK_NO))` (v60.00.06 ADD) |
| 3 | CALL | `recheckDslAfJuhen(ccMap, baseSvcKeiNo, hjnkjhMap)` |
| 4 | IF | `recheckDslAfJuhen() == true` -> Loop tgList: remove standard CPs, Return |

**Block 13** — [IF/ELSE] Post-delivery processing branch (L21413)

| # | Type | Code |
|---|------|------|
| 1 | IF | `isFirstSeikySta` |
| 2 | CALL | `delKojihiWrbkCpAfSeikySta(ccMap, flg, funcCd)` |
| 3 | FOR | Loop tgList: remove standard CPs |
| 4 | RETURN | |

**Block 14** — [IF] No registration target check (L21431)

| # | Type | Code |
|---|------|------|
| 1 | IF | `digitSize == 0` (L21431) |
| 2 | RETURN | Return (no registration target) |

**Block 15** — [SET] Get latest construction cost CP (L21450, v60.00.07 ADD)

| # | Type | Code |
|---|------|------|
| 1 | SET | `kojihiCpWribSvcCd = ""` |
| 2 | IF | `svcKeiNoList.size() > 0` |
| 3 | CALL | `getMapper().callEKK0451B012ToAll(ccMap, WRIB_SVC_KEI_FOR_SVC_KEI_NO_ICHII_FUNC_CD="1", retStringList(svcKeiNoList))` |
| 4 | FOR | Loop through ekk0451B012 results |
| 5 | IF | `ALL_KOJIHI_CP_LIST.contains(...) || HYOJUN_KOJIHI_WRBK_CP_LIST.contains(...)` |
| 6 | IF | `!isNullBlank(kojihiKapOperateStat) && (CD00055_APLYZM="300" or CD00055_DSLZM="910" or CD00055_CSLZM="920")` |
| 7 | CONTINUE | Skip if operate stat exists and status is applied/terminated/cancelled |
| 8 | SET | Update `kojihiCpWribSvcCd` and `kojihiCpMaxAddDtm` based on latest ADD_DTM |

**Block 16** — [FOR] Main CP evaluation loop (L21484)

This is the largest block. Each iteration evaluates a CP in `tgList`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `wribSvcCd = tgList.get(i).get(comWribSvcCd)` |
| 2 | IF | `HYOJUN_KOJIHI_WRBK_CP_LIST.contains(wribSvcCd)` [Standard CP] |
| 3 | IF | `!isNullBlank(kojihiCpWribSvcCd) && ALL_KOJIHI_CP_LIST.contains(kojihiCpWribSvcCd)` [Latest CP is ALL_KOJIHI] |
| 4 | EXEC | `printlnEjbLog(...); tgList.remove(i); i--; continue` |
| 5 | IF | `isNullBlank(kojihiCpWribSvcCd) && !KAP_PLAN_CD_BUNKATSU_24_10PER.equals(kapPlanCd)` [No latest CP and not 24-month 10% plan] |
| 6 | EXEC | `printlnEjbLog(...); tgList.remove(i); i--; continue` |
| 7 | IF | `JKKStrConst.WRIB_SVC_KOJIHI_WRBK_CP_TEL_24.equals(wribSvcCd)` [Tel 24-month CP] |
| 8 | IF | `Arrays.asList({MSKM_SBT_CD_00001, MSKM_SBT_CD_00002}).contains(mskmSbtCd)` [New or service add-on registration] |
| 9 | CALL | `getSvcStaMskmYmd(ccMap, svcKeiNoTel)` |
| 10 | IF | `mskmYmdTel.compareTo(newCpTelStaymd) < 0` |
| 11 | CALL | `getMapper().callEKK2311B001(...)` |
| 12 | IF | `ekk2311B001.size() == 0` -> Remove CP |

**Block 17** — [IF] Operate stat branch: cancellation record creation (L21561)

| # | Type | Code |
|---|------|------|
| 1 | IF | `!JKKStringUtil.isNullBlank(kojihiKapOperateStat)` (L21561) |
| 2 | FOR | Loop `i = 0` to `tgList.size()` |
| 3 | SET | `renban++; renbanNo = WRIBSVK_DCHSKMST_GRP_RLS + String.format(...)` |
| 4 | IF | `(NET_24 && CD00055_UKZM.equals(kojihiKapCpStatNet)) OR (TEL_24 && CD00055_UKZM.equals(kojihiKapCpStatTel))` [Received status] |
| 5 | IF | `isNullBlank(kapKeiStat) || CD01471_DSL_ZM.equals(kapKeiStat) || CD01471_CANCEL_ZM.equals(kapKeiStat)` |
| 6 | EXEC | `printlnEjbLog("業務log_キャンセル対象割引サービスコード：...")` |
| 7 | SET | `tgList.get(i).put(WRIB_SVC_KEI_NO, kojihiKapCpKeiNoNet/TEL)` |
| 8 | SET | `tgList.get(i).put(SVC_CANCEL_RSN_CD, CD01390_CL_TEISE)` |
| 9 | CALL | `createWribsvkDchskmstDslCncl(ccMap, tgList.get(i), flg, funcCd, renbanNo)` |

**Block 18** — [IF] BASE_SVC_KEI recheck after cancellation (L21598, v60.00.06 ADD)

| # | Type | Code |
|---|------|------|
| 1 | IF | `JKKStringUtil.isNullBlank(hjnkjhMap.get(BASE_SVC_KEI_KAISEN_UCWK_NO))` |
| 2 | FOR | Loop tgList: remove standard CPs |
| 3 | RETURN | |

**Block 19** — [IF] Already applied CP check (L21610)

| # | Type | Code |
|---|------|------|
| 1 | SET | `isAplyZm = hasFinishKojihiCp2(ccMap, baseSvcKeiNo, svcKeiNoList)` |
| 2 | FOR | Loop `i = 0` to `tgList.size()` (L21613) |
| 3 | IF | `HYOJUN_KOJIHI_WRBK_CP_LIST.contains(...)` [Standard CP] |
| 4 | IF | `isAplyZm` (already applied) |
| 5 | EXEC | `printlnEjbLog(...); tgList.remove(i); i--; continue` |
| 6 | IF | `JKKStrConst.WRIB_SVC_KOJIHI_WRBK_CP_NET_24.equals(...)` [NET_24 CP] |
| 7 | IF | `kojihiKapOperateStat not empty` |
| 8 | IF | `isNullBlank(kapKeiStat) || CD01471_DSL_ZM or CD01471_CANCEL_ZM` |
| 9 | EXEC | Remove CP |
| 10 | IF | `!{ADD_CHGE_DIV_KAIHK, CNCL, DSL} && isTelTandokuNew(...)` |
| 11 | IF | `isTelTandoku2New(...)` |
| 12 | EXEC | Remove CP |

**Block 20** — [IF] TEL_24 CP detailed checks (L21655)

| # | Type | Code |
|---|------|------|
| 1 | IF | `JKKStrConst.WRIB_SVC_KOJIHI_WRBK_CP_TEL_24.equals(...)` |
| 2 | IF | `kojihiKapOperateStat not empty` |
| 3 | IF | `CD01471_UK_ZM/SHOSA_ZUMI/CNC_ZM/KANRYOU_ZM.equals(kapKeiStat)` |
| 4 | IF | `!{KAIHK, CNCL, DSL} && isTelTandokuNew(...)` |
| 5 | IF | `isTelTandoku2New(...)` -> Remove CP |
| 6 | IF | `CD00037_UK_ZM/SHOSA_ZUMI/CNC_ZM/SVCTK_CHU.equals(svcKeiStatNet)` -> Remove CP |
| 7 | IF | `NOT ((Tel active AND Tv active AND seikyKeiNoTel == seikyKeiNoTv))` -> Remove CP |
| 8 | ELSE | Remove CP (kapKeiStat not in the above list) |
| 9 | ELSE | Remove CP (kojihiKapOperateStat empty) |

**Block 21** — [IF] Standard CP with no operate stat and no change type (L21717)

| # | Type | Code |
|---|------|------|
| 1 | IF | `HYOJUN_KOJIHI_WRBK_CP_LIST.contains(...) && isNullBlank(kojihiKapOperateStat) && NOT ({KAIHK, CNCL, DSL, CRS_CHG, CUST_PLS, CUST_SLT, BILL_PLS, BILL_SLT, LINE_PLS, PLAN_CHG, CRS_CHG})` |
| 2 | IF | `svcKeiNoList.size() != 0` |
| 3 | CALL | `getKojihiKapCpNew2(ccMap, svcKeiNoList)` |
| 4 | IF | `wribSvcCdMax.equals(tgList CP) || CD00055_APLYZM.equals(wribSvcStatMax) || isNullBlank(wribSvcCdMax)` -> Remove CP |

**Block 22** — [ELSE-IF] Standard CP with no operate stat but with change type (L21735)

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `HYOJUN_KOJIHI_WRBK_CP_LIST.contains(...) && isNullBlank(kojihiKapOperateStat) && ({KAIHK, CNCL, DSL, CRS_CHG, CUST_PLS, CUST_SLT, BILL_PLS, BILL_SLT, LINE_PLS, PLAN_CHG, CRS_CHG})` |
| 2 | FOR | Loop ekk0081B029List: fetch service contracts |
| 3 | IF | `CD00130_01` or `CD00130_02` [NET or TEL] |
| 4 | SET | `svcKeiNoList.add(svcKeiNo)` |
| 5 | IF | `svcKeiNoList.size() != 0` |
| 6 | CALL | `getKojihiKapCpNew2(ccMap, svcKeiNoList)` |
| 7 | IF | `isNullBlank(wribSvcCdMax)` -> Remove CP |

**Block 23** — [IF] NET CP with TEL existing (L21760)

| # | Type | Code |
|---|------|------|
| 1 | IF | `(CD00055_UKZM.equals(kojihiKapCpStatTel) || CD00055_SVCTK_CHU.equals(kojihiKapCpStatTel)) && !ADD_CHGE_DIV_KAIHK.equals(addChgeDiv)` (L21760) |
| 2 | FOR | Outer loop over tgList for NET_24 |
| 3 | IF | `JKKStrConst.WRIB_SVC_KOJIHI_WRBK_CP_NET_24.equals(...)` |
| 4 | FOR | Inner loop over `wribsvkDchskmstList` |
| 5 | IF | `JKKStrConst.WRIB_SVC_KOJIHI_WRBK_CP_TEL_24.equals(wribsvkDchskmstList.get(j).get(comWribSvcCd))` |
| 6 | SET | `renban++; renbanNo = WRIBSVK_DCHSKMST_GRP_RLS + ...` |
| 7 | SET | `hashMap = new HashMap<>(wribsvkDchskmstList.get(j))` |
| 8 | SET | `hashMap.put(SVC_CANCEL_RSN_CD, CD01390_CL_TEISE)` |
| 9 | IF | `WRIB_SVC_KEI_STAT_UK_ZM.equals(kojihiKapCpStatTel)` |
| 10 | SET | `hashMap.put(JKKWrisvcDchskmCommonUtil.SVC_CANCEL_RSN_CD, SVC_CANCEL_RSN_CD_OTHER)` |
| 11 | ELSE-IF | `WRIB_SVC_KEI_STAT_SVC_TK_CHU.equals(kojihiKapCpStatTel)` |
| 12 | SET | `hashMap.put(JKKWrisvcDchskmCommonUtil.SVC_DLRE_CD, SVC_DLRE_CD_TUJYO_DSL)` |
| 13 | SET | `hashMap.put(JKKWrisvcDchskmCommonUtil.SVC_ENDYMD, JCCBPCommon.getOpeDate(null))` |
| 14 | SET | `hashMap.put(JKKWrisvcDchskmCommonUtil.SVC_CHRG_ENDYMD, JCCBPCommon.getOpeDate(null))` |
| 15 | CALL | `createWribsvkDchskmstDslCncl(ccMap, hashMap, flg, funcCd, renbanNo)` |
| 16 | BREAK | Exit inner loop |

**Block 24** — [SET] Final log (L21806)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `printlnEjbLog("業務log_delKojihiWrbkCp_end")` |
| 2 | RETURN | End of method |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `cp` | Field | Discount Coupon (Coupon) — A promotional discount applied to construction costs in telecom service billing |
| `standard CP` | Field | Standard construction cost discount coupon — A specific type of promotional discount (W50000007 for Net, TEL variant for Phone) |
| `ALL_KOJIHI_CP` | Field | All construction cost discount coupons — Includes both cap (割引) and standard (割引) variants across Net and Tel |
| `HYOJUN_KOJIHI_WRBK_CP` | Field | Standard construction cost discount — The 24-installment standard promotional discount campaign |
| `kojihi_kap` | Field | Construction cost cap (割引割譲) — Discount installment assignment/assignment discount |
| `kapKeiStat` | Field | Cap contract status — The current state of the cap installment contract (Received, Terminated, Cancelled, etc.) |
| `kojihiKapCpStatNet` | Field | Construction cost discount CP status (Net) — Status of the Net discount coupon |
| `kojihiKapCpStatTel` | Field | Construction cost discount CP status (Tel) — Status of the Telephone discount coupon |
| `svcKeiStatNet` | Field | Service contract status (Net) — Overall status of the Internet service contract |
| `svcKeiStatTel` | Field | Service contract status (Tel) — Overall status of the Telephone service contract |
| `svcKeiStatTv` | Field | Service contract status (TV) — Overall status of the Television service contract |
| `flg` | Field | Cancel flag — Indicates whether the operation is cancellable ("1" = not cancellable, "0" = cancellable) |
| `funcCd` | Field | Function code — Identifies the calling function context for audit and logging |
| `idoDiv` | Field | Movement division — Type of operation change (add, cancel, recovery, bandwidth change, address change, etc.) |
| `addChgeDiv` | Field | Register/change division — Classification of the operation (Registration, Plan Change, Termination, Recovery, Cancellation, Course Change, Customer Merge/Split, Billing Merge/Split, Line Merge) |
| `kojihiKapOperateStat` | Field | Construction cost cap operate status — Indicates whether cap contract processing is active ("2" = clear status) |
| `firstSeikySvcKeiNo` | Field | First billing service contract number — The service contract associated with the first billing cycle |
| `baseSvcKeiNo` | Field | Base service contract number — The primary service contract number for the customer |
| `hjnkhMap` | Field | Standard construction cost map — Temporary storage for service data during processing |
| `geneAddDtmCp` | Field | Generation add timestamp (CP) — Timestamp of the most recent discount CP generation |
| `viewId` | Field | View ID — The screen identifier indicating which UI context is calling this method |
| `tgList` | Field | Target list — List of discount coupon registration targets to evaluate |
| `ccMap` | Field | CC Map — Central context map carrying all business data for the CC session |
| `wribsvkDchskmstList` | Field | WRIB SVC DK SKM ST List — Discount service contract registration target data list |
| `renban` | Field | Serial number — Sequential number assigned to each CP processing iteration |
| `renbanNo` | Field | Renban number — Formatted serial number for group identification |
| `NET` | Business term | Internet service (CD00130_01) — The "Net" service in K-Opticom's triple-play offering |
| `TEL` | Business term | Telephone service (CD00130_02) — The telephone service in K-Opticom's triple-play offering |
| `TV` | Business term | Television service (CD00130_03) — The television service (not a primary focus in this method) |
| `CAP` | Business term | Cap contract — Installment agreement for construction cost discount assignment |
| `CAP/CP` | Business term | Construction cost Discount Coupon — Promotional discount for construction/installation fees |
| `KKIFE386` | Screen | KKA182001PJP - Information registration linkage screen for external providers (new/add) |
| `VIEWID_MSKMINF_CHG` | Screen | KKW001330PJP - Registered information change screen |
| `VIEWID_ADCHG_FIX` | Screen | EO23I0320J0 - Address change confirmation (preview batch) |
| `SVC_KEI_ICHII_FUNC_CD` | Constant | "2" — Service contract unified inquiry function code |
| `WRIBSVK_DCHSKMST_GRP_SHOKAI` | Constant | "00" — Group division for service contract inquiry |
| `WRIBSVK_DCHSKMST_GRP_RLS` | Constant | "02" — Group division for service contract release/cancellation |
| `WRIBSVK_DCHSKMST_RLS_ZM` | Constant | "1" — Release completed flag |
| `ADD_CHGE_DIV_ADD` | Constant | "01" — Registration |
| `ADD_CHGE_DIV_PLAN_CHG` | Constant | "02" — Plan change |
| `ADD_CHGE_DIV_DSL` | Constant | "03" — Termination |
| `ADD_CHGE_DIV_KAIHK` | Constant | "04" — Recovery (restoration) |
| `ADD_CHGE_DIV_CNCL` | Constant | "05" — Cancellation |
| `ADD_CHGE_DIV_CRS_CHG` | Constant | "06" — Course change |
| `ADD_CHGE_DIV_CUST_PLS` | Constant | "11" — Customer merge |
| `ADD_CHGE_DIV_CUST_SLT` | Constant | "12" — Customer split |
| `ADD_CHGE_DIV_BILL_PLS` | Constant | "13" — Billing contract merge |
| `ADD_CHGE_DIV_BILL_SLT` | Constant | "14" — Billing contract split |
| `ADD_CHGE_DIV_LINE_PLS` | Constant | "15" — Line merge |
| `GRP_DIV_STDARD_KEI` | Constant | "00" — Group division: standard contract |
| `CD00037_UK_ZM` | Constant | "010" — Service contract status: Received |
| `CD00037_SHOSA_ZUMI` | Constant | "020" — Service contract status: Under review |
| `CD00037_CNC_ZM` | Constant | "030" — Service contract status: Contracted |
| `CD00037_SVCTK_CHU` | Constant | "100" — Service contract status: Service in progress |
| `CD00055_APLYZM` | Constant | "300" — Discount service status: Applied |
| `CD00055_DSLZM` | Constant | "910" — Discount service status: Terminated |
| `CD00055_CSLZM` | Constant | "920" — Discount service status: Cancellation completed |
| `CD00055_UKZM` | Constant | "010" — Discount service status: Received |
| `CD00055_SVCTK_CHU` | Constant | "100" — Discount service status: Service in progress |
| `CD00130_01` | Constant | "01" — Service code: Internet |
| `CD00130_02` | Constant | "02" — Service code: Telephone |
| `CD00130_03` | Constant | "03" — Service code: Television |
| `CD01390_CL_TEISE` | Constant | Cancel reason code: Cancellation revoked/rectified |
| `SVC_CANCEL_RSN_CD_OTHER` | Constant | Cancel reason code: Other reason |
| `SVC_DLRE_CD_TUJYO_DSL` | Constant | Service teardown reason code: Normal teardown |
| `MSKM_SBT_CD_00001` | Constant | "00001" — Registration type: New registration |
| `MSKM_SBT_CD_00002` | Constant | "00002" — Registration type: Service add-on registration |
| `EKK0241B004_FUNC_CD_3` | Constant | "3" — Function code for cap contract inquiry (construction cost cap) |
| `EKK0241B004_FUNC_CD_4` | Constant | "4" — Function code for cap contract inquiry with recovery |
| `BASE_SVC_KEI_KAISEN_UCWK_NO` | Field | Base service detail work number — Internal tracking for base service contract details |
| `WRIB_TYPE_CD_CMP_WARI` | Constant | "50" — Discount type code: Campaign discount |
| `WRIB_SVC_SBT_TYPE_TIKAN` | Constant | "01" — Discount service type: Replacement type |
| `WRIB_SVC_SBT_TYPE_NEBIKI` | Constant | "02" — Discount service type: Discount type |
| `SEIRITSU_JOKEN_RECHECK` | Field | Eligibility condition recheck flag |
| `SEIRITSU_JOKEN_RECHECK_YES` | Constant | "1" — Recheck with conditions |
| `WRIB_AUTO_TG_FLG` | Constant | "0" — Discount automatic application target flag: Target |
| `WRIB_AUTO_NOT_TG_FLG` | Constant | "1" — Discount automatic application target flag: Non-target |
| `KAP_SYSID` | Field | Cap SYSID — System identifier for cap contract |
| `KAP_SEIKY_KEI_NO` | Field | Cap billing contract number |
| `WRIB_DSL_FLG` | Field | Discount termination flag |
| `WRIB_DSL_FLG_ON` | Constant | "1" — Discount termination: Target |
| `SVC_KEI_NO_NET` | Field | Service contract number (Net) |
| `SVC_KEI_NO_TEL` | Field | Service contract number (Tel) |
| `SVC_KEI_NO_TV` | Field | Service contract number (TV) |
| `DBLE_FAIL_DIV_01` | Constant | "01" — Duplicate non-distinguishable: Applied only (not applicable) |
| `DBLE_FAIL_DIV_02` | Constant | "02" — Duplicate non-distinguishable: Applied/Completed both (not applicable) |
| `DBLE_FAIL_DIV_03` | Constant | "03" — Duplicate non-distinguishable: Applied only (not applicable with billing period) |
| `WRIB_ADD_JOKEN_CD_JOKEN_NON` | Constant | Discount registration condition: No condition |
| `WRIB_ADD_JOKEN_CD_CUST` | Constant | Discount registration condition: Customer |
| `WRIB_ADD_JOKEN_CD_SEI` | Constant | Discount registration condition: Billing |
| `WRIB_ADD_JOKEN_CD_KAISEN` | Constant | Discount registration condition: Line/Route |
| `WRIB_ADD_JOKEN_CD_CUST_SEI` | Constant | Discount registration condition: Customer + Billing |
| `WRIB_ADD_JOKEN_CD_SEI_KAISEN` | Constant | Discount registration condition: Billing + Line |
| `SVC_KEI_STAT_UK_ZM` | Constant | "010" — Service contract status: Received |
| `SVC_KEI_STAT_SHOSA_ZM` | Constant | "020" — Service contract status: Under review |
| `SVC_KEI_STAT_CNC_ZM` | Constant | "030" — Service contract status: Contracted |
| `SVC_KEI_STAT_SVC_TK_CHU` | Constant | "100" — Service contract status: Service in progress |
| `SVC_KEI_STAT_DSL_ZM` | Constant | "910" — Service contract status: Terminated |
| `SVC_KEI_STAT_CNCL_ZM` | Constant | "920" — Service contract status: Cancellation completed |
| `WRIB_DCHS_SKBT_FLAG_WRIB` | Constant | "1" — Discount/service data extraction flag: Discount service |
| `WRIB_DCHS_SKBT_FLAG_DCHS` | Constant | "2" — Discount/service data extraction flag: Data extraction |
| `WRIB_APLY_OPTNTY_CD_CUST_MSKM` | Constant | "1" — Discount application opportunity: Customer registration |
| `WRIB_APLY_OPTNTY_CD_AUTO_APLY` | Constant | "2" — Discount application opportunity: Automatic application |
