| | |
| | | // return R.ok("组托成功"); |
| | | // } |
| | | |
| | | @RequestMapping("/truss/order/auth") |
| | | @ManagerAuth(memo = "退库,1楼桁架退库,退库单退库") |
| | | public R trussCombOrder(@RequestBody TrussCombParam combParam){ |
| | | mobileService.trussCombOrder(combParam, getUserId()); |
| | | return R.ok("组托成功"); |
| | | } |
| | | // @RequestMapping("/truss/order/auth") |
| | | // @ManagerAuth(memo = "退库,1楼桁架退库,退库单退库") |
| | | // public R trussCombOrder(@RequestBody TrussCombParam combParam){ |
| | | // mobileService.trussCombOrder(combParam, getUserId()); |
| | | // return R.ok("组托成功"); |
| | | // } |
| | | |
| | | @RequestMapping("/truss/comd/auth") |
| | | // @ManagerAuth(memo = "手动入库,2楼无需桁架手动入库 wms入库") |
| | | public R PalletizingCompleteTwoFloorParam(@RequestBody PalletizingCompleteTwoFloorParam combParam){ |
| | | mobileService.PalletizingCompleteTwoFloorParam(combParam); |
| | | try{ |
| | | mobileService.PalletizingCompleteTwoFloorParam(combParam); |
| | | } catch (Exception e){ |
| | | return R.error(e.getMessage()).add(e.getMessage()); |
| | | } |
| | | return R.ok("组托成功"); |
| | | } |
| | | |
| | | @RequestMapping("/truss/comd/auth/v2") |
| | | // @ManagerAuth(memo = "手动入库,1楼无需桁架手动入库 wms入库") |
| | | public R PalletizingCompleteTwoFloorParamV2(@RequestBody PalletizingCompleteTwoFloorParam combParam){ |
| | | mobileService.PalletizingCompleteTwoFloorParam2(combParam); |
| | | try{ |
| | | mobileService.PalletizingCompleteTwoFloorParam2(combParam); |
| | | } catch (Exception e){ |
| | | return R.error(e.getMessage()).add(e.getMessage()); |
| | | } |
| | | return R.ok("组托成功"); |
| | | } |
| | | |
| | |
| | | } |
| | | LocDto locDto = new LocDto(orderDetl.getManu(), orderDetl.getMatnr(), orderDetl.getMaktx(),orderDetl.getModel(),orderDetl.getSpecs(), |
| | | orderDetl.getBatch(),orderDetl.getBrand(),orderDetl.getBarcode(), orderDetl.getOrderNo(),orderDetl.getAnfme()); |
| | | LocDetl one = locDetlService.selectItem(locDto.getLocNo(), locDto.getMatnr(), locDto.getBatch()); |
| | | if (one == null) { |
| | | LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("batch", locDto.getBatch())); |
| | | if (locDetl == null) { |
| | | locDto.setLocNo(null); |
| | | } else { |
| | | locDto.setLocNo(locDetl.getLocNo()); |
| | | } |
| | | } |
| | | |
| | | locDto.setOrderDetlId(orderDetl.getId()); |
| | | locDto.setTkType(orderDetl.getTkType()); |
| | | locDtos.add(locDto); |
| | |
| | | Order order = orderService.selectByNo(locDto.getOrderNo()); |
| | | |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | | |
| | | if (docType.getDocName().equals("不合格品出库")){ |
| | | staNoOrder = 212; |
| | | } |
| | |
| | | return this.brand; |
| | | } |
| | | |
| | | public int getBrandArmType$(){ |
| | | BasBoxTypeService basBoxTypeService = SpringUtils.getBean(BasBoxTypeService.class); |
| | | List<BasBoxType> basBoxTypes = basBoxTypeService.selectList(new EntityWrapper<BasBoxType>().eq("box_type", this.brand).orderBy("id", true)); |
| | | for (BasBoxType basBoxType:basBoxTypes){ |
| | | return basBoxType.getArmType(); |
| | | } |
| | | return 999; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | return ""; |
| | |
| | | } |
| | | return this.brand; |
| | | } |
| | | |
| | | public int getBrandArmType$(){ |
| | | BasBoxTypeService basBoxTypeService = SpringUtils.getBean(BasBoxTypeService.class); |
| | | List<BasBoxType> basBoxTypes = basBoxTypeService.selectList(new EntityWrapper<BasBoxType>().eq("box_type", this.brand).orderBy("id", true)); |
| | | for (BasBoxType basBoxType:basBoxTypes){ |
| | | return basBoxType.getArmType(); |
| | | } |
| | | return 999; |
| | | } |
| | | } |
| | |
| | | LocTypeDto locTypeDto = new LocTypeDto(); |
| | | locTypeDto.setLocType1((short)1); |
| | | |
| | | StartupDto dto = commonService.getLocNo(1, 1, 1901, matnr,null,null, locTypeDto); |
| | | StartupDto dto = null; |
| | | try{ |
| | | dto = commonService.getLocNo(1, 1, 1901, matnr,null,null, locTypeDto); |
| | | } catch (Exception e){ |
| | | throw new CoolException(e.getMessage()); |
| | | } |
| | | if (dto == null) { |
| | | throw new CoolException("未找到库位"); |
| | | } |
| | | |
| | | int workNo = dto.getWorkNo(); |
| | | // 生成工作档 |
| | |
| | | public List<Map<String, Object>> boxTypeComb() { |
| | | EntityWrapper<BasBoxType> wrapper = new EntityWrapper<>(); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | List<BasBoxType> basBoxTypes = basBoxTypeService.selectList(wrapper.orderBy("id",true)); |
| | | List<BasBoxType> basBoxTypes = basBoxTypeService.selectList(wrapper.orderBy("id",true).eq("arm_type",1)); |
| | | for (BasBoxType basBoxType : basBoxTypes){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("boxType", basBoxType.getBoxType()); |
| | |
| | | for (StockOutParam.LocDetl paramLocDetl : param.getLocDetls()) { |
| | | if (!Cools.isEmpty(paramLocDetl.getLocNo(), paramLocDetl.getMatnr(), paramLocDetl.getCount())) { |
| | | LocDetl one = locDetlService.selectItem(paramLocDetl.getLocNo(), paramLocDetl.getMatnr(), paramLocDetl.getBatch()); |
| | | one.setMemo(paramLocDetl.getMemo()); |
| | | one.setColor(paramLocDetl.getColor()); |
| | | if (null != one) locDetlDtos.add(new LocDetlDto(one, paramLocDetl.getCount(), param.getOrderNo())); |
| | | if (null != one) { |
| | | one.setMemo(paramLocDetl.getMemo()); |
| | | one.setColor(paramLocDetl.getColor()); |
| | | if (param.getOutSite()!=212 && param.getOutSite()!=1901 && one.getBrandArmType$()==999){ |
| | | staNo = basDevpService.checkSiteStatus(1901); |
| | | } |
| | | locDetlDtos.add(new LocDetlDto(one, paramLocDetl.getCount(), param.getOrderNo())); |
| | | } |
| | | } |
| | | } |
| | | if (!locDetlDtos.isEmpty()) { |
| | |
| | | for (OutLocDto dto : dtos) { |
| | | // 判断入出库类型:101.全板出库 or 103.拣料出库 |
| | | if (ioWorkType == null) { |
| | | ioType = dto.isAll() ? 101 : 103; |
| | | boolean dtoAll = dto.isAll(); |
| | | if (!dtoAll){ |
| | | for (LocDetlDto detlDto : dto.getLocDetlDtos()) { |
| | | LocDetl locDetl = detlDto.getLocDetl(); |
| | | LocDetl one = locDetlService.selectItem(dto.getLocNo(), locDetl.getMatnr(), locDetl.getBatch()); |
| | | if (null != one) { |
| | | if (one.getBrandArmType$()==999){ |
| | | dtoAll = true; |
| | | } |
| | | } else { |
| | | log.error("出库但未找到明细!!!"+locDetl.getMatnr()); |
| | | dtoAll = true; |
| | | } |
| | | } |
| | | if (dtoAll) { |
| | | List<LocDetl> locDetlList = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", dto.getLocNo())); |
| | | for (LocDetl locDetl : locDetlList) { |
| | | boolean signAddAll = true; |
| | | for (LocDetlDto detlDto : dto.getLocDetlDtos()) { |
| | | if (detlDto.getLocDetl().getBatch().equals(locDetl.getBatch())) { |
| | | signAddAll = false; |
| | | } |
| | | } |
| | | if (signAddAll) { |
| | | LocDetl one = locDetlService.selectItem(dto.getLocNo(), locDetl.getMatnr(), locDetl.getBatch()); |
| | | dto.getLocDetlDtos().add(new LocDetlDto(one, one.getAnfme(), "affiliated")); |
| | | } |
| | | } |
| | | } |
| | | if (staNo.getDevNo() == 1901 && !dtoAll){//紧急出库需修改 |
| | | staNo.setDevNo(118); |
| | | } |
| | | } |
| | | ioType = dtoAll ? 101 : 103; |
| | | } else if (ioWorkType.equals(IoWorkType.CHECK_OUT)) { |
| | | ioType = 107; |
| | | } |
| | | assert ioType != null; |
| | | // 获取库位 |
| | | LocMast locMast = locMastService.selectById(dto.getLocNo()); |
| | | |
| | | Integer outSta = staNo.getDevNo(); |
| | | // //2号堆垛机全板出库站指定为204站,拣料站指定为202 |
| | | // if(locMast.getCrnNo()==2){ |
| | |
| | | |
| | | int sign = 0; |
| | | int staA=118; |
| | | int staB=118; |
| | | int staB=1901; |
| | | for (List<StockOutParam.LocDetl> locDetlList:lists){ |
| | | sign++; |
| | | if (locDetlList.size()==0){ |
| | |
| | | |
| | | int sign = 0; |
| | | int staA=118; |
| | | int staB=118; |
| | | int staB=1901; |
| | | for (List<StockOutParam.LocDetl> locDetlList:lists){ |
| | | sign++; |
| | | if (locDetlList.size()==0){ |
| | |
| | | |
| | | int sign = 0; |
| | | int staA=118; |
| | | int staB=118; |
| | | int staB=1901; |
| | | for (List<StockOutParam.LocDetl> locDetlList:lists){ |
| | | sign++; |
| | | if (locDetlList.size()==0){ |
| | |
| | | */ |
| | | @Transactional |
| | | public StartupDto getLocNoRun(Integer whsType, Integer staDescId, Integer sourceStaNo, String matnr, String batch, String grade, Integer moveCrnNo, LocTypeDto locTypeDto, int times) { |
| | | boolean sign999 = false; |
| | | if (Cools.isEmpty(matnr)) { //物料号 |
| | | matnr = ""; |
| | | } |
| | |
| | | throw new CoolException("数据异常,请联系管理员"); |
| | | } |
| | | // ===============>>>> 开始执行 |
| | | if (sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901 || sourceStaNo == 1908){ |
| | | if (sign999 || sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901 || sourceStaNo == 1908){ |
| | | curRow = rowLastno.getCurrentRow1(); |
| | | } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){ |
| | | curRow = rowLastno.getCurrentRow2(); |
| | |
| | | if (locMast2.getCrnNo()==1 || locMast2.getCrnNo()==6){ |
| | | continue; |
| | | } |
| | | if (sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901 || sourceStaNo == 1908){ |
| | | if (sign999 || sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901 || sourceStaNo == 1908){ |
| | | if (locMast2.getCrnNo()>3){ |
| | | continue; |
| | | } |
| | |
| | | if (shallowLoc.getCrnNo()==1 || shallowLoc.getCrnNo()==6){ |
| | | continue; |
| | | } |
| | | if (sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901 || sourceStaNo == 1908){ |
| | | if (sign999 || sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901 || sourceStaNo == 1908){ |
| | | if (shallowLoc.getCrnNo()>3){ |
| | | continue; |
| | | } |
| | |
| | | |
| | | // 更新库位排号 |
| | | if (Utils.BooleanWhsTypeSta(whsType, staDescId) && Cools.isEmpty(locMast)) { |
| | | if (sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901 || sourceStaNo == 1908){ |
| | | if (sign999 || sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901 || sourceStaNo == 1908){ |
| | | rowLastno.setCurrentRow1(curRow); |
| | | } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){ |
| | | rowLastno.setCurrentRow2(curRow); |
| | |
| | | if (Cools.isEmpty(grade)) { //备用 |
| | | grade = ""; |
| | | } |
| | | |
| | | boolean sign999 = false; |
| | | // 初始化参数 |
| | | int crnNo = 0; //堆垛机号 |
| | | int nearRow = 0; //最浅库位排 |
| | |
| | | throw new CoolException("数据异常,请联系管理员"); |
| | | } |
| | | // ===============>>>> 开始执行 |
| | | if (sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901 || sourceStaNo == 1908){ |
| | | if (sign999 || sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901 || sourceStaNo == 1908){ |
| | | curRow = rowLastno.getCurrentRow1(); |
| | | } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){ |
| | | curRow = rowLastno.getCurrentRow2(); |
| | |
| | | |
| | | // 更新库位排号 |
| | | if (Utils.BooleanWhsTypeSta(whsType, staDescId) && Cools.isEmpty(locMast)) { |
| | | if (sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901 || sourceStaNo == 1908){ |
| | | if (sign999 || sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901 || sourceStaNo == 1908){ |
| | | rowLastno.setCurrentRow1(curRow); |
| | | } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){ |
| | | rowLastno.setCurrentRow2(curRow); |