fix 修正语法错误
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Dlhis.Basic.Device.Request;
|
||||
using Dlhis.Basic.Device.Response;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Dlhis.Basic.Device.Services;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ using Kurisu.Core.DataAccess.Dto;
|
||||
using Kurisu.SqlSugar.Extensions;
|
||||
using Kurisu.SqlSugar.Services;
|
||||
using Mapster;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SqlSugar;
|
||||
@@ -311,7 +312,7 @@ public class DeviceService : IDeviceService
|
||||
{
|
||||
var page = await _dbContext.Queryable<DeviceEntity>()
|
||||
.LeftJoin<DeviceTemplateEntity>((d, dt) => d.TemplateCode == dt.Code)
|
||||
.Where(x => x.Type == DeviceTypeEnumType.Attendance || (x.Type == DeviceTypeEnumType.Door && x.AsAttendance))
|
||||
.Where(d => d.Type == DeviceTypeEnumType.Attendance || (d.Type == DeviceTypeEnumType.Door && d.AsAttendance))
|
||||
.Select((d, dt) => new DevicePageResponse
|
||||
{
|
||||
FuncsStr = d.Funcs.ToString(),
|
||||
@@ -397,6 +398,5 @@ public class DeviceService : IDeviceService
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -746,7 +746,7 @@ public class BalanceService : IBalanceService
|
||||
foreach (var no in request.UniqueNos)
|
||||
{
|
||||
var device = devices.Where(x => x.UniqueNo == no).First();
|
||||
device.ThrowIfNull("设备不存在");
|
||||
device.ThrowIfNull($"{no}:设备不存在");
|
||||
}
|
||||
var regiss = await _dbContext.Queryable<DeviceRegistryEntity>()
|
||||
.Where(x => request.UniqueNos.Contains(x.DeviceUniqueNo))
|
||||
|
||||
Reference in New Issue
Block a user