| | |
| | | @RequestMapping("/comb/auth") |
| | | @ManagerAuth(memo = "组托") |
| | | public R comb(@RequestBody CombParam combParam) { |
| | | if (Cools.isEmpty(combParam.getOrderNo())) { |
| | | combParam.setOrderNo(combParam.getBillNo()); |
| | | } |
| | | List<CombParam.CombMat> combMats = combParam.getCombMats(); |
| | | combMats.forEach(elem -> { |
| | | if (Cools.isEmpty(elem.getBatch())) { |
| | | elem.setBatch(elem.getItemBatch()); |
| | | } |
| | | }); |
| | | System.out.println(combParam); |
| | | mobileService.comb(combParam, getUserId()); |
| | | return R.ok("组托成功"); |
| | | } |
| | |
| | | System.out.println("-------------------------"); |
| | | System.out.println(billNo); |
| | | System.out.println(size); |
| | | List<OrderDetl> waitMatins = orderDetlService.selectList(new EntityWrapper<OrderDetl>().eq("order_no", billNo).like("model", size).last("and anfme > work_qty")); |
| | | List<OrderDetl> waitMatins = orderDetlService.selectList(new EntityWrapper<OrderDetl>().eq("pg_no", billNo).like("model", size).last("and anfme > work_qty")); |
| | | // List<WaitMatin> waitMatins = waitMatinService.selectList(new EntityWrapper<WaitMatin>().eq("bill_no", billNo).last("and qty > in_qty")); |
| | | |
| | | //如果通知单单号为空,则查询调拨单号 |
| | |
| | | if (!Cools.isEmpty(waitMatins)) { |
| | | for (OrderDetl waitMatin : waitMatins) { |
| | | CombBillQueryVo vo = new CombBillQueryVo(); |
| | | vo.setMatNo(waitMatin.getMatnr()); |
| | | vo.setMatnr(waitMatin.getMatnr()); |
| | | vo.setMatName(waitMatin.getMaktx()); |
| | | vo.setQty(waitMatin.getQty()); |
| | | vo.setQty(waitMatin.getAnfme()); |
| | | vo.setCount(waitMatin.getAnfme() - waitMatin.getWorkQty()); |
| | | vo.setBillNo(waitMatin.getOrderNo()); |
| | | vo.setSeqNo(waitMatin.getINo()); |
| | | vo.setUnit(waitMatin.getUnit()); |
| | | vo.setSpecs(waitMatin.getSpecs()); |
| | | vo.setSize(waitMatin.getSpecs()); |
| | | vo.setSize(waitMatin.getModel()); |
| | | vo.setColor(waitMatin.getColor()); |
| | | vo.setItemBatch(waitMatin.getBatch()); |
| | | //vo.setOveFlag(waitMatin.getOveFlag()); |
| | |
| | | System.out.println(waitMatin.getAnfme()); |
| | | System.out.println(waitMatin.getWorkQty()); |
| | | System.out.println(vo); |
| | | // 10.0 |
| | | // 0.0 |
| | | // CombBillQueryVo(billNo=ZJFLC2407280005, seqNo=1, matNo=41011659, matName=弹簧盘, specs=null, size=null, color=null, count=10.0, qty=0.0, unit=Pcs, type=null, itemBatch=, oveFlag=null) |
| | | // 10.0 |
| | | // 0.0 |
| | | // CombBillQueryVo(billNo=ZJFLC2407280005, seqNo=2, matNo=4103020554, matName=支架, specs=null, size=null, color=null, count=10.0, qty=0.0, unit=Pcs, type=null, itemBatch=, oveFlag=null) |
| | | } |
| | | } |
| | | return R.ok().add(vos); |