CANCERYS\kw093 преди 2 дни
родител
ревизия
1f2f774453
променени са 2 файла, в които са добавени 12 реда и са изтрити 6 реда
  1. +11
    -5
      src/main/java/com/ffii/fpsms/modules/jobOrder/service/JoPickOrderService.kt
  2. +1
    -1
      src/main/java/com/ffii/fpsms/modules/jobOrder/web/model/CreateJobOrderRequest.kt

+ 11
- 5
src/main/java/com/ffii/fpsms/modules/jobOrder/service/JoPickOrderService.kt Целия файл

@@ -1918,13 +1918,19 @@ open fun getAllJoPickOrders(isDrink: Boolean?, floor: String?): List<AllJoPickOr
)
} else null

// Backend filtering by floor: include if there is remaining on that floor OR any no-lot remaining
// Backend filtering by floor:
// - When selecting a specific floor (2F/3F/4F), show ONLY remaining on that floor.
// - When selecting NO_LOT, show ONLY remaining for no-lot items.
if (normalizedFloorFilter != null) {
val hasRemainingOnFloor = floorPickCounts.any { c ->
c.floor == normalizedFloorFilter && (c.totalCount - c.finishedCount) > 0
if (normalizedFloorFilter == "NO_LOT") {
val hasNoLotRemaining = (noLotPickCount?.let { it.totalCount - it.finishedCount } ?: 0) > 0
if (!hasNoLotRemaining) return@mapNotNull null
} else {
val hasRemainingOnFloor = floorPickCounts.any { c ->
c.floor == normalizedFloorFilter && (c.totalCount - c.finishedCount) > 0
}
if (!hasRemainingOnFloor) return@mapNotNull null
}
val hasNoLotRemaining = (noLotPickCount?.let { it.totalCount - it.finishedCount } ?: 0) > 0
if (!hasRemainingOnFloor && !hasNoLotRemaining) return@mapNotNull null
}

val suggestedFailCount = suggestedFailCountByPickOrderId[pickOrder.id] ?: 0


+ 1
- 1
src/main/java/com/ffii/fpsms/modules/jobOrder/web/model/CreateJobOrderRequest.kt Целия файл

@@ -57,7 +57,7 @@ data class AllJoPickOrderResponse(
val finishedPickOLineCount: Int,
val floorPickCounts: List<FloorPickCountDto> = emptyList(),
// Lines which currently have no lot assigned (e.g. stockOutLine.inventoryLotLineId is null).
// For floor filtering, "no lot" should be treated as applicable to all floors.
// "no lot" is treated as a separate bucket in floor filtering (NOT mixed into 2F/3F/4F).
val noLotPickCount: FloorPickCountDto? = null,
// Count of rejected stock-out lines for this pick order (proxy for "suggested fail" items).
val suggestedFailCount: Int = 0


Зареждане…
Отказ
Запис