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";
|
}
|
|
|
|
/**
|
* 查询隐患台账列表
|
*/
|
@GetMapping("/getCountInfo")
|
public String countInfo(RiskAndPeopleInfoReqBO reqBO, ModelMap mmap)
|
{
|
System.out.println("11111111111111111111111111111111111111111");
|
// 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());
|
|
// mmap.put("riskAndPeopleInfo", ((RiskAndPeopleInfoRespDTO) result.getData()).getRiskAndPeopleInfoDTO());
|
// mmap.put("count", ((RiskAndPeopleInfoRespDTO) result.getData()).getCount());
|
mmap.put("count", 6);
|
mmap.put("complete", ((RiskAndPeopleInfoRespDTO) result.getData()).getComplete());
|
mmap.put("completeRatio", ((RiskAndPeopleInfoRespDTO) result.getData()).getCompleteRatio());
|
mmap.put("countOfHandle", ((RiskAndPeopleInfoRespDTO) result.getData()).getCountOfHandle());
|
mmap.put("completeOfHandle", ((RiskAndPeopleInfoRespDTO) result.getData()).getCompleteOfHandle());
|
mmap.put("completeRatioOfHandle", ((RiskAndPeopleInfoRespDTO) result.getData()).getCompleteRatioOfHandle());
|
mmap.put("countOfTechnology", ((RiskAndPeopleInfoRespDTO) result.getData()).getCountOfTechnology());
|
mmap.put("completeOfTechnology", ((RiskAndPeopleInfoRespDTO) result.getData()).getCompleteOfTechnology());
|
mmap.put("completeRatioOfTechnology", ((RiskAndPeopleInfoRespDTO) result.getData()).getCompleteRatioOfTechnology());
|
mmap.put("countOfMain", ((RiskAndPeopleInfoRespDTO) result.getData()).getCountOfMain());
|
mmap.put("completeOfMain", ((RiskAndPeopleInfoRespDTO) result.getData()).getCompleteOfMain());
|
mmap.put("completeRatioOfMain", ((RiskAndPeopleInfoRespDTO) result.getData()).getCompleteRatioOfMain());
|
|
return "riskAndPeopleInfo";
|
}
|
|
/**
|
* 查询隐患台账列表
|
*/
|
@PostMapping("/list")
|
@ResponseBody
|
public TableDataInfo list(RiskAndPeopleInfoReqBO reqBO, ModelMap mmap)
|
{
|
// 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;
|
}
|
|
|
}
|