| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | |
| | | return R.ok().add(orderDetls); |
| | | } |
| | | |
| | | @RequestMapping("/check/mergeStore/barcode") |
| | | @ManagerAuth |
| | | public R mergeStoreBarcode(@RequestParam String barcode){ |
| | | WrkMast wrkMast = wrkMastService.selectByBarcode(barcode); |
| | | if (Cools.isEmpty(wrkMast)) { |
| | | throw new CoolException("当前托盘码" + barcode + "没有任务,请检查!"); |
| | | } |
| | | if (wrkMast.getIoType() != 104) { |
| | | throw new CoolException("当前托盘码" + barcode + "非并板出库"); |
| | | } |
| | | if (wrkMast.getWrkSts() != 14L) { |
| | | throw new CoolException("当前托盘码" + barcode + "出库未完成"); |
| | | } |
| | | WrkDetl wrkDetl = wrkDetlService.selectOne(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | return R.ok().add(wrkDetl.getBomCode()); |
| | | } |
| | | |
| | | @RequestMapping("/comb/auth") |
| | | @ManagerAuth(memo = "组托") |
| | | public R comb(@RequestBody CombParam combParam){ |
| | |
| | | public R comb2(@RequestBody CombParam combParam){ |
| | | mobileService.comb2(combParam, getUserId()); |
| | | return R.ok("组托成功"); |
| | | } |
| | | |
| | | @RequestMapping("/comb/auth3") |
| | | @ManagerAuth(memo = "组托") |
| | | public R comb3(@RequestBody CombParam combParam){ |
| | | mobileService.comb3(combParam, getUserId()); |
| | | return R.ok("组托成功"); |
| | | } |
| | | |
| | | @RequestMapping("/check/fullplt/auth") |
| | | @ManagerAuth(memo = "检测物料是否有未满托托盘") |
| | | public R checkFullplt(@RequestBody CombParam.CombMat combMat){ |
| | | List<LocMast> locMasts = mobileService.checkFullplt(combMat, getUserId()); |
| | | return R.ok().add(locMasts); |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/merge/comb/auth") |
| | | @ManagerAuth(memo = "并板") |
| | | public R mergeComb(@RequestBody CombParam combParam){ |
| | | mobileService.mergeComb(combParam, getUserId()); |
| | | return R.ok("组托成功"); |
| | | } |
| | | |
| | | @RequestMapping("/merge/out/auth") |
| | | @ManagerAuth(memo = "pda并板出库") |
| | | public R mergeOut(@RequestParam String locNo,@RequestParam String staNo){ |
| | | mobileService.mergeOut(locNo,staNo, getUserId()); |
| | | return R.ok("出库成功"); |
| | | } |
| | | |
| | | @RequestMapping("/merge/comb2/auth") |
| | | @ManagerAuth(memo = "并板") |
| | | public R mergeComb2(@RequestBody CombParam combParam){ |
| | | mobileService.mergeComb2(combParam, getUserId()); |
| | | return R.ok("并板成功"); |
| | | } |
| | | |
| | | @RequestMapping("/comb/checkBom") |
| | |
| | | return R.ok().add(bomMat); |
| | | } else { |
| | | // 检查是否在bom清单内 |
| | | bomMat = bomMatService.selectOne(new EntityWrapper<BomMat>().eq("unit_num", checkBom.getBomCode()).eq("element_num", checkBom.getMatnr())); |
| | | bomMat = bomMatService.selectOne(new EntityWrapper<BomMat>().eq("bom_num", checkBom.getBomCode()).eq("element_num", checkBom.getMatnr())); |
| | | if (Cools.isEmpty(bomMat)) { |
| | | throw new CoolException("当前物料" + checkBom.getMatnr() + "不在Bom清单内"); |
| | | } else { |
| | |
| | | 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("补货成功"); |
| | | } |
| | | |
| | | } |