双重预防项目-国泰新华二开定制版
马宇豪
2023-03-28 993bcfbb0ea417891ae1317a560ec426b746dbd6
新增记录查询页面
已修改4个文件
50 ■■■■■ 文件已修改
src/main/java/com/ruoyi/doublePrevention/controller/RiskOldInfoController.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tr/selectOldRiskInfoPage/controller/selectOldRiskInfoPageController.java 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mybatis/doublePrevention/RiskOldInfoMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/templates/tr/selectOldRiskInfoPage/selectOldRiskInfoPage.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
    }
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;
    }
}
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}
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",