| | |
| | | |
| | | @PostMapping("auto/emptyOut/v1") |
| | | @ResponseBody |
| | | public R autoEmptyOut(){ |
| | | public R autoEmptyOut(@RequestBody LocTypeDto locTypeDto){ |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_sts", "D")); |
| | | if (Cools.isEmpty(locMast)) { |
| | | return R.error("库存没有空板"); |
| | | } |
| | | EmptyPlateOutParam emptyPlateOutParam = new EmptyPlateOutParam(); |
| | | emptyPlateOutParam.setOutSite(301); |
| | | emptyPlateOutParam.setOutSite(locTypeDto.getSiteId()); |
| | | emptyPlateOutParam.setLocNos(new ArrayList<String>(){{add(locMast.getLocNo()+"");}}); |
| | | WrkMast wrkMast = workService.emptyPlateOut(emptyPlateOutParam); |
| | | return R.ok(!Cools.isEmpty(wrkMast)? R.ok("自动空托出库成功,工作号:" + wrkMast.getWrkNo()) : R.error("生成自动空托出库失败")); |
| | |
| | | // 源站点状态检测 |
| | | BasDevp sourceStaNo = basDevpService.checkSiteStatus(transplantWork.getStaNo(), true); |
| | | WrkMast wrkMast1 = wrkMastService.selectWrkMast(transplantWork.getWorkNo(),transplantWork.getBarcode()); |
| | | if(sourceStaNo ==null ){ |
| | | return R.error("该站点盘点移栽许可,请查看源站点状态检测"); |
| | | } |
| | | if(wrkMast1== null){ |
| | | return R.error("无该盘点移栽任务"); |
| | | } |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(transplantWork.getWorkNo()); |
| | | Date now = new Date(); |
| | | |
| | | // 生成工作档 |
| | | WrkMast wrkMast = new WrkMast(); |
| | | wrkMast.setWrkNo(9997); |
| | |
| | | // 源站点状态检测 |
| | | BasDevp sourceStaNo = basDevpService.checkSiteStatus(transplantWork.getStaNo(), true); |
| | | WrkMast wrkMast1 = wrkMastService.selectWrkMast(transplantWork.getWorkNo(),transplantWork.getBarcode()); |
| | | if(sourceStaNo == null){ |
| | | |
| | | } |
| | | if(wrkMast1== null){ |
| | | return R.error("无该盘点移栽任务"); |
| | | } |