|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<LocMast> queryFreeLocMast(@Param("rows") List<Integer> rows, @Param("rowsLen") Integer rowsLen, @Param("locType1") Short locType1); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | LocMast queryFreeLocMast0(@Param("row") Integer row, @Param("locType1") Short locType1); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Select("select loc_no from asr_loc_mast where 1=1 and loc_sts = 'O' and crn_no = #{crnNo}") | 
|---|
|  |  |  | List<String> queryGroupEmptyStock(Integer crnNo); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | List<LocMast> queryFreeLocMast(List<Integer> rows, Integer rowsLen, Short locType1); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 检索可用库位0 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | LocMast queryFreeLocMast0(Integer row, Short locType1); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取同组货架的空库位 | 
|---|
|  |  |  | * @param sourceLocNo 源库位 | 
|---|
|  |  |  | * @return 同组空库位集合 | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public LocMast queryFreeLocMast0(Integer row, Short locType1) { | 
|---|
|  |  |  | return this.baseMapper.queryFreeLocMast0(row, locType1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<String> queryGroupEmptyStock(String sourceLocNo) { | 
|---|
|  |  |  | if (Cools.isEmpty(sourceLocNo)) { | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | if (Utils.isShallowLoc(slaveProperties, curRow)) { | 
|---|
|  |  |  | Integer deepRow = Utils.getDeepRow(slaveProperties, curRow); | 
|---|
|  |  |  | locMast = locMastService.queryFreeLocMast(deepRow, locTypeDto.getLocType1()); | 
|---|
|  |  |  | // todo:luxiaotao 如果用浅排找到的深库位,那么则需要判断这个深库位对应的浅库位是否有货(F、X、D) | 
|---|
|  |  |  | locMast = locMastService.queryFreeLocMast0(deepRow, locTypeDto.getLocType1()); | 
|---|
|  |  |  | // 因库位移转、需预留空库位 | 
|---|
|  |  |  | if (locMast !=null && !locMastService.checkEmptyCount(locMast)) { | 
|---|
|  |  |  | locMast = null; | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (Cools.isEmpty(locMast)) { | 
|---|
|  |  |  | locMast = locMastService.queryFreeLocMast(curRow, locTypeDto.getLocType1()); | 
|---|
|  |  |  | locMast = locMastService.queryFreeLocMast0(curRow, locTypeDto.getLocType1()); | 
|---|
|  |  |  | // 因库位移转、需预留空库位 | 
|---|
|  |  |  | if (!locMastService.checkEmptyCount(locMast)) { | 
|---|
|  |  |  | locMast = null; | 
|---|
|  |  |  | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="queryFreeLocMast0" resultMap="BaseResultMap"> | 
|---|
|  |  |  | select top 1 * | 
|---|
|  |  |  | from asr_loc_mast | 
|---|
|  |  |  | where row1=#{row} | 
|---|
|  |  |  | and loc_sts='O' | 
|---|
|  |  |  | <if test="locType1 != null"> | 
|---|
|  |  |  | and loc_type1 = #{locType1} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | order by loc_sts desc ,lev1 asc,bay1 asc | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </mapper> | 
|---|