| @@ -2465,6 +2465,7 @@ open class ProductProcessService( | |||||
| } | } | ||||
| // ===== Drink Production Qty Dashboard ===== | // ===== Drink Production Qty Dashboard ===== | ||||
| /** FP-MTMS Version Checklist | Functions Ref. No. 27 | v1.0.0 | 2026-07-20 */ | |||||
| open fun getDrinkProductionQty(date: LocalDate?): List<DrinkProductionQtyResponse> { | open fun getDrinkProductionQty(date: LocalDate?): List<DrinkProductionQtyResponse> { | ||||
| val targetDate = date ?: LocalDate.now() | val targetDate = date ?: LocalDate.now() | ||||
| val startOfDay = targetDate.atStartOfDay() | val startOfDay = targetDate.atStartOfDay() | ||||
| @@ -307,6 +307,7 @@ class ProductProcessController( | |||||
| return productProcessService.getEquipmentStatusByType() | return productProcessService.getEquipmentStatusByType() | ||||
| } | } | ||||
| /** FP-MTMS Version Checklist | Functions Ref. No. 27 | v1.0.0 | 2026-07-20 */ | |||||
| @GetMapping("/Demo/DrinkProductionQty") | @GetMapping("/Demo/DrinkProductionQty") | ||||
| fun getDrinkProductionQty(@RequestParam(required = false) date: String?): List<DrinkProductionQtyResponse> { | fun getDrinkProductionQty(@RequestParam(required = false) date: String?): List<DrinkProductionQtyResponse> { | ||||
| val parsedDate = date?.takeIf { it.isNotBlank() }?.let { | val parsedDate = date?.takeIf { it.isNotBlank() }?.let { | ||||
| @@ -208,6 +208,7 @@ open class ItemLotTraceOrchestrator( | |||||
| return (fromLots + supplemental).distinctBy { it.stockOutLineId } | return (fromLots + supplemental).distinctBy { it.stockOutLineId } | ||||
| } | } | ||||
| /** FP-MTMS Version Checklist | Functions Ref. No. 24 | v1.0.0 | 2026-07-20 */ | |||||
| private fun enrichDoMovements( | private fun enrichDoMovements( | ||||
| movements: List<com.ffii.fpsms.modules.stock.web.model.ItemLotTraceMovement>, | movements: List<com.ffii.fpsms.modules.stock.web.model.ItemLotTraceMovement>, | ||||
| doDeliveries: List<com.ffii.fpsms.modules.stock.web.model.ItemLotTraceDoDelivery>, | doDeliveries: List<com.ffii.fpsms.modules.stock.web.model.ItemLotTraceDoDelivery>, | ||||
| @@ -141,6 +141,7 @@ open class TraceMovementLoader( | |||||
| } | } | ||||
| } | } | ||||
| /** FP-MTMS Version Checklist | Functions Ref. No. 25 | v1.0.0 | 2026-07-20 */ | |||||
| open fun loadStockTakeEvents(lotLineIds: List<Long>): List<ItemLotTraceStockTakeEvent> { | open fun loadStockTakeEvents(lotLineIds: List<Long>): List<ItemLotTraceStockTakeEvent> { | ||||
| if (lotLineIds.isEmpty()) return emptyList() | if (lotLineIds.isEmpty()) return emptyList() | ||||
| val query = """ | val query = """ | ||||
| @@ -150,6 +150,7 @@ open class TraceOutboundLoader( | |||||
| LEFT JOIN user picker_user ON sol.handled_by = picker_user.id AND picker_user.deleted = 0 | LEFT JOIN user picker_user ON sol.handled_by = picker_user.id AND picker_user.deleted = 0 | ||||
| """.trimIndent() | """.trimIndent() | ||||
| /** FP-MTMS Version Checklist | Functions Ref. No. 24 | v1.0.0 | 2026-07-20 */ | |||||
| open fun loadDoDeliveries(inventoryLotId: Long): List<ItemLotTraceDoDelivery> { | open fun loadDoDeliveries(inventoryLotId: Long): List<ItemLotTraceDoDelivery> { | ||||
| val query = """ | val query = """ | ||||
| ${doDeliverySelectSql()} | ${doDeliverySelectSql()} | ||||
| @@ -167,7 +168,10 @@ open class TraceOutboundLoader( | |||||
| ) | ) | ||||
| } | } | ||||
| /** Fallback when lot-scoped query misses DO picks still present in movements. */ | |||||
| /** | |||||
| * FP-MTMS Version Checklist | Functions Ref. No. 24 | v1.0.0 | 2026-07-20 | |||||
| * Fallback when lot-scoped query misses DO picks still present in movements. | |||||
| */ | |||||
| open fun loadDoDeliveriesByPickOrderCodes(pickOrderCodes: List<String>): List<ItemLotTraceDoDelivery> { | open fun loadDoDeliveriesByPickOrderCodes(pickOrderCodes: List<String>): List<ItemLotTraceDoDelivery> { | ||||
| val codes = pickOrderCodes.map { it.trim() }.filter { it.isNotEmpty() }.distinct() | val codes = pickOrderCodes.map { it.trim() }.filter { it.isNotEmpty() }.distinct() | ||||
| if (codes.isEmpty()) return emptyList() | if (codes.isEmpty()) return emptyList() | ||||
| @@ -192,6 +196,7 @@ open class TraceOutboundLoader( | |||||
| return rows.map { row -> mapDoDelivery(row, replenishIndex) } | return rows.map { row -> mapDoDelivery(row, replenishIndex) } | ||||
| } | } | ||||
| /** FP-MTMS Version Checklist | Functions Ref. No. 24 | v1.0.0 | 2026-07-20 */ | |||||
| private fun mapDoDelivery( | private fun mapDoDelivery( | ||||
| row: Map<String, Any?>, | row: Map<String, Any?>, | ||||
| replenishIndex: DoReplenishmentService.ReplenishPdfIndex, | replenishIndex: DoReplenishmentService.ReplenishPdfIndex, | ||||