|
@@ -540,42 +540,36 @@ public partial class HealthExamBookingService : JsonRpcService, IVitalHealthExam
|
|
|
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 = registerInfo.JingQiExamInfos["PhyId"],
|
|
|
+ Identity = registerInfo.IDCardNo,
|
|
|
+ PatientName = registerInfo.Name,
|
|
|
+ });
|
|
|
+ if (jingQiRes.Status != "0")
|
|
|
{
|
|
|
- var jingQiRes = await _vitalFacturyUserService.FacturyExamDeleteAsync(new FacturyExamDeleteRequest
|
|
|
+ Logger.WriteLineError($"HealthExamBookingService DeleteRegiterInfoAsync failed, cardNo:{registerInfo.IDCardNo}, Status:{jingQiRes.Status}, ErroMsg:{jingQiRes.ErroMsg}");
|
|
|
+ if (jingQiRes.Status == "")
|
|
|
{
|
|
|
- Token = request.Token,
|
|
|
- PhyId = registerInfo.JingQiExamInfos["PhyId"],
|
|
|
- Identity = registerInfo.IDCardNo,
|
|
|
- PatientName = registerInfo.Name,
|
|
|
- });
|
|
|
- if (jingQiRes.Status != "0")
|
|
|
+ ThrowCustomerException(CustomerRpcCode.JingQiException, "JingQiException");
|
|
|
+ }
|
|
|
+ else if (jingQiRes.Status == "2")
|
|
|
{
|
|
|
- Logger.WriteLineError($"HealthExamBookingService DeleteRegiterInfoAsync failed, cardNo:{registerInfo.IDCardNo}, Status:{jingQiRes.Status}, ErroMsg:{jingQiRes.ErroMsg}");
|
|
|
- if (jingQiRes.Status == "")
|
|
|
- {
|
|
|
- ThrowCustomerException(CustomerRpcCode.JingQiException, "JingQiException");
|
|
|
- }
|
|
|
- else if (jingQiRes.Status == "2")
|
|
|
- {
|
|
|
- ThrowCustomerException(CustomerRpcCode.JingQiNonArea, "JingQiNonArea");
|
|
|
- }
|
|
|
- else if (jingQiRes.Status == "3")
|
|
|
- {
|
|
|
- ThrowCustomerException(CustomerRpcCode.JingQiExamedInYear, "JingQiExamedInYear");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ThrowCustomerException(CustomerRpcCode.JingQiApiFailed, jingQiRes.ErroMsg);
|
|
|
- }
|
|
|
+ ThrowCustomerException(CustomerRpcCode.JingQiNonArea, "JingQiNonArea");
|
|
|
+ }
|
|
|
+ else if (jingQiRes.Status == "3")
|
|
|
+ {
|
|
|
+ ThrowCustomerException(CustomerRpcCode.JingQiExamedInYear, "JingQiExamedInYear");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- Logger.WriteLineInfo($"HealthExamBookingService DeleteRegiterInfoAsync success, cardNo:{registerInfo.IDCardNo}, Status:{jingQiRes.Status}, ErroMsg:{jingQiRes.ErroMsg}");
|
|
|
+ ThrowCustomerException(CustomerRpcCode.JingQiApiFailed, jingQiRes.ErroMsg);
|
|
|
}
|
|
|
}
|
|
|
- catch (Exception ex)
|
|
|
+ else
|
|
|
{
|
|
|
+ Logger.WriteLineInfo($"HealthExamBookingService DeleteRegiterInfoAsync success, cardNo:{registerInfo.IDCardNo}, Status:{jingQiRes.Status}, ErroMsg:{jingQiRes.ErroMsg}");
|
|
|
}
|
|
|
}
|
|
|
return await _registerInfoDBService.DeleteRegisterInfoAsync(registerCode);
|