修改稽查查询
parent
855df63891
commit
5b1d676bb9
|
@ -140,8 +140,8 @@ 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.RelationDeadlineTime != null, x => x.CreateTime <= dto.RelationDeadlineTime.Value.AddSeconds(1))
|
||||
.Where(x => (x.TrialId == dto.TrialId) || (x.TrialId == null && x.CreateTime >= trialData.CreateTime && x.CreateTime <= trialData.TrialFinishTime))
|
||||
.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.CreateTime <= dto.RelationDeadlineTime.Value.AddSeconds(1)))
|
||||
|
|
|
@ -570,19 +570,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
subjectVisit = subjectVisit ?? new SubjectVisit();
|
||||
if (type == "Add")
|
||||
{
|
||||
//await AddInspectionRecordAsync( new
|
||||
//{
|
||||
// QcQuestionAnswerCommands = await Getdata(entitylist),
|
||||
//},new InspectionConvertDTO()
|
||||
//{
|
||||
// SiteId = subjectVisit.SiteId,
|
||||
// Identification = $"{_userInfo.RequestUrl}/{firstEntity.GetType().Name}/{type}",
|
||||
// SubjectId = subjectVisit.SubjectId,
|
||||
// SubjectVisitName = subjectVisit.VisitName,
|
||||
// TrialId = subjectVisit.TrialId,
|
||||
// SubjectVisitId = subjectVisit.Id,
|
||||
// GeneralId = subjectVisit.Id,
|
||||
//});
|
||||
|
||||
|
||||
await InsertInspection(firstEntity, type, answer => new InspectionConvertDTO()
|
||||
{
|
||||
|
@ -618,19 +606,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
QcQuestionAnswerCommands = await Getdata(entitylist),
|
||||
});
|
||||
|
||||
//await AddInspectionRecordAsync( new
|
||||
//{
|
||||
// QcQuestionAnswerCommands = await Getdata(entitylist),
|
||||
//},new InspectionConvertDTO()
|
||||
//{
|
||||
// Identification = $"{_userInfo.RequestUrl}/{firstEntity.GetType().Name}/{type}",
|
||||
// SiteId = subjectVisit.SiteId,
|
||||
// SubjectId = subjectVisit.SubjectId,
|
||||
// TrialId = subjectVisit.TrialId,
|
||||
// SubjectVisitId = subjectVisit.Id,
|
||||
// SubjectVisitName = subjectVisit.VisitName,
|
||||
// GeneralId = subjectVisit.Id,
|
||||
//});
|
||||
|
||||
}
|
||||
|
||||
async Task<List<AnswerDto>> Getdata(List<TrialQCQuestionAnswer> questionAnswers)
|
||||
|
|
Loading…
Reference in New Issue