fix id返回,仅判断meal设,移除心跳间隔30秒判断
This commit is contained in:
@@ -83,9 +83,9 @@ public class DeviceSaveRequest : IValidatableObject
|
||||
yield return new ValidationResult($"{DeviceTypeEnumType.Door.GetDescription()}才可设置作为考勤设备", new[] { nameof(AsAttendance) });
|
||||
}
|
||||
|
||||
if (HeartbeatInterval != 0 && HeartbeatInterval < 30)
|
||||
if (HeartbeatInterval < 0)
|
||||
{
|
||||
yield return new ValidationResult("心跳间隔需要设置>=30秒", new[] { nameof(HeartbeatInterval) });
|
||||
yield return new ValidationResult("心跳间隔不可小于0", new[] { nameof(HeartbeatInterval) });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,11 +126,15 @@ public class DeviceService : IDeviceService
|
||||
var item = request[i];
|
||||
await SaveAsync(item);
|
||||
|
||||
if (item.Type == DeviceTypeEnumType.Meal)
|
||||
{
|
||||
|
||||
var registry = await _dbContext.Queryable<DeviceRegistryEntity>().Where(x => x.DeviceUniqueNo == item.UniqueNo).FirstAsync();
|
||||
businessPlaces.Any(x => x.Code == item.BusinessPlaceCode).ThrowIfFalse("营业点不存在");
|
||||
registry.BusinessPlaceCode = item.BusinessPlaceCode;
|
||||
await _dbContext.UpdateAsync(registry);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
message.Add($"第{row}列:{ex.Message}");
|
||||
|
||||
@@ -7,6 +7,8 @@ namespace Dlhis.Basic.Organization.Response;
|
||||
|
||||
public class GainfoPageResponse
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
public string No { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user