| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.google.gson.Gson; |
| | | import com.sandu.common.execption.BusinessException; |
| | | import com.sandu.common.service.impl.BaseServiceImpl; |
| | | import com.sandu.ximon.admin.config.NginxConfigBean; |
| | | import com.sandu.ximon.admin.config.RealtimeServerBean; |
| | |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | |
| | | |
| | | /** |
| | | * 熙讯设备 |
| | | */ |
| | | @Service |
| | | @EnableCaching |
| | | public class PoleLightemitService extends BaseServiceImpl<PoleLightemitEntityMapper, PoleLightemitEntity> { |
| | |
| | | } |
| | | */ |
| | | |
| | | /* public void ledOnlineCheck(List<PoleLightemitEntity> list) { |
| | | |
| | | |
| | | |
| | | public List<PoleLightemitEntity> ledOnlineCheck(List<PoleLightemitEntity> list) { |
| | | List<PoleLightemitEntity> onLineList=new ArrayList<>(); |
| | | for(PoleLightemitEntity poleLightemitEntity : list){ |
| | | poleLightemitEntity.setIsOpen(lightemitUtils.getIsScreenOpen(poleLightemitEntity.getLightemitControlCode()).contains("true")); |
| | | if(poleLightemitEntity.getIsOpen()){ |
| | | onLineList.add(poleLightemitEntity); |
| | | } |
| | | } |
| | | }*/ |
| | | return onLineList; |
| | | } |
| | | |
| | | |
| | | public void savePoleLightemit(PoleLightemitEntity poleLightemit) { |
| | | boolean save = this.save(poleLightemit); |
| | | // 绑定灯杆 |
| | | if(save&&poleLightemit.getPoleId()!=null){ |
| | | |
| | | if(save&&poleLightemit.getStreetlightId()!=null){ |
| | | System.out.println("-------------"); |
| | | } |
| | | // poleStreetlightLightemitService.saveStreetlightLightemit(poleLightemit.getLightemitId(),poleLightemit.getStreetlightId()); |
| | | } |
| | | |
| | | |
| | | /* public void updatePoleLightemit(PoleLightemitEntity poleLightemit) { |
| | | this.updateById(poleLightemit); |
| | | poleStreetlightLightemitService.saveStreetlightLightemit(poleLightemit.getLightemitId(),poleLightemit.getStreetlightId()); |
| | | }*/ |
| | | public void updatePoleLightemit(Long ledId,PoleLightemitEntity poleLightemit) { |
| | | PoleLightemitEntity byId = getById(ledId); |
| | | if(byId==null){ |
| | | throw new BusinessException("未找到LED屏"); |
| | | } |
| | | poleLightemit.setLightemitId(ledId); |
| | | boolean b = this.updateById(poleLightemit); |
| | | // 绑定灯杆 |
| | | |
| | | if(b&&poleLightemit.getStreetlightId()!=null){ |
| | | System.out.println("-------------"); |
| | | } |
| | | // poleStreetlightLightemitService.saveStreetlightLightemit(poleLightemit.getLightemitId(),poleLightemit.getStreetlightId()); |
| | | } |
| | | |
| | | public boolean deletePoleLightemit(List<Long> ledIds) { |
| | | boolean b = removeByIds(ledIds); |
| | | |
| | | // 绑定灯杆 |
| | | |
| | | // if(b&&byId.getStreetlightId()!=null){ |
| | | // //删除绑定关系 |
| | | // System.out.println("-------------"); |
| | | // } |
| | | return b; |
| | | // poleStreetlightLightemitService.saveStreetlightLightemit(poleLightemit.getLightemitId(),poleLightemit.getStreetlightId()); |
| | | } |
| | | |
| | | /** |
| | | * 查询权限范围内的所有led屏信息 |