| | |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.OrderDomainParam; |
| | | import com.zy.asrs.entity.result.WrkTraceVo; |
| | | import com.zy.asrs.enums.OrderTypeEnum; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.web.BaseController; |
| | |
| | | wrapper.like("order_no", orderNo); |
| | | } |
| | | wrapper.le("settle", 2).eq("status", 1); |
| | | // 筛选出库单,不为OrderTypeEnum.STOCK |
| | | wrapper.ne("doc_type", OrderTypeEnum.STOCK.type); |
| | | wrapper.orderBy("create_time", false); |
| | | List<OrderPakout> orders = orderService.selectList(wrapper); |
| | | // 保留出库单 |
| | | if (!Cools.isEmpty(orders)) { |
| | | Iterator<OrderPakout> iterator = orders.iterator(); |
| | | while (iterator.hasNext()) { |
| | | OrderPakout order = iterator.next(); |
| | | if (order.getDocType() != null) { |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | | if (docType != null) { |
| | | if (docType.getPakout() == 0) { |
| | | iterator.remove(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return R.ok().add(orders); |
| | | } |
| | | |
| | | @RequestMapping(value = "/order/AGV/nav/list/auth") |
| | | @ManagerAuth |
| | | public R AGVnavList(@RequestParam(required = false) String orderNo){ |
| | | EntityWrapper<OrderPakout> wrapper = new EntityWrapper<>(); |
| | | if (!Cools.isEmpty(orderNo)) { |
| | | wrapper.like("order_no", orderNo); |
| | | } |
| | | wrapper.le("settle", 2).eq("status", 1); |
| | | wrapper.eq("doc_type", OrderTypeEnum.STOCK.type); |
| | | wrapper.orderBy("create_time", false); |
| | | List<OrderPakout> orders = orderService.selectList(wrapper); |
| | | // 保留出库单 |
| | |
| | | Date now = new Date(); |
| | | Long userId = getUserId(); |
| | | // 修改主档 |
| | | if (!param.getDocType().equals(order.getDocType())) { |
| | | if (!param.getDocType().equals(order.getDocType()) || !param.getItemName().equals(order.getItemName())) { |
| | | order.setItemName(param.getItemName()); |
| | | order.setDocType(param.getDocType()); |
| | | order.setUpdateBy(userId); |
| | | order.setUpdateTime(now); |