fix 获取品牌设备增加factory字段

This commit is contained in:
2024-06-13 14:49:41 +08:00
parent 15c67a4f78
commit bd91787e92
4 changed files with 26 additions and 20 deletions

View File

@@ -123,12 +123,12 @@ public class DeviceConnectService : IDeviceConnectService
})
.ToListAsync();
}
public async Task<List<DeviceUniqueWithConnectionInfoDto>> GetDeviceUniqueInfoByBrandAsync(string brand)
public async Task<List<DeviceUniqueWithConnectionInfoDto>> GetDeviceUniqueInfoByBrandAsync(string brand, string factory)
{
return await _dbContext.Queryable<DeviceEntity>()
.LeftJoin<DeviceTemplateEntity>((d, dt) => d.TemplateCode == dt.Code)
.Where((d, dt) => dt.Brand == brand)
.Where((d, dt) => dt.Brand == brand && d.TenantId == factory)
.Select(d => new DeviceUniqueWithConnectionInfoDto
{
DeviceUnique = d.UniqueNo,
@@ -176,7 +176,7 @@ public class DeviceConnectService : IDeviceConnectService
Funcs = new List<DeviceFuncEnumType>(),
Type = DeviceTypeEnumType.Meal,
DeployPlace = deployPlace,
HeartbeatInterval = 30,
HeartbeatInterval = 0,
DeployDirection = null,
Enable = true,
AsAttendance = false,