采购单入库商品默认显示采购单信息;采集数据显示优化

This commit is contained in:
2026-03-05 16:26:38 +08:00
parent f219c57fad
commit d50b11c9aa
9 changed files with 321 additions and 274 deletions
@@ -183,6 +183,10 @@ object ObjectBox {
box?.put(entities)
}
suspend fun count(name: String) = safeDbOp {
getBox<Food>()?.all?.count() { it.name == name }
} ?: 0
suspend fun filter(name: String?) = safeDbOp {
val list = getBox<Food>()?.all?.distinctBy { it.name }
if (name.isNullOrBlank().not()) {