| | |
| | | import com.fzzy.igds.constant.WarnType; |
| | | import com.fzzy.igds.data.IgdsBaseParam; |
| | | import com.fzzy.igds.data.PageResponse; |
| | | import com.fzzy.igds.domain.Company; |
| | | import com.fzzy.igds.domain.EventInfo; |
| | | import com.fzzy.security.manager.EventInfoManager; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | |
| | | */ |
| | | @GetMapping |
| | | public String getEventInfo(@RequestParam(value = "viewType", required = false) String viewType, Model model) { |
| | | |
| | | List<Company> companies = commonManager.listCompanyData(); |
| | | String defaultCompany = "" ; |
| | | if (companies != null && !companies.isEmpty()) { |
| | | defaultCompany = companies.get(0).getId(); |
| | | } |
| | | IgdsBaseParam param = new IgdsBaseParam(); |
| | | param.setPage(1); |
| | | param.setLimit(6); |
| | | param.setKey(defaultCompany); |
| | | Page<EventInfo> events = eventInfoManager.pageData(param); |
| | | model.addAttribute("eventInfoList", events.getRecords()); |
| | | model.addAttribute("currentPage", events.getCurrent()); |
| | |
| | | //设备数据 |
| | | model.addAttribute("cameraList", commonManager.listCameraData()); |
| | | //库区数据 |
| | | model.addAttribute("deptList", commonManager.listDeptData()); |
| | | model.addAttribute("deptList", commonManager.listDeptData(null)); |
| | | //业务类型数据 |
| | | List<Map<String, String>> bizTypeList = new ArrayList<>(); |
| | | for (WarnType type : WarnType.values()) { |
| | |
| | | } |
| | | model.addAttribute("bizTypeList", bizTypeList); |
| | | //公司数据 |
| | | model.addAttribute("companyList", commonManager.listCompanyData()); |
| | | model.addAttribute("companyList", companies); |
| | | return prefix + "/eventInfo"; |
| | | } |
| | | |