From ea08476354aa1bc2b8fc314142c05eb8d6283b1f Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Mon, 4 Nov 2024 09:29:00 +0100 Subject: [PATCH] Erneute Senden --- Host/GkvAbrechnungClient.aspx.cs | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Host/GkvAbrechnungClient.aspx.cs b/Host/GkvAbrechnungClient.aspx.cs index 3d408bc52..7e1ed695d 100644 --- a/Host/GkvAbrechnungClient.aspx.cs +++ b/Host/GkvAbrechnungClient.aspx.cs @@ -1,5 +1,6 @@ using BeWo.Data.Access; using BeWo.Data.Entities; +using BeWo.Service.ServiceImplementations; using BS.Shared; using BS.Shared.AppSender; using BS.Shared.DataContracts.GkvAbrechnung; @@ -78,7 +79,29 @@ namespace Host { HandleResult(result); } - + + var follows = req.ResultDCs.Where(x => x.ResultType == GkvTransferResultType.FailFollowUp); + + if (follows.Any()) + { + var service = new AccountingServiceImp(); + foreach (var follow in follows) + { + var protokoll_oid = follow.ProtokollOid; + var protokoll = DAOFactory.GenericDAO.LoadByID(protokoll_oid); + var abrechnung_oid = protokoll.GkvAbrechnungOid; + + var new_req = new GkvAbrechnungSendRequestDC() { + GkvAbrechnungOid = abrechnung_oid + }; + + var res = service.SendNewGkvAbrechnung(new_req); + + if (!res.Success) + throw new GkvException(res.Message); + } + } + response.Success = true; } catch (GkvException e)