---

# Business Logic — DKW01302SFLogic.confirmCreate() [55 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.DKW01302SF.DKW01302SFLogic` |
| Layer | Web / Logic (Webview business logic class) |
| Module | `DKW01302SF` (Package: `eo.web.webview.DKW01302SF`) |

## 1. Role

### DKW01302SFLogic.confirmCreate()

This method performs the **registration confirmation processing** (登録確認処理) for a shelf transfer incoming goods operation within the K-Opticom logistics management system. It is the confirmation-screen entry point for the **shelves-transfer incoming goods details** workflow: a user selects a specific row from a list of shelf-transfer work items and triggers the confirmation flow to review and, optionally, modify the details before final submission.

The method follows a **delegation + routing pattern**. It first obtains the `X31SDataBeanAccess` service form bean and extracts the detail subbean corresponding to the user-selected row number (`ROW_NO`). It retrieves the optional-preparation delivery number (予備機器配送番号) for paging state management. Then it calls `setGamen()` to establish the screen's display configuration, which includes a defensive error-check block to prevent inconsistency during error recovery.

The method then executes a **two-phase service orchestration**:

- **Check phase (`putServiceDKSV0106`)**: Invokes service component DKSV0106 in function code `FUNC_CD_2` ("2") to perform a pre-confirmation check. This service call does not fetch main data; it validates preparatory equipment delivery completion (予備機器配送配達完了) and sets the delivery result code to a fixed value of "1" (OK). If this check fails, the method returns `true` immediately as an early exit, effectively stopping the confirmation flow.
- **Main phase (`putServiceDKSV0105`)**: After resetting the display count and clearing page-link/ list data, it invokes service component DKSV0105 to fetch the shelf transfer incoming goods main and detail data. If no data is returned (indicating the work item was deleted or processed externally), the method displays error message `EKB0320-KW` (exclusion error — 排他エラー) and forcibly redirects to the incoming goods list screen (`DKW01301`). If data is successfully retrieved, it finalizes the screen display, sets the search command for pagination (`L_PAG_FIX`), and navigates to the confirmation screen (`DKW01303`) with message `EKB0370--I` (confirmation message — 確認メッセージ) showing the stock label "Shelf transfer incoming goods processing" (棚移動入庫処理).

This method is a **screen-entry-point logic** specific to the DKW01302 (shelves-transfer incoming goods details) screen, serving as the confirm-action handler.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["confirmCreate()"])
    START --> GETBEAN["Get serviceFormBean"]
    GETBEAN --> PAGING["Extract SHOSAI_LIST by ROW_NO"]
    PAGING --> SETPAGING["Set PAGING_KEY via subbean"]
    SETPAGING --> GAMEN["setGamen(serviceFormBean)"]
    GAMEN --> CHECK1{"putServiceDKSV0106
(FUNC_CD_2)?"}
    CHECK1 -->|false| END1(["Return true"])
    CHECK1 -->|true| RESET1["Reset DISP_COUNT to 0"]
    RESET1 --> CLEAR["clearPageLinkInfo(DKW01303)"]
    CLEAR --> CLEARLIST["Clear SHOSAI_LIST and UPDATE_LIST arrays"]
    CLEARLIST --> CALLSERVICE["putServiceDKSV0105(DKW01303, false)"]
    CALLSERVICE --> CHECK2{"Return false?"}
    CHECK2 -->|true| ERROR["Set EKB0320-KW message"]
    ERROR --> TRANSFER["setNextScreen(DKW01301)"]
    TRANSFER --> SETSCREEN["setTransferPageId + setScreenId(DKW01301)"]
    SETSCREEN --> END2(["Return true"])
    CHECK2 -->|false| GAMEN2["setGamen(serviceFormBean)"]
    GAMEN2 --> SETCMD["setSearchCommand(L_PAG_FIX, DKW01303)"]
    SETCMD --> FINAL["setNextScreen(DKW01303)"]
    FINAL --> MSG["Set EKB0370--I message with stock"]
    MSG --> END3(["Return true"])
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This method takes no parameters. It operates on the session-scoped `X31SDataBeanAccess` service form bean obtained from the parent class. |

### Instance fields and external state read:

| No | State | Type | Business Description |
|----|-------|------|---------------------|
| 1 | `MSG_STOCK` | `String` (private static final) | Stock label for messaging: "棚移動入庫処理" (Shelf transfer incoming goods processing) |
| 2 | `SERVICE_ID` (inherited) | `String` | The service ID used for the X31 framework invocation context |
| 3 | `X31SDataBeanAccess` (session) | `X31SDataBeanAccess` | Session-scoped form bean holding screen data including lists, paging info, and display state |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `X31SDataBeanAccess.getDataBeanArray` | - | - | Reads `SHOSAI_LIST` array (shelf transfer incoming goods detail list) from the form bean |
| R | `X31SDataBeanAccess.sendMessageString` (GET) | - | - | Retrieves `L_YBKIKI_HAISO_NO_01` (preparatory equipment delivery number) from the subbean for paging state |
| R | `DKW01302SFLogic.setGamen` | - | - | Configures screen display settings: basic info, detail info, and CSV record metadata |
| R | `DKW01302SFLogic.putServiceDKSV0106` | DKSV0106 | - | Pre-confirmation check: calls DKSV010601SC (preparatory equipment delivery completion check) and DKSV010602SC (preparatory equipment delivery completion) with func_code "2" (check mode) |
| R | `DKW01302SFLogic.putServiceDKSV0105` | DKSV0105 | - | Main data fetch: calls DKSV010501SC (shelf transfer basic info), DKSV010502SC (shelf transfer incoming goods detail), DKSV010503SC (shelf transfer incoming goods detail - all items) to retrieve work item data |
| R | `X31SDataBeanAccess.getDataBeanArray.clearArray` | - | - | Clears `SHOSAI_LIST` (detail list) and `UPDATE_LIST` (data update list) arrays for refresh |
| - | `JCCWebCommon.clearPageLinkInfo` | - | - | Clears page-link/pagination info for screen DKW01303 to ensure clean state |
| - | `JCCWebCommon.setMessageInfo` | - | - | Displays confirmation message `EKB0370--I` with stock label "Shelf transfer incoming goods processing" |
| - | `JCCWebCommon.setMessageInfo` | - | - | Displays exclusion error `EKB0320-KW` when no data is found during redirect |
| - | `JCCWebCommon.setScreenId` | - | - | Sets screen state for error redirect path (DKW01301 as target, DKW01302 as source) |
| - | `JCCWebCommon.setSearchCommand` | - | - | Sets pagination search command `L_PAG_FIX` for screen DKW01303 |
| - | `DKW01302SFLogic.setNextScreen` | - | - | Sets the next screen to navigate to (DKW01303 for normal flow, DKW01301 for error redirect) |
| - | `DKW01302SFLogic.setTransferPageId` | - | - | Sets the transfer page ID for redirect (DKW01301 + ".p" suffix) |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:DKW01302 (棚移動入庫詳細) | `DKW01302SFLogic.confirmCreate()` | `putServiceDKSV0105 [R] EDK0111B028CBSMsg1List (shelf transfer basic info)`, `putServiceDKSV0106 [R] EDK0111B033CBSMsg1List (preparatory equipment delivery)` |

**Caller Analysis:**
- This method is defined within `DKW01302SFLogic` which handles the **shelves-transfer incoming goods details screen (DKW01302)**.
- No external caller class was found referencing `confirmCreate` directly — the method is invoked by the X31 web framework's action dispatch based on the screen's button/action configuration.
- The `DKW01302SFChecker` class handles GUI validation for the DKW01302 screen but does not directly call `confirmCreate`.
- The method acts as a terminal logic point within the DKW01302 screen's confirmation workflow.

## 6. Per-Branch Detail Blocks

### Block 1 — [SET/EXTRACT] Data Bean Access (L387-L392)

> Obtains the service form bean and extracts the detail subbean for the user-selected row. Also sets up paging state by carrying over the preparatory equipment delivery number.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `X31SDataBeanAccess serviceFormBean = super.getServiceFormBean()` | Get the session-scoped service form bean from parent class |
| 2 | SET | `X31SDataBeanAccessArray shosaiList = serviceFormBean.getDataBeanArray(SHOSAI_LIST)` | `[-> SHOSAI_LIST = "棚移動入荷詳細一覧照会明細リスト"]` Retrieve the detail list array (shelf transfer incoming goods details registration detail list) |
| 3 | SET | `int idx = Integer.parseInt(JDKWebCommon.getData(serviceFormBean, ROW_NO))` | `[-> ROW_NO = "行番号"]` Parse the selected row number as an integer |
| 4 | SET | `X31SDataBeanAccess subbean = shosaiList.getDataBean(idx)` | Get the detail data bean at the selected row index |
| 5 | EXEC | `serviceFormBean.sendMessageString(PAGING_KEY, X31CWebConst.DATABEAN_SET_VALUE, subbean.sendMessageString(L_YBKIKI_HAISO_NO_01, X31CWebConst.DATABEAN_GET_VALUE))` | `[-> PAGING_KEY = "ページンキー", L_YBKIKI_HAISO_NO_01 = "予備機器配送番号"]` Extract the preparatory equipment delivery number from the subbean and set it as the paging key value |

### Block 2 — [EXEC] Screen Display Setup (L394)

> Configures screen display settings. Includes an error-check block to prevent inconsistency during error recovery.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | EXEC | `setGamen(serviceFormBean)` | Set screen display configuration: initializes basic info bean, detail info beans, CSV record types (KIHON=7G, SHOSAI=7H, TRAILER=7I), and display flags (number detail button disabled flag, registration confirm button disabled flag) |

### Block 3 — [IF] Check Mode Service Call (L397-L400)

> Invokes DKSV0106 in check mode (func_code "2"). If the check fails, the method returns early without proceeding to the main confirmation flow.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `JPCModelConstant.FUNC_CD_2` | `[-> FUNC_CD_2 = "2"]` Function code 2 = check mode (not data-fetch mode) |
| 2 | CALL | `putServiceDKSV0106(serviceFormBean, JPCModelConstant.FUNC_CD_2)` | Call service DKSV0106 with func_code "2" (check mode) for pre-confirmation validation. Internally sets `YBKIKI_HAISO_RSLT_CD` = "1" (OK) and `YBKIKI_HAISO_RSLT_MEMO` = "" (blank) as fixed values. Calls `setDKSV010601SC` (preparatory equipment delivery completion) and `setDKSV010602SC` (preparatory equipment delivery completion) |
| 3 | IF | `if (!putServiceDKSV0106(...))` | If the check service returns false (failure) |
| 4 | RETURN | `return true` | Early exit — the check detected an issue, so return success without proceeding (the check service already handled error messaging) |

### Block 4 — [SET/EXEC] Data Reset and List Initialization (L403-L407)

> Prepares a clean slate for the main data fetch: resets the display count, clears page-link info, and empties both the detail list and update list arrays.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `JPCWebConst.DATABEAN_SET_VALUE` | `[-> X31CWebConst.DATABEAN_SET_VALUE = "set"]` Constant for setting data bean values |
| 2 | EXEC | `serviceFormBean.sendMessageString(DISP_COUNT, X31CWebConst.DATABEAN_SET_VALUE, "0")` | `[-> DISP_COUNT = "一覧表示件数"]` Reset the list display count to zero |
| 3 | CALL | `JCCWebCommon.clearPageLinkInfo(this, SCREEN_ID_DKW01303)` | `[-> SCREEN_ID_DKW01303 = "DKW01303"]` Clear pagination info for the confirmation screen |
| 4 | EXEC | `serviceFormBean.getDataBeanArray(SHOSAI_LIST).clearArray()` | `[-> SHOSAI_LIST = "棚移動入荷詳細一覧照会明細リスト"]` Clear the detail list array for a fresh fetch |
| 5 | EXEC | `serviceFormBean.getDataBeanArray(UPDATE_LIST).clearArray()` | `[-> UPDATE_LIST = "データ更新リスト"]` Clear the data update list array |

### Block 5 — [IF] Main Service Data Fetch (L410-L428)

> The core branching logic: invokes the main data-fetch service DKSV0105. If no data is found, displays an exclusion error and redirects to the list screen. If data is found, completes the confirmation flow.

#### Block 5.1 — [CALL] Service Invocation

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | CALL | `putServiceDKSV0105(serviceFormBean, SCREEN_ID_DKW01303, false)` | `[-> SCREEN_ID_DKW01303 = "DKW01303"]` Invoke service DKSV0105 with screen ID DKW01303 and transBack=false (not navigating back from a sub-screen). Internally: creates `DKSV0105_DKSV0105OPDBMapper`, calls `setDKSV010501SC` (shelf transfer basic info), `setDKSV010502SC` (shelf transfer incoming goods detail), `setDKSV010503SC` (shelf transfer incoming goods detail - all), then calls `invokeService`, and fetches `EDK0111B028CBSMsg1List` (shelf transfer basic info list). Returns false if the list is empty (cnt == 0). |

#### Block 5.2 — [IF] No Data Branch (L412-L420)

> When the service returns false, meaning no shelf transfer work items were found. This typically indicates the work item was processed or deleted externally.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `if (!putServiceDKSV0105(...))` | Service returned false: no shelf transfer data found (empty result from `EDK0111B028CBSMsg1List`) |
| 2 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB0320_KW)` | `[-> EKB0320_KW = "EKB0320-KW"]` Display exclusion error message (排他エラー) — data no longer available |
| 3 | EXEC | `setNextScreen(SCREEN_ID_DKW01301, JZMWebConst.BLANK)` | `[-> SCREEN_ID_DKW01301 = "DKW01301", JZMWebConst.BLANK = ""]` Set next screen to the incoming goods list screen |
| 4 | EXEC | `setTransferPageId(SCREEN_ID_DKW01301 + JZMWebConst.PJP)` | Set transfer page ID as "DKW01301.p" (adding ".p" suffix for the transfer page identifier) |
| 5 | CALL | `JCCWebCommon.setScreenId(this, SCREEN_ID_DKW01301, SCREEN_ID_DKW01302)` | Set screen state: target = DKW01301 (list), source = DKW01302 (details) |
| 6 | RETURN | `return true` | Return success — the error redirect has been configured |

#### Block 5.3 — [ELSE] Normal Flow (L424-L432)

> When data is successfully fetched. Completes the confirmation flow by setting display, navigation, and message state.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | EXEC | `setGamen(serviceFormBean)` | Re-configure screen display settings after data refresh |
| 2 | CALL | `JCCWebCommon.setSearchCommand(this, L_PAG_FIX, SCREEN_ID_DKW01303)` | `[-> L_PAG_FIX = "L_PAG_FIX" (VARB confirmation screen pagination)]` Set the pagination search command for the confirmation screen |
| 3 | EXEC | `setNextScreen(SCREEN_ID_DKW01303, SCREEN_NAME_DKW01303)` | `[-> SCREEN_NAME_DKW01303 = "棚移動入庫確認"]` Set next screen to the confirmation screen (shelves-transfer incoming goods confirmation) |
| 4 | CALL | `JCCWebCommon.setMessageInfo(this, EKB0370__I, new String[] {MSG_STOCK})` | `[-> EKB0370__I = "EKB0370--I", MSG_STOCK = "棚移動入庫処理"]` Display the confirmation message with stock label "Shelf transfer incoming goods processing" |
| 5 | RETURN | `return true` | Return success — the confirmation screen is ready for display |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `SHOSAI_LIST` | Field | Shelf transfer incoming goods detail list registration detail list — the data bean array holding the selected work item's detail records for display |
| `UPDATE_LIST` | Field | Data update list — the data bean array tracking records that have been modified during the current session |
| `ROW_NO` | Field | Row number — the index of the user-selected row in the detail list |
| `PAGING_KEY` | Field | Pagination key — internal tracking key for page navigation state management |
| `L_YBKIKI_HAISO_NO_01` | Field | Preparatory equipment delivery number — the ID of a preparatory machine's delivery, carried over for paging context |
| `YBKIKI_HAISO_RSLT_CD` | Field | Preparatory equipment delivery result code — a code indicating the status of preparatory equipment delivery (e.g., "1" = OK) |
| `YBKIKI_HAISO_RSLT_MEMO` | Field | Preparatory equipment delivery result memo — free-text memo field for delivery result notes |
| `DISP_COUNT` | Field | List display count — the number of items shown on a paginated list |
| `L_PAG_FIX` | Field | VARB confirmation screen pagination — a fixed pagination configuration key for the confirmation screen |
| `MSG_STOCK` | Field | Stock label — a message template identifier; value is "棚移動入庫処理" (Shelf transfer incoming goods processing) |
| `FUNC_CD_2` | Constant | Function code "2" — represents check mode (validation only, no data fetch) in service component calls |
| `FUNC_CD_1` | Constant | Function code "1" — represents data fetch mode in service component calls |
| SCREEN_ID_DKW01301 | Constant | Shelf transfer incoming goods list screen — the master list screen where work items are displayed |
| SCREEN_ID_DKW01302 | Constant | Shelf transfer incoming goods details screen — the current screen where this method's logic originates |
| SCREEN_ID_DKW01303 | Constant | Shelf transfer incoming goods confirmation screen — the target screen shown after successful confirmation processing |
| SCREEN_NAME_DKW01303 | Constant | "棚移動入庫確認" (Shelf transfer incoming goods confirmation) — the display name of the confirmation screen |
| EKB0320-KW | Constant | Exclusion error message code — displayed when data is no longer available (e.g., deleted by another user or process) |
| EKB0370--I | Constant | Confirmation message code — displayed to show the user that confirmation processing has completed successfully |
| JZMWebConst.PJP | Constant | ".p" — a suffix appended to screen IDs to form transfer page identifiers |
| JZMWebConst.BLANK | Constant | "" (empty string) — used as a blank parameter for navigation targets |
| EDK0111B028CBSMsg1List | CBS | Shelf transfer basic info list — the CBS result list containing shelf transfer basic work item records |
| DKSV0105 | Service | Shelf transfer main data fetch service — retrieves shelf transfer basic info (DKSV010501SC), incoming goods details (DKSV010502SC), and all items details (DKSV010503SC) |
| DKSV0106 | Service | Preparatory equipment delivery completion service — validates and sets preparatory equipment delivery status (DKSV010601SC, DKSV010602SC) |
| DKSV0093 | Service | Shelf transfer result information service — retrieves shelf transfer result records (called by related methods like `fix()`) |
| X31SDataBeanAccess | Framework | The X31 framework's data bean access class — provides get/set operations on session-scoped form data beans |
| X31SDataBeanAccessArray | Framework | Array wrapper for X31 data beans — supports `getDataBean(int)`, `clearArray()`, and indexed access |
| 棚移動 (Tana-ido) | Business term | Shelf transfer — the logistics operation of moving equipment from one storage location/shelf to another within the K-Opticom infrastructure |
| 入庫 (Nyuka) | Business term | Incoming goods receipt — the process of registering equipment that has arrived at a storage location |
| 予備機器 (Yobiki) | Business term | Preparatory equipment — spare/backup equipment items maintained in inventory for delivery when needed |
| 排他エラー (Gatasyncerror) | Business term | Exclusion error — an error indicating that data has been concurrently modified or deleted by another user/process |

---
