马宇豪
2023-04-28 56f09487b7750d479d097713c86008d857f2f168
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package com.ruoyi.project.tr.selectRiskAndPeopleInfo.controller;
 
import com.ruoyi.doublePrevention.entity.dto.req.RiskAndPeopleInfoReqBO;
import com.ruoyi.doublePrevention.entity.dto.req.RiskOldInfoQueryReqDTO;
import com.ruoyi.doublePrevention.entity.dto.resp.RiskAndPeopleInfoRespDTO;
import com.ruoyi.doublePrevention.entity.dto.resp.RiskOldInfoQueryRespDTO;
import com.ruoyi.doublePrevention.service.baseService.RiskAndPeopleInfoService;
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.tr.hiddenDangerCheckPoint.service.IHiddenDangerCheckPointService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
 
import java.util.List;
 
/**
 * 隐患列表Controller
 *
 * @date 2020-05-08
 */
@Controller
@RequestMapping("/tr/selectRiskAndPeoplePage")
public class selectRiskAndPeopleInfoController extends BaseController
{
    private String prefix = "tr/selectRiskAndPeoplePage";
 
    @Autowired
    private RiskAndPeopleInfoService riskAndPeopleInfoService;
 
    @Autowired
    private RiskOldInfoService riskOldInfoService;
 
    @GetMapping()
    public String selectOldRiskInfoPage(ModelMap mmap)
    {
        return prefix + "/selectRiskAndPeoplePage";
    }
 
 
 
    /**
     * 查询隐患台账列表
     */
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(RiskAndPeopleInfoReqBO reqBO)
    {
//        ResultVO resultVO = new ResultVO<>();
//        resultVO.setCode("200");
//        resultVO.setMsg("查询成功");
 
        ResultVO<RiskAndPeopleInfoRespDTO> result = riskAndPeopleInfoService.listRiskAndPeoplePage(reqBO);
        RiskAndPeopleInfoRespDTO data = (RiskAndPeopleInfoRespDTO) result.getData();
//        resultVO.setPageSize(result.getPageSize());
//        resultVO.setPageNum(result.getPageNum());
//        resultVO.setCount(result.getCount());
//        resultVO.setData(result.getData());
 
        TableDataInfo dataTable = getDataTable(data.getRiskAndPeopleInfoDTO());
        dataTable.setTotal(result.getCount());
        return dataTable;
    }
 
}