| | |
| | | import com.vincent.rsf.server.api.entity.dto.InTaskMsgDto; |
| | | import com.vincent.rsf.server.api.entity.dto.LocTypeDto; |
| | | import com.vincent.rsf.server.api.controller.params.TaskInParam; |
| | | import com.vincent.rsf.server.api.entity.enums.LocUseStatusType; |
| | | import com.vincent.rsf.server.api.entity.enums.OrderType; |
| | | import com.vincent.rsf.server.api.entity.enums.TaskStsType; |
| | | import com.vincent.rsf.server.api.entity.enums.TaskType; |
| | |
| | | String shallowLocNo = LocUtils.getShallowLoc(slaveProperties, loc1.getCode()); |
| | | // 检测目标库位是否为空库位 |
| | | Loc shallowLoc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode,shallowLocNo)); |
| | | if (shallowLoc != null && shallowLoc.getUseStatus().equals(LocUseStatusType.Empty_Slot.type)) { |
| | | if (shallowLoc != null && shallowLoc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_O.type)) { |
| | | if (LocUtils.locMoveCheckLocTypeComplete(shallowLoc, locTypeDto)) { |
| | | loc = shallowLoc; |
| | | deviceNo = shallowLoc.getDeviceNo(); |
| | |
| | | List<Loc> locMasts = null; |
| | | locMasts = locService.list(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getRow, nearRow) |
| | | .eq(Loc::getUseStatus, LocUseStatusType.Empty_Slot.type) |
| | | .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type) |
| | | .eq(Loc::getType, locTypeDto.getLocType1()) |
| | | .eq(Loc::getAreaId,area) |
| | | .orderByAsc(Loc::getLev) |
| | |
| | | //相似物料打开,判断深库位有没有货,没货就放深库位,有货就不操作 |
| | | Loc locMast2 = locService.getOne(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getRow, shallowLoc) |
| | | .eq(Loc::getUseStatus, LocUseStatusType.Empty_Slot.type) |
| | | .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type) |
| | | .eq(Loc::getAreaId,area) |
| | | ); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | |
| | | //相似物料关闭,判断深库位有没有货,有货就放浅库位,无货就不操作 |
| | | Loc locMast2 = locService.getOne(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getCode, shallowLoc) |
| | | .in(Loc::getUseStatus, LocUseStatusType.Empty_Pallet.type,LocUseStatusType.In_Stock.type) |
| | | .in(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_D.type,LocStsType.LOC_STS_TYPE_F.type) |
| | | .eq(Loc::getAreaId,area) |
| | | ); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | |
| | | }else{ |
| | | locMast2 = locService.getOne(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getCode, shallowLoc) |
| | | .eq(Loc::getUseStatus, LocUseStatusType.Empty_Slot.type) |
| | | .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type) |
| | | .eq(Loc::getAreaId,area) |
| | | ); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | |
| | | String shallowLoc = LocUtils.getDeepLoc(slaveProperties, locMast1.getCode()); |
| | | Loc locMast2 = locService.getOne(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getCode, shallowLoc) |
| | | .eq(Loc::getUseStatus, LocUseStatusType.Empty_Slot.type) |
| | | .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type) |
| | | .eq(Loc::getAreaId,area) |
| | | ); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | |
| | | } else { |
| | | locMast2 = locService.getOne(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getCode, shallowLoc) |
| | | .in(Loc::getUseStatus, LocUseStatusType.Empty_Pallet.type,LocUseStatusType.In_Stock.type) |
| | | .in(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_D.type,LocStsType.LOC_STS_TYPE_D.type) |
| | | .eq(Loc::getAreaId,area) |
| | | ); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | |
| | | } |
| | | //查询当前库位类型空库位 小于5个则locmast = null |
| | | List<Loc> locTypeLocMasts = locService.list(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getUseStatus, LocUseStatusType.Empty_Slot.type) |
| | | .eq(Loc::getUseStatus,LocStsType.LOC_STS_TYPE_O.type) |
| | | .eq(Loc::getDeviceNo, deviceNo) |
| | | .eq(Loc::getType, locTypeDto.getLocType1()) |
| | | .eq(Loc::getAreaId,area) |
| | |
| | | loc = null; |
| | | } |
| | | // 递归查询 |
| | | if (Cools.isEmpty(loc) || !loc.getUseStatus().equals(LocUseStatusType.Empty_Slot.type)) { |
| | | if (Cools.isEmpty(loc) || !loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_O.type)) { |
| | | // 当前巷道无空库位时,递归调整至下一巷道,检索全部巷道无果后,跳出递归 |
| | | if (times < rowCount * 2) { |
| | | times = times + 1; |
| | |
| | | InTaskMsgDto inTaskMsgDto = new InTaskMsgDto(); |
| | | List<Loc> loc1 = locService.list(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getAreaId, area) |
| | | .eq(Loc::getUseStatus, LocUseStatusType.Empty_Slot.type) |
| | | .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type) |
| | | .eq(Loc::getType, locTypeDto.getLocType1()) |
| | | .orderByAsc(Loc::getRow) |
| | | .orderByAsc(Loc::getCol) |
| | |
| | | inTaskMsgDto.setStaNo(Integer.parseInt(deviceSite.getDeviceSite())); |
| | | } |
| | | // 递归查询 |
| | | if (Cools.isEmpty(loc) || !loc.getUseStatus().equals(LocUseStatusType.Empty_Slot.type)) { |
| | | if (Cools.isEmpty(loc) || !loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_O.type)) { |
| | | // 当前巷道无空库位时,递归调整至下一巷道,检索全部巷道无果后,跳出递归 |
| | | if (times < 5) { |
| | | times = times + 1; |