From c965bb296ca01c2b7d197bfe01e464a58d53636d Mon Sep 17 00:00:00 2001 From: "kelvin.yau" Date: Sun, 15 Mar 2026 05:16:29 +0800 Subject: [PATCH] update wareshouse setup --- .../modules/common/internalSetup/warehouseSetup.kt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ffii/fpsms/modules/common/internalSetup/warehouseSetup.kt b/src/main/java/com/ffii/fpsms/modules/common/internalSetup/warehouseSetup.kt index 625313b..61ac26f 100644 --- a/src/main/java/com/ffii/fpsms/modules/common/internalSetup/warehouseSetup.kt +++ b/src/main/java/com/ffii/fpsms/modules/common/internalSetup/warehouseSetup.kt @@ -26,7 +26,8 @@ open class WarehouseSetup { val area: String, val slot: String, val order: String?, - val stockTakeSection: String? + val stockTakeSection: String?, + val stockTakeSectionDescription: String? ) @Transactional(rollbackFor = [Exception::class]) @@ -50,6 +51,7 @@ open class WarehouseSetup { val COLUMN_SLOT_INDEX = 4 // Column E val COLUMN_ORDER_INDEX = 5 // Column F val COLUMN_STOCK_TAKE_SECTION_INDEX = 6 // Column G + val COLUMN_STOCK_TAKE_SECTION_DESCRIPTION_INDEX = 7 // Column H val START_ROW_INDEX = 8 // Start from Excel row 9 (0-based: index 8) @@ -73,6 +75,7 @@ open class WarehouseSetup { val order = ExcelUtils.getStringValue(row.getCell(COLUMN_ORDER_INDEX))?.trim() val stockTakeSection = ExcelUtils.getStringValue(row.getCell(COLUMN_STOCK_TAKE_SECTION_INDEX))?.trim() + val stockTakeSectionDescription = ExcelUtils.getStringValue(row.getCell(COLUMN_STOCK_TAKE_SECTION_DESCRIPTION_INDEX))?.trim() println("=== Processing row ${rowIndex + 1} (store_id: $store_id, warehouse: $warehouse, area: $area, slot: $slot) ===") @@ -83,7 +86,8 @@ open class WarehouseSetup { area = area, slot = slot, order = order, - stockTakeSection = stockTakeSection + stockTakeSection = stockTakeSection, + stockTakeSectionDescription = stockTakeSectionDescription ) ) } @@ -126,6 +130,9 @@ open class WarehouseSetup { if (data.stockTakeSection != null) { this.stockTakeSection = data.stockTakeSection } + if (data.stockTakeSectionDescription != null) { + this.stockTakeSectionDescription = data.stockTakeSectionDescription + } } warehouseRepository.save(existingWarehouse) updatedCount++ @@ -145,6 +152,9 @@ open class WarehouseSetup { if (data.stockTakeSection != null) { this.stockTakeSection = data.stockTakeSection } + if (data.stockTakeSectionDescription != null) { + this.stockTakeSectionDescription = data.stockTakeSectionDescription + } } warehouseRepository.save(newWarehouse) createdCount++