| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.dto.DataConfigDto; |
| | | import com.ruoyi.device.dto.DeviceConfigDtoPage; |
| | | import com.ruoyi.device.mapper.DataConfigMapper; |
| | | import com.ruoyi.device.mapper.DeviceMapper; |
| | | import com.ruoyi.device.pojo.DataConfig; |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author 江苏鵷雏网络科技有限公司 |
| | |
| | | if (dataConfigList.getIsDevice()) { |
| | | Device device = new Device(); |
| | | BeanUtils.copyProperties(dataConfigList, device); |
| | | List<String> channelList = dataConfigList.getChannel(); |
| | | if (channelList != null && !channelList.isEmpty()) { |
| | | String channelString = String.join(",", channelList); |
| | | device.setChannel(channelString); |
| | | } |
| | | device.setId(deviceId); |
| | | deviceMapper.updateById(device); |
| | | } else { |
| | |
| | | List<DataConfig> list = baseMapper.selectList(wrapper); |
| | | return Result.success(list); |
| | | } else { |
| | | return Result.success(dataConfigMapper.selectDataConfigList(dataConfig.getDeviceId())); |
| | | List<DeviceConfigDtoPage> deviceConfigDtoPages = dataConfigMapper.selectDataConfigList(dataConfig.getDeviceId()); |
| | | return Result.success(deviceConfigDtoPages); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Result<?> queryDataAcquisitionConfigurationTwo(DataConfig dataConfig) { |
| | | List<DeviceConfigDtoPage> deviceConfigDtoPages = dataConfigMapper.selectDataConfigListTwo(dataConfig.getDeviceName(), dataConfig.getManagementNumber()); |
| | | return Result.success(deviceConfigDtoPages); |
| | | } |
| | | } |