修改稽查
parent
24d089b245
commit
ec80fb6429
|
@ -494,6 +494,8 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
|||
/// </summary>
|
||||
public Guid? BatchId { get; set; }
|
||||
|
||||
public Guid? GeneralId { get; set; }
|
||||
|
||||
public DateTime? RelationDeadlineTime { get; set; }
|
||||
|
||||
public Guid? ObjectRelationParentId { get; set; }
|
||||
|
|
|
@ -140,9 +140,18 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
|||
};
|
||||
|
||||
query = query.WhereIf(dto.SiteId != null, x => x.SiteId == dto.SiteId)
|
||||
.WhereIf(dto.RelationDeadlineTime != null, x => x.CreateTime <= dto.RelationDeadlineTime.Value.AddSeconds(1))
|
||||
.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.BatchId != null && dto.ObjectRelationParentId == null && dto.GeneralId == null, x => x.BatchId == dto.BatchId)
|
||||
.WhereIf(dto.BatchId != null && dto.GeneralId != null && dto.ObjectRelationParentId == null, x => x.BatchId == dto.BatchId || x.GeneralId == dto.GeneralId || x.ObjectRelationParentId== dto.GeneralId)
|
||||
//父稽查 查看关联子记录 x.ObjectRelationParentId== dto.GeneralId
|
||||
.WhereIf(dto.ObjectRelationParentId != null && dto.BatchId != null && dto.GeneralId != null,
|
||||
x => x.GeneralId == dto.ObjectRelationParentId || //子稽查 查询父记录
|
||||
x.GeneralId == dto.GeneralId || //同一对象
|
||||
x.BatchId == dto.BatchId || //同一事务批次
|
||||
x.ObjectRelationParentId == dto.GeneralId || //父稽查 查询子记录
|
||||
x.ObjectRelationParentId == dto.ObjectRelationParentId //不同对象 但是同一层级
|
||||
)
|
||||
.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)
|
||||
|
|
|
@ -129,7 +129,7 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// <summary>
|
||||
/// 通用Id
|
||||
/// </summary>
|
||||
public Guid GeneralId { get; set; }
|
||||
public Guid? GeneralId { get; set; }
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue