| | |
| | | package com.ruoyi.project.tr.selectRiskAndPeopleInfo.controller; |
| | | |
| | | import com.ruoyi.doublePrevention.entity.RiskAndPeopleInfo; |
| | | 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.vo.ResultVO; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.page.TableDataInfo; |
| | | import com.ruoyi.project.system.dept.domain.Dept; |
| | | import com.ruoyi.project.tr.hiddenDangerCheck.domain.HiddenDangerCheck; |
| | | 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.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @date 2020-05-08 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tr/selectRiskAndPeoplePage") |
| | | @RequestMapping("/tr/riskAndPeopleInfo") |
| | | public class selectRiskAndPeopleInfoController extends BaseController |
| | | { |
| | | private String prefix = "tr/selectRiskAndPeoplePage"; |
| | | private String prefix = "tr/riskAndPeopleInfo"; |
| | | |
| | | @Autowired |
| | | private RiskAndPeopleInfoService riskAndPeopleInfoService; |
| | |
| | | /** |
| | | * 查询隐患台账列表 |
| | | */ |
| | | @PostMapping("/list") |
| | | @ResponseBody |
| | | public String list(RiskAndPeopleInfoReqBO reqBO, ModelMap mmap) |
| | | @GetMapping("/getCountInfo") |
| | | public String countInfo(RiskAndPeopleInfoReqBO reqBO, ModelMap mmap) |
| | | { |
| | | // ResultVO resultVO = new ResultVO<>(); |
| | | // resultVO.setCode("200"); |
| | |
| | | // 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("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("completeOfMain", ((RiskAndPeopleInfoRespDTO) result.getData()).getCompleteOfMain()); |
| | | mmap.put("completeRatioOfMain", ((RiskAndPeopleInfoRespDTO) result.getData()).getCompleteRatioOfMain()); |
| | | |
| | | return prefix + "/listRiskAndPeopleInfo"; |
| | | 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; |
| | | } |
| | | |
| | | |
| | | @GetMapping("/detailRiskAndPeopleInfo/{id}") |
| | | public String detailDangerPlanFormulate(@PathVariable("id") Long id, ModelMap mmap) { |
| | | RiskAndPeopleInfo riskAndPeopleInfo = riskAndPeopleInfoService.selectRiskAndPeopleInfoById(id); |
| | | mmap.put("riskAndPeopleInfo", riskAndPeopleInfo); |
| | | return prefix + "/detailRiskAndPeopleInfo"; |
| | | } |
| | | |
| | | } |
| | | |