| | |
| | | if (staNo.getDevNo() == 1135 && locMast.getLocType1() == 2) { |
| | | throw new CoolException("所选库位不是低库位无法调拨,库位号:{}" + locMast.getLocNo()); |
| | | } |
| | | // 启动出库开始 101.出库 |
| | | stockOut(staNo, locDetlDtos, null, userId); |
| | | if(staNo.getDevNo()>=1100){ |
| | | // 启动出库开始 101.出库 |
| | | stockOut(staNo, locDetlDtos, null, userId); |
| | | }else { |
| | | stockOutSXK(staNo, locDetlDtos, null, userId); |
| | | } |
| | | } else { |
| | | throw new CoolException("所选库位存在状态不为F、D的库位,库位号:" + locMast.getLocNo() + " 、当前状态:" + locMast.getLocSts() + "-" + locMast.getLocSts$()); |
| | | } |
| | |
| | | LocMast locMast = locMastService.selectById(taskDto.getLocNo()); |
| | | |
| | | List<LocMast> locMasts = new ArrayList<>(); |
| | | if ((locMast.getBay1() >= 1 && locMast.getBay1() <= 2) || (locMast.getBay1() >= 6 && locMast.getBay1() <= 7 && locMast.getRow1() != 36 && locMast.getRow1() != 29) || (locMast.getBay1() >= 11 && locMast.getBay1() <= 12)) { |
| | | if ((locMast.getBay1() >= 3 && locMast.getBay1() <= 6) ) { |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("gro1", locMast.getGro1()) |
| | | .eq("crn_no", 7) |
| | | .eq("loc_type1", locMast.getLocType1()) |
| | | .orderBy("bay1", false)); |
| | | } else { |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("gro1", locMast.getGro1()) |
| | | .eq("row1", locMast.getBay1()) |
| | | .in("bay1", 3,4,5,6) |
| | | .eq("crn_no", 7) |
| | | .eq("loc_type1", locMast.getLocType1()) |
| | | .orderBy("bay1", true)); |
| | | } |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (locMast1.getLocNo().equals(taskDto.getLocNo())) { |
| | | break; |
| | | } |
| | | if (locMast1.getLocSts().equals("X")) { |
| | | throw new CoolException(taskDto.getLocNo() + "库位前方有锁定库位,禁止出库"); |
| | | } |
| | | if (locMast1.getLocSts().equals("F")) { |
| | | moveLocForDeepLoc(locMast1); |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (locMast1.getLocNo().equals(taskDto.getLocNo())) { |
| | | break; |
| | | } |
| | | if (locMast1.getLocSts().equals("X")) { |
| | | throw new CoolException(taskDto.getLocNo() + "库位前方有锁定库位,禁止出库"); |
| | | } |
| | | if (locMast1.getLocSts().equals("F")) { |
| | | locMast = locMast1; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | // 获取路径 |
| | | int ioType = taskDto.isAll() ? 101 : 103; |
| | |
| | | LocMast locMast = locMastService.selectById(dto.getLocNo()); |
| | | |
| | | List<LocMast> locMasts = new ArrayList<>(); |
| | | if ((locMast.getBay1() >= 1 && locMast.getBay1() <= 2) || (locMast.getBay1() >= 6 && locMast.getBay1() <= 7 && locMast.getRow1() != 36 && locMast.getRow1() != 29) || (locMast.getBay1() >= 11 && locMast.getBay1() <= 12)) { |
| | | // if ((locMast.getBay1() >= 1 && locMast.getBay1() <= 2) || (locMast.getBay1() >= 6 && locMast.getBay1() <= 7 && locMast.getRow1() != 36 && locMast.getRow1() != 29) || (locMast.getBay1() >= 11 && locMast.getBay1() <= 12)) { |
| | | // locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | // .eq("gro1", locMast.getGro1()) |
| | | // .eq("crn_no", 7) |
| | | // .eq("loc_type1", locMast.getLocType1()) |
| | | // .orderBy("bay1", false)); |
| | | // } else { |
| | | // locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | // .eq("gro1", locMast.getGro1()) |
| | | // .eq("crn_no", 7) |
| | | // .eq("loc_type1", locMast.getLocType1()) |
| | | // .orderBy("bay1", true)); |
| | | // } |
| | | // for (LocMast locMast1 : locMasts) { |
| | | // if (locMast1.getLocNo().equals(dto.getLocNo())) { |
| | | // break; |
| | | // } |
| | | // if (locMast1.getLocSts().equals("X")) { |
| | | // throw new CoolException(dto.getLocNo() + "库位前方有锁定库位,禁止出库"); |
| | | // } |
| | | // if (locMast1.getLocSts().equals("F")) { |
| | | // moveLocForDeepLoc(locMast1); |
| | | // } |
| | | // } |
| | | if ((locMast.getBay1() >= 3 && locMast.getBay1() <= 6) ) { |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("gro1", locMast.getGro1()) |
| | | .eq("crn_no", 7) |
| | | .eq("loc_type1", locMast.getLocType1()) |
| | | .orderBy("bay1", false)); |
| | | } else { |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("gro1", locMast.getGro1()) |
| | | .eq("row1", locMast.getBay1()) |
| | | .in("bay1", 3,4,5,6) |
| | | .eq("crn_no", 7) |
| | | .eq("loc_type1", locMast.getLocType1()) |
| | | .orderBy("bay1", true)); |
| | | } |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (locMast1.getLocNo().equals(dto.getLocNo())) { |
| | | break; |
| | | } |
| | | if (locMast1.getLocSts().equals("X")) { |
| | | throw new CoolException(dto.getLocNo() + "库位前方有锁定库位,禁止出库"); |
| | | } |
| | | if (locMast1.getLocSts().equals("F")) { |
| | | moveLocForDeepLoc(locMast1); |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (locMast1.getLocNo().equals(locMast.getLocNo())) { |
| | | break; |
| | | } |
| | | if (locMast1.getLocSts().equals("X")) { |
| | | throw new CoolException(locMast.getLocNo() + "库位前方有锁定库位,禁止出库"); |
| | | } |
| | | if (locMast1.getLocSts().equals("F")) { |
| | | locMast = locMast1; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | Integer outSta = staNo.getDevNo(); |
| | | // //2号堆垛机全板出库站指定为204站,拣料站指定为202 |
| | |
| | | WrkMast wrkMast = new WrkMast(); |
| | | wrkMast.setWrkNo(workNo); |
| | | wrkMast.setIoTime(new Date()); |
| | | wrkMast.setWrkSts(1L); // 工作状态:1.生成入库ID |
| | | wrkMast.setIoType(1); // 入出库状态: 1.库格移载 |
| | | wrkMast.setWrkSts(2L); // 工作状态:1.生成入库ID |
| | | wrkMast.setIoType(wrkMastold.getIoType() - 100); // 入出库状态: 1.库格移载 |
| | | wrkMast.setIoPri(12D); |
| | | wrkMast.setStaNo(1032); |
| | | wrkMast.setSourceStaNo(1031); |
| | | wrkMast.setCrnNo(7); |
| | | wrkMast.setLocNo(dto.getLocNo()); // 目标库位 |
| | | wrkMast.setFullPlt("Y"); // 满板 |
| | |
| | | wrkMast.setEmptyMk("Y"); // 空板 |
| | | wrkMast.setBarcode(wrkMastold.getBarcode()); // 托盘码 |
| | | wrkMast.setLinkMis("N"); |
| | | wrkMast.setPltType(wrkMastold.getWrkNo()); |
| | | wrkMast.setAppeTime(new Date()); |
| | | wrkMast.setModiTime(new Date()); |
| | | boolean res = wrkMastService.insert(wrkMast); |
| | |
| | | public void toCrn(WrkMast wrkMastold, List<WrkDetl> wrkDetls, Short locType) { |
| | | LocTypeDto locTypeDto = new LocTypeDto(); |
| | | locTypeDto.setLocType1(locType); |
| | | StartupDto dto = commonService.getLocNo(1, 1035, null, null, null, locTypeDto, false); |
| | | StartupDto dto = commonService.getLocNo(1, 1135, null, null, null, locTypeDto, false); |
| | | if (Cools.isEmpty(dto)) { |
| | | throw new CoolException("去堆垛机未找到库位"); |
| | | } |
| | |
| | | wrkMast.setWrkNo(workNo); |
| | | wrkMast.setIoTime(new Date()); |
| | | wrkMast.setWrkSts(1L); // 工作状态:1.生成入库ID |
| | | wrkMast.setIoType(1); // 入出库状态: 1.入库 |
| | | wrkMast.setIoType(wrkMastold.getIoType() - 100); // 入出库状态: 1.入库 |
| | | wrkMast.setIoPri(12D); |
| | | wrkMast.setCrnNo(7); |
| | | wrkMast.setCrnNo(1); |
| | | wrkMast.setStaNo(1131); |
| | | wrkMast.setSourceStaNo(1135); |
| | | wrkMast.setLocNo(dto.getLocNo()); // 目标库位 |
| | | wrkMast.setFullPlt(wrkDetls == null ? "N" : "Y"); // 满板 |
| | | wrkMast.setPicking("N"); // 拣料 |
| | |
| | | wrkMast.setEmptyMk(wrkDetls != null ? "N" : "Y"); // 空板 |
| | | wrkMast.setBarcode(wrkMastold.getBarcode()); // 托盘码 |
| | | wrkMast.setLinkMis("N"); |
| | | wrkMast.setPltType(wrkMastold.getWrkNo()); |
| | | wrkMast.setAppeTime(new Date()); |
| | | wrkMast.setModiTime(new Date()); |
| | | boolean res = wrkMastService.insert(wrkMast); |