fix 处理已知查询问题
This commit is contained in:
@@ -431,8 +431,10 @@ public class DevicePermissionService : IDevicePermissionService
|
|||||||
DeviceType = x.Type,
|
DeviceType = x.Type,
|
||||||
UserNo = userNo,
|
UserNo = userNo,
|
||||||
CancellationId = 0,
|
CancellationId = 0,
|
||||||
|
Priority = 0,
|
||||||
Version = 0,
|
Version = 0,
|
||||||
TenantId = x.TenantId
|
TenantId = x.TenantId,
|
||||||
|
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
await _dbContext.InsertAsync(tasks);
|
await _dbContext.InsertAsync(tasks);
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ public class GainfoFaceService : IGainfoFaceService
|
|||||||
.Where(x => x.Factory == request.Factory)
|
.Where(x => x.Factory == request.Factory)
|
||||||
.WhereIF(request.Exists.HasValue && request.Exists.Value, x => existsFaceCodes.Contains(x.Code))
|
.WhereIF(request.Exists.HasValue && request.Exists.Value, x => existsFaceCodes.Contains(x.Code))
|
||||||
.WhereIF(request.Exists.HasValue && !request.Exists.Value, x => !existsFaceCodes.Contains(x.Code))
|
.WhereIF(request.Exists.HasValue && !request.Exists.Value, x => !existsFaceCodes.Contains(x.Code))
|
||||||
|
.WhereIF(request.Search.IsPresent(),x=>x.Code == request.Search)
|
||||||
.Select((x, d) => new GainfoFacePageResponse
|
.Select((x, d) => new GainfoFacePageResponse
|
||||||
{
|
{
|
||||||
UserCode = x.Code,
|
UserCode = x.Code,
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
using Dlhis.Basic.Device.Services;
|
using Dlhis.Basic.Organization.Request;
|
||||||
using Dlhis.Basic.Organization.Request;
|
|
||||||
using Dlhis.Basic.Organization.Response;
|
using Dlhis.Basic.Organization.Response;
|
||||||
using Dlhis.Entity.Basic.Entity;
|
using Dlhis.Entity.Basic.Entity;
|
||||||
using Dlhis.Entity.Device.Enums;
|
|
||||||
using Kurisu.AspNetCore.DataAccess.SqlSugar.Services;
|
using Kurisu.AspNetCore.DataAccess.SqlSugar.Services;
|
||||||
using Kurisu.AspNetCore.Utils;
|
using Kurisu.AspNetCore.Utils;
|
||||||
using Kurisu.AspNetCore.Utils.Extensions;
|
using Kurisu.AspNetCore.Utils.Extensions;
|
||||||
@@ -15,13 +13,11 @@ public class GainfoOutsourceService : IGainfoOutsourceService
|
|||||||
{
|
{
|
||||||
private readonly IDbContext _dbContext;
|
private readonly IDbContext _dbContext;
|
||||||
private readonly RedisCache _redisCache;
|
private readonly RedisCache _redisCache;
|
||||||
private readonly IDevicePermissionService _devicePermissionService;
|
|
||||||
|
|
||||||
public GainfoOutsourceService(IDbContext dbContext, RedisCache redisCache, IDevicePermissionService devicePermissionService)
|
public GainfoOutsourceService(IDbContext dbContext, RedisCache redisCache)
|
||||||
{
|
{
|
||||||
_dbContext = dbContext;
|
_dbContext = dbContext;
|
||||||
_redisCache = redisCache;
|
_redisCache = redisCache;
|
||||||
_devicePermissionService = devicePermissionService;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task SaveAsync(GainfoOutsourceRequest request)
|
public async Task SaveAsync(GainfoOutsourceRequest request)
|
||||||
@@ -53,8 +49,6 @@ public class GainfoOutsourceService : IGainfoOutsourceService
|
|||||||
SapCode = request.ExternalInfo.SapCode,
|
SapCode = request.ExternalInfo.SapCode,
|
||||||
SapPhone = request.ExternalInfo.SapPhone
|
SapPhone = request.ExternalInfo.SapPhone
|
||||||
});
|
});
|
||||||
|
|
||||||
await _devicePermissionService.GenerateDeviceTasksAsync(entity.No, DeviceTaskEnumType.Add);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -65,7 +59,7 @@ public class GainfoOutsourceService : IGainfoOutsourceService
|
|||||||
(outsource == null).ThrowIfTrue("不可编辑非外包人员档案数据");
|
(outsource == null).ThrowIfTrue("不可编辑非外包人员档案数据");
|
||||||
|
|
||||||
request.Adapt(entity);
|
request.Adapt(entity);
|
||||||
outsource.Code = entity.Code;
|
outsource!.Code = entity.Code;
|
||||||
request.ExternalInfo.Adapt(outsource);
|
request.ExternalInfo.Adapt(outsource);
|
||||||
|
|
||||||
await _dbContext.UpdateAsync(entity);
|
await _dbContext.UpdateAsync(entity);
|
||||||
|
|||||||
Reference in New Issue
Block a user