| | |
| | | import com.sandu.ximon.admin.security.SecurityUtils; |
| | | import com.sandu.ximon.admin.service.*; |
| | | import com.sandu.ximon.admin.utils.LightemitUtils; |
| | | import com.sandu.ximon.dao.domain.Pole; |
| | | import com.sandu.ximon.dao.domain.PoleBinding; |
| | | import com.sandu.ximon.dao.domain.PoleLightemitEntity; |
| | | import com.sandu.ximon.dao.domain.PoleXixunPlayerEntity; |
| | |
| | | private final LightemitUtils lightemitUtils; |
| | | private final LedScheduleService scheduleService; |
| | | private final PoleBindingService bindingService; |
| | | private final PoleService poleService; |
| | | // private final ListPageUtil listPageUtil; |
| | | |
| | | /** |
| | |
| | | if (isOnLine) { |
| | | List<PoleLightemitEntity> results = poleLightemitService.ledOnline(list); |
| | | results.forEach( |
| | | led->{ |
| | | led -> { |
| | | bindings.forEach( |
| | | bind->{ |
| | | if(bind.getDeviceCode()!=null&&led.getLightemitControlCode()==bind.getDeviceCode()){ |
| | | bind -> { |
| | | if (bind.getDeviceCode() != null && led.getLightemitControlCode() == bind.getDeviceCode()) { |
| | | led.setStreetlightId(bind.getPoleId()); |
| | | System.out.println("有没有运行到这里?---------------"+bind.getPoleId()); |
| | | led.setStreetlightName(poleService.getOne(Wrappers.lambdaQuery(Pole.class).eq(Pole::getId, bind.getPoleId())).getPoleName()); |
| | | } |
| | | } |
| | | ); |
| | |
| | | } else { |
| | | poleLightemitService.ledOnlineCheck(list); |
| | | list.forEach( |
| | | led->{ |
| | | led -> { |
| | | bindings.forEach( |
| | | bind->{ |
| | | if(bind.getDeviceCode()!=null&&led.getLightemitControlCode().equals(bind.getDeviceCode())){ |
| | | bind -> { |
| | | if (bind.getDeviceCode() != null && led.getLightemitControlCode().equals(bind.getDeviceCode())) { |
| | | led.setStreetlightId(bind.getPoleId()); |
| | | System.out.println("有没有运行到这里?---------------"+bind.getPoleId()); |
| | | led.setStreetlightName(poleService.getOne(Wrappers.lambdaQuery(Pole.class).eq(Pole::getId, bind.getPoleId())).getPoleName()); |
| | | } |
| | | } |
| | | ); |
| | | } |
| | | ); |
| | | return ResponseUtil.success(list); |
| | | CommonPage commonPage = CommonPage.restPage(list); |
| | | int size = list.size(); |
| | | commonPage.setTotal((long) size); |
| | | commonPage.setTotalPage(size / baseConditionVO.getPageSize() + 1); |
| | | if (size % baseConditionVO.getPageSize() == 0) { |
| | | commonPage.setTotalPage(size / baseConditionVO.getPageSize()); |
| | | } |
| | | return ResponseUtil.success(commonPage); |
| | | // return ResponseUtil.success(list); |
| | | } |
| | | // return ResponseUtil.success(poleLightemitService.list(wrapper)); |
| | | } |