1
0

导出数据设备

This commit is contained in:
2025-07-10 14:57:59 +08:00
parent d75658e81e
commit 7e688e16b3
12 changed files with 84 additions and 47 deletions

View File

@ -41,6 +41,14 @@ public interface DeviceTypeService extends IService<DeviceType> {
*/
List<DeviceType> queryDeviceTypes();
/**
* 根据设备类型名称查询设备类型
*
* @param typeName 条件参数
* @return List<DeviceTypeDto>
*/
DeviceType queryByName(String typeName);
/**
* 新增设备类型
*

View File

@ -43,6 +43,8 @@ public class DeviceExportService {
dto.setDeviceMac(device.getDeviceMac());
// 设备IMEI
dto.setDeviceImei(device.getDeviceImei());
// 蓝牙名称
dto.setBluetoothName(device.getBluetoothName());
dto.setLongitude(device.getLongitude());
dto.setLatitude(device.getLatitude());
dto.setRemark(device.getRemark());

View File

@ -112,6 +112,7 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
@Override
public List<Device> queryAll(DeviceQueryCriteria criteria) {
criteria.setCurrentOwnerId(LoginHelper.getUserId());
return deviceMapper.findAll(criteria);
}
@ -141,6 +142,9 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
queryCriteria.setDeviceTypeId(deviceForm.getDeviceType());
queryCriteria.setCustomerId(LoginHelper.getUserId());
DeviceTypeGrants typeGrants = deviceTypeGrantsMapper.selectById(queryCriteria.getDeviceTypeId());
if (typeGrants == null) {
throw new Exception("设备类型不存在!!!");
}
DeviceType deviceTypes = deviceTypeMapper.selectById(typeGrants.getDeviceTypeId());
if (deviceTypes == null) {
throw new Exception("设备类型不存在!!!");

View File

@ -78,6 +78,21 @@ public class DeviceTypeServiceImpl extends ServiceImpl<DeviceTypeMapper, DeviceT
return deviceTypeMapper.findAll(criteria);
}
/**
* 根据设备类型名称查询设备类型
*
* @param typeName 条件参数
* @return List<DeviceTypeDto>
*/
@Override
public DeviceType queryByName(String typeName) {
DeviceTypeQueryCriteria criteria = new DeviceTypeQueryCriteria();
criteria.setCustomerId(LoginHelper.getUserId());
criteria.setTypeName(typeName);
DeviceType deviceType = deviceTypeMapper.queryByName(criteria);
return deviceType;
}
/**
* 新增设备类型