| | |
| | | |
| | | //todo 锁库位需WCS锁定(相关库位,不可执行任务操作,不能只在WMS锁定) |
| | | List<LocMast> locMs = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("frozen", 0).eq("deleted", 0) |
| | | .in("loc_no", locs) |
| | | .eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type)); |
| | | locMs.forEach(loc -> { |
| | |
| | | } |
| | | Set<String> locs = binds.stream().map(LocAroundBind::getBLocNo).collect(Collectors.toSet()); |
| | | |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().in("loc_no", locs).eq("loc_sts", LocStsType.LOC_STS_TYPE_X.type)); |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().in("loc_no", locs) |
| | | .eq("frozen", 0).eq("deleted", 0) |
| | | .eq("loc_sts", LocStsType.LOC_STS_TYPE_X.type)); |
| | | if (Objects.isNull(locMasts) || locMasts.isEmpty()) { |
| | | throw new CoolException("没有禁用库位,不需要释放!!"); |
| | | } |
| | |
| | | @ManagerAuth(memo = "获取在库库位") |
| | | public R locNoF(@RequestParam(required = false) String locNo) { |
| | | Wrapper<LocMast> wrapper = new EntityWrapper<LocMast>() |
| | | .eq("frozen", 0).eq("deleted", 0) |
| | | .eq("loc_sts", "F"); |
| | | if (!Cools.isEmpty(locNo)) { |
| | | wrapper.like("loc_no", locNo); |
| | |
| | | } |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | }else { |
| | | wrapper.orderBy("io_time", false); |
| | | wrapper.orderBy("appe_time", false); |
| | | } |
| | | return R.ok(wrkMastService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .between("row1", params.getStartRow(), params.getEndRow()) |
| | | .between("bay1", params.getStartBay(), params.getEndBay()) |
| | | .eq("frozen", 0).eq("deleted", 0) |
| | | .between("lev1", params.getStartLev(), params.getEndLev()) |
| | | .ne("loc_sts", LocStsType.LOC_STS_TYPE_X.type)); |
| | | if (Cools.isEmpty(locMasts)) { |
| | |
| | | rowCount = locNecessaryParameters[0]; |
| | | nearRow = locNecessaryParameters[3]; |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | .eq("row1", nearRow) |
| | | .eq("loc_sts", "O") |
| | | .eq("frozen", 0) |
| | | .eq("deleted", 0) |
| | | .eq("whs_type", rowLastnoType.getType().longValue())); |
| | | int crnCountO = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", crnNo).le("io_type", 100)); |
| | | if (locMasts.size() - crnCountO <= 2) { |
| | | log.error(crnNo + "号堆垛机没有空库位!!! 尺寸规格: {}, 轮询次数:{}", JSON.toJSONString(locTypeDto), times); |
| | |
| | | if (signRule1) { |
| | | if (nearRow != curRow) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | .eq("row1", nearRow) |
| | | .eq("frozen", 0).eq("deleted", 0) |
| | | .eq("loc_sts", "O") |
| | | .eq("whs_type", rowLastnoType.getType().longValue())); |
| | | for (LocMast locMast1 : locMasts) { |
| | | //获取巷道 |
| | | // List<String> groupOutsideLocCrn = Utils.getGroupOutLocCrn(curRow,nearRow,locMast1.getLocNo(), curRow>nearRow); |
| | |
| | | // 靠近摆放规则 --- 空托 //互通版 |
| | | if (staDescId == 10 && Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow).eq("whs_type", rowLastnoType.getType().longValue())); |
| | | .eq("loc_sts", "D").eq("frozen", 0).eq("deleted", 0) |
| | | .ge("row1", sRow).le("row1", eRow).eq("whs_type", rowLastnoType.getType().longValue())); |
| | | if (!locMasts.isEmpty()) { |
| | | for (LocMast loc : locMasts) { |
| | | if (Utils.isShallowLoc(slaveProperties, loc.getLocNo())) { |
| | |
| | | if (Cools.isEmpty(locMast) && crnNo != 0) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow) |
| | | .eq("frozen", 0).eq("deleted", 0) |
| | | .eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()) |
| | | .orderBy("lev1", true).orderBy("bay1", true)); |
| | | for (LocMast locMast1 : locMasts) { |
| | |
| | | crnNo = locNecessaryParameters[2]; |
| | | nearRow = locNecessaryParameters[3]; |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("frozen", 0).eq("deleted", 0) |
| | | .eq("crn_no", crnNo).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | if (locMasts.size() <= 5) { |
| | | nearRow = 0; |
| | |
| | | if (signRule1) { |
| | | if (nearRow != curRow) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("frozen", 0).eq("deleted", 0) |
| | | .eq("row1", nearRow).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | for (LocMast locMast1 : locMasts) { |
| | | //获取巷道 |
| | |
| | | |
| | | // 靠近摆放规则 --- 空托 //互通版 |
| | | if (staDescId == 10 && Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow)); |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").eq("frozen", 0).eq("deleted", 0) |
| | | .ge("row1", sRow).le("row1", eRow)); |
| | | int nearbay = 0; |
| | | int nearlev = 0; |
| | | for (LocMast locMastSign : locMasts) { |
| | |
| | | if (Cools.isEmpty(locMast) && crnNo != 0) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow) |
| | | .eq("frozen", 0).eq("deleted", 0) |
| | | .eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()) |
| | | .orderBy("lev1", true).orderBy("bay1", true));//最浅库位 |
| | | for (LocMast locMast1 : locMasts) { |
| | |
| | | if (Cools.isEmpty(locMast) && crnNo != 0) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow) |
| | | .eq("frozen", 0).eq("deleted", 0) |
| | | .eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()) |
| | | .orderBy("lev1", true).orderBy("bay1", true));//最浅库位 |
| | | for (LocMast locMast1 : locMasts) { |
| | |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号',sort: true, width: 95} |
| | | ,{field: 'wrkCode', align: 'center',title: '下发工作号',sort: true, width: 120, hide: true} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间',sort: true, width: 170} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态', width: 120} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态', width: 140} |
| | | ,{field: 'ioType$', align: 'center',title: '入出库类型', width: 140} |
| | | ,{field: 'ioPri', align: 'center',title: '优先级', width: 95} |
| | | ,{field: 'barcode', align: 'center',title: 'SN', width: 120} |