双重预防项目-国泰新华二开定制版
马宇豪
2023-03-28 993bcfbb0ea417891ae1317a560ec426b746dbd6
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;
    }
}