jeremy 8 сар өмнө
parent
commit
87265a4d8b

+ 6 - 2
src/HealthExamBookingService/HealthExamBookingService.cs

@@ -527,14 +527,17 @@ public partial class HealthExamBookingService : JsonRpcService, IVitalHealthExam
     {
         var registerCode = request.RegisterCode;
         var registerInfo = await _registerInfoDBService.FindRegisterInfoByCodeAsync(registerCode);
-        if (registerInfo != null && registerInfo.JingQiExamInfos != null && registerInfo.JingQiExamInfos.Any())
+        if (registerInfo != null && registerInfo.JingQiExamInfos != null && registerInfo.JingQiExamInfos.Any()
+            && registerInfo.JingQiExamInfos.ContainsKey("PhyId") && !string.IsNullOrWhiteSpace(registerInfo.JingQiExamInfos["PhyId"]))
         {
             try
             {
                 var jingQiRes = await _vitalFacturyUserService.FacturyExamDeleteAsync(new FacturyExamDeleteRequest
                 {
                     Token = request.Token,
-                    PhyId = "",
+                    PhyId = registerInfo.JingQiExamInfos["PhyId"],
+                    Identity = registerInfo.IDCardNo,
+                    PatientName = registerInfo.Name,
                 });
                 if (jingQiRes.Status != "0")
                 {
@@ -564,6 +567,7 @@ public partial class HealthExamBookingService : JsonRpcService, IVitalHealthExam
                 {
                     Token = request.Token,
                     Identity = request.IDCardNo,
+                    PatientName = request.Name,
                 });
             }
             catch (Exception ex)

+ 15 - 7
src/VitalMixtureService/Factury/JingQiApiHelper.cs

@@ -59,16 +59,24 @@ namespace VitalService.Factury
             {
                 var res = await GetResult(url, request, headers);
                 Logger.WriteLineInfo($"VitalMixtureService JingQiApiHelper GetJingQiResult success, res:{res}");
-                var jingQiResult = JsonConvert.DeserializeObject<JingQiResult<TResult>>(res);
-                if (jingQiResult.status == "0")
+                if (!string.IsNullOrWhiteSpace(res))
                 {
-                    Logger.WriteLineInfo($"VitalMixtureService JingQiApiHelper GetJingQiResult success, ErroMsg:{jingQiResult.ErroMsg}");
+                    var jingQiResult = JsonConvert.DeserializeObject<JingQiResult<TResult>>(res);
+                    if (jingQiResult.status == "0")
+                    {
+                        Logger.WriteLineInfo($"VitalMixtureService JingQiApiHelper GetJingQiResult success, ErroMsg:{jingQiResult.ErroMsg}");
+                    }
+                    else
+                    {
+                        Logger.WriteLineError($"VitalMixtureService JingQiApiHelper GetJingQiResult failed, status:{jingQiResult.status}, ErroMsg:{jingQiResult.ErroMsg}");
+                    }
+                    return jingQiResult;
                 }
-                else
+                return new JingQiResult<TResult>
                 {
-                    Logger.WriteLineError($"VitalMixtureService JingQiApiHelper GetJingQiResult failed, status:{jingQiResult.status}, ErroMsg:{jingQiResult.ErroMsg}");
-                }
-                return jingQiResult;
+                    status = "error",
+                    ErroMsg = "",
+                };
             }
             catch (Exception ex)
             {

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

@@ -101,7 +101,7 @@ namespace VitalService.Service
                     IDCardNo = history.IDCardNo,
                     PatientName = history.PatientName,
                     Status = 1,
-                    // PostTime = request.PostTime,
+                    PostTime = DateTime.MinValue,
                     Headers = history.Headers,
                     Content = history.Content,
                     Result = history.Result,