feat 处理已知禅道
This commit is contained in:
@@ -153,8 +153,10 @@ public class DeviceUploadLogService : IDeviceUploadLogService
|
||||
/// <inheritdoc />
|
||||
public async Task ManuallySetTimeInfoAsync(string deviceNo, DateTime start, DateTime end)
|
||||
{
|
||||
var device = await _dbContext.Queryable<DeviceEntity>().Where(x => x.UniqueNo == deviceNo).SingleAsync();
|
||||
(device.Type != DeviceTypeEnumType.Attendance && device.Type != DeviceTypeEnumType.Door).ThrowIfTrue("不支持该设备类型");
|
||||
var exists = await _dbContext.Queryable<DeviceUploadLogManuallyEntity>().Where(x => x.DeviceNo == deviceNo).Where(x => x.IsFinished == false).AnyAsync();
|
||||
exists.ThrowIfTrue("已存在时间配置尚未完成");
|
||||
exists.ThrowIfTrue("已存在配置尚未完成");
|
||||
|
||||
await _dbContext.InsertAsync(new DeviceUploadLogManuallyEntity
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user