Quellcode durchsuchen

update jo get stockinlineid

master
CANCERYS\kw093 vor 2 Tagen
Ursprung
Commit
689dea70a6
1 geänderte Dateien mit 9 neuen und 3 gelöschten Zeilen
  1. +9
    -3
      src/main/java/com/ffii/fpsms/modules/jobOrder/service/JoPickOrderService.kt

+ 9
- 3
src/main/java/com/ffii/fpsms/modules/jobOrder/service/JoPickOrderService.kt Datei anzeigen

@@ -1917,9 +1917,15 @@ open fun getJobOrderLotsHierarchicalByPickOrderId(pickOrderId: Long): JobOrderLo
// 获取 stock in lines 通过 inventoryLotLineId(用于填充 stockInLineId)
val stockInLinesByInventoryLotLineId = if (inventoryLotLineIds.isNotEmpty()) {
inventoryLotLineIds.associateWith { illId ->
stockInLineRepository.findStockInLineInfoByInventoryLotLineId(illId).orElse(null)?.id
}.filterValues { it != null }
// ✅ 修复:直接使用已加载的 inventoryLotLines 实体获取 stockInLineId
inventoryLotLines.associateBy { it.id!! }
.mapNotNull { (illId, ill) ->
// 通过关系链:InventoryLotLine -> InventoryLot -> StockInLine -> id
ill.inventoryLot?.stockInLine?.id?.let { stockInLineId ->
illId to stockInLineId
}
}
.toMap()
} else {
emptyMap()
}


Laden…
Abbrechen
Speichern