| | |
| | | private final C3ChargingService c3ChargingService; |
| | | |
| | | |
| | | public CommonPage listMsg(BaseConditionVO baseConditionVO, String type) { |
| | | if (StringUtils.isEmpty(type)) { |
| | | throw new BusinessException("设备故障类型不能为空!"); |
| | | } |
| | | CommonPage commonPage = null; |
| | | switch (type) { |
| | | case "单灯故障": |
| | | /** |
| | | * 单灯 |
| | | * |
| | | * @param baseConditionVO |
| | | * @return |
| | | */ |
| | | public CommonPage lightListMsg(BaseConditionVO baseConditionVO) { |
| | | //单灯故障数据 |
| | | commonPage = lightReportErrorService.queryErrorCode(baseConditionVO); |
| | | CommonPage commonPage = lightReportErrorService.queryErrorCode(baseConditionVO); |
| | | if (!commonPage.getList().isEmpty()) { |
| | | for (LightReportErrorBo lightReportError : (List<LightReportErrorBo>) commonPage.getList()) { |
| | | ErrorMsgDto errorMsgDto = new ErrorMsgDto(); |
| | |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | case "充电桩故障": |
| | | return commonPage; |
| | | } |
| | | |
| | | /** |
| | | * 充电桩 |
| | | * |
| | | * @param baseConditionVO |
| | | * @return |
| | | */ |
| | | public List<ErrorMsgDto> C3ListMsg(BaseConditionVO baseConditionVO) { |
| | | List<ErrorMsgDto> errorMsgDtoList = new ArrayList<>(); |
| | | //充电桩故障数据 |
| | | List<C3ReportErrorBo> c3ReportErrorBos = c3mReportErrorService.listReportError(baseConditionVO); |
| | | if (!c3ReportErrorBos.isEmpty()) { |
| | |
| | | if (one != null) { |
| | | errorMsgDto.setDeviceJson(JSON.toJSONString(one)); |
| | | } |
| | | errorMsgDtoList.add(errorMsgDto); |
| | | }); |
| | | commonPage = new CommonPage(); |
| | | commonPage.setList(c3ReportErrorBos); |
| | | } |
| | | |
| | | break; |
| | | case "大气故障": |
| | | //大气故障数据 todo 暂无 |
| | | |
| | | break; |
| | | default: |
| | | throw new BusinessException("类型不正确,请确认!"); |
| | | return errorMsgDtoList; |
| | | } |
| | | // break; |
| | | // case "充电桩故障": |
| | | |
| | | // |
| | | // break; |
| | | // case "大气故障": |
| | | // //大气故障数据 todo 暂无 |
| | | // |
| | | // break; |
| | | // default: |
| | | // throw new BusinessException("类型不正确,请确认!"); |
| | | // } |
| | | // |
| | | // |
| | | // //对errorMsgDtos按创建时间倒叙 |
| | |
| | | // //手动分页 baseConditionVO.getPageNo() 当前页 baseConditionVO.getPageSize() 每页条数 |
| | | //// return errorMsgDtos.subList((baseConditionVO.getPageNo() - 1) * baseConditionVO.getPageSize(), baseConditionVO.getPageNo() * baseConditionVO.getPageSize()); |
| | | // ListPagingUtils.pages(errorMsgDtos, baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | return commonPage; |
| | | } |
| | | |
| | | |
| | | } |