Uat_Study
parent
10f2887c2b
commit
a6b39efdf2
|
@ -169,6 +169,10 @@ namespace IRaCIS.Core.Application.Service
|
||||||
DictionaryCode = lst.Max(x => x.DictionaryCode),
|
DictionaryCode = lst.Max(x => x.DictionaryCode),
|
||||||
DictionaryType = lst.Max(x => x.DictionaryType),
|
DictionaryType = lst.Max(x => x.DictionaryType),
|
||||||
DateType = lst.Select(x => x.DateType).FirstOrDefault(),
|
DateType = lst.Select(x => x.DateType).FirstOrDefault(),
|
||||||
|
ForeignKeyValue = lst.Select(x => x.ForeignKeyValue).FirstOrDefault(),
|
||||||
|
ForeignKeyText = lst.Select(x => x.ForeignKeyText).FirstOrDefault(),
|
||||||
|
ForeignKeyTable = lst.Select(x => x.ForeignKeyTable).FirstOrDefault(),
|
||||||
|
DataType = lst.Select(x => x.DataType).FirstOrDefault(),
|
||||||
Id =NewId.NextGuid()//新id,
|
Id =NewId.NextGuid()//新id,
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
|
@ -189,10 +193,18 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var item = alllist.FirstOrDefault(y => y.ValueCN == x.ValueCN);
|
var item = alllist.FirstOrDefault(y => y.ValueCN == x.ValueCN);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
x.Code=x.Code.IsNullOrEmpty()?item.Code:x.Code;
|
x.Code=item.Code;
|
||||||
x.Value = x.Code.IsNullOrEmpty() ? item.Value : x.Value;
|
x.Value = x.Code.IsNullOrEmpty() ? item.Value : x.Value;
|
||||||
x.DictionaryType = x.DictionaryType.IsNullOrEmpty() ? item.DictionaryType : x.DictionaryType;
|
x.DictionaryType = x.DictionaryType.IsNullOrEmpty() ? item.DictionaryType : x.DictionaryType;
|
||||||
x.DictionaryCode = x.DictionaryCode.IsNullOrEmpty() ? item.DictionaryCode : x.DictionaryCode;
|
x.DictionaryCode = x.DictionaryCode.IsNullOrEmpty() ? item.DictionaryCode : x.DictionaryCode;
|
||||||
|
x.DataType = x.DataType.IsNullOrEmpty() ? item.DataType : x.DataType;
|
||||||
|
x.DateType = x.DateType.IsNullOrEmpty() ? item.DateType : x.DateType;
|
||||||
|
x.DictionaryKey = x.DictionaryKey.IsNullOrEmpty() ? item.DictionaryKey : x.DictionaryKey;
|
||||||
|
x.IsShowParent = x.IsShowParent==null ? item.IsShowParent : x.IsShowParent;
|
||||||
|
x.ForeignKeyTable = x.ForeignKeyTable.IsNullOrEmpty() ? item.ForeignKeyTable : x.ForeignKeyTable;
|
||||||
|
x.ForeignKeyText = x.ForeignKeyText.IsNullOrEmpty() ? item.ForeignKeyText : x.ForeignKeyText;
|
||||||
|
x.ForeignKeyValue = x.ForeignKeyValue.IsNullOrEmpty() ? item.ForeignKeyValue : x.ForeignKeyValue;
|
||||||
|
x.EnumType = x.EnumType.IsNullOrEmpty() ? item.EnumType : x.EnumType;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -79,7 +79,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||||
from lefttrialSign in trialSigntemp.DefaultIfEmpty()
|
from lefttrialSign in trialSigntemp.DefaultIfEmpty()
|
||||||
|
|
||||||
|
|
||||||
join leftfrontAuditConfig in _repository.GetQueryable<FrontAuditConfig>().Where(x=>x.ConfigType=="M"&&x.Identification!=null) on
|
join leftfrontAuditConfig in _repository.GetQueryable<FrontAuditConfig>().Where(x=>x.ConfigType=="M"&&x.Identification!=null&&x.IsEnable==true) on
|
||||||
data.Identification.ToLower()
|
data.Identification.ToLower()
|
||||||
equals
|
equals
|
||||||
leftfrontAuditConfig.Identification.ToLower()
|
leftfrontAuditConfig.Identification.ToLower()
|
||||||
|
|
|
@ -1441,7 +1441,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
dbSubjectVisit.Auditor = _userInfo.Id;
|
||||||
dbSubjectVisit.IsTake = false;
|
dbSubjectVisit.IsTake = false;
|
||||||
dbSubjectVisit.CurrentActionUserId = null;
|
dbSubjectVisit.CurrentActionUserId = null;
|
||||||
dbSubjectVisit.CurrentActionUserExpireTime = null;
|
dbSubjectVisit.CurrentActionUserExpireTime = null;
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
//添加受试者的时候,获取访视计划列表,添加到受试者访视表。
|
//添加受试者的时候,获取访视计划列表,添加到受试者访视表。
|
||||||
var visitPlan = await _repository.Where<VisitStage>(t => t.TrialId == subjectCommand.TrialId).ToListAsync();
|
var visitPlan = await _repository.Where<VisitStage>(t => t.TrialId == subjectCommand.TrialId&&t.IsConfirmed).ToListAsync();
|
||||||
|
|
||||||
svlist = _mapper.Map<List<SubjectVisit>>(visitPlan);
|
svlist = _mapper.Map<List<SubjectVisit>>(visitPlan);
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,9 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public Guid UpdateUserId { get; set; }
|
public Guid UpdateUserId { get; set; }
|
||||||
public DateTime UpdateTime { get; set; }
|
public DateTime UpdateTime { get; set; }
|
||||||
|
|
||||||
|
public Guid? Auditor { get; set; }
|
||||||
|
|
||||||
|
|
||||||
//public SubjectVisitStateEnum VisitState { get; set; }
|
//public SubjectVisitStateEnum VisitState { get; set; }
|
||||||
|
|
||||||
//核查状态
|
//核查状态
|
||||||
|
|
|
@ -49,8 +49,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
public async Task IncomingEntitys(List<EntityEntry> entitys)
|
public async Task IncomingEntitys(List<EntityEntry> entitys)
|
||||||
{
|
{
|
||||||
// 修改
|
// 修改
|
||||||
await InsertAddEntitys(entitys.Where(x => x.State == EntityState.Modified && (!typeof(ISoftDelete).IsAssignableFrom(x.Entity.GetType())
|
await InsertAddEntitys(entitys.Where(x => x.State == EntityState.Modified && ((!typeof(ISoftDelete).IsAssignableFrom(x.Entity.GetType())
|
||||||
|| !(bool)x.Entity.GetType().GetProperty("IsDeleted").GetValue(x.Entity))
|
|| !(bool)x.Entity.GetType().GetProperty("IsDeleted").GetValue(x.Entity))||x.Entity.GetType()== typeof(DicomSeries))
|
||||||
).ToList(), "Update");
|
).ToList(), "Update");
|
||||||
|
|
||||||
// 新增
|
// 新增
|
||||||
|
@ -58,7 +58,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
await InsertAddEntitys(entitys.Where(x => x.State == EntityState.Deleted
|
await InsertAddEntitys(entitys.Where(x => x.State == EntityState.Deleted
|
||||||
||((typeof(ISoftDelete).IsAssignableFrom(x.Entity.GetType())&& (bool)x.Entity.GetType().GetProperty("IsDeleted").GetValue(x.Entity)))
|
||((typeof(ISoftDelete).IsAssignableFrom(x.Entity.GetType())&& x.Entity.GetType() != typeof(DicomSeries) && (bool)x.Entity.GetType().GetProperty("IsDeleted").GetValue(x.Entity)))
|
||||||
).ToList(), "Deleted");
|
).ToList(), "Deleted");
|
||||||
|
|
||||||
|
|
||||||
|
@ -146,17 +146,18 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(DicomSeries)))
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(DicomSeries)))
|
||||||
{
|
{
|
||||||
var entity = item.Entity as DicomSeries;
|
var entity = item.Entity as DicomSeries;
|
||||||
if (entity.DicomStudy == null)
|
var dicomStudy = entity.DicomStudy.Clone();
|
||||||
|
if (dicomStudy == null)
|
||||||
{
|
{
|
||||||
entity.DicomStudy = await _dbContext.DicomStudys.AsNoTracking().FirstOrDefaultAsync(x => x.Id == entity.StudyId);
|
dicomStudy = await _dbContext.DicomStudys.AsNoTracking().FirstOrDefaultAsync(x => x.Id == entity.StudyId);
|
||||||
}
|
}
|
||||||
await InsertInspection<DicomSeries>(item, type, x => new DataInspection()
|
await InsertInspection<DicomSeries>(item, type, x => new DataInspection()
|
||||||
{
|
{
|
||||||
GeneralId = x.Id,
|
GeneralId = x.Id,
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
StudyCode = entity.DicomStudy?.StudyCode,
|
StudyCode = dicomStudy?.StudyCode,
|
||||||
Modalities = entity.DicomStudy?.Modalities,
|
Modalities = dicomStudy?.Modalities,
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -701,6 +701,8 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
string Table = item.ForeignKeyTable;
|
string Table = item.ForeignKeyTable;
|
||||||
string ForeignKeyValue = item.ForeignKeyValue;
|
string ForeignKeyValue = item.ForeignKeyValue;
|
||||||
string ForeignKeyText = item.ForeignKeyText;
|
string ForeignKeyText = item.ForeignKeyText;
|
||||||
|
if (JsonDataValue[item.Key] != null)
|
||||||
|
{
|
||||||
string value = JsonDataValue[item.Key].ToString();
|
string value = JsonDataValue[item.Key].ToString();
|
||||||
string para = string.Empty;
|
string para = string.Empty;
|
||||||
string sql = string.Empty;
|
string sql = string.Empty;
|
||||||
|
@ -723,6 +725,8 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
};
|
};
|
||||||
JsonDataValue[item.Key] = string.Join(",", _dbContext.Database.SqlQuery<ForeignKey>(sql, paravalue).Select(x => x.Text).ToList());
|
JsonDataValue[item.Key] = string.Join(",", _dbContext.Database.SqlQuery<ForeignKey>(sql, paravalue).Select(x => x.Text).ToList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return JsonConvert.SerializeObject(JsonDataValue);
|
return JsonConvert.SerializeObject(JsonDataValue);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue