| | |
| | | package com.ruoyi.project.tr.specialCheck.controller; |
| | | |
| | | import com.ruoyi.doublePrevention.entity.CJReport.PreventCJReportDangerInfo; |
| | | import com.ruoyi.doublePrevention.service.baseService.PreventCJReportDangerInfoService; |
| | | import com.ruoyi.doublePrevention.vo.ResultVO; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | |
| | | @Autowired |
| | | private TbBaseCheckService tbBaseCheckService; |
| | | |
| | | @Autowired |
| | | private PreventCJReportDangerInfoService preventCJReportDangerInfoService; |
| | | |
| | | |
| | | |
| | | @GetMapping() |
| | |
| | | |
| | | ResultVO<List<TbSpecialCheckItemDangerLog>> resultVO = itemDangerLogService.selectSpecialCheckItemDangerLogPage(itemDangerLogBO); |
| | | List<TbSpecialCheckItemDangerLogDTO> data = (List<TbSpecialCheckItemDangerLogDTO>) resultVO.getData(); |
| | | |
| | | List<PreventCJReportDangerInfo> dangerList = preventCJReportDangerInfoService.getDangerListForCheckTask(); |
| | | for (TbSpecialCheckItemDangerLogDTO log : data) { |
| | | for (PreventCJReportDangerInfo danger : dangerList) { |
| | | if (danger.getId().equals(log.getDangerId())){ |
| | | log.setDangerName(danger.getDangerName()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | TableDataInfo dataTable = getDataTable(data); |
| | | dataTable.setTotal(resultVO.getCount()); |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 新增任务 |
| | | * 新增 |
| | | */ |
| | | @GetMapping("/add") |
| | | public String add(ModelMap mmap) |
| | | { |
| | | ResultVO<List<RiskList>> resultVO = riskListService.listHazardSource(); |
| | | Object data = resultVO.getData(); |
| | | mmap.put("hazardList", data); |
| | | List<RiskList> riskList = riskListService.listHazardSource(); |
| | | List<PreventCJReportDangerInfo> dangerList = preventCJReportDangerInfoService.getDangerListForCheckTask(); |
| | | mmap.put("hazardList", riskList); |
| | | mmap.put("dangerList", dangerList); |
| | | return prefix + "/add"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增任务保存 |
| | | * 新增保存 |
| | | */ |
| | | @PostMapping("/add") |
| | | @ResponseBody |