| | |
| | | package com.sandu.ximon.admin.service; |
| | | |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.sandu.common.domain.CommonPage; |
| | | import com.sandu.common.execption.BusinessException; |
| | | import com.sandu.common.object.BaseConditionVO; |
| | | import com.sandu.common.service.impl.BaseServiceImpl; |
| | |
| | | import com.sandu.ximon.admin.manager.iot.rrpc.enums.LightErrorEnum; |
| | | import com.sandu.ximon.admin.manager.iot.rrpc.mainboard.MainBoardInvokeSyncService; |
| | | import com.sandu.ximon.admin.security.SecurityUtils; |
| | | import com.sandu.ximon.admin.utils.ListPagingUtils; |
| | | import com.sandu.ximon.admin.utils.StoreOperationRecordsUtils; |
| | | import com.sandu.ximon.dao.bo.LightReportErrorBo; |
| | | import com.sandu.ximon.dao.domain.LightReportError; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author chenjiantian |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | public List<LightReportErrorBo> queryErrorCode(BaseConditionVO baseConditionVO) { |
| | | |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | public CommonPage queryErrorCode(BaseConditionVO baseConditionVO) { |
| | | List<LightReportErrorBo> lightReportErrorBos = baseMapper.listError(SecurityUtils.getClientId()); |
| | | for (LightReportErrorBo lightReportErrorBo : lightReportErrorBos) { |
| | | lightReportErrorBos = lightReportErrorBos.stream().filter(bean -> bean.getErrorCode() != 0).collect(Collectors.toList()); |
| | | CommonPage commonPage = ListPagingUtils.pages(lightReportErrorBos, baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | |
| | | for (LightReportErrorBo lightReportErrorBo : (List<LightReportErrorBo>) commonPage.getList()) { |
| | | Integer errorCode = lightReportErrorBo.getErrorCode(); |
| | | StringBuilder sb = new StringBuilder(); |
| | | LightErrorEnum[] values = LightErrorEnum.values(); |
| | |
| | | } |
| | | lightReportErrorBo.setErrorMsg(sb.toString()); |
| | | } |
| | | return lightReportErrorBos; |
| | | return commonPage; |
| | | } |
| | | |
| | | /** |