|
@@ -525,7 +525,23 @@ public partial class HealthExamBookingService : JsonRpcService, IVitalHealthExam
|
|
|
/// <returns></returns>
|
|
|
public async Task<bool> DeleteRegiterInfoAsync(DeleteRegiterInfoRequest request)
|
|
|
{
|
|
|
- return true;
|
|
|
+ var registerCode = request.RegisterCode;
|
|
|
+ var registerInfo = await _registerInfoDBService.FindRegisterInfoByCodeAsync(registerCode);
|
|
|
+ if (registerInfo != null && registerInfo.JingQiExamInfos != null && registerInfo.JingQiExamInfos.Any())
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var jingQiRes = await _vitalFacturyUserService.FacturyExamDeleteAsync(new FacturyExamDeleteRequest
|
|
|
+ {
|
|
|
+ Token = request.Token,
|
|
|
+ PhyId = "",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return await _registerInfoDBService.DeleteRegisterInfoAsync(registerCode);
|
|
|
}
|
|
|
|
|
|
private async Task<Dictionary<string, string>> JingQiExamRegisterAsync(AddRegiterInfoRequest request)
|
|
@@ -533,15 +549,34 @@ public partial class HealthExamBookingService : JsonRpcService, IVitalHealthExam
|
|
|
var jingQiExamInfos = new Dictionary<string, string>();
|
|
|
if (await IsJingQiRequiredAsync(request))
|
|
|
{
|
|
|
- var jingQiRes = await _vitalFacturyUserService.FacturyExamRegisterAsync(new FacturyExamRegisterRequest
|
|
|
+ FacturyExamRegisterResult jingQiRes = null;
|
|
|
+ try
|
|
|
{
|
|
|
- Token = request.Token,
|
|
|
- Identity = request.IDCardNo,
|
|
|
- });
|
|
|
+ jingQiRes = await _vitalFacturyUserService.FacturyExamRegisterAsync(new FacturyExamRegisterRequest
|
|
|
+ {
|
|
|
+ Token = request.Token,
|
|
|
+ Identity = request.IDCardNo,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ return jingQiExamInfos;
|
|
|
+ }
|
|
|
if (jingQiRes.Status != "0")
|
|
|
{
|
|
|
Logger.WriteLineError($"HealthExamBookingService JingQiExamRegisterAsync failed, cardNo:{request.IDCardNo}, Status:{jingQiRes.Status}, ErroMsg:{jingQiRes.ErroMsg}");
|
|
|
- ThrowCustomerException(CustomerRpcCode.JingQiApiFailed, jingQiRes.ErroMsg);
|
|
|
+ if (jingQiRes.Status == "2")
|
|
|
+ {
|
|
|
+ ThrowCustomerException(CustomerRpcCode.JingQiNonArea, "JingQiNonArea");
|
|
|
+ }
|
|
|
+ else if (jingQiRes.Status == "3")
|
|
|
+ {
|
|
|
+ ThrowCustomerException(CustomerRpcCode.JingQiExamedInYear, "JingQiExamedInYear");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ThrowCustomerException(CustomerRpcCode.JingQiApiFailed, jingQiRes.ErroMsg);
|
|
|
+ }
|
|
|
}
|
|
|
PropertyInfo[] properties = typeof(FacturyExamRegisterResult).GetProperties();
|
|
|
foreach (PropertyInfo property in properties)
|