From f878f449ad3e6e281208ee958ee86b2ea4cc6640 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期一, 27 三月 2023 15:22:56 +0800
Subject: [PATCH] 修改传参

---
 src/main/java/com/ruoyi/doublePrevention/vo/ResultVO.java                                     |   10 +-
 src/main/java/com/ruoyi/doublePrevention/controller/RiskOldInfoController.java                |   83 +++++++++++++--------------
 src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/RiskOldInfoServiceImpl.java |    6 +-
 src/main/resources/templates/tr/hiddenDangerCheck/dangerRecord/dangerRecord.html              |   56 ------------------
 4 files changed, 50 insertions(+), 105 deletions(-)

diff --git a/src/main/java/com/ruoyi/doublePrevention/controller/RiskOldInfoController.java b/src/main/java/com/ruoyi/doublePrevention/controller/RiskOldInfoController.java
index 2eb0b98..6a78b4f 100644
--- a/src/main/java/com/ruoyi/doublePrevention/controller/RiskOldInfoController.java
+++ b/src/main/java/com/ruoyi/doublePrevention/controller/RiskOldInfoController.java
@@ -1,43 +1,40 @@
-package com.ruoyi.doublePrevention.controller;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.ruoyi.doublePrevention.entity.RiskOldInfo;
-import com.ruoyi.doublePrevention.entity.dto.req.RiskOldInfoQueryReqDTO;
-import com.ruoyi.doublePrevention.entity.dto.resp.RiskOldInfoQueryRespDTO;
-import com.ruoyi.doublePrevention.enums.ResultCodes;
-import com.ruoyi.doublePrevention.repository.RiskOldInfoRepository;
-import com.ruoyi.doublePrevention.service.baseService.RiskOldInfoService;
-import com.ruoyi.doublePrevention.vo.ResultVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-
-@RestController
-@RequestMapping("/info")
-public class RiskOldInfoController {
-
-    @Autowired
-    private RiskOldInfoService riskOldInfoService;
-
-    @PostMapping("/selectOldRiskInfoPage")
-    public ResultVO<RiskOldInfoQueryRespDTO> selectOldRiskInfoPage(@RequestBody RiskOldInfoQueryReqDTO queryReqDTO){
-
-        ResultVO resultVO = new ResultVO<>();
-        resultVO.setCode(ResultCodes.OK.getCode());
-        resultVO.setMsg("查询成功");
-
-        ResultVO<RiskOldInfoQueryRespDTO> respDTOResultVO = riskOldInfoService.selectOldRiskInfoPage(queryReqDTO);
-
-        resultVO.setData(respDTOResultVO.getData());
-        resultVO.setCount(respDTOResultVO.getCount());
-        resultVO.setPageIndex(respDTOResultVO.getPageIndex());
-        resultVO.setPageSize(respDTOResultVO.getPageSize());
-
-        return resultVO;
-    }
-
-
-}
+package com.ruoyi.doublePrevention.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.ruoyi.doublePrevention.entity.RiskOldInfo;
+import com.ruoyi.doublePrevention.entity.dto.req.RiskOldInfoQueryReqDTO;
+import com.ruoyi.doublePrevention.entity.dto.resp.RiskOldInfoQueryRespDTO;
+import com.ruoyi.doublePrevention.enums.ResultCodes;
+import com.ruoyi.doublePrevention.repository.RiskOldInfoRepository;
+import com.ruoyi.doublePrevention.service.baseService.RiskOldInfoService;
+import com.ruoyi.doublePrevention.vo.ResultVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+
+@RestController
+@RequestMapping("/info")
+public class RiskOldInfoController {
+
+    @Autowired
+    private RiskOldInfoService riskOldInfoService;
+
+    @PostMapping("/selectOldRiskInfoPage")
+    public ResultVO<RiskOldInfoQueryRespDTO> selectOldRiskInfoPage(@RequestBody RiskOldInfoQueryReqDTO queryReqDTO){
+
+        ResultVO resultVO = new ResultVO<>();
+        resultVO.setCode(ResultCodes.OK.getCode());
+        resultVO.setMsg("查询成功");
+
+        ResultVO<RiskOldInfoQueryRespDTO> respDTOResultVO = riskOldInfoService.selectOldRiskInfoPage(queryReqDTO);
+
+        resultVO.setData(respDTOResultVO.getData());
+        resultVO.setCount(respDTOResultVO.getCount());
+        resultVO.setPageNum(respDTOResultVO.getPageNum());
+        resultVO.setPageSize(respDTOResultVO.getPageSize());
+
+        return resultVO;
+    }
+
+
+}
diff --git a/src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/RiskOldInfoServiceImpl.java b/src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/RiskOldInfoServiceImpl.java
index d168823..fce6ba3 100644
--- a/src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/RiskOldInfoServiceImpl.java
+++ b/src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/RiskOldInfoServiceImpl.java
@@ -34,7 +34,7 @@
         if (ObjectUtils.isEmpty(queryReqDTO.getPageSize())){
             throw new BusinessException("分页信息不能为空");
         }
-        if (ObjectUtils.isEmpty(queryReqDTO.getPageIndex())){
+        if (ObjectUtils.isEmpty(queryReqDTO.getPageNum())){
             throw new BusinessException("分页信息不能为空");
         }
 
@@ -57,7 +57,7 @@
             queryReqDTO.setMajor(null);
         }
 
-        Integer pageIndex = queryReqDTO.getPageIndex();
+        Integer pageIndex = queryReqDTO.getPageNum();
         Integer pageSize = queryReqDTO.getPageSize();
 
         Page<RiskOldInfo> page = PageHelper.startPage(pageIndex, pageSize);
@@ -67,7 +67,7 @@
 
         resultVO.setData(result);
         resultVO.setCount((int) page.getTotal());
-        resultVO.setPageIndex(page.getPageNum());
+        resultVO.setPageNum(page.getPageNum());
         resultVO.setPageSize(page.getPageSize());
 
         return resultVO;
diff --git a/src/main/java/com/ruoyi/doublePrevention/vo/ResultVO.java b/src/main/java/com/ruoyi/doublePrevention/vo/ResultVO.java
index 29947af..2b706b7 100644
--- a/src/main/java/com/ruoyi/doublePrevention/vo/ResultVO.java
+++ b/src/main/java/com/ruoyi/doublePrevention/vo/ResultVO.java
@@ -13,7 +13,7 @@
 
     private String msg;
 
-    private int pageIndex;
+    private int pageNum;
 
     private int pageSize;
 
@@ -48,12 +48,12 @@
     }
 
 
-    public int getPageIndex() {
-        return pageIndex;
+    public int getPageNum() {
+        return pageNum;
     }
 
-    public void setPageIndex(int pageIndex) {
-        this.pageIndex = pageIndex;
+    public void setPageNum(int pageNum) {
+        this.pageNum = pageNum;
     }
 
     public int getPageSize() {
diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerRecord/dangerRecord.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerRecord/dangerRecord.html
index 268ef23..dedd92c 100644
--- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerRecord/dangerRecord.html
+++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerRecord/dangerRecord.html
@@ -83,7 +83,7 @@
 <th:block th:include="include :: footer"/>
 <script th:inline="javascript">
     var prefix = ctx + "tr/hiddenDangerCheck/dangerRecord";
-    var common = [[${common}]];//用户角色 是否在公司管理员
+    // var common = [[${common}]];//用户角色 是否在公司管理员
 
     $(function () {
         var options = {
@@ -94,9 +94,7 @@
             // exportUrl: prefix + "/export",
             // detailUrl: prefix + "/detail/{id}",
             modalName: "隐患列表",
-            columns: [{
-                checkbox: true
-            },
+            columns: [
                 {
                     field: 'id',
                     title: 'id'
@@ -149,56 +147,6 @@
         };
         $.table.init(options);
     });
-
-
-    var compareDate = function (date1, date2) {
-        var oDate1 = new Date(date1);
-        var oDate2 = new Date(date2);
-        if (oDate1.getTime() >= oDate2.getTime()) {
-            return true; //第一个大
-        } else {
-            return false; //第二个大
-        }
-    }
-
-
-    /* 隐患核查--核查 */
-    function editDangerExamine(id) {
-        var editDangerExamineUrl = ctx + "tr/hiddenDangerCheck/dangerExamine/editDangerExamine/{id}";
-        $.modal.open("隐患核查", editDangerExamineUrl.replace("{id}", id));
-    }
-
-    /* 隐患核查--查看 */
-    function detailDangerExamine(id) {
-        var detailDangerExamineUrl = ctx + "tr/hiddenDangerCheck/dangerExamine/detailDangerExamine/{id}";
-        $.operate.openDetailInfo("查看隐患核查信息", detailDangerExamineUrl.replace("{id}", id));
-    }
-
-    /* 隐患整改--整改 */
-    function editDangerRectify(id) {
-        var editDangerRectifyUrl = ctx + "tr/hiddenDangerCheck/dangerRectify/editDangerRectify/{id}";
-        $.modal.open("隐患整改", editDangerRectifyUrl.replace("{id}", id));
-    }
-
-    /* 隐患整改--查看 */
-    function detailDangerRectify(id) {
-        var detailDangerRectifyUrl = ctx + "tr/hiddenDangerCheck/dangerRectify/detailDangerRectify/{id}";
-        $.operate.openDetailInfo("查看隐患整改信息", detailDangerRectifyUrl.replace("{id}", id));
-    }
-
-    /* 隐患验收--验收 */
-    function editDangerAccept(id) {
-        var editDangerAcceptUrl = ctx + "tr/hiddenDangerCheck/dangerAccept/editDangerAccept/{id}";
-        $.modal.open("隐患验收", editDangerAcceptUrl.replace("{id}", id));
-    }
-
-    /* 隐患验收--查看 */
-    function detailDangerAccept(id) {
-        var detailDangerAcceptUrl = ctx + "tr/hiddenDangerCheck/dangerAccept/detailDangerAccept/{id}";
-        $.operate.openDetailInfo("查看隐患验收信息", detailDangerAcceptUrl.replace("{id}", id));
-    }
-
-
 </script>
 </body>
 </html>
\ No newline at end of file

--
Gitblit v1.9.2