|
@@ -176,7 +176,7 @@ namespace WingDeviceService.Service
|
|
|
OrganizationCode = deviceDb.OrganizationCode,
|
|
|
DepartmentCode = deviceDb.DepartmentCode,
|
|
|
ShortCode = deviceDb.ShortCode,
|
|
|
- DeviceTypeName = deviceTypeModel.Value
|
|
|
+ LanguageConfigs = deviceTypeModel.LanguageConfigs
|
|
|
};
|
|
|
return result;
|
|
|
}
|
|
@@ -558,11 +558,7 @@ namespace WingDeviceService.Service
|
|
|
var deviceTypeList = await _deviceInfoDBServiceProxy.FindDictionaryItemsAsync(new FindDictionaryItemsDBRequest { DictionaryType = (int)DictionaryTypeEnum.DeviceType });
|
|
|
foreach (var c in deviceInfoDOList)
|
|
|
{
|
|
|
- var deviceTypeName = deviceTypeList.FirstOrDefault(t => t.DictionaryCode == c.DeviceType)?.Value;
|
|
|
- if (string.IsNullOrWhiteSpace(deviceTypeName))
|
|
|
- {
|
|
|
- deviceTypeName = c.DeviceType;
|
|
|
- }
|
|
|
+ var deviceTypeModel = deviceTypeList.FirstOrDefault(t => t.DictionaryCode == c.DeviceType);
|
|
|
result.Add(new DeviceExtendInfoDTO
|
|
|
{
|
|
|
DepartmentName = organizations.PageData.FirstOrDefault(o => o.OrganizationCode == c.DepartmentCode)?.OrganizationName,
|
|
@@ -580,7 +576,7 @@ namespace WingDeviceService.Service
|
|
|
OrganizationCode = c.OrganizationCode,
|
|
|
DepartmentCode = c.DepartmentCode,
|
|
|
ShortCode = c.ShortCode,
|
|
|
- DeviceTypeName = deviceTypeName
|
|
|
+ LanguageConfigs = deviceTypeModel?.LanguageConfigs
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -803,11 +799,7 @@ namespace WingDeviceService.Service
|
|
|
var device = dto.MappingTo<DeviceExtendInfoDTO>();
|
|
|
device.IsOnline = deviceTokens.FirstOrDefault(x => x.ClientId == dto.DeviceCode)?.IsOnline ?? false;
|
|
|
device.DepartmentName = organizations.FirstOrDefault(x => x.OrganizationCode == dto.DepartmentCode)?.OrganizationName;
|
|
|
- device.DeviceTypeName = deviceTypeList.FirstOrDefault(t => t.DictionaryCode == device.DeviceType)?.Value;
|
|
|
- if (string.IsNullOrWhiteSpace(device.DeviceTypeName))
|
|
|
- {
|
|
|
- device.DeviceTypeName = device.DeviceType;
|
|
|
- }
|
|
|
+ device.LanguageConfigs = deviceTypeList.FirstOrDefault(t => t.DictionaryCode == device.DeviceType)?.LanguageConfigs;
|
|
|
var organization = organizations.FirstOrDefault(x => x.OrganizationCode == dto.OrganizationCode);
|
|
|
if (organization != null)
|
|
|
{
|