fix 获取设备支持多factory
This commit is contained in:
@@ -54,7 +54,6 @@ public class DeviceConnectService : IDeviceConnectService
|
||||
|
||||
await _dbContext.InsertAsync(registry);
|
||||
return "设备注册成功";
|
||||
|
||||
}
|
||||
|
||||
public async Task<List<DeviceNotSetBusinessPlaceResponse>> GetNotSetBusinessPlaceDevicesAsync()
|
||||
@@ -129,9 +128,11 @@ public class DeviceConnectService : IDeviceConnectService
|
||||
|
||||
public async Task<List<DeviceUniqueWithConnectionInfoDto>> GetDeviceUniqueInfoByBrandAsync(string brand, string factory)
|
||||
{
|
||||
var factories = factory.Split(",").ToList();
|
||||
|
||||
return await _dbContext.Queryable<DeviceEntity>()
|
||||
.LeftJoin<DeviceTemplateEntity>((d, dt) => d.TemplateCode == dt.Code)
|
||||
.Where((d, dt) => dt.Brand == brand && d.TenantId == factory)
|
||||
.Where((d, dt) => dt.Brand == brand && factories.Contains(d.TenantId))
|
||||
.Select(d => new DeviceUniqueWithConnectionInfoDto
|
||||
{
|
||||
DeviceUnique = d.UniqueNo,
|
||||
|
||||
Reference in New Issue
Block a user