|
|
|
@@ -53,11 +53,21 @@ interface InventoryLotLineRepository : AbstractRepository<InventoryLotLine, Long |
|
|
|
""") |
|
|
|
fun findByLotNoAndItemId(lotNo: String, itemId: Long): InventoryLotLine? |
|
|
|
|
|
|
|
<<<<<<< HEAD |
|
|
|
@Query(""" |
|
|
|
SELECT DISTINCT ill.inventoryLot.item.id |
|
|
|
FROM InventoryLotLine ill |
|
|
|
WHERE ill.deleted = false |
|
|
|
AND ill.inventoryLot.lotNo = :lotNo |
|
|
|
""") |
|
|
|
fun findDistinctItemIdsByLotNo(@Param("lotNo") lotNo: String): List<Long> |
|
|
|
======= |
|
|
|
// lotNo + itemId may not be unique (multiple warehouses/lines); pick one deterministically |
|
|
|
fun findFirstByInventoryLotLotNoAndInventoryLotItemIdAndDeletedFalseOrderByIdDesc( |
|
|
|
lotNo: String, |
|
|
|
itemId: Long |
|
|
|
): InventoryLotLine? |
|
|
|
>>>>>>> 9760717ed6a5c59383467921464fb2b89a7f85a8 |
|
|
|
// InventoryLotLineRepository.kt 中添加 |
|
|
|
@Query("SELECT ill FROM InventoryLotLine ill WHERE ill.warehouse.id IN :warehouseIds AND ill.deleted = false") |
|
|
|
fun findAllByWarehouseIdInAndDeletedIsFalse(@Param("warehouseIds") warehouseIds: List<Long>): List<InventoryLotLine> |
|
|
|
|