|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.service.impl.ServiceImpl; | 
|---|
|  |  |  | import com.core.common.Cools; | 
|---|
|  |  |  | import com.zy.asrs.entity.LocDetl; | 
|---|
|  |  |  | import com.zy.asrs.entity.LocMast; | 
|---|
|  |  |  | import com.zy.asrs.mapper.LocMastMapper; | 
|---|
|  |  |  | import com.zy.asrs.service.LocMastService; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public LocMast queryFreeLocMast(Integer row, Short locType1) { | 
|---|
|  |  |  | return this.baseMapper.queryFreeLocMast(row, locType1); | 
|---|
|  |  |  | return this.baseMapper.queryFreeLocMast(row, locType1,1L); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public LocMast queryFreeLocMast(Integer row, Short locType1,Long type) { | 
|---|
|  |  |  | return this.baseMapper.queryFreeLocMast(row, locType1,type); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | 
|---|
|  |  |  | if (Cools.isEmpty(sourceStock)) { | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return this.baseMapper.queryGroupEmptyStock(sourceStock.getCrnNo()); | 
|---|
|  |  |  | return this.baseMapper.queryGroupEmptyStock(sourceStock.getCrnNo(), 1L); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<String> queryGroupEmptyStock(String sourceLocNo,Long type) { | 
|---|
|  |  |  | if (Cools.isEmpty(sourceLocNo)) { | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | LocMast sourceStock = this.selectById(sourceLocNo); | 
|---|
|  |  |  | if (Cools.isEmpty(sourceStock)) { | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return this.baseMapper.queryGroupEmptyStock(sourceStock.getCrnNo(), type); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | 
|---|
|  |  |  | if (locMast == null) { | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return this.baseMapper.selectEmptyLocCount(locMast.getLocType1(), locMast.getCrnNo()) > 1; | 
|---|
|  |  |  | return this.baseMapper.selectEmptyLocCount(locMast.getLocType1(), locMast.getCrnNo(),1L) > 1; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public Boolean checkEmptyCount(LocMast locMast,Long type) { | 
|---|
|  |  |  | if (locMast == null) { | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return this.baseMapper.selectEmptyLocCount(locMast.getLocType1(), locMast.getCrnNo(),type) > 1; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /* | 
|---|
|  |  |  | *获取目标库位所在巷道最浅非空库位 | 
|---|
|  |  |  | * */ | 
|---|
|  |  |  | //    @Override | 
|---|
|  |  |  | //    public LocMast selectLocByLocStsPakInF(Integer curRow,Integer nearRow,List<String> locNos) { | 
|---|
|  |  |  | //        if (curRow<nearRow){ | 
|---|
|  |  |  | //            return this.baseMapper.selectLocByLocStsPakInF1(locNos,1L); | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | //        return this.baseMapper.selectLocByLocStsPakInF2(locNos,1L); | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  | // | 
|---|
|  |  |  | //    @Override | 
|---|
|  |  |  | //    public LocMast selectLocByLocStsPakInF(Integer curRow,Integer nearRow,List<String> locNos,Long type) { | 
|---|
|  |  |  | //        if (curRow<nearRow){ | 
|---|
|  |  |  | //            return this.baseMapper.selectLocByLocStsPakInF1(locNos,type); | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | //        return this.baseMapper.selectLocByLocStsPakInF2(locNos,type); | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public LocMast selectLocByLocStsPakInF(Integer curRow,Integer nearRow,LocMast locMast,Long type) { | 
|---|
|  |  |  | if (curRow>nearRow){ | 
|---|
|  |  |  | return this.baseMapper.selectLocByLocStsPakInF1(locMast.getCrnNo(),locMast.getBay1(),locMast.getLev1(),locMast.getGro1(),type); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return this.baseMapper.selectLocByLocStsPakInF2(locMast.getCrnNo(),locMast.getBay1(),locMast.getLev1(),locMast.getGro1(),type); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /* | 
|---|
|  |  |  | * 获取目标库位所在巷道最深空库位 | 
|---|
|  |  |  | * */ | 
|---|
|  |  |  | //    @Override | 
|---|
|  |  |  | //    public LocMast selectLocByLocStsPakInO(Integer curRow,Integer nearRow,List<String> locNos) { | 
|---|
|  |  |  | //        if (curRow<nearRow){ | 
|---|
|  |  |  | //            return this.baseMapper.selectLocByLocStsPakInO1(locNos,1L); | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | //        return this.baseMapper.selectLocByLocStsPakInO2(locNos,1L); | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public LocMast selectLocByLocStsPakInO(Integer curRow,Integer nearRow,LocMast locMast,Long type) { | 
|---|
|  |  |  | if (curRow>nearRow){ | 
|---|
|  |  |  | return this.baseMapper.selectLocByLocStsPakInO1(locMast.getCrnNo(),locMast.getBay1(),locMast.getLev1(),locMast.getGro1(),type); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return this.baseMapper.selectLocByLocStsPakInO2(locMast.getCrnNo(),locMast.getBay1(),locMast.getLev1(),locMast.getGro1(),type); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<LocMast> selectLocByLev(Integer lev) { | 
|---|
|  |  |  | return this.baseMapper.selectLocByLev(lev); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public Boolean checkWhole(List<LocDetl> locDetls) { | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public Boolean checkWhole(List<LocDetl> locDetls,Long type) { | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<LocMast> queryShallowLocFMast(Integer crnNo) { | 
|---|
|  |  |  | return this.baseMapper.queryShallowLocFMast(crnNo,1L); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<LocMast> queryShallowLocFMast(Integer crnNo,Long type) { | 
|---|
|  |  |  | return this.baseMapper.queryShallowLocFMast(crnNo,type); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<LocMast> selectLocMastShuttleMoveUnilateral(Integer bay,Integer lev,Integer crnNo) { | 
|---|
|  |  |  | if (crnNo==1){ | 
|---|
|  |  |  | return this.baseMapper.selectLocShuttleMoveUnilateralY(bay,lev,1L); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return this.baseMapper.selectLocShuttleMoveUnilateralN(bay,lev,1L); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<LocMast> selectLocMastShuttleMoveUnilateral(Integer bay,Integer lev,Integer crnNo,Long type) { | 
|---|
|  |  |  | if (crnNo==1){ | 
|---|
|  |  |  | return this.baseMapper.selectLocShuttleMoveUnilateralY(bay,lev,type); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return this.baseMapper.selectLocShuttleMoveUnilateralN(bay,lev,type); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|