Przeglądaj źródła

Merge branch 'master' of http://git.ius.plus:88/Project-Wing/WingMongoDBModule

denny 8 miesięcy temu
rodzic
commit
cde104d963

+ 3 - 2
src/Service/DatabaseService.cs

@@ -1680,7 +1680,7 @@ namespace WingMongoDBModule.Service
                     await _reportTemplateDBRepository.InsertOneAsync(reportTemplateU, new Dictionary<string, string>(), string.Empty, false);
                 }
             }
-            
+
             var reportTemplate = new ReportTemplateDO();
             reportTemplate.Code = "38ab39f05188433a820527997f064a310b3d";
             reportTemplate.ReportTemplateName = "HEIECG(Vertical)";
@@ -1698,7 +1698,7 @@ namespace WingMongoDBModule.Service
             {
                 await _reportTemplateDBRepository.InsertOneAsync(reportTemplate, new Dictionary<string, string>(), string.Empty, false);
             }
-        
+
             reportTemplate = new ReportTemplateDO();
             reportTemplate.Code = "38ab39f05186daca820527997f064a310b3f";
             reportTemplate.ReportTemplateName = "HEIECG(Horizontal)";
@@ -3140,6 +3140,7 @@ namespace WingMongoDBModule.Service
                         process.StartInfo.Arguments = paramsValue;
                         process.StartInfo.RedirectStandardOutput = true; //重定向输出,
                         process.StartInfo.RedirectStandardError = true;
+                        process.StartInfo.UseShellExecute = false;
                         process.Start();
                     }
                 }

+ 30 - 7
src/Service/ResearchProjectDBService.cs

@@ -171,14 +171,33 @@ namespace WingMongoDBModule.Service
                 {
                     dataInfo.UpdateTime = DateTime.UtcNow;
                     dataInfo.OperateTime = DateTime.UtcNow;
-                    dataInfo.OperatorCode = request.BelongUserCode;
-                    dataInfo.OperatorName = request.CreatorName;
-                    dataInfo.BelongUserCode = request.BelongUserCode;
-                    dataInfo.CreatorName = request.CreatorName;
+                    dataInfo.OperatorCode = dataInfo.OperatorCode;
+                    dataInfo.OperatorName = dataInfo.OperatorName;
+                    dataInfo.BelongUserCode = dataInfo.BelongUserCode;
+                    dataInfo.CreatorName = dataInfo.CreatorName;
                     dataInfo.PatientType = request.PatientType;
                     dataInfo.Name = request.Name;
                     dataInfo.Introduction = request.Introduction;
                     res = await _researchProjectDBRepository.UpdateOneAsync("Code", dataInfo.Code, dataInfo);
+                    //时间轴
+                    var task = new TaskEntity()
+                    {
+                        BusinessId = "",
+                        TaskName = "",
+                        MainTaskCode = "",
+                        Description = "",
+                        CreatorName = dataInfo.CreatorName,
+                        OperatorCode = dataInfo.BelongUserCode,
+                        OperatorName = dataInfo.CreatorName,
+                        OperateTime = DateTime.UtcNow,
+                        Status = VTaskStatus.Completed,
+                        TaskType = VTaskType.ProjectUpdate,
+                        CreateTime = DateTime.UtcNow,
+                        UpdateTime = DateTime.UtcNow,
+                        BusinessCode = dataInfo.Code,
+                    };
+                    await _taskDBRepository.InsertOneAsync(task);
+
                 }
                 return res;
             }
@@ -956,9 +975,9 @@ namespace WingMongoDBModule.Service
                 deviceUploadTimeAxisDetail.DataJson = JsonConvert.SerializeObject(deviceUploadTimeAxisJson);
                 list.Add(deviceUploadTimeAxisDetail);
             }
-            //邀请用户、移除用户、删除样本、删除检查
+            //邀请用户、移除用户、删除样本、删除检查、修改项目
             var tasks = await GetTaskListByBusinessCodeDBAsync(projectCode);
-            var userTasks = tasks.Where(x => x.TaskType == VTaskType.InviteUser || x.TaskType == VTaskType.RemoveUser || x.TaskType == VTaskType.DeleteRecord || x.TaskType == VTaskType.DeleteSample);
+            var userTasks = tasks.Where(x => x.TaskType == VTaskType.InviteUser || x.TaskType == VTaskType.RemoveUser || x.TaskType == VTaskType.DeleteRecord || x.TaskType == VTaskType.DeleteSample || x.TaskType == VTaskType.ProjectUpdate);
             foreach (var item in userTasks)
             {
                 var userTimeAxisDetail = new TimeAxisDetail();
@@ -980,12 +999,16 @@ namespace WingMongoDBModule.Service
                 {
                     userTimeAxisDetail.TimeAxisType = TimeAxisDetailEnum.DeleteRecord;
                 }
+                else if(item.TaskType == VTaskType.ProjectUpdate)
+                {
+                    userTimeAxisDetail.TimeAxisType = TimeAxisDetailEnum.ProjectUpdate;
+                }
                 if (userTimeAxisDetail.TimeAxisType == TimeAxisDetailEnum.InviteUser || userTimeAxisDetail.TimeAxisType == TimeAxisDetailEnum.RemoveUser)
                 {
                     var userCodes = item.JsonData.Split(',').ToList();
                     var users = await FindUsersByUserCodesAsync(userCodes);
                     var inviteUserTimeAxisJsons = new List<InviteUserTimeAxisJson>();
-                    if (users != null && users.Count > 0)
+                    if (users != null && users.Count() > 0)
                     {
                         foreach (var user in users)
                         {