修改问题

This commit is contained in:
he
2022-04-20 13:16:01 +08:00
parent fa33be9718
commit ee0ead7017
13 changed files with 121 additions and 13 deletions
@@ -485,6 +485,11 @@
是否为特殊类型
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.FrontAuditConfigAddOrEdit.DateType">
<summary>
日期类型
</summary>
</member>
<member name="T:IRaCIS.Core.Application.ViewModel.SystemAnonymizationView">
<summary> SystemAnonymizationView 列表视图模型 </summary>
</member>
@@ -1508,7 +1513,7 @@
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.QCPassedOrFailed(System.Guid,System.Guid,System.Guid,IRaCIS.Core.Domain.Share.AuditStateEnum)">
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.QCPassedOrFailed(System.Guid,System.Guid,IRaCIS.Core.Domain.Share.AuditStateEnum)">
<summary>
设置QC 通过或者不通过 7:QC failed 8QC passed
</summary>
@@ -192,6 +192,13 @@ namespace IRaCIS.Core.Application.ViewModel
public bool? IsSpecialType { get; set; }
/// <summary>
/// 日期类型
/// </summary>
public string DateType { get; set; }
}
@@ -78,6 +78,7 @@ namespace IRaCIS.Core.Application.Service
ModuleTypeId = additem?.ModuleTypeId,
ObjectTypeId = additem?.ObjectTypeId,
OptTypeId = additem?.OptTypeId,
DateType = lst.Select(x => x.DateType).FirstOrDefault(),
Id =Guid.NewGuid(),
}).ToList();
@@ -188,6 +189,7 @@ namespace IRaCIS.Core.Application.Service
ChildDataLabel=data.ChildDataLabel,
ChildDataValue=data.ChildDataValue,
IsSpecialType=data.IsSpecialType,
DateType=data.DataType,
};
query = query
@@ -112,6 +112,8 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
public DateTime? CreateTime { get; set; }
public bool NeedSava { get; set; } = true;
}
@@ -187,7 +189,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
{
public Guid trialId { get; set; }
public Guid subjectVisitId { get; set; }
public Guid signId { get; set; }
public AuditStateEnum auditState { get; set; }
}
@@ -216,7 +216,11 @@ namespace IRaCIS.Core.Application.Service.Inspection
}
// 判断是否需要前面
await AddInspectionRecordAsync(AuditInfo, signId);
if (AuditInfo.NeedSava)
{
await AddInspectionRecordAsync(AuditInfo, signId);
}
return bResult;
}
@@ -282,7 +286,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
/// <param name="addDto">添加对象</param>
/// <param name="signId">签名Id</param>
/// <returns></returns>
public async Task<IResponseOutput> AddInspectionRecordAsync(DataInspectionAddDTO addDto, Guid? signId=null)
public async Task<IResponseOutput> AddInspectionRecordAsync(DataInspectionAddDTO addDto, Guid? signId = null)
{
if (addDto == new DataInspectionAddDTO())
{
@@ -292,15 +296,19 @@ namespace IRaCIS.Core.Application.Service.Inspection
var add = _mapper.Map<DataInspection>(addDto);
await SetInspectionNameValue(add);
Guid? parentId = null;
parentId = (await _repository.GetQueryable<DataInspection>().Where( x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId&&x.ChildrenType==add.ChildrenType && x.ObjectType==add.ObjectType&&x.VisitStageId==add.VisitStageId&&x.GeneralId==add.GeneralId).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id;
parentId = (await _repository.GetQueryable<DataInspection>().Where(x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId && x.ChildrenType == add.ChildrenType && x.ObjectType == add.ObjectType && x.VisitStageId == add.VisitStageId && x.GeneralId == add.GeneralId).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id;
add.ParentId = parentId;
add.CreateTime = DateTime.Now;
add.CreateUserId = _userInfo.Id;
add.SignId = signId;
add.IP = _userInfo.IP;
add =await _dataInspectionRepository.SetDataInspectionDateType(add);
await _repository.AddAsync(add);
var success = await _repository.SaveChangesAsync();
return ResponseOutput.Ok(success);
@@ -12,7 +12,7 @@ namespace IRaCIS.Core.Application.Image.QA
{
Task<IResponseOutput> CheckBack(Guid subjectVisitId);
Task<IResponseOutput> SetNeedReupload(Guid trialId, Guid qcChallengeId);
Task<IResponseOutput> QCPassedOrFailed(Guid trialId, Guid subjectVisitId, Guid signId, [FromRoute] AuditStateEnum auditState);
Task<IResponseOutput> QCPassedOrFailed(Guid trialId, Guid subjectVisitId, [FromRoute] AuditStateEnum auditState);
Task<IResponseOutput> SetCheckPass(Guid subjectVisitId);
@@ -1382,7 +1382,7 @@ namespace IRaCIS.Core.Application.Image.QA
[HttpPost("{trialId:guid}/{subjectVisitId:guid}/{signId:guid}/{auditState:int}")]
[TypeFilter(typeof(TrialResourceFilter))]
public async Task<IResponseOutput> QCPassedOrFailed(Guid trialId, Guid subjectVisitId, Guid signId, [FromRoute] AuditStateEnum auditState)
public async Task<IResponseOutput> QCPassedOrFailed(Guid trialId, Guid subjectVisitId, [FromRoute] AuditStateEnum auditState)
{
if (!await _repository.AnyAsync<TrialUser>(t => t.TrialId == trialId && t.UserId == _userInfo.Id))
@@ -1546,9 +1546,9 @@ namespace IRaCIS.Core.Application.Image.QA
await _repository.SaveChangesAsync();
var success = await _repository.BatchUpdateAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
//var success = await _repository.BatchUpdateAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
return ResponseOutput.Result(success);
return ResponseOutput.Result(true);
}
@@ -27,3 +27,5 @@ public class SignDTO
}