浏览代码

晶奇数据推送 中医体质、老年人自理能力评估

jeremy 8 月之前
父节点
当前提交
a47735bb2e

+ 18 - 3
src/VitalMixtureService/FrontService/Service/ExamService.cs

@@ -66,6 +66,21 @@ namespace VitalService.Service
             Logger.WriteLineInfo($"CreateExamAsync Mix Start, request: {JsonConvert.SerializeObject(request)}");
             if (!string.IsNullOrWhiteSpace(result) && !string.IsNullOrWhiteSpace(request.PhysicalExamNumber))
             {
+                try
+                {
+                    await CreateJingQiExamPostHistoryAsync(new CreateJingQiExamPostHistoryRequest
+                    {
+                        Token = request.Token,
+                        ExamKey = dbRequest.Key,
+                        PhysicalExamNumber = dbRequest.PhysicalExamNumber,
+                        ExamData = JsonConvert.DeserializeObject<Dictionary<string, string>>(request.ExamData),
+                        ExamTime = DateTime.UtcNow,
+                    });
+                }
+                catch (Exception ex)
+                {
+                    Logger.WriteLineWarn($"IVitalExamService CreateExamAsync CreateJingQiExamPostHistoryAsync error, ex:{ex}");
+                }
                 try
                 {
                     //更新登记信息
@@ -122,7 +137,7 @@ namespace VitalService.Service
                         }
                     }
                     if (request.Key == "HEIECG")
-                    { 
+                    {
                         if (!request.IsRemoteEcgExam)//如果是体检系统生成的。走这边,远程心电的不处理,不走这边
                         {
                             var userInfo = await _userDBService.GetUserDetailAsync(new GetUserDBRequest
@@ -134,8 +149,8 @@ namespace VitalService.Service
                             record.ExamData = request.ExamData;
                             record.ExamDoctor = userCode;
                             record.ExamState = ExamStateEnum.Inspected;
-                            record.DeviceCode =userInfo.EcgCode;//心电code                       
-                       
+                            record.DeviceCode = userInfo.EcgCode;//心电code                       
+
                             _vitalElectrocardiogramDBService.UpdateExamElectrocardiogramDBAsync(record);
                         }
                     }

+ 2 - 1
src/VitalMixtureService/FrontService/Service/FacturyPostHistoryService.cs

@@ -159,12 +159,13 @@ namespace VitalService.Service
                                     Content = rpcContent,
                                     Result = string.Empty,
                                 });
+                                return true;
                             }
                         }
                     }
                 }
             }
-            return true;
+            return false;
         }
 
         private void OnUpdateHistoryStatus(string code, bool success, DateTime postTime, string rpcResult)