From e2ed35c5dbda6ff80fddf5f0ae1fe39ad407fb6b Mon Sep 17 00:00:00 2001
From: zhangc <zc@123>
Date: 星期日, 02 三月 2025 14:47:07 +0800
Subject: [PATCH] 四期

---
 src/main/java/com/zy/asrs/controller/OrderDetlController.java |   53 ++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 50 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/OrderDetlController.java b/src/main/java/com/zy/asrs/controller/OrderDetlController.java
index 8f7f771..d589562 100644
--- a/src/main/java/com/zy/asrs/controller/OrderDetlController.java
+++ b/src/main/java/com/zy/asrs/controller/OrderDetlController.java
@@ -197,12 +197,20 @@
         EntityWrapper<OrderDetl> wrapper = new EntityWrapper<>();
         excludeTrash(param);
         Object o = param.get("orderType");
+        boolean flag = false;
         if (o != null) {
             String[] split = o.toString().split(",");
             //-1璇存槑鏄崐鎴愬搧绠卞3鍑哄簱鍗�
             if (split[0].equals("-1")) {
-                wrapper.like("order_no", "EB", SqlLike.RIGHT);
-                wrapper.in("source", split);
+                List<DocType> pakins = docTypeService.selectList(new EntityWrapper<DocType>().eq("pakout", 1));
+                List<Long> docIds = new ArrayList<>();
+                for (DocType pakin : pakins) {
+                    if (pakin.getDocId() != 33) {
+                        docIds.add(pakin.getDocId());
+                    }
+                }
+                wrapper.andNew().like("matnr", "401", SqlLike.RIGHT).or().like("matnr", "402", SqlLike.RIGHT).andNew().in("source", docIds);
+                flag = true;
             } else {
                 wrapper.in("source", split);
             }
@@ -224,7 +232,12 @@
 //        wrapper.in("source", docIds);
         Page<OrderDetl> page = orderDetlService.selectPage(new Page<>(curr, limit), wrapper);
         for (OrderDetl record : page.getRecords()) {
-            Double sumAnfme = agvLocDetlService.getSumAnfme(record.getMatnr(), record.getThreeCode());
+            Double sumAnfme;
+            if (flag) {
+                sumAnfme = agvLocDetlService.getSumAnfme2(record.getMatnr(), record.getThreeCode());
+            } else {
+                sumAnfme = agvLocDetlService.getSumAnfme(record.getMatnr(), record.getThreeCode());
+            }
             record.setStock(sumAnfme == null ? 0 : sumAnfme);
         }
         return R.ok(page);
@@ -299,6 +312,40 @@
         return R.ok(page);
     }
 
+
+    @RequestMapping(value = "/orderDetl/pakout/list/authV8")
+    @ManagerAuth
+    public R pakoutList8(@RequestParam(defaultValue = "1") Integer curr,
+                         @RequestParam(defaultValue = "10") Integer limit,
+                         @RequestParam(required = false) String orderByField,
+                         @RequestParam(required = false) String orderByType,
+                         @RequestParam Map<String, Object> param) {
+        EntityWrapper<OrderDetl> wrapper = new EntityWrapper<>();
+        excludeTrash(param);
+        convertLike(param, wrapper);
+        if (!Cools.isEmpty(orderByField)) {
+            wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
+        } else {
+            wrapper.orderBy("create_time", false);
+        }
+        List<DocType> pakins = docTypeService.selectList(new EntityWrapper<DocType>().eq("pakout", 1));
+        List<Long> docIds = new ArrayList<>();
+        for (DocType pakin : pakins) {
+            if (pakin.getDocId() == 34) {
+                docIds.add(pakin.getDocId());
+            }
+        }
+
+        wrapper.in("source", docIds);
+        Page<OrderDetl> page = orderDetlService.selectPage(new Page<>(curr, limit), wrapper);
+        for (OrderDetl record : page.getRecords()) {
+            Double sumAnfme = agvLocDetlService.getSumAnfmeProcessed2(record.getMatnr(), record.getThreeCode());
+            record.setStock(sumAnfme == null ? 0 : sumAnfme);
+        }
+
+        return R.ok(page);
+    }
+
     @RequestMapping(value = "/orderDetl/pakout/list/authV6")
     @ManagerAuth
     public R pakoutList6(@RequestParam(defaultValue = "1") Integer curr,

--
Gitblit v1.9.1