稽查修改
parent
857e7c5523
commit
54cdd14889
|
@ -1716,20 +1716,37 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
});
|
||||
}
|
||||
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(UserRole)))
|
||||
{
|
||||
var type = GetEntityAuditOpt(item);
|
||||
|
||||
var entity = item.Entity as UserRole;
|
||||
//var user = await _dbContext.Users.Include(x => x.UserTypeRole).FirstOrDefaultAsync(x => x.Id == entity.UserId);
|
||||
await InsertInspection<UserRole>(entity, type, x => new InspectionConvertDTO
|
||||
{
|
||||
IsDistinctionInterface = type == AuditOpt.Update ? true : false,
|
||||
});
|
||||
}
|
||||
|
||||
// 项目人员
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialUserRole)))
|
||||
{
|
||||
var type = GetEntityAuditOpt(item);
|
||||
|
||||
var entity = item.Entity as TrialUserRole;
|
||||
string extraIndentification = string.Empty;
|
||||
if (type == AuditOpt.Update)
|
||||
{
|
||||
extraIndentification= "/" + entity.IsDeleted.ToString();
|
||||
}
|
||||
|
||||
|
||||
//var user = await _dbContext.Users.Include(x => x.UserTypeRole).FirstOrDefaultAsync(x => x.Id == entity.UserId);
|
||||
await InsertInspection<TrialUserRole>(entity, type, x => new InspectionConvertDTO
|
||||
{
|
||||
IsDistinctionInterface = type == AuditOpt.Update ? true : false,
|
||||
TrialId = x.TrialId,
|
||||
ObjectRelationParentId = x.TrialId,
|
||||
ExtraIndentification = extraIndentification,
|
||||
ObjectRelationParentId2 = x.UserId,
|
||||
});
|
||||
}
|
||||
|
@ -3775,10 +3792,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
/// <returns></returns>
|
||||
public string GetInspectionRecordIdentification<T>(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false)
|
||||
{
|
||||
var entityType = _dbContext.Model.FindEntityType(entityObj.GetType());
|
||||
var tableName = entityType.GetTableName();
|
||||
//var entityType = _dbContext.Model.FindEntityType(entityObj.GetType());
|
||||
//var tableName = entityType.GetTableName();
|
||||
|
||||
var entityTypeName = tableName.IsNotNullOrEmpty() ? tableName : entityObj.GetType().Name;
|
||||
var entityTypeName = entityObj.GetType().Name;
|
||||
|
||||
//文档签署这块,不区分系统和项目的 需要处理为同一个标识
|
||||
if (typeof(T) == typeof(TrialDocConfirmedUser) || typeof(T) == typeof(SystemDocConfirmedUser))
|
||||
|
|
Loading…
Reference in New Issue