fix ss
This commit is contained in:
@@ -181,24 +181,28 @@ public class DeviceUploadLogService : IDeviceUploadLogService
|
||||
|
||||
public async Task QiaoqiaoGaoshiqingAsync(DeviceUploadLogSecretAddRequest request)
|
||||
{
|
||||
var gainfo = await _dbContext.Queryable<GainfoEntity>().Where(x => x.Code == request.UserCode).SingleAsync();
|
||||
gainfo.ThrowIfNull("人员不存在");
|
||||
var device = await _dbContext.Queryable<DeviceEntity>().Where(x => x.UniqueNo == request.DeviceUniqueNo).SingleAsync();
|
||||
|
||||
await _dbContext.InsertAsync(new DeviceUploadLogEntity
|
||||
{
|
||||
DeviceUniqueNo = device.UniqueNo,
|
||||
UserUniqueNo = request.UserCode,
|
||||
UserType = gainfo.Type,
|
||||
RaiseDateTime = request.RaiseDateTime,
|
||||
SerialNo = string.Empty,
|
||||
Type = device.Type == DeviceTypeEnumType.Attendance
|
||||
? DeviceUploadLogTypeEnumType.Attendance
|
||||
: device.Type == DeviceTypeEnumType.Door && device.AsAttendance
|
||||
? DeviceUploadLogTypeEnumType.Attendance
|
||||
: DeviceUploadLogTypeEnumType.Door,
|
||||
|
||||
: DeviceUploadLogTypeEnumType.Door,
|
||||
NeedUpload = true,
|
||||
Sync = false,
|
||||
SerialNo = string.Empty,
|
||||
DeviceCode = device.Code,
|
||||
TenantId = device.TenantId,
|
||||
Status = true,
|
||||
Image = null,
|
||||
CreatedBy = 1,
|
||||
ModifiedBy = 1
|
||||
ModifiedBy = 1,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user