|
|
|
@ -4,6 +4,8 @@ import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
|
|
|
|
import cn.estsh.i3plus.pojo.wms.bean.WmsStockSn;
|
|
|
|
|
import org.springframework.data.jpa.repository.Query;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Description : 库存条码dao层
|
|
|
|
|
* @Reference :
|
|
|
|
@ -21,13 +23,14 @@ public interface WmsStockSnRepository extends BaseRepository<WmsStockSn, Long> {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Rock.Yu at 2019-06-22 11:05
|
|
|
|
|
* 按照存储区代码查询最早批次的物料条码
|
|
|
|
|
* 按照 特殊批次、生产日期、收货日期 优先级从高到低依次排序
|
|
|
|
|
* @return 最早批次的条码
|
|
|
|
|
*/
|
|
|
|
|
@Query(value = "select sn from WmsStockSn " +
|
|
|
|
|
"where organizeCode=?1 and isValid=?2 and isDeleted=?3 " +
|
|
|
|
|
"and zoneNo=?4 and partNo=?5 " +
|
|
|
|
|
@Query(value = "from WmsStockSn " +
|
|
|
|
|
"where organizeCode=?1 " +
|
|
|
|
|
"and zoneNo=?2 and partNo=?3 and isValid=?4 and isDeleted=?5 " +
|
|
|
|
|
"order by fixLotNo, dateCode, lotNo")
|
|
|
|
|
WmsStockSn findFirstFifoSNByZoneNo(String organizeCode, int isValid, int isDeleted, String zoneNo, String partNo);
|
|
|
|
|
List<WmsStockSn> findByFifoSNByZoneNo(String organizeCode, String zoneNo, String partNo, int isValid, int isDeleted);
|
|
|
|
|
}
|
|
|
|
|