From 370e086f75ea792d9faeb2b8f23257ad22933316 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 24 Jun 2024 16:30:36 +0200 Subject: [PATCH] =?UTF-8?q?Todos=20f=C3=BCr=20V3.21,=20Modul=20Arbeitszeit?= =?UTF-8?q?erfassung=20serverseitig=20implementiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BeWo/AI/View/AiChatView.xaml.cs | 65 +++++++++++-- BeWo/BeWo.csproj | 7 +- BeWo/BeWo.csproj.user | 2 +- BeWo/BeWoApp.xaml.cs | 10 +- BeWo/Core/Config/AppSettings.cs | 4 +- BeWo/LoginControl.xaml.cs | 2 + BeWo/ServiceProxy/Generated.cs | 19 ++++ .../ServiceInvoiceCreatePopUpView.xaml | 7 +- .../ServiceInvoiceCreatePopUpView.xaml.cs | 29 ++++++ BeWo/View/Detail/CustomerView.xaml | 12 ++- BeWo/View/Detail/CustomerView.xaml.cs | 17 +++- BeWo/View/Detail/MandatorView.xaml.cs | 2 +- .../Zeiterfassung/ServiceRecordView2.xaml | 2 +- .../Zeiterfassung/ServiceRecordView2.xaml.cs | 9 +- .../Navigation/CustomerNavigationView.xaml | 1 + .../Navigation/CustomerNavigationView.xaml.cs | 15 ++- BeWo/View/Navigation/MainNavigationView.xaml | 1 + .../Navigation/MainNavigationView.xaml.cs | 25 +++++ BeWo/View/TwoFactorAuthMessageDialog.xaml.cs | 2 +- .../ListViewModel/ServiceRecordListVM.cs | 31 ++++++- BeWo/ViewModel/ServiceRecordVM.cs | 61 ++++++++++++ BeWo/app.config | 6 +- Host/Host.csproj.user | 28 +++++- .../MitarbeiterstundenkontoBerechnung.cs | 89 +++++++++++++++--- ...eiterstundenkontoBerechnungTagesansicht.cs | 1 + .../AssistenzstundenReport.Designer.cs | 93 +++++++++---------- .../PariSozial/AssistenzstundenReport.cs | 55 ++++------- ReportImp/PariSozial/PariSozial.csproj | 1 + .../QuittierungsbelegMitDatum.Designer.cs | 34 +++---- Service/Configuration/AppSettings.cs | 86 ++++++++++++----- Service/Import/Perseh/PersehReader.cs | 70 +++++++------- Service/Plugins/AiService.cs | 28 +++++- Service/Plugins/PluginLoader.cs | 8 +- Service/Plugins/TranslationDictionary.cs | 2 +- .../Security/SecurityContextInitializer.cs | 2 +- .../ServiceContracts/IOperationsService.cs | 8 ++ .../OperationsServiceImp.cs | 44 +++++++-- Shared/Core/SettingsKeys.cs | 3 +- .../Compact/ClientPartials/CompactPersonDC.cs | 34 ++++++- 39 files changed, 681 insertions(+), 234 deletions(-) diff --git a/BeWo/AI/View/AiChatView.xaml.cs b/BeWo/AI/View/AiChatView.xaml.cs index 344b919b3..535d21ed6 100644 --- a/BeWo/AI/View/AiChatView.xaml.cs +++ b/BeWo/AI/View/AiChatView.xaml.cs @@ -31,21 +31,41 @@ namespace BeWo.AI.View { public partial class AiChatView : BeWoView { - public event Action CloseButtonClicked; + + int type = 0; //0 = ServiceRecordQuery, 1 = SingleCustomerQuery, 2 = AllCustomerQuery + private long cb2scOid; + private long customerOid; + private TableID tableID; private DateTime startDate; private DateTime endDate; - public AiChatView(long c2sOid, DateTime start, DateTime end) + public AiChatView() { InitializeComponent(); + + } + + public void InitServiceRecordQuery(long c2sOid, DateTime start, DateTime end) + { + type = 0; this.cb2scOid = c2sOid; this.startDate = start; this.endDate = end; } - - + + public void InitSingleCustomerQuery(long customerOid) + { + type = 1; + this.customerOid = customerOid; + } + + public void InitObjectQuery(TableID tableId) + { + type = 2; + tableID = tableId; + } private void ReloadViewModel(AiChatDC dc) { @@ -57,14 +77,39 @@ namespace BeWo.AI.View var acdc = new AiChatDC(); acdc.Prompt = TextBoxAnfrage.Text; - ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForServiceRecords(acdc, cb2scOid, startDate, endDate), - dc => - { - this.Dispatch(delegate + if (type == 1) + { + ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForSingleCustomer(acdc, customerOid), + dc => { - ReloadViewModel(dc); + this.Dispatch(delegate + { + ReloadViewModel(dc); + }); }); - }); + } + else if (type == 2) + { + ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForObjects(acdc, (int)tableID), + dc => + { + this.Dispatch(delegate + { + ReloadViewModel(dc); + }); + }); + } + else + { + ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForServiceRecords(acdc, cb2scOid, startDate, endDate), + dc => + { + this.Dispatch(delegate + { + ReloadViewModel(dc); + }); + }); + } } private void btnClose_Click(object sender, RoutedEventArgs e) { diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index 79227a577..8e898f11b 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -39,16 +39,16 @@ false true false - https://app.ownsoft.de/ + https://app.ownsoft.de/test/ de-DE BeWoPlaner ownSoft GmbH - 2.0.1.240 + 2.0.1.242 true publish.htm false true - 241 + 243 2.0.1.%2a false true @@ -826,6 +826,7 @@ MSBuild:Compile Designer + AiChatView.xaml diff --git a/BeWo/BeWo.csproj.user b/BeWo/BeWo.csproj.user index 3eff8c8d2..5b9016668 100644 --- a/BeWo/BeWo.csproj.user +++ b/BeWo/BeWo.csproj.user @@ -2,7 +2,7 @@ D:\Projects\beyondsoft\BeWoPlaner\Publish\|publish\|D:\Projects\beyondsoft\BeWoPlaner\PublishTest\|D:\Projects\beyondsoft\BeWoPlaner\PublishDev\|D:\Projects\beyondsoft\BeWoPlaner\Publish45\ - https://app.ownsoft.de/|https://app.ownsoft.de/test/|https://app.ownsoft.de/dev/|http://app.ownsoft.de/dev/|http://app.beyondsoft.de/dev/ + https://app.ownsoft.de/test/|https://app.ownsoft.de/|https://app.ownsoft.de/dev/|http://app.ownsoft.de/dev/|http://app.beyondsoft.de/dev/ https://app.ownsoft.de/|https://app.ownsoft.de/bewoplaner.application/ diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index 072729246..761d0808d 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -50,7 +50,7 @@ namespace BeWo public static MainControl MainControl; public static string ShortVersion = "3.21"; - public static string Version = "Version 3.21"; + public static string Version = "Version 3.21 (GKV Test)"; public static int RenderTier = 0; @@ -368,10 +368,10 @@ namespace BeWo showDienstplanung = true; } - val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.Arbeitszeiterfassung); + val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowWorktime); if (val != null && val.Equals("1")) { - AppSettings.Arbeitszeiterfassung = true; + AppSettings.ShowWorktime = true; } val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.EnableArbeitszeiterfassung); if (val != null && val.Equals("1")) @@ -508,6 +508,9 @@ namespace BeWo val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowAI); AppSettings.ShowAI = val != null && val.Equals("1"); + val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowAIInternal); + AppSettings.ShowAIInternal = val != null && val.Equals("1"); + val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.MoKSessionTimeout); if(int.TryParse(val, out var sessionTimeout)) { @@ -592,6 +595,7 @@ namespace BeWo showHilfeplanBezeichnung = true; AppSettings.AllowStorno = true; AppSettings.ShowAI = true; + AppSettings.ShowAIInternal = true; //showInfoButtonInCalender = true; #endif diff --git a/BeWo/Core/Config/AppSettings.cs b/BeWo/Core/Config/AppSettings.cs index 8256fc352..3126d116d 100644 --- a/BeWo/Core/Config/AppSettings.cs +++ b/BeWo/Core/Config/AppSettings.cs @@ -425,7 +425,7 @@ namespace BeWo.Core.Config public bool DontShowSpitzabrechnung { get; set; } public bool ShowDienstplanung { get; set; } - public bool Arbeitszeiterfassung { get; set; } + public bool ShowWorktime { get; set; } public bool EnableArbeitszeiterfassung { get; set; } public bool EnableAutomaticPauses { get; set; } public bool EnableRestTimeWarning { get; set; } @@ -447,6 +447,8 @@ namespace BeWo.Core.Config public bool ShowAI { get; set; } + public bool ShowAIInternal { get; set; } + public bool AllowGkvAbrechnung { get; set; } public bool ShowImportAbschlagszahlungen { get; set; } diff --git a/BeWo/LoginControl.xaml.cs b/BeWo/LoginControl.xaml.cs index 39df78623..166e1bb66 100644 --- a/BeWo/LoginControl.xaml.cs +++ b/BeWo/LoginControl.xaml.cs @@ -924,6 +924,8 @@ namespace BeWo { if (result == UserValidationResult.UserValidTwoFactorAuthenticationNeeded) { + Translator t = new Translator(new MultiLanguage.ServiceTranslator()); + grid_root.Children.Remove(lWaitLayer); var dlg = new TwoFactorAuthMessageDialog(lUserName, lPassword); var message = Translator.Translate("Zwei Faktor Authentifizierung erforderlich"); diff --git a/BeWo/ServiceProxy/Generated.cs b/BeWo/ServiceProxy/Generated.cs index 00fc5a290..1a7b9c55a 100644 --- a/BeWo/ServiceProxy/Generated.cs +++ b/BeWo/ServiceProxy/Generated.cs @@ -5465,6 +5465,15 @@ namespace BeWo.ServiceProxy "t", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] BS.Shared.DataContracts.AiChatDC CreateAiQueryForServiceRecords(BS.Shared.DataContracts.AiChatDC acdc, long cb2scOid, System.DateTime startdate, System.DateTime enddate); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateAiQueryForSingleCustomer", ReplyAction="http://tempuri.org/IOperationsService/CreateAiQueryForSingleCustomerResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateAiQueryForSingleCustomerBeWoFaultFaul" + + "t", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + BS.Shared.DataContracts.AiChatDC CreateAiQueryForSingleCustomer(BS.Shared.DataContracts.AiChatDC acdc, long customerOid); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateAiQueryForObjects", ReplyAction="http://tempuri.org/IOperationsService/CreateAiQueryForObjectsResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateAiQueryForObjectsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + BS.Shared.DataContracts.AiChatDC CreateAiQueryForObjects(BS.Shared.DataContracts.AiChatDC acdc, long objectTid); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTable", ReplyAction="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTableRespons" + "e")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTableBeWoFau" + @@ -7475,6 +7484,16 @@ namespace BeWo.ServiceProxy return base.Channel.CreateAiQueryForServiceRecords(acdc, cb2scOid, startdate, enddate); } + public BS.Shared.DataContracts.AiChatDC CreateAiQueryForSingleCustomer(BS.Shared.DataContracts.AiChatDC acdc, long customerOid) + { + return base.Channel.CreateAiQueryForSingleCustomer(acdc, customerOid); + } + + public BS.Shared.DataContracts.AiChatDC CreateAiQueryForObjects(BS.Shared.DataContracts.AiChatDC acdc, long objectTid) + { + return base.Channel.CreateAiQueryForObjects(acdc, objectTid); + } + public void DeleteCertainDienstEintragOutOfTable(long dienstEintragOid) { base.Channel.DeleteCertainDienstEintragOutOfTable(dienstEintragOid); diff --git a/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml b/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml index 082070e1e..22c2af212 100644 --- a/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml +++ b/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml @@ -68,8 +68,11 @@ -