| | |
| | | * 检索库位号 |
| | | */ |
| | | @Transactional |
| | | public StartupDto getLocNo(Integer staDescId, Integer sourceStaNo, Integer moveCrnNo, LocTypeDto locTypeDto, int times) { |
| | | public StartupDto getLocNo(Integer staDescId, Integer sourceStaNo, Long hostId, LocTypeDto locTypeDto, int times) { |
| | | // 目标库位 |
| | | LocMast locMast = null; |
| | | |
| | |
| | | // } |
| | | |
| | | //搜索整个空库位组 |
| | | locMast = getLocNoStepSingle(locTypeDto, staDescId, sourceStaNo); |
| | | locMast = getLocNoStepSingle(locTypeDto, staDescId, sourceStaNo, hostId); |
| | | if (locMast != null) { |
| | | //找到库位,返回dto |
| | | return getLocNoStep6(staDescId, sourceStaNo, locMast);//返回dto |
| | |
| | | } |
| | | |
| | | // 搜索单品(整个库位组) |
| | | private LocMast getLocNoStepSingle(LocTypeDto locTypeDto, Integer staDescId, Integer sourceStaNo) { |
| | | private LocMast getLocNoStepSingle(LocTypeDto locTypeDto, Integer staDescId, Integer sourceStaNo, Long hostId) { |
| | | LocMast locMast = null; |
| | | // 获取目标站 |
| | | LambdaQueryWrapper<StaDesc> wrapper = new LambdaQueryWrapper<StaDesc>() |
| | | .eq(StaDesc::getTypeNo, staDescId) |
| | | .eq(StaDesc::getStnNo, sourceStaNo); |
| | | .eq(StaDesc::getStnNo, sourceStaNo) |
| | | .eq(StaDesc::getHostId, hostId); |
| | | StaDesc staDesc = staDescService.getOne(wrapper); |
| | | if (staDesc == null) { |
| | | throw new CoolException("入库路径不存在"); |
| | | } |
| | | |
| | | List<LocMast> locMasts = locMastService.list(new LambdaQueryWrapper<LocMast>().eq(LocMast::getLocSts, "O"));//搜索货物 |
| | | List<LocMast> locMasts = locMastService.list(new LambdaQueryWrapper<LocMast>().eq(LocMast::getLocSts, "O").eq(LocMast::getHostId, hostId));//搜索货物 |
| | | |
| | | if (locMasts == null) { |
| | | return null; |
| | |
| | | } |
| | | Date now = new Date(); |
| | | LocTypeDto locTypeDto = new LocTypeDto(); |
| | | StartupDto dto = commonService.getLocNo(1, param.getDevpNo(), null, locTypeDto, 0); |
| | | StartupDto dto = commonService.getLocNo(1, param.getDevpNo(), hostId, locTypeDto, 0); |
| | | // 生成工作号 |
| | | int workNo = dto.getWorkNo(); |
| | | // 生成工作档 |
| | |
| | | var $ = layui.jquery; |
| | | var form = layui.form; |
| | | |
| | | $('#locNo').val(parent.locNo); |
| | | var tmp = getQueryVariable("locNo") |
| | | if (tmp == false) { |
| | | $('#locNo').val(parent.locNo); |
| | | }else { |
| | | $('#locNo').val(tmp); |
| | | } |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | |
| | | page: true, |
| | | limit: 20, |
| | | skin: 'line', |
| | | where: {loc_no: parent.locNo}, |
| | | where: {loc_no: $('#locNo').val()}, |
| | | even: true, |
| | | cellMinWidth: 50, |
| | | cols: [getCol()], |