| | |
| | | import com.whyc.mapper.DevAlarmDataVerifyMapper; |
| | | import com.whyc.pojo.BattAlarmDataVerify; |
| | | import com.whyc.pojo.DevAlarmDataVerify; |
| | | import com.whyc.pojo.WorkflowMain; |
| | | import com.whyc.util.ActionUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | @Resource |
| | | private DevAlarmDataVerifyMapper mapper; |
| | | |
| | | @Autowired |
| | | @Lazy |
| | | private AlarmManualClearService clearService; |
| | | |
| | | public Response<Object> getPage(DevAlarmPar param) { |
| | | List<Integer> allMainIds = clearService.getAllMainIds(); |
| | | //int userId = ActionUtil.getUser().getUId().intValue(); |
| | | PageHelper.startPage(param.getPage().getPageCurr(),param.getPage().getPageSize()); |
| | | List<DevAlarmDataVerify> list = mapper.getList(param); |
| | | list.stream().forEach(data -> { |
| | | data.setAlarmName(AlarmDaoFactory.getAllAlarmName(data.getAlmType())); |
| | | WorkflowMain main = data.getMain(); |
| | | if (main != null && allMainIds.contains(main.getId())){ |
| | | main.setFaultUploadDone(true); |
| | | } |
| | | }); |
| | | PageInfo<DevAlarmDataVerify> pageInfo = new PageInfo<>(list); |
| | | return new Response<>().set(1,pageInfo); |