fix .
This commit is contained in:
@@ -5,7 +5,6 @@ using Dlhis.Entity.Device.Enums;
|
||||
using Dlhis.Entity.Sys.Entities;
|
||||
using Dlhis.Entity.Sys.Enums;
|
||||
using Dlhis.Jip.Api.Dto;
|
||||
using Dlhis.Sys.Api;
|
||||
using Kurisu.AspNetCore.DataAccess.SqlSugar.Services;
|
||||
using Kurisu.AspNetCore.Utils.Extensions;
|
||||
|
||||
@@ -15,14 +14,12 @@ public class GainfoUpdateService : IGainfoUpdateService
|
||||
{
|
||||
private readonly IDbContext _dbContext;
|
||||
private readonly ILogger<GainfoUpdateService> _logger;
|
||||
private readonly ITenantApi _tenantApi;
|
||||
private readonly IJinkoSapService _jinkoSapService;
|
||||
private readonly IGainfoPermissionService _gainfoPermissionService;
|
||||
private readonly IIdentityUserSyncService _identityUserSyncService;
|
||||
|
||||
public GainfoUpdateService(IDbContext dbContext,
|
||||
ILogger<GainfoUpdateService> logger,
|
||||
ITenantApi tenantApi,
|
||||
IJinkoSapService jinkoSapService,
|
||||
IGainfoPermissionService gainfoPermissionService,
|
||||
IIdentityUserSyncService identityUserSyncService)
|
||||
@@ -30,7 +27,6 @@ public class GainfoUpdateService : IGainfoUpdateService
|
||||
_dbContext = dbContext;
|
||||
_dbContext.Client.QueryFilter.Clear();
|
||||
_logger = logger;
|
||||
_tenantApi = tenantApi;
|
||||
_jinkoSapService = jinkoSapService;
|
||||
_gainfoPermissionService = gainfoPermissionService;
|
||||
_identityUserSyncService = identityUserSyncService;
|
||||
@@ -277,8 +273,11 @@ public class GainfoUpdateService : IGainfoUpdateService
|
||||
change += $"{gainfo.DepartmentNo}->{item.appellation}";
|
||||
}
|
||||
|
||||
await _identityUserSyncService.SyncAccountAsync(gainfo.Code, gainfo.Name, gainfo.IdNo, factory);
|
||||
await _gainfoPermissionService.ResetPermissionsAsync(gainfo.No, DeviceTaskEnumType.Delete, null, $"异动生成({change})");
|
||||
if (change.IsPresent())
|
||||
{
|
||||
await _identityUserSyncService.SyncAccountAsync(gainfo.Code, gainfo.Name, gainfo.IdNo, factory);
|
||||
await _gainfoPermissionService.ResetPermissionsAsync(gainfo.No, DeviceTaskEnumType.Delete, null, $"异动生成({change})");
|
||||
}
|
||||
}
|
||||
|
||||
await _dbContext.Updateable<GainfoEntity>().SetColumns(g => new GainfoEntity
|
||||
|
||||
Reference in New Issue
Block a user