|
@@ -92,6 +92,7 @@ namespace WingDeviceService.Service
|
|
|
{
|
|
|
SerialNumber = request.DeviceUniqueCode,
|
|
|
Name = request.Name,
|
|
|
+ Password = request.Password,
|
|
|
Description = request.Description,
|
|
|
OrganizationCode = request.OrganizationCode,
|
|
|
DeviceModel = request.DeviceModel,
|
|
@@ -125,6 +126,19 @@ namespace WingDeviceService.Service
|
|
|
};
|
|
|
await _organizationDBService.CreateOrganizationsAsync(new CreateOrganizationsDBRequest { Infos = new List<TableDataItem<OrganizationDTO>> { orgData } });
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ deviceDto.DeviceModel = request.DeviceModel;
|
|
|
+ deviceDto.DeviceType = request.DeviceType;
|
|
|
+ deviceDto.DeviceSoftwareVersion = request.SoftwareVersion;
|
|
|
+ deviceDto.SystemVersion = request.SystemVersion;
|
|
|
+ deviceDto.CPUModel = request.CPUModel;
|
|
|
+ // deviceDto.Description = request.Description;
|
|
|
+ // deviceDto.Name = request.Name;
|
|
|
+ // deviceDto.OrganizationCode = request.OrganizationCode;
|
|
|
+ deviceDto.SystemLanguage = request.SystemLanguage;
|
|
|
+ await _deviceInfoDBServiceProxy.UpdateDeviceInfoByCodeAsync(deviceDto.DeviceCode, deviceDto, string.Empty, true);
|
|
|
+ }
|
|
|
var applyRequest = new ApplyTokenRequest(AccountType.US, deviceName, request.Platform, request.LoginSource, deviceCode, _sourceUrl, 0);
|
|
|
var tokenInfo = await _authenticationService.ApplyTokenAsync(applyRequest);
|
|
|
if (!string.IsNullOrWhiteSpace(tokenInfo.Code))
|