| | |
| | | } |
| | | |
| | | @Override |
| | | public R barcodeVerificatio(String barcode) { |
| | | |
| | | if (!barcode.matches("\\d{8}")) { |
| | | return R.parse("条码不是8位数字:" + barcode); |
| | | } |
| | | |
| | | int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet", barcode)); |
| | | int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet", barcode)); |
| | | int countwait = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet", barcode)); |
| | | |
| | | if (countLoc > 0) { |
| | | return R.parse("库存已存在该条码:" + barcode); |
| | | } else if (countWrk > 0) { |
| | | return R.parse("该条码已生成工作档:" + barcode); |
| | | } else if (countwait > 0) { |
| | | return R.parse("该条码已生成入库通知档:" + barcode); |
| | | } |
| | | |
| | | return R.ok("校验成功"); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public R outbound(List<LocDto> locDtos) throws InterruptedException { |
| | | public R outbound(List<LocDto> locDtos,String endLocation) throws InterruptedException { |
| | | if (Cools.isEmpty(locDtos)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | |
| | | // ----------------------------------------------------------------------------------------------- |
| | | for (TaskDto taskDto : taskDtos) { |
| | | BasDevp staNo = basDevpService.checkSiteStatus(taskDto.getStaNo()); |
| | | workService.stockOut(staNo, taskDto, null); |
| | | workService.stockOut(staNo, taskDto, null, endLocation); |
| | | } |
| | | return R.ok("出库成功"); |
| | | } |