| @@ -116,9 +116,8 @@ class DoPickOrderQueryService( | |||||
| .groupBy { it.key.first } | .groupBy { it.key.first } | ||||
| .mapValues { (_, entries) -> | .mapValues { (_, entries) -> | ||||
| entries.map { it.value } | entries.map { it.value } | ||||
| .filter { it.unassigned > 0 } // filter out lanes with no unassigned orders | |||||
| .filter { it.unassigned > 0 } // filter out lanes with no unassigned orders | |||||
| .sortedByDescending { it.unassigned } | .sortedByDescending { it.unassigned } | ||||
| .take(3) | |||||
| } | } | ||||
| .filterValues { lanes -> lanes.isNotEmpty() } | .filterValues { lanes -> lanes.isNotEmpty() } | ||||
| .toSortedMap(compareBy { it }) | .toSortedMap(compareBy { it }) | ||||
| @@ -445,7 +445,6 @@ open class DoPickOrderService( | |||||
| entries.map { it.value } | entries.map { it.value } | ||||
| .filter { it.unassigned > 0 } | .filter { it.unassigned > 0 } | ||||
| .sortedByDescending { it.unassigned } | .sortedByDescending { it.unassigned } | ||||
| .take(3) | |||||
| } | } | ||||
| .filterValues { lanes -> lanes.any { it.unassigned > 0 } } | .filterValues { lanes -> lanes.any { it.unassigned > 0 } } | ||||
| .toSortedMap(compareBy { it }) | .toSortedMap(compareBy { it }) | ||||
| @@ -1871,7 +1871,10 @@ open fun getAllJoPickOrders(isDrink: Boolean?, floor: String?): List<AllJoPickOr | |||||
| if (jobOrder.isHidden == true) { | if (jobOrder.isHidden == true) { | ||||
| return@mapNotNull null | return@mapNotNull null | ||||
| } | } | ||||
| if (jobOrder.status == JobOrderStatus.COMPLETED) { | |||||
| return@mapNotNull null | |||||
| } | |||||
| println("Job order found: ${jobOrder.id}, code: ${jobOrder.code}") | println("Job order found: ${jobOrder.id}, code: ${jobOrder.code}") | ||||
| val bom = jobOrder.bom | val bom = jobOrder.bom | ||||