# Eo / Web / Webview / Kkw12601sf

## Overview

The `KKW12601SF` module implements the **Thank-you Letter List Inquiry** screen (加入御礼書一覧照会). It is the central hub for managing customer thank-you letters — the business documents sent to acknowledge receipt of payments, subscriptions, or other contractual events. Engineers should think of this module as the main navigation and batch-processing control center for the thank-you letter lifecycle: viewing a paginated list of letters, searching and filtering records, performing bulk updates (e.g., exclusion flags, re-issuance), extracting data for batch jobs, and sending/receiving letters via Yamato delivery.

The module lives within the Fujitsu Futurity X31/X33 web framework. Its entry point is `[KKW12601SFLogic](source/koptWebB/src/eo/web/webview/KKW12601SF/KKW12601SFLogic.java)`, which contains all action methods wired to screen buttons and events. Data flows through a hierarchical bean structure: a page-level bean (`KKW12601SFBean`) holds search conditions and list data, while three sub-beans (`KKW12601SF01DBean`, `KKW12601SF02DBean`, `KKW12601SF03DBean`) manage pulldown lists, detail row fields, and pre-update snapshots respectively.

## Architecture

```mermaid
flowchart TD
    subgraph KKW12601SF["KKW12601SF Module"]
        Logic["KKW12601SFLogic<br/>Business Logic Controller"]
        Bean["KKW12601SFBean<br/>Main Page Data Bean"]
        Checker["KKW12601SFChecker<br/>GUI Check (placeholder)"]
        Const["KKW12601SFConst<br/>Constants"]

        D01["KKW12601SF01DBean<br/>Pulldown Data Sub-Bean<br/>(code lists, names)"]
        D02["KKW12601SF02DBean<br/>Detail Row Sub-Bean<br/>(single record fields)"]
        D03["KKW12601SF03DBean<br/>Pre-update Snapshot<br/>(before-update values)"]
    end

    subgraph ExternalServices["External Services (EJB)"]
        KKSV0131["KKSV0131<br/>Init: pull-down data"]
        KKSV0132["KKSV0132<br/>Search: list query"]
        KKSV0142["KKSV0142<br/>Update: bulk change"]
        KKSV0143["KKSV0143<br/>Job: data extraction"]
        KKSV0144["KKSV0144<br/>Job: Yamato send"]
        KKSV0145["KKSV0145<br/>Job: Yamato receipt"]
    end

    subgraph RelatedScreens["Related Screens"]
        KKW12602["KKW12602<br/>Detail view/edit"]
        KKW12605["KKW12605<br/>Update confirmation"]
        KKW12606["KKW12606<br/>Update complete"]
    end

    Bean --> Logic
    D01 --> Bean
    D02 --> Bean
    D03 --> Bean
    Const -.-> Logic
    Const -.-> Bean

    Logic --> KKSV0131
    Logic --> KKSV0132
    Logic --> KKSV0142
    Logic --> KKSV0143
    Logic --> KKSV0144
    Logic --> KKSV0145

    Logic --> KKW12602
    Logic --> KKW12605
    Logic --> KKW12606
```

## Key Classes and Interfaces

### KKW12601SFLogic — Business Logic Controller

[Source](source/koptWebB/src/eo/web/webview/KKW12601SF/KKW12601SFLogic.java)

This is the core class of the module. It extends `JCCWebBusinessLogic` (the framework's base web business logic class) and implements all action methods that correspond to screen buttons and user interactions. It handles the complete CRUD-like lifecycle for thank-you letter records without directly performing persistence — instead, it delegates all data operations to EJB-based batch services via `invokeService()`.

**Primary responsibilities:**

- **`actionInit()`** — The screen entry point. Retrieves screen context, loads pulldown data (data type codes, new-add identifiers, exclusion flags) from service `KKSV0131`, determines whether to auto-search based on a `search_flg` flag, and decides whether to display a "back" button based on which screen invoked this one. It also filters out the "phone number advance notice" data type (code `3`) from the pulldown, per [OT-2013-0000163](source/koptWebB/src/eo/web/webview/KKW12601SF/KKW12601SFLogic.java).

- **`actionSearch()`** — Executes a list search. Collects all search form fields (SYSID, service contract number, date range, submission number, customer name, same-wire group number, new-add flag, exclusion flag, un-sent flag), converts pulldown indices to actual code values, validates that at least one search condition is provided, calls the search service `KKSV0132`, and processes results with pagination.

- **`actionPaging()`** — Handles page navigation for the result list. Keeps the sort settings but clears the row selection, then re-runs the search.

- **`actionSortAsc()` / `actionSortDesc()`** — Trigger ascending or descending sorts on whichever column header was clicked. Reads the sort number from the bean, sets the order direction, and re-executes the search.

- **`actionClear()`** — Resets all search form fields to blank, hides the result list, and reinitializes pulldowns to their default values.

- **`actionUpdIcrn()`** — The bulk update confirmation entry point. Iterates through all rows in the displayed list, compares each row's current values against the pre-update snapshot (`KANUORESO_LIST_BF`), and categorizes changes into three groups:
  - **Updated rows** (`KANUORESO_LIST_UPD`) — Records where the exclusion flag or re-issuance checkbox was toggled.
  - **Newly issued rows** (`KANUORESO_LIST_INS`) — Records where the re-issuance checkbox was set on data that has no send timestamp. These trigger a validation error if the letter hasn't actually been sent yet (per [ANK-2837-00-00](source/koptWebB/src/eo/web/webview/KKW12601SF/KKW12601SFLogic.java)).
  - **Modified rows** (`KANUORESO_LIST_MOD`) — Records with exclusion or re-issuance changes but not re-issuance.

  After categorizing, it calls service `KKSV0142` (bulk update check) and navigates to the confirmation screen `KKW12605` if the batch send process is not currently running. It also enforces a validation from [TAI-2012-0000101](source/koptWebB/src/eo/web/webview/KKW12601SF/KKW12601SFLogic.java) that prevents bulk updates while a send batch is in progress.

- **`actionShokaiDtl()`** — Navigates to the detail view screen (`KKW12602`). Passes the selected row's thank-you letter ID and all search context parameters.

- **`actionUpdDtl()`** — Navigates to the detail edit screen (`KKW12602`) with an update flag. Blocks navigation if the letter has already been sent (i.e., `send_dtm` is populated), per the framework's send-once policy.

- **`actionDchs()`** — Triggers the data extraction batch job (`KKSV0143`, job ID `EO2050110J0`). Used to prepare data for producing thank-you letters. Returns an error if the extraction batch is already running.

- **`actionSend()`** — Triggers the Yamato send batch job (`KKSV0144`, job ID `EO2050410J0`). After the service call, checks whether there are any un-sent target records. Returns a specific message if no data was found.

- **`actionRcv()`** — Triggers the Yamato receipt batch job (`KKSV0145`, job IDs `EO2050710J0`, `EO2050910J0`, `EO2051110J0`). Handles three receipt file types: error file, item file 1, and item file 2 (added per [IT1-2012-0000420](source/koptWebB/src/eo/web/webview/KKW12601SF/KKW12601SFLogic.java)).

- **`actionFix()`** — The confirmation screen's "confirm" button. Re-validates the update against the EJB service `KKSV0142`, applies the changes, then navigates to the completion screen `KKW12606`. It also maps internal flag codes back to checkbox states so the list reflects the applied changes after confirmation.

- **`actionFin()`** — The "finish" button. Navigates back to the calling screen and re-executes `actionInit()` to refresh the list with the same search conditions (a "re-search" pattern).

- **`actionBack()`** — Navigates back to the calling screen without any re-search.

**Key private helper methods:**

| Method | Purpose |
|--------|---------|
| `invokeService()` | Generic wrapper for EJB service invocations. Sets up the usecase/operation IDs, clears previous messages, and populates `inputMap`/`outputMap`. |
| `execSearch()` | Core search execution. Calls service `KKSV0132` with the search criteria and maps results back to the bean. |
| `beforeSearch()` / `afterSearch()` | Pre-search (clear list arrays, hide display) and post-search (handle error flags, set pagination, populate checkbox states from service results) hooks. |
| `isSearchInput()` | Validates that at least one search field has a value. Prevents empty searches. |
| `setPulldownSelected()` | Restores pulldown selections when returning from a search (re-search). |
| `setParamAndSeni()` | Shared navigation logic for detail view and detail edit screens. Copies all search parameters and selected row data to the next screen. |
| `getErrFlg()` / `getKKSV0142Result()` | Parse error flags from service output maps to determine if batch processes are in progress. |

### KKW12601SFBean — Main Page Data Bean

[Source](source/koptWebB/src/eo/web/webview/KKW12601SF/KKW12601SFBean.java)

The page-level data bean that holds the entire screen's state. It extends `X33VViewBaseBean` and implements `X33VListedBeanInterface` and `X31CBaseBean`, making it compatible with the X33 data binding framework and the X31 web component layer.

**Key data properties (grouped by function):**

- **Search condition fields:** `sysid`, `svc_kei_no`, date range components (`data_chsht_year_from` through `data_chsht_day_to`), `mskmsho_no`, `cust_nm`, `same_kaisen_grp_no`, `mi_send` (un-sent checkbox).

- **Search result fields:** `kanuoreso_list_list` (the main result list), `kanuoreso_choice` (selected row index), `kanuoreso_hakko_no` (selected thank-you letter ID), `rtn_btn_disp_flg` (whether to show the back button).

- **Pulldown data:** `data_sbt_info_list`, `new_add_skbt_info_list`, `send_jgi_info_list` — each is an `X33VDataTypeList` containing sub-beans with code/value pairs loaded by `KKSV0131`.

- **Update-related lists:** `kanuoreso_list_upd_list`, `kanuoreso_list_mod_list`, `kanuoreso_list_ins_list`, `kanuoreso_list_bf_list` — used during the bulk update confirmation flow to track which records are being updated, modified, newly issued, or held as pre-update snapshots.

- **Display control:** `search_flg`, `list_disp_flg`, `inflg` — flags controlling what parts of the screen are visible.

**Constructor behavior:** Initializes all `X33VDataTypeList` properties and populates each with exactly one `KKW12601SF01DBean` instance. This pre-creates the pulldown sub-beans so the framework's data binding can access them immediately on page load.

**JavaServer Faces integration:** Each pulldown list has a corresponding `getJsflist_*` method (e.g., `getJsflist_typelist_data_sbt_info()`) that converts the `X33VDataTypeList` into `ArrayList<SelectItem>` for JSF `<h:selectOneListbox>` components.

### KKW12601SF01DBean — Pulldown Data Sub-Bean

[Source](source/koptWebB/src/eo/web/webview/KKW12601SF/KKW12601SF01DBean.java)

A data-type sub-bean used exclusively for pulldown list items (data type codes, new-add identifiers, exclusion flags). It implements `X33VDataTypeBeanInterface`, `X33VListedBeanInterface`, and `Serializable`.

**Key properties:**

| Property | Type | Purpose |
|----------|------|---------|
| `index` | `int` | Row index within the pulldown list |
| `cd_div_list_list` | `X33VDataTypeList` | Code values for the pulldown |
| `cd_div_nm_list_list` | `X33VDataTypeList` | Code display names |
| `nm_list_list` | `X33VDataTypeList` | Additional name data |

**Key methods:**

- **`loadModelData(key, subkey)`** — Dynamically retrieves data from any property. Handles the "add row" pseudo-field (`index`), and supports indexed access to list properties using a `key/subkey/index` pattern (e.g., `"コードリスト/0/value"` retrieves the value at index 0 of the code list). Returns `null` for invalid indices.

- **`storeModelData(key, subkey, in_value)`** — The write counterpart to `loadModelData`. Sets values on the appropriate property based on the key path. Supports the `isSetAsString` flag for type-safe long property writes.

- **`typeModelData(key, subkey)`** — Returns the `Class<?>` for a given property, used by the X33 framework for type checking. Returns `String.class`, `Boolean.class`, or `Integer.class` depending on the property.

- **`addListDataInstance(key)`** — Adds a new `X33VDataTypeStringBean` to the appropriate list (by key name), returning the new element's index.

- **`removeElementFromListData(key, index)`** — Removes an element from a list by index.

- **`clearListDataInstance(key)`** — Clears all elements from a list.

### KKW12601SF02DBean — Detail Row Sub-Bean

[Source](source/koptWebB/src/eo/web/webview/KKW12601SF/KKW12601SF02DBean.java)

A data-type sub-bean representing a single row in the thank-you letter list. Contains all display fields shown per-record: the thank-you letter issue number, checkboxes (withdrawal, exclusion, re-issuance), letter dispatch routing code, data type information, and all customer/service reference fields (SYSID, service code, service name, contract number, customer name, submission number, review result code, timestamps, terminal purchase notification code).

Unlike `01DBean`, this sub-bean has no list properties. It represents a flat record with standard value/update/state/enabled property groups for each field.

The `loadModelData()` method (approximately 275 lines) and `storeModelData()` method (approximately 270 lines) are auto-generated switch-case chains that map each of the ~35 field names to their respective getters/setters, supporting subkeys `value`, `update`, `state`, and `enabled`.

### KKW12601SF03DBean — Pre-update Snapshot Sub-Bean

[Source](source/koptWebB/src/eo/web/webview/KKW12601SF/KKW12601SF03DBean.java)

A lightweight sub-bean used only during the bulk update confirmation flow. It stores the "before update" values for comparison against the current values. Contains just three fields:

| Property | Type | Purpose |
|----------|------|---------|
| `kanuoreso_hakko_no` | `String` | Thank-you letter issue number |
| `hikinuki_flg` | `Boolean` | Withdrawal (exclusion) flag — before value |
| `send_jgi_flg` | `Boolean` | Send exclusion flag — before value |

The `KKW12601SFLogic.actionUpdIcrn()` method populates this bean's arrays during the comparison phase to detect which rows have changed.

### KKW12601SFChecker — GUI Validation

[Source](source/koptWebB/src/eo/web/webview/KKW12601SF/KKW12601SFChecker.java)

Implements `X31SGuiCheckBase` but provides a no-op `checkMethod()` that always returns `true`. This is a placeholder / auto-generated class that can be extended with screen-level validation rules. Currently, no GUI-specific validation logic is implemented here; all validation is handled directly in `KKW12601SFLogic` action methods.

### KKW12601SFConst — Constants

[Source](source/koptWebB/src/eo/web/webview/KKW12601SF/KKW12601SFConst.java)

A utility class with a private constructor holding all string constants used across the module. Constants are organized into logical groups:

- **Search conditions:** `SEARCH_SYSID`, `SEARCH_SVC_KEI_NO`, `SEARCH_CHSHTYMD_FROM`, `SEARCH_CHSHTYMD_TO`, `SEARCH_MSKMSHO_NO`, `SEARCH_CUST_NM`, etc.
- **Data type constants:** `DATA_SBT_INFO`, `NEW_ADD_SKBT_INFO`, `SEND_JGI_INFO`, `MI_SEND`
- **Thank-you letter fields:** `KANUORESO_HAKKO_NO`, `HIKINUKI`, `SEND_JGI`, `RE_HAKO`, `LETTER_HASSO_SHIWAKE_DIV`, `SKEKKA_CD`, `SEND_DTM`, `UPD_DTM`, `TNMT_BUY_TCHISHO_OPUT_SKCD`
- **List type constants:** `KANUORESO_LIST`, `KANUORESO_LIST_UPD`, `KANUORESO_LIST_MOD`, `KANUORESO_LIST_INS`, `KANUORESO_LIST_BF`
- **Pulldown keys:** `INDEX_01` (add row), `CD_DIV_LIST_01` (code list), `CD_DIV_NM_LIST_01` (code name list), `NM_LIST_01` (name list)
- **Control flags:** `SEARCH_FLG`, `LIST_DISP_FLG`, `RTN_BTN_DISP_FLG`, `INFLG`, `SORT_NUM`, `ORDER_NUM`, `ORDER_TYPE`

## How It Works

### Typical Search Flow

```mermaid
sequenceDiagram
    participant User
    participant Logic as KKW12601SFLogic
    participant Bean as KKW12601SFBean
    participant Svc as EJB Service
    participant Screen as JSF Screen

    User->>Logic: actionInit()
    Logic->>Bean: get service form bean
    Logic->>Bean: read search_flg
    Logic->>Bean: beforeSearch()
    alt search_flg != "1"
        Logic->>Svc: invokeService("KKSV0131", "KKSV0131OP")
        Svc-->>Logic: outputMap (pulldown data)
        Logic->>Bean: setPulldownList from outputMap
        Logic->>Bean: initialize screen
    else search_flg == "1"
        Logic->>Svc: invokeService("KKSV0132", "KKSV0132OP")
        Svc-->>Logic: outputMap (search results)
        Logic->>Bean: afterSearch() — populate list
    end
    Logic->>Bean: setPulldownSelected()
    Logic->>Screen: render page
```

1. **Screen initialization** (`actionInit`): The framework calls `actionInit()` on first display. The logic retrieves the service form bean, checks if `search_flg` is set to `"1"` (indicating a re-search from a previous screen action), and either loads pulldown data from `KKSV0131` only, or runs a full search.

2. **Pulldown loading**: The `KKSV0131` service returns three code lists (data type, new-add identifier, exclusion flag). The `KKSV0131_KKSV0131OPDBMapper` maps these into `X33VDataTypeList` structures within the bean. The `setPulldownList()` helper iterates through each list and sets both the code and display name sub-properties.

3. **User search** (`actionSearch`): When the user submits the search form, `actionSearch()` extracts all field values, converts pulldown indices to actual codes (e.g., "Data Type A" → `"001"`), assembles date ranges from year/month/day components, clears sorting, and calls `execSearch()` which invokes `KKSV0132`.

4. **Search results** (`afterSearch`): After the search service returns, `afterSearch()` checks for error conditions (zero results, over-maximum results, no data), sets up pagination info, and populates the result list (`KANUORESO_LIST`). For each returned row, it converts the service's flag codes back to checkbox states (`LETTER_SHIWAKE_KOPT` → withdrawal checkbox checked, `SEND_JGI_JGI` → exclusion checkbox checked) and stores pre-update snapshots for the bulk update flow.

5. **Sorting / paging**: Clicking a column header calls `actionSortAsc()` or `actionSortDesc()`, which sets the sort parameters and re-runs the search. Paging works similarly via `actionPaging()`.

6. **Bulk update** (`actionUpdIcrn` → `actionFix`): The user checks checkboxes on one or more rows (exclusion, re-issuance) and clicks "Update/Confirm". The logic compares each row against the pre-update snapshot, categorizes changes, validates that sent records aren't being modified, validates that re-issuance is only on un-sent records, checks for terminal purchase notification code conflicts, and calls `KKSV0142` for a pre-check. If the batch send process isn't running, it navigates to the confirmation screen. On `actionFix()`, the changes are applied and the user navigates to the completion screen.

7. **Detail view/edit**: `actionShokaiDtl()` passes the selected row's `kanuoreso_hakko_no` to `KKW12602`. `actionUpdDtl()` does the same but with an update flag, and blocks if `send_dtm` is populated (already sent records are immutable).

### Batch Job Integration

The module launches four distinct batch jobs, all dispatched through the EJB layer:

| Action | Service | Operation | Job ID | Purpose |
|--------|---------|-----------|--------|---------|
| `actionDchs()` | `KKSV0143` | `KKSV0143OP` | `EO2050110J0` | Data extraction for producing thank-you letters |
| `actionSend()` | `KKSV0144` | `KKSV0144OP` | `EO2050410J0` | Yamato send — dispatch letters via Yamato delivery |
| `actionRcv()` | `KKSV0145` | `KKSV0145OP` | `EO2050710J0` / `EO2050910J0` / `EO2051110J0` | Yamato receipt — process return files (error, item 1, item 2) |

Each job has concurrency protection: the `getErrFlg()` method checks the service output for an `err_flg`. A value of `"1"` means a send/extract batch is already running; `"2"` means the extraction batch is running. In both cases, the user receives a "process is currently running" message.

## Data Model

### Page-Level Bean Structure

```
KKW12601SFBean (extends X33VViewBaseBean)
├── Search fields
│   ├── sysid / svc_kei_no / date range (y/m/d from/to)
│   ├── mskmsho_no / cust_nm / same_kaisen_grp_no
│   ├── mi_send (Boolean — un-sent filter checkbox)
│   └── All fields have _update, _value, _enabled, _state variants
├── Pulldown lists (X33VDataTypeList, each containing KKW12601SF01DBean)
│   ├── data_sbt_info_list → Data type codes/names
│   ├── new_add_skbt_info_list → New-add identifier codes/names
│   └── send_jgi_info_list → Exclusion flag codes/names
├── Result list (X33VDataTypeList, each element = KKW12601SF02DBean)
│   └── kanuoreso_list_list
├── Update flow lists
│   ├── kanuoreso_list_upd_list → Rows being updated
│   ├── kanuoreso_list_mod_list → Rows with exclusion/re-issuance changes
│   ├── kanuoreso_list_ins_list → Rows with re-issuance
│   └── kanuoreso_list_bf_list → Pre-update snapshots
└── Control flags
    ├── search_flg / list_disp_flg / inflg
    ├── kanuoreso_choice (selected row index)
    └── rtn_btn_disp_flg (show back button?)
```

### Sub-Bean Roles

| Sub-Bean | Role | When it's used |
|----------|------|----------------|
| `KKW12601SF01DBean` | Pulldown item holder | Each row in `data_sbt_info_list`, `new_add_skbt_info_list`, `send_jgi_info_list`. Holds code + display name pairs. |
| `KKW12601SF02DBean` | Detail row holder | Each row in `kanuoreso_list_list`. Holds all displayed fields for a single thank-you letter record. |
| `KKW12601SF03DBean` | Pre-update snapshot | Each row in `kanuoreso_list_bf_list`. Holds the original values for change detection during bulk updates. |

## Dependencies and Integration

### Internal Dependencies

This module depends on the following packages:

| Package | Classes Used | Purpose |
|---------|-------------|---------|
| `eo.web.webview.KKW12602SF` | `KKW12602SFConst`, `KKW12602SFLogic` | Related detail screen — navigates to it from this module's detail view/edit actions |
| `eo.web.webview.KKW12605SF` | (implicit) | Update confirmation screen — destination after bulk update |
| `eo.web.webview.KKW12606SF` | (implicit) | Update completion screen |
| `eo.web.webview.KKW00127SF` | (implicit) | Used by inbound XML configs |
| `eo.web.webview.KKA17201SF`, `KKA14201SF`, `KKA14701SF`, `KKA17101SF` | (implicit) | Referenced by XML configs |
| `eo.web.webview.FUW00162SF` | (implicit) | Referenced by XML configs |
| `eo.web.webview.SCW00101SF` | (implicit) | Referenced by XML configs |
| `eo.web.webview.common` | `JCCWebCommon`, `JKKWebCommon`, `JKKCommonConst`, `JKKScreenConst`, `JKKWebCommon`, `JZMScreenConst` | Shared web utilities |
| `eo.web.webview.mapping` | `KKSV0131_*`, `KKSV0132_*`, `KKSV0142_*`, `KKSV0143_*`, `KKSV0144_*`, `KKSV0145_*` | Data mapping mappers for EJB service parameter binding |
| `eo.web.webview.CommonInfoCF` | `CommonInfoCFConst` | Shared screen info bean |
| `eo.common.constant` | `JPCModelConstant`, `JPCOnlineMessageConstant` | Model constants and message codes |
| `eo.business.service` | (implicit) | Business service layer |
| `eo.ejb.common.edit` | (implicit) | EJB edit utilities |
| `eo.ejb.cbs.mainproc` | (implicit) | CBS main process EJBs |
| `eo.common.util` | (implicit) | Common utilities |

### XML Configurations

The module is wired through four XML configuration files:

| XML File | Classes Referenced |
|----------|-------------------|
| `WEBGAMEN_KKW126010PJP.xml` | `KKW12601SFBean`, `KKW12601SFLogic` |
| `WEBGAMEN_KKW126050PJP.xml` | `KKW12601SFBean`, `KKW12601SFLogic` |
| `WEBGAMEN_KKW126060PJP.xml` | `KKW12601SFBean`, `KKW12601SFLogic` |
| `x31business_logic_KKW12601SF.xml` | `KKW12601SFLogic` |

The three `WEBGAMEN_` files represent the three main screen flows: the main list screen (`KKW12601`), the update confirmation screen (`KKW12605`), and the update completion screen (`KKW12606`).

## Notes for Developers

### Screen Navigation Flow

```
KKW12601 (main list)
  ├── actionShokaiDtl() → KKW12602 (detail view)
  ├── actionUpdDtl() → KKW12602 (detail edit)
  ├── actionUpdIcrn() → KKW12605 (bulk update confirm)
  │                       └── actionFix() → KKW12606 (bulk update complete)
  └── actionFin() → re-searches KKW12601 with same conditions
```

### Key Business Rules

1. **Sent records are immutable**: Once `send_dtm` (send timestamp) is populated for a thank-you letter, you cannot edit its details (`actionUpdDtl` blocks) and cannot change its exclusion/withdrawal flags in bulk update (`actionUpdIcrn` validates this).

2. **Re-issuance requires un-sent data**: Setting the re-issuance checkbox on a record that has already been sent is an error (per [ANK-2837-00-00](source/koptWebB/src/eo/web/webview/KKW12601SF/KKW12601SFLogic.java)).

3. **Un-sent filter**: The `mi_send` checkbox defaults to checked (true), meaning searches default to showing only un-sent records. This can be toggled off to include sent records.

4. **Concurrency protection**: Batch jobs (`KKSV0143`, `KKSV0144`, `KKSV0145`) and bulk updates (`KKSV0142`) all check for running batch processes. If a batch is in progress, the user receives an error and the operation is not executed.

5. **Terminal purchase notification code conflict**: When a user sets the exclusion flag on a record where `tnmt_buy_tchisho_oput_skcd` is `"1"` (output required), a specific warning message is displayed (per [ANK-1200-00-00](source/koptWebB/src/eo/web/webview/KKW12601SF/KKW12601SFLogic.java)).

6. **Data type filtering**: The "phone number advance notice" data type (code `3`) is filtered out from the data type pulldown on initial load (per [OT-2013-0000163](source/koptWebB/src/eo/web/webview/KKW12601SF/KKW12601SFLogic.java)).

### Extension Points

- **KKW12601SFChecker**: Currently a no-op. If screen-level GUI validation is needed (e.g., cross-field validation on the search form), this is where it would be added by implementing the `checkMethod()` logic.

- **Mapper classes**: The `KKSV013*_KKSV013*OPDBMapper` and `KKSV014*_KKSV014*OPDBMapper` classes in `eo.web.webview.mapping` handle the mapping between the Data Bean properties and the EJB service input/output maps. If the service interface changes, these mappers are the files to update.

### Debugging Tips

- **Data bean dump**: Every action method calls `JSYwebLog.println(JSYwebLog.DataBean_Dump, ...)` at the end, logging all bean state. Check the application log for the full bean contents at each step.

- **Inheritance dump**: The `dumpDatabean()` method (inherited from `JCCWebBusinessLogic`) recursively dumps all nested beans. Useful when tracing issues with the hierarchical bean structure.

- **Inheritance map logging**: The `printLog()` helper dumps the `dataMapMe` (self-redirect) and `dataMapNext` (next screen) maps when navigating between screens.

### Generated Code Patterns

The `01DBean`, `02DBean`, `03DBean`, and `KKW12601SFBean` classes are generated by the "Web Client tool V01/L01" (version 2.0.39, per the file headers). Key generation patterns:

- Every property has a standard group of four fields: `_value`, `_update`, `_enabled`, `_state`.
- `loadModelData()` / `storeModelData()` are switch-case chains that map property names to getters/setters.
- `typeModelData()` returns the `Class<?>` for each property.
- List sub-beans (`01DBean`) have `addListDataInstance()`, `removeElementFromListData()`, and `clearListDataInstance()` for dynamic list management.
- The `listKoumokuIds()` method returns all property names known to the bean.

### Version History Highlights

| Version | Date | Change |
|---------|------|--------|
| v1.00 | 2011/07/14 | Initial creation |
| v2.01 | 2012/02/29 | Added error message when no target exists for Yamato send |
| v2.02 | 2012/05/06 | Added Yamato receipt batch (deferred processing registration) |
| v4.00 | 2012/09/26 | Added warning for terminal purchase notification code conflict |
| v4.01 | 2012/10/05 | Screen navigation support (back button logic) |
| v4.02 | 2012/12/09 | Added batch send process check during bulk update |
| v4.03 | 2013/01/30 | Added un-sent flag setting support |
| v4.04 | 2013/02/19 | Excluded "phone number advance notice" data type from display |
| v23.00.00 | 2016/01/22 | Consumer protection rule review support |
| v23.00.01 | 2016/03/23 | Re-enabled thank-you letter re-issuance (copy) |
