| | |
| | | private BasDevpService basDevpService; |
| | | @Autowired |
| | | private PackService packService; |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | |
| | | // 拣料检索托盘信息 |
| | | @RequestMapping("/piking/auth") |
| | | @ManagerAuth |
| | | public R pikingAuth(String barcode) { |
| | | WrkMast wrkMast = wrkMastService.selectByBarcode(barcode); |
| | | if (Cools.isEmpty(wrkMast)) { |
| | | throw new CoolException(barcode + "暂无工作档"); |
| | | } |
| | | if (wrkMast.getIoType() != 103 && wrkMast.getIoType() != 107){ |
| | | throw new CoolException(barcode + "不为拣料/盘点出库"); |
| | | } |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()); |
| | | return R.ok().add(wrkDetls); |
| | | } |
| | | |
| | | // 组托前查询托盘码是否已经组托 |
| | | @RequestMapping("/barcode/auth") |
| | | @ManagerAuth |
| | | public R pakinAuth(@RequestParam("barcode") String barcode) { |
| | | WaitPakin waitPakin = waitPakinService.selectOne(new EntityWrapper<WaitPakin>().eq("zpallet", barcode)); |
| | | if (!Cools.isEmpty(waitPakin)) { |
| | | return R.error("入库通知档已存在!"); |
| | | } |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("barcode",barcode)); |
| | | if (!Cools.isEmpty(locMast)) { |
| | | return R.error("库存主档中已存在当前条码!"); |
| | | } |
| | | LocDetl locdetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("barcode", barcode)); |
| | | if (!Cools.isEmpty(locdetl)){ |
| | | return R.error("库存明细中已存在当前条码,请检查库存"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | // 拣料转全板 |
| | |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | wrkDetl.setWrkNo(wrkMast.getWrkNo()); |
| | | wrkDetl.setModiTime(now); |
| | | wrkDetl.setMatType(locDetl.getMatType()); |
| | | |
| | | wrkDetl.sync(locDetl); |
| | | wrkDetlService.insert(wrkDetl); |
| | |
| | | wrkDetl.setOrderNo(orderNo); |
| | | wrkDetl.setIoTime(wrkMast.getIoTime()); |
| | | wrkDetl.setWrkNo(wrkNo); |
| | | wrkDetl.setMatType(locDetl.getMatType()); |
| | | return R.ok().add(wrkDetl); |
| | | } |
| | | } |
| | |
| | | @ManagerAuth |
| | | public R getCheckDetl2(String barcode) { |
| | | WrkMast wrkMast = wrkMastService.selectByBarcode(barcode); |
| | | if(Cools.isEmpty()){ |
| | | if(Cools.isEmpty(wrkMast)){ |
| | | throw new CoolException("此托盘码没有盘点任务"); |
| | | } |
| | | if (wrkMast.getIoType() != 107){ |
| | |
| | | @RequestMapping("/adjustNew/auth") |
| | | @ManagerAuth(memo = "盘点") |
| | | public synchronized R adjustNew(@RequestBody MobileAdjustParam combParam){ |
| | | mobileService.adjustNew(combParam, getUserId()); |
| | | mobileService.adjustNew(combParam, Boolean.FALSE, getUserId()); |
| | | return R.ok("盘点成功"); |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/adjustNew/v2/auth") |
| | | @ManagerAuth(memo = "补货") |
| | | public synchronized R adjustNewV2(@RequestBody MobileAdjustParam combParam){ |
| | | mobileService.adjustNew(combParam, Boolean.TRUE, getUserId()); |
| | | return R.ok("补货成功"); |
| | | } |
| | | } |