|
|
@@ -4,10 +4,13 @@ package com.fs.company.controller.qw;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.fs.common.annotation.Log;
|
|
|
import com.fs.common.annotation.RepeatSubmit;
|
|
|
+import com.fs.common.constant.HttpStatus;
|
|
|
import com.fs.common.core.controller.BaseController;
|
|
|
import com.fs.common.core.domain.AjaxResult;
|
|
|
import com.fs.common.core.domain.R;
|
|
|
+import com.fs.common.core.page.PageDomain;
|
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
|
+import com.fs.common.core.page.TableSupport;
|
|
|
import com.fs.common.enums.BusinessType;
|
|
|
import com.fs.common.utils.PubFun;
|
|
|
import com.fs.common.utils.ServletUtils;
|
|
|
@@ -77,7 +80,7 @@ public class SopUserLogsInfoController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('qw:sop:list')")
|
|
|
@GetMapping("/list")
|
|
|
public TableDataInfo list(SopUserLogsInfo sopUserLogsInfo) {
|
|
|
- startPage();
|
|
|
+ //startPage();
|
|
|
if (sopUserLogsInfo.getFilterMode() == 1) {
|
|
|
List<SopUserLogsInfo> list = sopUserLogsInfoService.selectSopUserLogsInfoList(sopUserLogsInfo);
|
|
|
|
|
|
@@ -312,8 +315,28 @@ public class SopUserLogsInfoController extends BaseController
|
|
|
// // 处理 level
|
|
|
// item.setLevelName(getLevel(item.getLevel()));
|
|
|
// });
|
|
|
-
|
|
|
- return getDataTable(list);
|
|
|
+ PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
+ Integer pageNum = pageDomain.getPageNum();
|
|
|
+ Integer pageSize = pageDomain.getPageSize();
|
|
|
+
|
|
|
+ int total = list.size();
|
|
|
+
|
|
|
+ if (pageNum != null && pageSize != null) {
|
|
|
+ int fromIndex = (pageNum - 1) * pageSize;
|
|
|
+ int toIndex = Math.min(fromIndex + pageSize, total);
|
|
|
+ // 确保索引不越界
|
|
|
+ if (fromIndex < total) {
|
|
|
+ list = list.subList(fromIndex, toIndex);
|
|
|
+ } else {
|
|
|
+ list = new ArrayList<>(); // 返回空列表
|
|
|
+ }
|
|
|
+ }
|
|
|
+ TableDataInfo rspData = new TableDataInfo();
|
|
|
+ rspData.setCode(HttpStatus.SUCCESS);
|
|
|
+ rspData.setMsg("查询成功");
|
|
|
+ rspData.setRows(list);
|
|
|
+ rspData.setTotal(total);
|
|
|
+ return rspData;
|
|
|
}
|
|
|
else {
|
|
|
|