| | |
| | | "}"; |
| | | |
| | | StoreOperationRecordsUtils.storeOperationData(listCode, null, "编辑一键求助子设备", content); |
| | | boolean b = updateById(interphoneSub); |
| | | /** |
| | | * 编辑一键求助子设备 日志记录结束 |
| | | */ |
| | | List<InterphoneSub> list = list(Wrappers.lambdaQuery(InterphoneSub.class).eq(InterphoneSub::getSubMac, interphoneSubParam.getSubMac())); |
| | | if (list.size() > 0) { |
| | | list.forEach( |
| | | sub->{ |
| | | if(!sub.getSubId().equals(id)){ |
| | | throw new BusinessException("请检查设备mac是否重复"); |
| | | } |
| | | } |
| | | ); |
| | | if (list.size() > 1) { |
| | | throw new BusinessException("请检查设备mac是否重复"); |
| | | } |
| | | boolean b = updateById(interphoneSub); |
| | | return b; |
| | | } |
| | | |
| | |
| | | } else { |
| | | list = interphoneSubMapper.getInterphoneSubList(keyword, SecurityUtils.getUserId()); |
| | | } |
| | | list.forEach(interphoneSubBo -> { |
| | | InterphoneHostSubPole one = SpringContextHolder.getBean(InterphoneHostSubService.class).getOne(Wrappers.lambdaQuery(InterphoneHostSubPole.class) |
| | | .eq(InterphoneHostSubPole::getSubId, interphoneSubBo.getSubId())); |
| | | if (one != null) { |
| | | interphoneSubBo.setHostId(one.getHostId()); |
| | | } |
| | | }); |
| | | return list; |
| | | } |
| | | } |