From 399142eaaef038d040b78e20ce07a17e67d4e96a Mon Sep 17 00:00:00 2001
From: zjh <1084500556@qq.com>
Date: 星期二, 13 八月 2024 18:11:53 +0800
Subject: [PATCH] zjh 2024-08-13

---
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java
index aadf1be..ff4a3d5 100644
--- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java
+++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java
@@ -1738,14 +1738,30 @@
      */
     @GetMapping("/getDeptAdvice")
     @ApiOperation(value = "鏍规嵁椤圭洰id鑾峰彇寤鸿")
-    public AjaxResult getDeptAdvice(@ApiParam(value = "鐖堕」鐩」鐩甶d") @RequestParam(required = false) String proId) {
+    public AjaxResult getDeptAdvice(@ApiParam(value = "鐖堕」鐩」鐩甶d") @RequestParam(required = false) String proId,
+                                    @ApiParam(value = "鍐呭") @RequestParam(required = false) String nr,
+                                    @ApiParam(value = "鎷奸煶鐮�") @RequestParam(required = false) String pym,
+                                    @ApiParam(value = "椤电爜") @RequestParam(defaultValue ="1") int page,
+                                    @ApiParam(value = "姣忛〉灞曠ず鏉℃暟") @RequestParam(defaultValue ="10") int pageSize) {
         LambdaQueryWrapper<TjAdvice> wq1 = new LambdaQueryWrapper<>();
         if(null !=proId){
             wq1.eq(TjAdvice::getProId, proId);
         }
-        wq1.last("limit 20");
-        List<TjAdvice> list = tjAdviceService.list(wq1);
-        return AjaxResult.success(list);
+        if(null !=nr && !nr.isEmpty()){
+            wq1.like(TjAdvice::getTitle,nr);
+        }else if (null !=pym && !pym.isEmpty()){
+            wq1.like(TjAdvice::getTitle,pym);
+        }
+//        else {
+//            wq1.last("limit 20");
+//        }
+        Page<TjAdvice> pages=new Page<>(page,pageSize);
+        Page<TjAdvice> advicePage = tjAdviceService.page(pages, wq1);
+        Map<String,Object> map=new HashMap<>();
+        map.put("list",advicePage.getRecords());
+        map.put("total",advicePage.getTotal());
+//        List<TjAdvice> list = tjAdviceService.list(wq1);
+        return AjaxResult.success(map);
     }
 
     /**

--
Gitblit v1.8.0