| | |
| | | |
| | | 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; |
| | |
| | | public void savePoleLightemit(PoleLightemitEntity poleLightemit) { |
| | | boolean save = this.save(poleLightemit); |
| | | // 绑定灯杆 |
| | | if(save&&!("").equals(poleLightemit.getStreetlightId())){ |
| | | |
| | | 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屏信息 |