| | |
| | | } |
| | | 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); |
| | |
| | | public synchronized R pakout(@RequestBody List<LocDto> locDtos) throws InterruptedException { |
| | | StockOutParam param = new StockOutParam(); |
| | | ArrayList<StockOutParam.LocDetl> locDetls = new ArrayList<>(); |
| | | int staNoOrder = 0; |
| | | for (LocDto locDto:locDtos){ |
| | | Order order = orderService.selectByNo(locDto.getOrderNo()); |
| | | |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | | |
| | | if (docType.getDocName().equals("不合格品出库")){ |
| | | staNoOrder = 212; |
| | | } |
| | | if (docType.getDocName().equals("拆包装检出库")){ |
| | | staNoOrder = 212; |
| | | } |
| | | if (docType.getDocName().equals("退货至二楼")){ |
| | | staNoOrder = 212; |
| | | } |
| | | |
| | | OrderDetl orderDetl = orderDetlService.selectById(locDto.getOrderDetlId()); |
| | | |
| | | StockOutParam.LocDetl locDetl = new StockOutParam.LocDetl(); |
| | |
| | | } |
| | | param.setLocDetls(locDetls); |
| | | |
| | | List<StockOutParam> stockOutParams = OutboundAllocationUtil.OutboundClassification(param); |
| | | List<StockOutParam> stockOutParams = OutboundAllocationUtil.OutboundClassificationOrder(param,staNoOrder); |
| | | Date now = new Date(); |
| | | for (StockOutParam stockOutParam : stockOutParams){ |
| | | stockOutParam.setNowTime(now); |
| | | workService.startupFullTakeStore(stockOutParam, getUserId()); |
| | | } |
| | | |