diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.xml b/IRaCIS.Core.API/IRaCIS.Core.API.xml
index 7d572d56b..dac513ac8 100644
--- a/IRaCIS.Core.API/IRaCIS.Core.API.xml
+++ b/IRaCIS.Core.API/IRaCIS.Core.API.xml
@@ -58,6 +58,13 @@
+
+
+ 手动领取 或者取消 QC任务
+
+
+
+
疾病进展确认评估
diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs
index 84fa40745..99ff2727b 100644
--- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs
+++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs
@@ -20,10 +20,14 @@ namespace IRaCIS.Core.Application.Service.Inspection
public class InspectionService : BaseService, IInspectionService
{
private readonly IRepository _dataInspectionRepository;
+ private readonly IRepository _frontAuditConfigRepository;
- public InspectionService(IRepository dataInspectionRepository)
+ public InspectionService(IRepository dataInspectionRepository,
+ IRepository frontAuditConfigRepository
+ )
{
this._dataInspectionRepository = dataInspectionRepository;
+ this._frontAuditConfigRepository = frontAuditConfigRepository;
}
public async Task> GetInspectionData(GetDataInspectionDto dto)
{
@@ -282,6 +286,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
}
await SetEnum(addDto);
var add = _mapper.Map(addDto);
+ await SetInspectionNameValue(add);
Guid? parentId = null;
parentId = (await _repository.GetQueryable().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;
@@ -289,18 +294,9 @@ namespace IRaCIS.Core.Application.Service.Inspection
add.CreateUserId = _userInfo.Id;
add.SignId = signId;
add.IP = _userInfo.IP;
- await SetInspectionNameValue(add);
+
await _repository.AddAsync(add);
- //if (addDto.OptType.ToLower() == "Add".ToLower()&& Statusdata!=null)
- //{
- // DataInspection ststus=JsonConvert.DeserializeObject(JsonConvert.SerializeObject(add))??new DataInspection();
- // ststus.CreateTime = add.CreateTime.AddSeconds(1);
- // ststus.JsonDetail = JsonConvert.SerializeObject(Statusdata);
- // ststus.ChildrenType = "Status";
- // ststus.OptType = "Init";
- // ststus.Id = Guid.NewGuid();
- // await _repository.AddAsync(ststus);
- //}
+
var success = await _repository.SaveChangesAsync();
return ResponseOutput.Ok(success);
@@ -324,10 +320,11 @@ namespace IRaCIS.Core.Application.Service.Inspection
foreach (var add in datas)
{
+ await SetInspectionNameValue(add);
add.ParentId = (await _repository.GetQueryable().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.CreateUserId = _userInfo.Id;
add.IP = _userInfo.IP;
- await SetInspectionNameValue(add);
+
}
await _dataInspectionRepository.AddRangeAsync(datas);
@@ -486,7 +483,6 @@ namespace IRaCIS.Core.Application.Service.Inspection
}
#endregion
-
#region 测试中心名称
@@ -546,7 +542,14 @@ namespace IRaCIS.Core.Application.Service.Inspection
}
#endregion
-
+ #region 取操作类型
+ var from =await _frontAuditConfigRepository.FirstOrDefaultAsync(x => x.Identification == Data.Identification);
+ Data.ObjectType = from.ObjectTypeId;
+ Data.OptType = from.OptTypeId;
+ Data.ChildrenType = from.ChildrenTypeId;
+ Data.ModuleType = from.ModuleTypeId;
+
+ #endregion
}