| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | |
| | | wrapper.le("settle", 2).eq("status", 1); |
| | | wrapper.orderBy("create_time", false); |
| | | List<OrderPakin> orders = orderService.selectList(wrapper); |
| | | // 保留出库单 |
| | | // 保留入库单 |
| | | if (!Cools.isEmpty(orders)) { |
| | | Iterator<OrderPakin> iterator = orders.iterator(); |
| | | while (iterator.hasNext()) { |
| | |
| | | if (order.getDocType() != null) { |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | | if (docType != null) { |
| | | if (docType.getPakout() == 0) { |
| | | if (docType.getPakout() == 1) { |
| | | iterator.remove(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return R.ok().add(orders); |
| | | JSONArray jsonArray = new JSONArray(); |
| | | for(OrderPakin orderPakin: orders) { |
| | | JSONObject object = new JSONObject(); |
| | | object.put("order_no",orderPakin.getOrderNo()); |
| | | jsonArray.add(object); |
| | | } |
| | | return R.ok().add(jsonArray); |
| | | } |
| | | |
| | | @RequestMapping(value = "/order/head/page/auth") |