|
|
|
@ -95,11 +95,13 @@ public class BaseMonitorInfo1ServiceImpl implements IBaseMonitorInfo1Service {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//判断该通信地址是否已绑定设备
|
|
|
|
|
BaseMonitorInfo temp = new BaseMonitorInfo();
|
|
|
|
|
temp.setAddressCode(baseMonitorInfo.getAddressCode());
|
|
|
|
|
List<BaseMonitorInfo> list = baseMonitorInfoMapper.selectBaseMonitorInfoList(temp);
|
|
|
|
|
if (!CollectionUtils.isEmpty(list)){
|
|
|
|
|
throw new ServiceException("通信地址重复:" + baseMonitorInfo.getAddressCode());
|
|
|
|
|
if (StringUtils.isNotBlank(baseMonitorInfo.getAddressCode())) {
|
|
|
|
|
BaseMonitorInfo temp = new BaseMonitorInfo();
|
|
|
|
|
temp.setAddressCode(baseMonitorInfo.getAddressCode());
|
|
|
|
|
List<BaseMonitorInfo> list = baseMonitorInfoMapper.selectBaseMonitorInfoList(temp);
|
|
|
|
|
if (!CollectionUtils.isEmpty(list)){
|
|
|
|
|
throw new ServiceException("通信地址重复:" + baseMonitorInfo.getAddressCode());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
baseMonitorInfo.setCreateTime(DateUtils.getNowDate());
|
|
|
|
|