|
|
|
@@ -45,14 +45,27 @@ interface PickOrderRepository : AbstractRepository<PickOrder, Long> { |
|
|
|
pageable: Pageable, |
|
|
|
): Page<PickOrderInfo> |
|
|
|
|
|
|
|
@Query(""" |
|
|
|
select po.consoCode from PickOrder po where po.consoCode like :prefix% order by po.consoCode desc limit 1 |
|
|
|
""") |
|
|
|
fun findLatestConsoCodeByPrefix(prefix: String): String? |
|
|
|
@Query(""" |
|
|
|
select po.code from PickOrder po where po.code like :prefix% order by po.code desc limit 1 |
|
|
|
""") |
|
|
|
fun findLatestCodeByPrefix(prefix: String): String? |
|
|
|
@Query( |
|
|
|
""" |
|
|
|
SELECT po.consoCode FROM pick_order po |
|
|
|
WHERE po.consoCode LIKE CONCAT(:prefix, '%') |
|
|
|
ORDER BY CAST(SUBSTRING_INDEX(po.consoCode, '-', -1) AS UNSIGNED) DESC |
|
|
|
LIMIT 1 |
|
|
|
""", |
|
|
|
nativeQuery = true, |
|
|
|
) |
|
|
|
fun findLatestConsoCodeByPrefix(@Param("prefix") prefix: String): String? |
|
|
|
|
|
|
|
@Query( |
|
|
|
""" |
|
|
|
SELECT po.code FROM pick_order po |
|
|
|
WHERE po.code LIKE CONCAT(:prefix, '%') |
|
|
|
ORDER BY CAST(SUBSTRING_INDEX(po.code, '-', -1) AS UNSIGNED) DESC |
|
|
|
LIMIT 1 |
|
|
|
""", |
|
|
|
nativeQuery = true, |
|
|
|
) |
|
|
|
fun findLatestCodeByPrefix(@Param("prefix") prefix: String): String? |
|
|
|
fun findAllByIdInAndStatus(id: List<Serializable>, status: PickOrderStatus): List<PickOrder> |
|
|
|
|
|
|
|
fun findAllByIdInAndConsoCodeIsNullAndStatus(id: List<Serializable>, status: PickOrderStatus): List<PickOrder> |
|
|
|
|