From 993bcfbb0ea417891ae1317a560ec426b746dbd6 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期二, 28 三月 2023 09:37:18 +0800
Subject: [PATCH] 新增记录查询页面
---
src/main/resources/templates/tr/selectOldRiskInfoPage/selectOldRiskInfoPage.html | 6 +++---
src/main/java/com/ruoyi/doublePrevention/controller/RiskOldInfoController.java | 7 +++++--
src/main/java/com/ruoyi/project/tr/selectOldRiskInfoPage/controller/selectOldRiskInfoPageController.java | 35 +++++++++++++++++++++++++----------
src/main/resources/mybatis/doublePrevention/RiskOldInfoMapper.xml | 2 +-
4 files changed, 34 insertions(+), 16 deletions(-)
diff --git a/src/main/java/com/ruoyi/doublePrevention/controller/RiskOldInfoController.java b/src/main/java/com/ruoyi/doublePrevention/controller/RiskOldInfoController.java
index 6a78b4f..021f55e 100644
--- a/src/main/java/com/ruoyi/doublePrevention/controller/RiskOldInfoController.java
+++ b/src/main/java/com/ruoyi/doublePrevention/controller/RiskOldInfoController.java
@@ -1,5 +1,4 @@
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;
@@ -9,7 +8,10 @@
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.*;
+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
@@ -34,6 +36,7 @@
resultVO.setPageSize(respDTOResultVO.getPageSize());
return resultVO;
+// return riskOldInfoService.selectOldRiskInfoPage(queryReqDTO);
}
diff --git a/src/main/java/com/ruoyi/project/tr/selectOldRiskInfoPage/controller/selectOldRiskInfoPageController.java b/src/main/java/com/ruoyi/project/tr/selectOldRiskInfoPage/controller/selectOldRiskInfoPageController.java
index 3247621..1bc81c4 100644
--- a/src/main/java/com/ruoyi/project/tr/selectOldRiskInfoPage/controller/selectOldRiskInfoPageController.java
+++ b/src/main/java/com/ruoyi/project/tr/selectOldRiskInfoPage/controller/selectOldRiskInfoPageController.java
@@ -1,5 +1,11 @@
package com.ruoyi.project.tr.selectOldRiskInfoPage.controller;
import java.util.List;
+
+import com.ruoyi.doublePrevention.entity.dto.req.RiskOldInfoQueryReqDTO;
+import com.ruoyi.doublePrevention.entity.dto.resp.PreventRiskEventPageQueryRespDTO;
+import com.ruoyi.doublePrevention.entity.dto.resp.RiskOldInfoQueryRespDTO;
+import com.ruoyi.doublePrevention.service.baseService.RiskOldInfoService;
+import com.ruoyi.doublePrevention.vo.ResultVO;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.company.service.ICompanyService;
@@ -20,11 +26,15 @@
*/
@Controller
@RequestMapping("/tr/selectOldRiskInfoPage")
-public class selectOldRiskInfoPageController extends BaseController {
+public class selectOldRiskInfoPageController extends BaseController
+{
private String prefix = "tr/selectOldRiskInfoPage";
@Autowired
private IHiddenDangerCheckPointService hiddenDangerCheckPointService;
+
+ @Autowired
+ private RiskOldInfoService riskOldInfoService;
@GetMapping()
public String selectOldRiskInfoPage(ModelMap mmap)
@@ -39,15 +49,20 @@
*/
@PostMapping("/list")
@ResponseBody
- public TableDataInfo list(HiddenDangerCheckPoint hiddenDangerCheckPoint, String dateRangeLedger, String rectifyStatusLedger, String rectifyDeptIdLedger) {
-
- hiddenDangerCheckPoint.setRectifyUserIdIsNotNull("1");//隐患整改人ID 不为空
- hiddenDangerCheckPoint.setCompanyId(Long.valueOf(getSysUser().getCompanyId()));
-
- startPage();
- List<HiddenDangerCheckPoint> list = hiddenDangerCheckPointService.selectHiddenDangerCheckPointList(hiddenDangerCheckPoint);
-
- return getDataTable(list);
+ public TableDataInfo list(RiskOldInfoQueryReqDTO queryReqDTO)
+ {
+ ResultVO<RiskOldInfoQueryRespDTO> resultVO = riskOldInfoService.selectOldRiskInfoPage(queryReqDTO);
+ List<RiskOldInfoQueryRespDTO> data = (List<RiskOldInfoQueryRespDTO>) resultVO.getData();
+// hiddenDangerCheckPoint.setRectifyUserIdIsNotNull("1");//隐患整改人ID 不为空
+// hiddenDangerCheckPoint.setCompanyId(Long.valueOf(getSysUser().getCompanyId()));
+//
+// startPage();
+// List<HiddenDangerCheckPoint> list = hiddenDangerCheckPointService.selectHiddenDangerCheckPointList(hiddenDangerCheckPoint);
+//
+// return getDataTable(list);
+ TableDataInfo dataTable = getDataTable(data);
+ dataTable.setTotal(resultVO.getCount());
+ return dataTable;
}
}
diff --git a/src/main/resources/mybatis/doublePrevention/RiskOldInfoMapper.xml b/src/main/resources/mybatis/doublePrevention/RiskOldInfoMapper.xml
index c306bbd..08bbcbf 100644
--- a/src/main/resources/mybatis/doublePrevention/RiskOldInfoMapper.xml
+++ b/src/main/resources/mybatis/doublePrevention/RiskOldInfoMapper.xml
@@ -71,7 +71,7 @@
and risk_dep = #{queryReqDTO.riskDep}
</if>
<if test="queryReqDTO.major != null ">
- and report_people = #{queryReqDTO.major}
+ and major = #{queryReqDTO.major}
</if>
<if test="queryReqDTO.riskLevel != null ">
and risk_level = #{queryReqDTO.riskLevel}
diff --git a/src/main/resources/templates/tr/selectOldRiskInfoPage/selectOldRiskInfoPage.html b/src/main/resources/templates/tr/selectOldRiskInfoPage/selectOldRiskInfoPage.html
index 5bd4f76..2df447e 100644
--- a/src/main/resources/templates/tr/selectOldRiskInfoPage/selectOldRiskInfoPage.html
+++ b/src/main/resources/templates/tr/selectOldRiskInfoPage/selectOldRiskInfoPage.html
@@ -82,12 +82,12 @@
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
- var prefix = ctx + "info";
+ var prefix = ctx + "tr/selectOldRiskInfoPage";
// var common = [[${common}]];//用户角色 是否在公司管理员
- console.log(ctx,prefix,'prefix')
+
$(function () {
var options = {
- url: prefix + "/selectOldRiskInfoPage",
+ url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/removeDangerLedger",
--
Gitblit v1.9.2