From 9d38f2354b3a7267a2486d937bb7d256fcb949c1 Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期五, 13 六月 2025 08:15:48 +0800
Subject: [PATCH] #增加生产日期,到期日期字段,增加库存明细超期库存检索

---
 src/main/java/com/zy/asrs/controller/LocDetlController.java |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/LocDetlController.java b/src/main/java/com/zy/asrs/controller/LocDetlController.java
index 3ab417a..be58971 100644
--- a/src/main/java/com/zy/asrs/controller/LocDetlController.java
+++ b/src/main/java/com/zy/asrs/controller/LocDetlController.java
@@ -19,6 +19,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.time.LocalDate;
 import java.util.*;
 
 @RestController
@@ -86,14 +87,23 @@
                   @RequestParam(required = false)String orderByType,
                   @RequestParam(required = false)String condition,
                   @RequestParam Map<String, Object> param,
-                  @RequestParam(required = false)Boolean unreason){
+                  @RequestParam(required = false)Boolean unreason,
+                @RequestParam(required = false)Boolean expired){
         if (!Cools.isEmpty(unreason) && unreason) {
-
-            return R.ok(locDetlService.selectPage(new Page<>(curr, limit), new EntityWrapper<LocDetl>()
-                    .where(" DATALENGTH( batch ) != 11 or\n" +
-                            "            batch LIKE '%[a-z]%'")));
+            return R.ok(locDetlService.selectPage(
+                    new Page<>(curr, limit),
+                    new EntityWrapper<LocDetl>()
+                            .where(" DATALENGTH(batch) != 11 OR batch LIKE '%[a-z]%'")));
+        }
+        if (!Cools.isEmpty(expired) && expired) {
+            return R.ok(locDetlService.selectPage(
+                    new Page<>(curr, limit),
+                    new EntityWrapper<LocDetl>()
+                            .where("deadline < {0}", LocalDate.now())  // 鏂板鐨勮繃鏈熷垽鏂�
+            ));
         }
         param.remove("unreason");
+        param.remove("expired");
         String row = "";
         EntityWrapper<LocDetl> wrapper = new EntityWrapper<>();
         if (param.get("row") != null) {

--
Gitblit v1.9.1