forked from dyf/fys-Multi-tenant
导出数据设备
This commit is contained in:
@ -41,6 +41,14 @@ public interface DeviceTypeService extends IService<DeviceType> {
|
||||
*/
|
||||
List<DeviceType> queryDeviceTypes();
|
||||
|
||||
/**
|
||||
* 根据设备类型名称查询设备类型
|
||||
*
|
||||
* @param typeName 条件参数
|
||||
* @return List<DeviceTypeDto>
|
||||
*/
|
||||
DeviceType queryByName(String typeName);
|
||||
|
||||
/**
|
||||
* 新增设备类型
|
||||
*
|
||||
|
@ -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());
|
||||
|
@ -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("设备类型不存在!!!");
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增设备类型
|
||||
|
Reference in New Issue
Block a user