| | |
| | | import com.sandu.ximon.admin.param.SetScreenOpenParam; |
| | | import com.sandu.ximon.admin.param.SetVolumeParam; |
| | | import com.sandu.ximon.admin.security.SecurityUtils; |
| | | import com.sandu.ximon.admin.service.ClientService; |
| | | import com.sandu.ximon.admin.service.LedScheduleService; |
| | | import com.sandu.ximon.admin.service.PoleLightemitService; |
| | | import com.sandu.ximon.admin.service.XiXunPlayerService; |
| | | import com.sandu.ximon.admin.service.*; |
| | | import com.sandu.ximon.admin.utils.LightemitUtils; |
| | | import com.sandu.ximon.dao.domain.PoleBinding; |
| | | import com.sandu.ximon.dao.domain.PoleLightemitEntity; |
| | | import com.sandu.ximon.dao.domain.PoleXixunPlayerEntity; |
| | | import com.sandu.ximon.dao.enums.AdministratorEnums; |
| | |
| | | private final PoleLightemitService poleLightemitService; |
| | | private final LightemitUtils lightemitUtils; |
| | | private final LedScheduleService scheduleService; |
| | | private final PoleBindingService bindingService; |
| | | // private final ListPageUtil listPageUtil; |
| | | |
| | | /** |
| | |
| | | } |
| | | ); |
| | | } |
| | | List<PoleBinding> bindings = bindingService.list(Wrappers.lambdaQuery(PoleBinding.class).eq(PoleBinding::getDeviceType, 1)); |
| | | List<PoleLightemitEntity> list = poleLightemitService.list(wrapper); |
| | | if (isOnLine) { |
| | | List<PoleLightemitEntity> results = poleLightemitService.ledOnline(list); |
| | | results.forEach( |
| | | led->{ |
| | | bindings.forEach( |
| | | bind->{ |
| | | if(bind.getDeviceCode()!=null&&led.getLightemitControlCode()==bind.getDeviceCode()){ |
| | | led.setStreetlightId(bind.getPoleId()); |
| | | } |
| | | } |
| | | ); |
| | | } |
| | | ); |
| | | CommonPage commonPage = CommonPage.restPage(results); |
| | | int size = results.size(); |
| | | commonPage.setTotal((long) size); |
| | |
| | | return ResponseUtil.success(commonPage); |
| | | } else { |
| | | poleLightemitService.ledOnlineCheck(list); |
| | | list.forEach( |
| | | led->{ |
| | | bindings.forEach( |
| | | bind->{ |
| | | if(bind.getDeviceCode()!=null&&led.getLightemitControlCode().equals(bind.getDeviceCode())){ |
| | | led.setStreetlightId(bind.getPoleId()); |
| | | } |
| | | } |
| | | ); |
| | | } |
| | | ); |
| | | return ResponseUtil.success(list); |
| | | } |
| | | // return ResponseUtil.success(poleLightemitService.list(wrapper)); |