Commit 82ea225e authored by chicheng's avatar chicheng

通过品号仓库、库位查询库存按最近入库排序

parent 60519d4e
...@@ -33,7 +33,7 @@ public interface InvmlDao extends JpaRepository<Invml, InvmlId>, JpaSpecificatio ...@@ -33,7 +33,7 @@ public interface InvmlDao extends JpaRepository<Invml, InvmlId>, JpaSpecificatio
Optional<Invml> findFirstByMl001AndMl002AndMl003AndMl004(String ml001, String ml002, String ml003, String ml004); Optional<Invml> findFirstByMl001AndMl002AndMl003AndMl004(String ml001, String ml002, String ml003, String ml004);
@Query(value = "select il.*,ib.MB002 materialName from INVML il left join INVMB ib on il.ML001 = ib.MB001 where il.ML001 = :ml001 and ('' = ISNULL(CONVERT(varchar(200), :ml002),'') or il.ML002 = :ml002)" + @Query(value = "select il.*,ib.MB002 materialName from INVML il left join INVMB ib on il.ML001 = ib.MB001 where il.ML001 = :ml001 and ('' = ISNULL(CONVERT(varchar(200), :ml002),'') or il.ML002 = :ml002)" +
" and ('' = ISNULL(CONVERT(varchar(200), :gtStock),'') or il.ML005 > :gtStock)", nativeQuery = true) " and ('' = ISNULL(CONVERT(varchar(200), :gtStock),'') or il.ML005 > :gtStock) order by il.ML009", nativeQuery = true)
List<IInvmlDto> findJoinInvmb(@Param(value = "ml001") String ml001, @Param(value = "ml002") String ml002, @Param(value = "gtStock") Integer gtStock); List<IInvmlDto> findJoinInvmb(@Param(value = "ml001") String ml001, @Param(value = "ml002") String ml002, @Param(value = "gtStock") Integer gtStock);
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment