修改中心调研拷贝数据逻辑错误

Uat_Study
hang 2023-08-17 15:59:11 +08:00
parent 585b665b53
commit d575d8ac73
1 changed files with 7 additions and 3 deletions

View File

@ -331,9 +331,13 @@ namespace IRaCIS.Core.Application.Contracts
copy.TrialSiteEquipmentSurveyList = currentLatest.TrialSiteEquipmentSurveyList.Clone(); copy.TrialSiteEquipmentSurveyList = currentLatest.TrialSiteEquipmentSurveyList.Clone();
copy.TrialSiteEquipmentSurveyList.ForEach(t => { t.Id = Guid.Empty; t.CreateTime = DateTime.Now; }); copy.TrialSiteEquipmentSurveyList.ForEach(t => { t.Id = Guid.Empty; t.CreateTime = DateTime.Now; });
copy.TrialSiteUserSurveyList = currentLatest.TrialSiteUserSurveyList.Clone().Where(t => t.IsHistoryUser == false).ToList(); //锁定了的话,就不拷贝
copy.TrialSiteUserSurveyList.ForEach(t => { t.Id = Guid.Empty; t.IsGenerateSuccess = false; t.CreateTime = DateTime.Now; }); if(currentLatest.State!= TrialSiteSurveyEnum.PMCreatedAndLock)
{
copy.TrialSiteUserSurveyList = currentLatest.TrialSiteUserSurveyList.Clone().Where(t => t.IsHistoryUser == false).ToList();
copy.TrialSiteUserSurveyList.ForEach(t => { t.Id = Guid.Empty; t.IsGenerateSuccess = false; t.CreateTime = DateTime.Now; });
}
//从项目site 中找到已存在的 加到历史人员中 //从项目site 中找到已存在的 加到历史人员中