| | |
| | | package com.zy.asrs.wms.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.sun.org.apache.xpath.internal.operations.Or; |
| | | import com.zy.asrs.common.domain.dto.LocDetlDto; |
| | | import com.zy.asrs.common.domain.dto.WrkDto; |
| | | import com.zy.asrs.common.domain.entity.MobileAdjustResult; |
| | |
| | | |
| | | PickMatParam matParam = new PickMatParam(); |
| | | matParam.setMatnr(orderDetl.getMatnr()); |
| | | matParam.setMaktx(orderDetl.getMaktx()); |
| | | matParam.setBatch(orderDetl.getBatch()); |
| | | matParam.setOrderNo(orderDetl.getOrderNo()); |
| | | matParam.setOrderId(orderDetl.getOrderId()); |
| | |
| | | wrkDetl.setHostId(getHostId()); |
| | | wrkDetl.setWrkMastId(wrkMast.getId()); |
| | | wrkDetl.setZpallet(wrkMast.getBarcode()); |
| | | if(Cools.isEmpty(matParam.getBatch())){ |
| | | wrkDetl.setBatch(""); |
| | | } |
| | | if (!wrkDetlService.save(wrkDetl)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | |
| | | } |
| | | for (OrderDetl o : orderDetls |
| | | ) { |
| | | if(o.getAnfme().equals(o.getQty())){ |
| | | continue; |
| | | } |
| | | for (LocDetl l : locDetls |
| | | ) { |
| | | if (o.getMatnr().equals(l.getMatnr())) { |
| | |
| | | return R.ok(locDetlList); |
| | | } |
| | | |
| | | @PostMapping("/pda/OutOrder") |
| | | @ManagerAuth(memo = "获得出库单") |
| | | @Transactional |
| | | public R OutOrder(@RequestParam String orderNo) { |
| | | List<Order> orders=new ArrayList<Order>(); |
| | | List<Order> OrderList=new ArrayList<Order>(); |
| | | if(Cools.isEmpty(orderNo)){ |
| | | orders= orderService.list(new LambdaQueryWrapper<Order>() |
| | | .between(Order::getSettle,1,2) |
| | | .eq(Order::getHostId, getHostId()) |
| | | ); |
| | | }else{ |
| | | orders= orderService.list(new LambdaQueryWrapper<Order>() |
| | | .like(Order::getOrderNo, orderNo) |
| | | .between(Order::getSettle,1,2) |
| | | .eq(Order::getHostId, getHostId()) |
| | | ); |
| | | } |
| | | if(Cools.isEmpty(orders)){ |
| | | return R.ok(); |
| | | } |
| | | for (Order o:orders |
| | | ) { |
| | | DocType docType=docTypeService.getOne(new LambdaQueryWrapper<DocType>() |
| | | .eq(DocType::getDocId,o.getDocType())); |
| | | if(docType.getPakout()==1){ |
| | | OrderList.add(o); |
| | | } |
| | | } |
| | | |
| | | |
| | | return R.ok(OrderList); |
| | | } |
| | | |
| | | } |