| | |
| | | } |
| | | wrapper.eq("status", 1); |
| | | wrapper.eq("move_status", 0); |
| | | return R.ok(orderService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | Page<OrderPakin> page = orderService.selectPage(new Page<>(curr, limit), wrapper); |
| | | if (page != null && page.getRecords() != null) { |
| | | for (OrderPakin order : page.getRecords()) { |
| | | if (order == null || Cools.isEmpty(order.getOrderNo())) { |
| | | continue; |
| | | } |
| | | int total = orderDetlPakinService.selectCount(new EntityWrapper<OrderDetlPakin>() |
| | | .eq("order_no", order.getOrderNo()) |
| | | .eq("status", 1)); |
| | | if (total <= 0) { |
| | | order.setIssueComplete(0); |
| | | continue; |
| | | } |
| | | int notComplete = orderDetlPakinService.selectCount(new EntityWrapper<OrderDetlPakin>() |
| | | .eq("order_no", order.getOrderNo()) |
| | | .eq("status", 1) |
| | | .where("be_batch is null or be_batch < anfme")); |
| | | order.setIssueComplete(notComplete <= 0 ? 1 : 0); |
| | | } |
| | | } |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @RequestMapping(value = "/actual/shipment/order/report/auth") |
| | |
| | | return R.error("失败").add("失败"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/order/oneKey/issue/auth") |
| | | @ManagerAuth(memo = "一键下发") |
| | | @Transactional |
| | | public R oneKeyIssue(@RequestParam String orderNo) { |
| | | if (Cools.isEmpty(orderNo)) { |
| | | return R.error("订单号不能为空"); |
| | | } |
| | | if (!orderDetlPakinService.issueAll(orderNo)) { |
| | | return R.error("下发明细更新失败"); |
| | | } |
| | | orderService.updateOrderStatus(orderNo); |
| | | return R.ok("成功").add("成功"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/order/detl/all/auth") |
| | | @ManagerAuth |
| | | public R head(@RequestParam Long orderId){ |