From 482b2982ba27b18e6391c3862ec239c89a801a46 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 21 五月 2026 13:09:05 +0800
Subject: [PATCH] feat(home): 添加生产看板功能并优化订单查询性能

---
 src/main/java/com/ruoyi/framework/web/controller/BaseController.java |   79 ++++++++++++++++++++++++---------------
 1 files changed, 48 insertions(+), 31 deletions(-)

diff --git a/src/main/java/com/ruoyi/framework/web/controller/BaseController.java b/src/main/java/com/ruoyi/framework/web/controller/BaseController.java
index 27baf0e..3edde93 100644
--- a/src/main/java/com/ruoyi/framework/web/controller/BaseController.java
+++ b/src/main/java/com/ruoyi/framework/web/controller/BaseController.java
@@ -11,11 +11,12 @@
 import com.github.pagehelper.PageInfo;
 import com.ruoyi.common.constant.HttpStatus;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.PageUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.sql.SqlUtil;
 import com.ruoyi.framework.security.LoginUser;
-import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.framework.web.domain.R;
 import com.ruoyi.framework.web.page.PageDomain;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.framework.web.page.TableSupport;
@@ -51,15 +52,7 @@
      */
     protected void startPage()
     {
-        PageDomain pageDomain = TableSupport.buildPageRequest();
-        Integer pageNum = pageDomain.getPageNum();
-        Integer pageSize = pageDomain.getPageSize();
-        if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize))
-        {
-            String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
-            Boolean reasonable = pageDomain.getReasonable();
-            PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
-        }
+        PageUtils.startPage();
     }
 
     /**
@@ -73,6 +66,14 @@
             String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
             PageHelper.orderBy(orderBy);
         }
+    }
+
+    /**
+     * 娓呯悊鍒嗛〉鐨勭嚎绋嬪彉閲�
+     */
+    protected void clearPage()
+    {
+        PageUtils.clearPage();
     }
 
     /**
@@ -92,53 +93,69 @@
     /**
      * 杩斿洖鎴愬姛
      */
-    public AjaxResult success()
+    public R<?> success()
     {
-        return AjaxResult.success();
-    }
-
-    /**
-     * 杩斿洖澶辫触娑堟伅
-     */
-    public AjaxResult error()
-    {
-        return AjaxResult.error();
+        return R.ok();
     }
 
     /**
      * 杩斿洖鎴愬姛娑堟伅
      */
-    public AjaxResult success(String message)
+    public R<?> success(String message)
     {
-        return AjaxResult.success(message);
+        return R.ok(null, message);
+    }
+
+    /**
+     * 杩斿洖鎴愬姛娑堟伅
+     */
+    public R<?> success(Object data)
+    {
+        return R.ok(data);
     }
 
     /**
      * 杩斿洖澶辫触娑堟伅
      */
-    public AjaxResult error(String message)
+    public R<?> error()
     {
-        return AjaxResult.error(message);
+        return R.fail();
+    }
+
+    /**
+     * 杩斿洖澶辫触娑堟伅
+     */
+    public R<?> error(String message)
+    {
+        return R.fail(message);
+    }
+
+    /**
+     * 杩斿洖璀﹀憡娑堟伅
+     */
+    public R<?> warn(String message)
+    {
+        return R.fail(HttpStatus.WARN, message);
     }
 
     /**
      * 鍝嶅簲杩斿洖缁撴灉
-     * 
+     *
      * @param rows 褰卞搷琛屾暟
      * @return 鎿嶄綔缁撴灉
      */
-    protected AjaxResult toAjax(int rows)
+    protected R<?> toAjax(int rows)
     {
-        return rows > 0 ? AjaxResult.success() : AjaxResult.error();
+        return rows > 0 ? R.ok() : R.fail();
     }
 
     /**
      * 鍝嶅簲杩斿洖缁撴灉
-     * 
+     *
      * @param result 缁撴灉
      * @return 鎿嶄綔缁撴灉
      */
-    protected AjaxResult toAjax(boolean result)
+    protected R<?> toAjax(boolean result)
     {
         return result ? success() : error();
     }
@@ -162,9 +179,9 @@
     /**
      * 鑾峰彇鐧诲綍閮ㄩ棬id
      */
-    public Long getDeptId()
+    public Long [] getDeptId()
     {
-        return getLoginUser().getDeptId();
+        return getLoginUser().getDeptIds();
     }
 
     /**

--
Gitblit v1.9.3