diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 8bdff8f28..a51a1c849 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -2388,6 +2388,11 @@
依赖父问题
+
+
+ 系统标准Id
+
+
PageName
@@ -3089,13 +3094,6 @@
-
-
- 获取项目勾选器官信息
-
-
-
-
同步系统器官到项目
@@ -3630,35 +3628,50 @@
CriterionNidusAddOrEdit 列表查询参数模型
+
+
+ 病灶类型
+
+
OrganInfoView 列表视图模型
+
+
+ 部位
+
+
+
+
+ TULOC
+
+
+
+
+ 位置
+
+
备注
-
+
+
+ 是否是淋巴结
+
+
+
病灶类型
-
+
病灶类型
-
-
- 是否关联
-
-
-
-
- 病灶类型
-
-
-
+
病灶类型
@@ -3668,9 +3681,19 @@
备注
+
+
+ 是否是淋巴结
+
+
OrganInfoQuery 列表查询参数模型
+
+
+ 病灶类型
+
+
OrganInfoAddOrEdit 列表查询参数模型
@@ -3684,12 +3707,12 @@
是否是淋巴结
-
+
- 标准 病灶类型
+ 病灶类型
-
+
标准 病灶类型
@@ -6700,6 +6723,13 @@
阅片问题.标准
+
+
+ 赋值一个系统标准到另一系统标准
+
+
+
+
获取获取系统阅片标准下拉
diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs
index 5ca96c5c9..f96bb5c47 100644
--- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs
+++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs
@@ -23,26 +23,28 @@ namespace IRaCIS.Core.Application.Service.Inspection
this._frontAuditConfigRepository = frontAuditConfigRepository;
}
-
+
public async Task> GetInspectionList(GetDataInspectionDto dto)
{
//_repository.GetQueryable.GetQueryable < DataInspection >
- var trialData= await _repository.GetQueryable().Where(x=>x.Id== dto.TrialId).AsNoTracking().FirstOrDefaultAsync();
+ var trialData = await _repository.GetQueryable().Where(x => x.Id == dto.TrialId).AsNoTracking().FirstOrDefaultAsync();
trialData.TrialFinishTime = trialData.TrialFinishTime == null ? DateTime.Now : trialData.TrialFinishTime;
#region 逻辑代码
- var query = from data in _repository.GetQueryable().Where(x => (x.TrialId == dto.TrialId)||(x.TrialId==null&&x.CreateTime>= trialData.CreateTime && x.CreateTime <= trialData.TrialFinishTime))
+ var query = from data in _repository.GetQueryable()
+ //.Where(x => (x.TrialId == dto.TrialId)||(x.TrialId==null&&x.CreateTime>= trialData.CreateTime && x.CreateTime <= trialData.TrialFinishTime))
+
join trial in _repository.GetQueryable().IgnoreQueryFilters() on data.TrialId equals trial.Id into trialtemp
from leftrial in trialtemp.DefaultIfEmpty()
join site in _repository.GetQueryable().IgnoreQueryFilters() on data.SiteId equals site.Id into sitetemp
from leftsite in sitetemp.DefaultIfEmpty()
- join trialSite in _repository.GetQueryable().IgnoreQueryFilters() on new { SiteId = leftsite.Id, Trialid= leftrial.Id } equals new { SiteId = trialSite.SiteId , Trialid = trialSite.TrialId } into trialSitetemp
+ join trialSite in _repository.GetQueryable().IgnoreQueryFilters() on new { SiteId = leftsite.Id, Trialid = leftrial.Id } equals new { SiteId = trialSite.SiteId, Trialid = trialSite.TrialId } into trialSitetemp
from lefttrialSite in trialSitetemp.DefaultIfEmpty()
@@ -75,9 +77,9 @@ namespace IRaCIS.Core.Application.Service.Inspection
join trialSign in _repository.GetQueryable().IgnoreQueryFilters() on data.SignId equals trialSign.Id into trialSigntemp
from lefttrialSign in trialSigntemp.DefaultIfEmpty()
- join leftfrontAuditConfig in _repository.GetQueryable().Where(x=>x.ConfigType=="M"&&x.Identification!=null&&x.IsEnable==true) on
+ join leftfrontAuditConfig in _repository.GetQueryable().Where(x => x.ConfigType == "M" && x.Identification != null && x.IsEnable == true) on
data.Identification.ToLower()
- equals
+ equals
leftfrontAuditConfig.Identification.ToLower()
join moduleTypec in _repository.GetQueryable() on new { ModuleType = leftfrontAuditConfig.ModuleTypeId.Value } equals new { ModuleType = moduleTypec.Id } into moduleTypectemp
from leftmoduleTypec in moduleTypectemp.DefaultIfEmpty()
@@ -113,37 +115,40 @@ namespace IRaCIS.Core.Application.Service.Inspection
UserFirstName = leftuser.FirstName,
UserLastName = leftuser.LastName,
//SubjectCode=leftsubject.Code,
- SubjectCode =leftsubject.Code,
- SubjectVisitName=leftsubjectVisit.VisitName,
+ SubjectCode = leftsubject.Code,
+ SubjectVisitName = leftsubjectVisit.VisitName,
CreateUserName = leftuser.FirstName + leftuser.LastName,
- RoleName= leftusertype.UserTypeShortName,
- TrialName= leftrial.ExperimentName,
- SiteCode= lefttrialSite.TrialSiteCode,
- ResearchProgramNo= leftrial.ResearchProgramNo,
- ObjectTypeId=data.ObjectTypeId,
- Description=leftfrontAuditConfig.Description,
- ModuleTypeName= leftmoduleTypec.ValueCN,
- SignText= lefttrialSign.SignText,
- Identification= leftfrontAuditConfig.Identification,
- FrontAuditConfigId= leftfrontAuditConfig.Id,
+ RoleName = leftusertype.UserTypeShortName,
+ TrialName = leftrial.ExperimentName,
+ SiteCode = lefttrialSite.TrialSiteCode,
+ ResearchProgramNo = leftrial.ResearchProgramNo,
+ ObjectTypeId = data.ObjectTypeId,
+ Description = leftfrontAuditConfig.Description,
+ ModuleTypeName = leftmoduleTypec.ValueCN,
+ SignText = lefttrialSign.SignText,
+ Identification = leftfrontAuditConfig.Identification,
+ FrontAuditConfigId = leftfrontAuditConfig.Id,
ParentIdentification = leftparent.Identification,
OptTypeId = leftOptType.Id,
- VisitNum=leftsubjectVisit.VisitNum,
- InPlan= leftsubjectVisit.InPlan,
+ VisitNum = leftsubjectVisit.VisitNum,
+ InPlan = leftsubjectVisit.InPlan,
//IsFrontAdd=data.IsFrontAdd,
- BatchId =data.BatchId,
+ BatchId = data.BatchId,
OptType = leftOptType.Value,
+ ObjectRelationParentId = data.ObjectRelationParentId,
+ GeneralId=data.GeneralId
};
query = query.WhereIf(dto.SiteId != null, x => x.SiteId == dto.SiteId)
- //.WhereIf(dto.BatchId != null, x => x.BatchId == dto.BatchId)
- .WhereIf(dto.ObjectRelationParentId != null && dto.BatchId!=null && dto.RelationDeadlineTime!=null, x => (x.ObjectRelationParentId == dto.ObjectRelationParentId && x.CreateTime<= dto.RelationDeadlineTime) ||x.BatchId==dto.BatchId )
+ .WhereIf(dto.TrialId != null, t => (t.TrialId == dto.TrialId) || (t.CreateTime >= trialData.CreateTime && t.CreateTime <= trialData.TrialFinishTime))
+ .WhereIf(dto.BatchId != null && dto.ObjectRelationParentId == null, x => x.BatchId == dto.BatchId)
+ .WhereIf(dto.ObjectRelationParentId != null && dto.BatchId != null && dto.RelationDeadlineTime != null, x =>( x.GeneralId == dto.ObjectRelationParentId &&x.CreateTime <=dto.RelationDeadlineTime)||x.BatchId==dto.BatchId)
.WhereIf(!dto.SubjectInfo.IsNullOrEmpty(), x => x.SubjectCode.Contains(dto.SubjectInfo))
//.WhereIf(dto.VisitPlanInfo != null&& dto.VisitPlanInfo!=(decimal) 1.11, x => x.VisitNum == dto.VisitPlanInfo)
//.WhereIf(dto.VisitPlanInfo != (decimal)1.11,x=>x.InPlan!=null&& x.InPlan==false)
.WhereIf(dto.StartTime != null, x => x.CreateTime >= dto.StartTime)
.WhereIf(dto.EndTime != null, x => x.CreateTime <= dto.EndTime)
- .WhereIf(dto.ModuleType!=null, x => x.ModuleTypeId == dto.ModuleType)
+ .WhereIf(dto.ModuleType != null, x => x.ModuleTypeId == dto.ModuleType)
.WhereIf(!dto.Description.IsNullOrEmpty(), x => x.Description == dto.Description)
.WhereIf(!dto.OpByUserName.IsNullOrEmpty(), x => x.CreateUserName.Contains(dto.OpByUserName))
//.WhereIf(!dto.SubjectInfo.IsNullOrEmpty(), x => x.SubjectCode.Contains(dto.SubjectInfo))
@@ -152,11 +157,12 @@ namespace IRaCIS.Core.Application.Service.Inspection
if (dto.VisitPlanInfo != null && dto.VisitPlanInfo.Value != (decimal)1.11)
{
query = query.Where(x => x.VisitNum == dto.VisitPlanInfo.Value);
- } else if (dto.VisitPlanInfo != null)
+ }
+ else if (dto.VisitPlanInfo != null)
{
query = query.Where(x => x.InPlan == false);
}
- return await query.ToPagedListAsync(dto.PageIndex, dto.PageSize, dto.SortField.IsNullOrEmpty()?nameof(GetDataInspectionOutDto.CreateTime): dto.SortField, dto.Asc);
+ return await query.ToPagedListAsync(dto.PageIndex, dto.PageSize, dto.SortField.IsNullOrEmpty() ? nameof(GetDataInspectionOutDto.CreateTime) : dto.SortField, dto.Asc);
}
@@ -180,7 +186,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
{
return default(Guid);
}
-
+
}
///
@@ -225,7 +231,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
return add.Id;
}
-
-
+
+
}
}
diff --git a/IRaCIS.Core.Domain/Trial/DataInspection.cs b/IRaCIS.Core.Domain/Trial/DataInspection.cs
index 8370f875d..40c26cd8a 100644
--- a/IRaCIS.Core.Domain/Trial/DataInspection.cs
+++ b/IRaCIS.Core.Domain/Trial/DataInspection.cs
@@ -129,7 +129,7 @@ namespace IRaCIS.Core.Domain.Models
///
/// 通用Id
///
- public Guid? GeneralId { get; set; }
+ public Guid GeneralId { get; set; }