Todos für V3.21, Modul Arbeitszeiterfassung serverseitig implementiert

This commit is contained in:
Christian
2024-06-24 16:30:36 +02:00
parent c3b6a1e9c0
commit 370e086f75
39 changed files with 681 additions and 234 deletions

View File

@@ -31,21 +31,41 @@ namespace BeWo.AI.View
{ {
public partial class AiChatView : BeWoView public partial class AiChatView : BeWoView
{ {
public event Action CloseButtonClicked; public event Action CloseButtonClicked;
int type = 0; //0 = ServiceRecordQuery, 1 = SingleCustomerQuery, 2 = AllCustomerQuery
private long cb2scOid; private long cb2scOid;
private long customerOid;
private TableID tableID;
private DateTime startDate; private DateTime startDate;
private DateTime endDate; private DateTime endDate;
public AiChatView(long c2sOid, DateTime start, DateTime end) public AiChatView()
{ {
InitializeComponent(); InitializeComponent();
}
public void InitServiceRecordQuery(long c2sOid, DateTime start, DateTime end)
{
type = 0;
this.cb2scOid = c2sOid; this.cb2scOid = c2sOid;
this.startDate = start; this.startDate = start;
this.endDate = end; 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) private void ReloadViewModel(AiChatDC dc)
{ {
@@ -57,14 +77,39 @@ namespace BeWo.AI.View
var acdc = new AiChatDC(); var acdc = new AiChatDC();
acdc.Prompt = TextBoxAnfrage.Text; acdc.Prompt = TextBoxAnfrage.Text;
ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForServiceRecords(acdc, cb2scOid, startDate, endDate), if (type == 1)
dc => {
{ ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForSingleCustomer(acdc, customerOid),
this.Dispatch(delegate 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) private void btnClose_Click(object sender, RoutedEventArgs e)
{ {

View File

@@ -39,16 +39,16 @@
<UpdatePeriodically>false</UpdatePeriodically> <UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>true</UpdateRequired> <UpdateRequired>true</UpdateRequired>
<MapFileExtensions>false</MapFileExtensions> <MapFileExtensions>false</MapFileExtensions>
<InstallUrl>https://app.ownsoft.de/</InstallUrl> <InstallUrl>https://app.ownsoft.de/test/</InstallUrl>
<TargetCulture>de-DE</TargetCulture> <TargetCulture>de-DE</TargetCulture>
<ProductName>BeWoPlaner</ProductName> <ProductName>BeWoPlaner</ProductName>
<PublisherName>ownSoft GmbH</PublisherName> <PublisherName>ownSoft GmbH</PublisherName>
<MinimumRequiredVersion>2.0.1.240</MinimumRequiredVersion> <MinimumRequiredVersion>2.0.1.242</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish> <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage> <WebPage>publish.htm</WebPage>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish> <OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<TrustUrlParameters>true</TrustUrlParameters> <TrustUrlParameters>true</TrustUrlParameters>
<ApplicationRevision>241</ApplicationRevision> <ApplicationRevision>243</ApplicationRevision>
<ApplicationVersion>2.0.1.%2a</ApplicationVersion> <ApplicationVersion>2.0.1.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
@@ -826,6 +826,7 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Compile Include="AI\AiChatController.cs" />
<Compile Include="AI\View\AiChatView.xaml.cs"> <Compile Include="AI\View\AiChatView.xaml.cs">
<DependentUpon>AiChatView.xaml</DependentUpon> <DependentUpon>AiChatView.xaml</DependentUpon>
</Compile> </Compile>

View File

@@ -2,7 +2,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<PublishUrlHistory>D:\Projects\beyondsoft\BeWoPlaner\Publish\|publish\|D:\Projects\beyondsoft\BeWoPlaner\PublishTest\|D:\Projects\beyondsoft\BeWoPlaner\PublishDev\|D:\Projects\beyondsoft\BeWoPlaner\Publish45\</PublishUrlHistory> <PublishUrlHistory>D:\Projects\beyondsoft\BeWoPlaner\Publish\|publish\|D:\Projects\beyondsoft\BeWoPlaner\PublishTest\|D:\Projects\beyondsoft\BeWoPlaner\PublishDev\|D:\Projects\beyondsoft\BeWoPlaner\Publish45\</PublishUrlHistory>
<InstallUrlHistory>https://app.ownsoft.de/|https://app.ownsoft.de/test/|https://app.ownsoft.de/dev/|http://app.ownsoft.de/dev/|http://app.beyondsoft.de/dev/</InstallUrlHistory> <InstallUrlHistory>https://app.ownsoft.de/test/|https://app.ownsoft.de/|https://app.ownsoft.de/dev/|http://app.ownsoft.de/dev/|http://app.beyondsoft.de/dev/</InstallUrlHistory>
<SupportUrlHistory /> <SupportUrlHistory />
<UpdateUrlHistory>https://app.ownsoft.de/|https://app.ownsoft.de/bewoplaner.application/</UpdateUrlHistory> <UpdateUrlHistory>https://app.ownsoft.de/|https://app.ownsoft.de/bewoplaner.application/</UpdateUrlHistory>
<BootstrapperUrlHistory /> <BootstrapperUrlHistory />

View File

@@ -50,7 +50,7 @@ namespace BeWo
public static MainControl MainControl; public static MainControl MainControl;
public static string ShortVersion = "3.21"; 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; public static int RenderTier = 0;
@@ -368,10 +368,10 @@ namespace BeWo
showDienstplanung = true; showDienstplanung = true;
} }
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.Arbeitszeiterfassung); val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowWorktime);
if (val != null && val.Equals("1")) if (val != null && val.Equals("1"))
{ {
AppSettings.Arbeitszeiterfassung = true; AppSettings.ShowWorktime = true;
} }
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.EnableArbeitszeiterfassung); val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.EnableArbeitszeiterfassung);
if (val != null && val.Equals("1")) if (val != null && val.Equals("1"))
@@ -508,6 +508,9 @@ namespace BeWo
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowAI); val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowAI);
AppSettings.ShowAI = val != null && val.Equals("1"); 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); val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.MoKSessionTimeout);
if(int.TryParse(val, out var sessionTimeout)) if(int.TryParse(val, out var sessionTimeout))
{ {
@@ -592,6 +595,7 @@ namespace BeWo
showHilfeplanBezeichnung = true; showHilfeplanBezeichnung = true;
AppSettings.AllowStorno = true; AppSettings.AllowStorno = true;
AppSettings.ShowAI = true; AppSettings.ShowAI = true;
AppSettings.ShowAIInternal = true;
//showInfoButtonInCalender = true; //showInfoButtonInCalender = true;
#endif #endif

View File

@@ -425,7 +425,7 @@ namespace BeWo.Core.Config
public bool DontShowSpitzabrechnung { get; set; } public bool DontShowSpitzabrechnung { get; set; }
public bool ShowDienstplanung { get; set; } public bool ShowDienstplanung { get; set; }
public bool Arbeitszeiterfassung { get; set; } public bool ShowWorktime { get; set; }
public bool EnableArbeitszeiterfassung { get; set; } public bool EnableArbeitszeiterfassung { get; set; }
public bool EnableAutomaticPauses { get; set; } public bool EnableAutomaticPauses { get; set; }
public bool EnableRestTimeWarning { get; set; } public bool EnableRestTimeWarning { get; set; }
@@ -447,6 +447,8 @@ namespace BeWo.Core.Config
public bool ShowAI { get; set; } public bool ShowAI { get; set; }
public bool ShowAIInternal { get; set; }
public bool AllowGkvAbrechnung { get; set; } public bool AllowGkvAbrechnung { get; set; }
public bool ShowImportAbschlagszahlungen { get; set; } public bool ShowImportAbschlagszahlungen { get; set; }

View File

@@ -924,6 +924,8 @@ namespace BeWo
{ {
if (result == UserValidationResult.UserValidTwoFactorAuthenticationNeeded) if (result == UserValidationResult.UserValidTwoFactorAuthenticationNeeded)
{ {
Translator t = new Translator(new MultiLanguage.ServiceTranslator());
grid_root.Children.Remove(lWaitLayer); grid_root.Children.Remove(lWaitLayer);
var dlg = new TwoFactorAuthMessageDialog(lUserName, lPassword); var dlg = new TwoFactorAuthMessageDialog(lUserName, lPassword);
var message = Translator.Translate("Zwei Faktor Authentifizierung erforderlich"); var message = Translator.Translate("Zwei Faktor Authentifizierung erforderlich");

View File

@@ -5465,6 +5465,15 @@ namespace BeWo.ServiceProxy
"t", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] "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); 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" + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTable", ReplyAction="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTableRespons" +
"e")] "e")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTableBeWoFau" + [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); 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) public void DeleteCertainDienstEintragOutOfTable(long dienstEintragOid)
{ {
base.Channel.DeleteCertainDienstEintragOutOfTable(dienstEintragOid); base.Channel.DeleteCertainDienstEintragOutOfTable(dienstEintragOid);

View File

@@ -68,8 +68,11 @@
</dxg:GridControl.View> </dxg:GridControl.View>
</dxg:GridControl> </dxg:GridControl>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2"> <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2">
<Button Content="Erstellen" x:Name="btn_create" Click="btn_create_Click" Padding="5 0" Margin="3" /> <Button Content=" Für alle neu erstellen auswählen " Click="btn_SelectAllNeu" Margin="3" />
<Button Content="Abbrechen" x:Name="btn_cancel" Click="btn_cancel_Click" Margin="3" Padding="5 0" /> <Button Content=" Für alle Diff-Rg erstellen auswählen " Click="btn_SelectAllDiff" Margin="3" />
<Button Content=" Alle abwählen " Click="btn_DeselectAll" Padding="5 0" Margin="3" />
<Button Content=" Erstellen " x:Name="btn_create" Click="btn_create_Click" Margin="20,3,3,3" />
<Button Content=" Abbrechen " x:Name="btn_cancel" Click="btn_cancel_Click" Margin="3" />
</StackPanel> </StackPanel>
</Grid> </Grid>
</GroupBox> </GroupBox>

View File

@@ -55,6 +55,35 @@ namespace BeWo.View.Detail.Accounting
} }
} }
private void btn_SelectAllNeu(object sender, RoutedEventArgs e)
{
SetAllRowsSelection(true, false);
}
private void btn_SelectAllDiff(object sender, RoutedEventArgs e)
{
SetAllRowsSelection(false, true);
}
private void btn_DeselectAll(object sender, RoutedEventArgs e)
{
SetAllRowsSelection(false, false);
}
private void SetAllRowsSelection(bool selectNew, bool selectDiff)
{
var list = this.grid_newInvoices.ItemsSource as BindingList<ServiceInvoiceDC>;
if (list != null)
{
foreach (var item in list)
{
item.InvoiceBase.NeuErstellen = selectNew;
item.InvoiceBase.DiffErstellen = selectDiff;
}
grid_newInvoices.RefreshData();
}
}
private void Fire() private void Fire()
{ {
if (this.Closed != null) if (this.Closed != null)

View File

@@ -517,7 +517,17 @@
Grid.Column="1" Grid.Row="4" Grid.Column="1" Grid.Row="4"
Height="23" Margin="3"/> Height="23" Margin="3"/>
</Grid> <TextBlock x:Name="ButtonOpenAiChat" HorizontalAlignment="Left" Width="Auto" Margin="5,2,0,0" Grid.Column="0" Grid.Row="5" PreviewMouseLeftButtonDown="OpenAiChat">
<Hyperlink NavigateUri="https://www.bewoplaner.de" TargetName="newWindow" Foreground="Transparent" >
<Image HorizontalAlignment="Left" Source="..\..\Ressources\Icons\chatbot.png" Width="48" Height="48"
Style="{StaticResource toolbarImageStyle}" >
</Image>
</Hyperlink>
</TextBlock>
</Grid>
</GroupBox> </GroupBox>
<GroupBox Grid.Column="1" Grid.Row="1" Margin="8 8 0 0" Header="Rechnungsadresse" <GroupBox Grid.Column="1" Grid.Row="1" Margin="8 8 0 0" Header="Rechnungsadresse"
Style="{StaticResource ObjectEditGroupBox}"> Style="{StaticResource ObjectEditGroupBox}">

View File

@@ -49,7 +49,7 @@ using HorizontalAlignment = System.Windows.HorizontalAlignment;
using Hyperlink = System.Windows.Documents.Hyperlink; using Hyperlink = System.Windows.Documents.Hyperlink;
using MessageBox = System.Windows.MessageBox; using MessageBox = System.Windows.MessageBox;
using VerticalAlignment = System.Windows.VerticalAlignment; using VerticalAlignment = System.Windows.VerticalAlignment;
using BeWo.AI;
namespace BeWo.View.Detail namespace BeWo.View.Detail
{ {
@@ -160,6 +160,14 @@ namespace BeWo.View.Detail
} }
if (BeWoApp.AppSettings.ShowAIInternal)
{
ButtonOpenAiChat.Visibility = Visibility.Visible;
}
else
{
ButtonOpenAiChat.Visibility = Visibility.Collapsed;
}
#if DEBUG #if DEBUG
tabitem_stundenplan.Visibility = Visibility.Visible; tabitem_stundenplan.Visibility = Visibility.Visible;
#endif #endif
@@ -1845,6 +1853,13 @@ namespace BeWo.View.Detail
BeWoUtils.ShowImageForm(Img.Source); BeWoUtils.ShowImageForm(Img.Source);
} }
private void OpenAiChat(object sender, MouseButtonEventArgs e)
{
AiChatController.ShowAiChatViewForSingleCustomer(ViewModel.DataContract.CustomerOid.Value, Math.Min(800, this.ActualHeight), Math.Min(1200, this.ActualWidth));
}
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
[NotifyPropertyChangedInvocator] [NotifyPropertyChangedInvocator]

View File

@@ -30,7 +30,7 @@ namespace BeWo.View.Detail
GroupOwnChatSettings.Visibility = Visibility.Collapsed; GroupOwnChatSettings.Visibility = Visibility.Collapsed;
} }
if (!BeWoApp.AppSettings.Arbeitszeiterfassung) if (!BeWoApp.AppSettings.ShowWorktime)
{ {
EnableArbeitszeiterfassung.Visibility = Visibility.Collapsed; EnableArbeitszeiterfassung.Visibility = Visibility.Collapsed;
EnableAutomaticPauses.Visibility = Visibility.Collapsed; EnableAutomaticPauses.Visibility = Visibility.Collapsed;

View File

@@ -1410,7 +1410,7 @@
<TextBlock Grid.Column="2" Grid.Row="5" Text="{Binding Path=InsUser}" Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type zeit:ServiceRecordView2}}, Path=InsertedOnAndByVisibility}" /> <TextBlock Grid.Column="2" Grid.Row="5" Text="{Binding Path=InsUser}" Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type zeit:ServiceRecordView2}}, Path=InsertedOnAndByVisibility}" />
<TextBlock Grid.Column="2" Grid.Row="6" Text="{Binding Path=InsertedOn}" Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type zeit:ServiceRecordView2}}, Path=InsertedOnAndByVisibility}" /> <TextBlock Grid.Column="2" Grid.Row="6" Text="{Binding Path=InsertedOn}" Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type zeit:ServiceRecordView2}}, Path=InsertedOnAndByVisibility}" />
<TextBox Grid.Column="4" Grid.Row="1" Grid.RowSpan="7" <TextBox Grid.Column="4" Grid.Row="1" Grid.RowSpan="7"
HorizontalAlignment="Stretch" Text="{Binding Path=Notice}" HorizontalAlignment="Stretch" Text="{Binding Path=AllNotices}"
HorizontalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Auto" Margin="0,0,0,15" VerticalScrollBarVisibility="Auto" Margin="0,0,0,15"
BorderThickness="0" BorderBrush="{x:Null}" Style="{StaticResource ListBoxNoticeTextBoxStyle}" BorderThickness="0" BorderBrush="{x:Null}" Style="{StaticResource ListBoxNoticeTextBoxStyle}"

View File

@@ -51,6 +51,7 @@ using SupportConceptService = BeWo.Core.Service.SupportConceptService;
using VerticalAlignment = System.Windows.VerticalAlignment; using VerticalAlignment = System.Windows.VerticalAlignment;
using DependencyObject = System.Windows.DependencyObject; using DependencyObject = System.Windows.DependencyObject;
using BeWo.AI.View; using BeWo.AI.View;
using BeWo.AI;
namespace BeWo.View.Detail.Zeiterfassung namespace BeWo.View.Detail.Zeiterfassung
{ {
@@ -5043,13 +5044,7 @@ namespace BeWo.View.Detail.Zeiterfassung
latestEndDate = latestEndDate.AddMinutes(59); latestEndDate = latestEndDate.AddMinutes(59);
} }
var ctrl = new AiChatView(c2sOid, earliestStartDate, latestEndDate); AiChatController.ShowAiChatViewForServiceRecords(c2sOid, earliestStartDate, latestEndDate, Math.Min(800, this.ActualHeight), Math.Min(1200, this.ActualWidth));
var beWoWindow = BeWoWindowBuilder.GetBeWoWindow(Translator.Translate("Frage unsere KI"), ctrl, Math.Min(800, this.ActualHeight), Math.Min(1200, this.ActualWidth));
ctrl.CloseButtonClicked += () => beWoWindow.Close();
beWoWindow.ShowDialog();
} }
private void multiSupportConceptControl_ListChanged(object sender, EventArgs<IList<CompactSupportConceptDC>> e) private void multiSupportConceptControl_ListChanged(object sender, EventArgs<IList<CompactSupportConceptDC>> e)

View File

@@ -167,6 +167,7 @@
OpenObject="mainNavigationView_OpenObject" OpenObject="mainNavigationView_OpenObject"
DeleteObject="mainNavigationView_DeleteObject" DeleteObject="mainNavigationView_DeleteObject"
ArchiveObject="mainNavigationView_ArchiveObject" ArchiveObject="mainNavigationView_ArchiveObject"
OpenAiChat="MainNavigationView_OpenAiChat"
ExcelExport="mainNavigationView_ExcelExport" ExcelExport="mainNavigationView_ExcelExport"
Print="mainNavigationView_Print" Print="mainNavigationView_Print"
DeleteDemands="DeleteAll, CustomerView_Delete" DeleteDemands="DeleteAll, CustomerView_Delete"

View File

@@ -23,7 +23,7 @@ using BS.Shared.Extensions;
using BS.Shared.Translation; using BS.Shared.Translation;
using Microsoft.Win32; using Microsoft.Win32;
using BeWo.AI;
namespace BeWo.View.Navigation namespace BeWo.View.Navigation
{ {
@@ -59,9 +59,13 @@ namespace BeWo.View.Navigation
//supportConceptFilterComboBox.DisplayMemberPath = "DisplayName"; //supportConceptFilterComboBox.DisplayMemberPath = "DisplayName";
//supportConceptFilterComboBox.SelectionChanged = "sortCombo_SelectionChanged"; //supportConceptFilterComboBox.SelectionChanged = "sortCombo_SelectionChanged";
supportConceptFilterComboBox.Style = FindResource("SortComboBox") as Style; supportConceptFilterComboBox.Style = FindResource("SortComboBox") as Style;
if(BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) || BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll)) if (BeWoApp.AppSettings.ShowAIInternal)
{
mainNavigationView.btnOpenAi.Visibility = Visibility.Visible;
}
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) || BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
{ {
supportConceptFilterComboBox.Items.Add(new CustomerFilterItem(CustomerFilterEnum.All)); supportConceptFilterComboBox.Items.Add(new CustomerFilterItem(CustomerFilterEnum.All));
} }
@@ -467,5 +471,10 @@ namespace BeWo.View.Navigation
}); });
}); });
} }
private void MainNavigationView_OpenAiChat()
{
AiChatController.ShowAiChatViewForObjects(TableID.Customer, 800, 1200);
}
} }
} }

View File

@@ -103,6 +103,7 @@
<Button x:Name="btnEdit" Content="Öffnen" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="10,0,0,0" Click="btnEdit_Click" /> <Button x:Name="btnEdit" Content="Öffnen" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="10,0,0,0" Click="btnEdit_Click" />
<Button x:Name="btnArchive" Content="Archivieren" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="10,0,0,0" Click="btnArchive_Click" /> <Button x:Name="btnArchive" Content="Archivieren" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="10,0,0,0" Click="btnArchive_Click" />
<Button x:Name="btnDelete" Content="Löschen" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="10,0,0,0" Click="btnDelete_Click" /> <Button x:Name="btnDelete" Content="Löschen" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="10,0,0,0" Click="btnDelete_Click" />
<Button x:Name="btnOpenAi" Visibility="Collapsed" Content="KI" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="10,0,0,0" Click="btnOpenAi_Click" />
<TextBlock x:Name="textblock_link" VerticalAlignment="Center" Margin="20 0 0 0" FontSize="16"> <TextBlock x:Name="textblock_link" VerticalAlignment="Center" Margin="20 0 0 0" FontSize="16">
<Hyperlink x:Name="linkExcelExport" TargetName="newWindow" Foreground="White" RequestNavigate="linkExcelExport_RequestNavigate">Excel Export</Hyperlink> <Hyperlink x:Name="linkExcelExport" TargetName="newWindow" Foreground="White" RequestNavigate="linkExcelExport_RequestNavigate">Excel Export</Hyperlink>
</TextBlock> </TextBlock>

View File

@@ -92,6 +92,8 @@ namespace BeWo.View.Navigation
public delegate void ImportObjectsDelegate(); public delegate void ImportObjectsDelegate();
public delegate void OpenAiChatDelegate();
public delegate bool DeleteObjectDelegate(IFilterableDC obj); public delegate bool DeleteObjectDelegate(IFilterableDC obj);
public delegate void OpenObjectDelegate(IFilterableDC obj); public delegate void OpenObjectDelegate(IFilterableDC obj);
@@ -108,6 +110,8 @@ namespace BeWo.View.Navigation
public event ImportObjectsDelegate ImportObjects; public event ImportObjectsDelegate ImportObjects;
public event OpenAiChatDelegate OpenAiChat;
public event DeleteObjectDelegate DeleteObject; public event DeleteObjectDelegate DeleteObject;
public event EventHandler<EventArgs<IEnumerable<IFilterableDC>>> ExcelExport; public event EventHandler<EventArgs<IEnumerable<IFilterableDC>>> ExcelExport;
@@ -214,6 +218,19 @@ namespace BeWo.View.Navigation
} }
} }
public bool OpenAiButtonVisible
{
get
{
return btnOpenAi.Visibility == Visibility.Visible;
}
set
{
btnOpenAi.Visibility = value ? Visibility.Visible : Visibility.Collapsed;
}
}
//[TypeConverter(typeof(UserRightTypeArrayConverter))] //[TypeConverter(typeof(UserRightTypeArrayConverter))]
//public UserRightType[] ImportDemands //public UserRightType[] ImportDemands
//{ //{
@@ -601,6 +618,14 @@ namespace BeWo.View.Navigation
} }
} }
private void btnOpenAi_Click(object sender, RoutedEventArgs e)
{
if (OpenAiChat != null)
{
OpenAiChat();
}
}
private void btnCopy_Click(object sender, RoutedEventArgs e) private void btnCopy_Click(object sender, RoutedEventArgs e)
{ {
if (CopyObject != null) if (CopyObject != null)

View File

@@ -62,7 +62,7 @@ namespace BeWo.View
private void OkayButton_OnClick(object sender, RoutedEventArgs e) private void OkayButton_OnClick(object sender, RoutedEventArgs e)
{ {
var result = ServiceFacade.DoUserServiceSync(u => u.IsUserValidTwoFactor(this.username, this.password, null, textbox.Text)); var result = ServiceFacade.DoUserServiceSync(u => u.IsUserValidTwoFactor(this.username, this.password, textbox.Text, null));
if (result == UserValidationResult.UserValid) if (result == UserValidationResult.UserValid)
{ {
BeWoApp.TwoFactorPin = textbox.Text; BeWoApp.TwoFactorPin = textbox.Text;

View File

@@ -736,7 +736,7 @@ namespace BeWo.ViewModel.ListViewModel
else else
{ {
var newVM = new ServiceRecordVM(dc, _Category2Services, goalCats, goals); var newVM = new ServiceRecordVM(dc, _Category2Services, goalCats, goals);
SetDocTypes(newVM);
// newVM.RoundedDuration = newVM.GroupRoundedDuration.Value; // newVM.RoundedDuration = newVM.GroupRoundedDuration.Value;
groupVMs.Add(key, newVM); groupVMs.Add(key, newVM);
@@ -752,7 +752,7 @@ namespace BeWo.ViewModel.ListViewModel
{ {
// ###AddServiceRecord // ###AddServiceRecord
var newVM = new ServiceRecordVM(dc, _Category2Services, goalCats, goals); var newVM = new ServiceRecordVM(dc, _Category2Services, goalCats, goals);
SetDocTypes(newVM);
if (dc.GroupOid != null) if (dc.GroupOid != null)
{ {
// newVM.RoundedDuration = newVM.GroupRoundedDuration.Value; // newVM.RoundedDuration = newVM.GroupRoundedDuration.Value;
@@ -763,6 +763,33 @@ namespace BeWo.ViewModel.ListViewModel
} }
} }
private void SetDocTypes(ServiceRecordVM newVM)
{
if (AllDocTypes != null)
{
if (AllDocTypes.Count > 0)
{
newVM.DocField1 = AllDocTypes[0].TypeDescription;
}
if (AllDocTypes.Count > 1)
{
newVM.DocField2 = AllDocTypes[1].TypeDescription;
}
if (AllDocTypes.Count > 2)
{
newVM.DocField3 = AllDocTypes[2].TypeDescription;
}
if (AllDocTypes.Count > 3)
{
newVM.DocField4 = AllDocTypes[3].TypeDescription;
}
if (AllDocTypes.Count > 4)
{
newVM.DocField5 = AllDocTypes[4].TypeDescription;
}
}
}
private static void InitNewDC(ServiceRecordDC newDc, FlatSupportConceptTreeNodeDC selectedCustomerNode) private static void InitNewDC(ServiceRecordDC newDc, FlatSupportConceptTreeNodeDC selectedCustomerNode)
{ {
if (selectedCustomerNode != null && selectedCustomerNode.SupportConceptTreeNodeDC != null) if (selectedCustomerNode != null && selectedCustomerNode.SupportConceptTreeNodeDC != null)

View File

@@ -1417,6 +1417,66 @@ namespace BeWo.ViewModel
} }
} }
public string DocField1 { get; set; }
public string DocField2 { get; set; }
public string DocField3 { get; set; }
public string DocField4 { get; set; }
public string DocField5 { get; set; }
public string AllNotices
{
get
{
if (String.IsNullOrEmpty(DocField2)) // Nur ein Dokufeld vorhanden
{
return Notice;
}
String all = "";
if (!String.IsNullOrEmpty(Notice))
{
all = String.Format("{0}:\n{1}", DocField1, Notice);
}
if (!String.IsNullOrEmpty(Notice2))
{
if (all.Length > 0)
{
all += "\n\n";
}
all += String.Format("{0}:\n{1}", DocField2, Notice2);
}
if (!String.IsNullOrEmpty(Notice3))
{
if (all.Length > 0)
{
all += "\n\n";
}
all += String.Format("{0}:\n{1}", DocField3, Notice3);
}
if (!String.IsNullOrEmpty(Notice4))
{
if (all.Length > 0)
{
all += "\n\n";
}
all += String.Format("{0}:\n{1}", DocField4, Notice4);
}
if (!String.IsNullOrEmpty(Notice5))
{
if (all.Length > 0)
{
all += "\n\n";
}
all += String.Format("{0}:\n{1}", DocField5, Notice5);
}
return all;
}
set { }
}
public string RTFNotice public string RTFNotice
{ {
get { return _RTFNotice; } get { return _RTFNotice; }
@@ -1718,6 +1778,7 @@ namespace BeWo.ViewModel
return name; return name;
} }
public ObservableSortCollection<ValueListEntryDC> SelectedGoals public ObservableSortCollection<ValueListEntryDC> SelectedGoals
{ {
get get

View File

@@ -13,17 +13,17 @@
<basicHttpBinding> <basicHttpBinding>
<binding name="BeWoBasicEndpoint" closeTimeout="00:05:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true" messageEncoding="Text"> <binding name="BeWoBasicEndpoint" closeTimeout="00:05:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true" messageEncoding="Text">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None" /> <security mode="Transport" />
<!-- mode="Transport" für https und "None" sonst--> <!-- mode="Transport" für https und "None" sonst-->
</binding> </binding>
<binding name="BeWoStreamingEndpoint" receiveTimeout="10:10:00" sendTimeout="10:01:00" maxBufferSize="65536" maxReceivedMessageSize="67108864" transferMode="StreamedRequest" useDefaultWebProxy="true" messageEncoding="Text"> <binding name="BeWoStreamingEndpoint" receiveTimeout="10:10:00" sendTimeout="10:01:00" maxBufferSize="65536" maxReceivedMessageSize="67108864" transferMode="StreamedRequest" useDefaultWebProxy="true" messageEncoding="Text">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None" /> <security mode="Transport" />
<!-- mode="Transport" für https --> <!-- mode="Transport" für https -->
</binding> </binding>
<binding name="QueryServiceEndpoint" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true" messageEncoding="Text"> <binding name="QueryServiceEndpoint" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true" messageEncoding="Text">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None"> <security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" /> <message clientCredentialType="UserName" algorithmSuite="Default" />
</security> </security>

View File

@@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<NameOfLastUsedPublishProfile>BeWo2.0</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>BeWo2.0</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress>false</Use64BitIISExpress> <Use64BitIISExpress>false</Use64BitIISExpress>
<IISExpressSSLPort /> <IISExpressSSLPort />
<IISExpressAnonymousAuthentication /> <IISExpressAnonymousAuthentication />
@@ -12,5 +12,29 @@
<UseGlobalApplicationHostFile /> <UseGlobalApplicationHostFile />
<ProjectView>ShowAllFiles</ProjectView> <ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup> </PropertyGroup>
<ProjectExtensions /> <ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>NoStartPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
<SQLDebugging>False</SQLDebugging>
<ExternalProgram>
</ExternalProgram>
<StartExternalURL>
</StartExternalURL>
<StartCmdLineArguments>
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>False</EnableENC>
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project> </Project>

View File

@@ -35,6 +35,15 @@ namespace BeWo.Report.ReportObjects
vacationService = PluginLoader.FindClass<VacationService>(); vacationService = PluginLoader.FindClass<VacationService>();
} }
protected AppSettings Settings
{
get
{
return appSettings;
}
}
public MitarbeiterstundenkontoBerechnung(decimal maxWochenstunden) : this() public MitarbeiterstundenkontoBerechnung(decimal maxWochenstunden) : this()
{ {
this.maxWochenstunden = maxWochenstunden; this.maxWochenstunden = maxWochenstunden;
@@ -951,6 +960,9 @@ namespace BeWo.Report.ReportObjects
protected virtual ServiceRecordSummary BerechneStunden(MitarbeiterstundenkontoRO.EmployeeDetail empDetail, IList<ServiceRecord> groupFilteredRecords, DateTime berichtsAnfang, DateTime berichtsEnde) protected virtual ServiceRecordSummary BerechneStunden(MitarbeiterstundenkontoRO.EmployeeDetail empDetail, IList<ServiceRecord> groupFilteredRecords, DateTime berichtsAnfang, DateTime berichtsEnde)
{ {
decimal flsGesamt = 0;
decimal arbeitszeit = 0;
var sum = new ServiceRecordSummary(); var sum = new ServiceRecordSummary();
sum.RecordsImBerichtszeitraum = new List<ServiceRecord>(); sum.RecordsImBerichtszeitraum = new List<ServiceRecord>();
@@ -965,17 +977,33 @@ namespace BeWo.Report.ReportObjects
//String test = String.Format("{0:dd.MM.yyyy HH:mm}, {1:0} Minuten, {2}, {3}", item.Start, item.RoundedDuration, item.ServiceDescription.Name, item.Notice); //String test = String.Format("{0:dd.MM.yyyy HH:mm}, {1:0} Minuten, {2}, {3}", item.Start, item.RoundedDuration, item.ServiceDescription.Name, item.Notice);
HandleServiceRecord(empDetail, item); HandleServiceRecord(empDetail, item);
if (AddServiceRecordToDuration(item))
if (Settings.ShowWorktime && Settings.EnableArbeitszeiterfassung)
{ {
empDetail.ServiceRecordsInSelectedTimeSpan.Add(item); empDetail.ServiceRecordsInSelectedTimeSpan.Add(item);
String test = String.Format("{0:dd.MM. HH:mm} - {1:HH:mm}, {2}", item.Start, item.End, item.RoundedDuration); decimal duration = GetDuration(item, empDetail);
if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null)
{
if (item.ServiceDescription.ServiceCategory.Name == "Arbeitszeit")
{
arbeitszeit += duration;
}
else if (item.ServiceDescription.ServiceCategory.IsBillable)
{
flsGesamt += duration;
}
}
}
else if (AddServiceRecordToDuration(item))
{
empDetail.ServiceRecordsInSelectedTimeSpan.Add(item);
decimal duration = GetDuration(item, empDetail); decimal duration = GetDuration(item, empDetail);
//System.Diagnostics.Debug.WriteLine("{0:0.##}", duration);
if (item.ServiceDescription != null && if (item.ServiceDescription != null &&
item.ServiceDescription.ServiceCategory != null && item.ServiceDescription.ServiceCategory != null &&
item.ServiceDescription.ServiceCategory.IsBillable) item.ServiceDescription.ServiceCategory.IsBillable)
@@ -988,7 +1016,11 @@ namespace BeWo.Report.ReportObjects
} }
} }
} }
if (Settings.ShowWorktime && Settings.EnableArbeitszeiterfassung)
{
sum.IstAbrechenbar = flsGesamt;
sum.IstNichtAbrechenbar = arbeitszeit - flsGesamt;
}
return sum; return sum;
} }
@@ -1290,6 +1322,10 @@ namespace BeWo.Report.ReportObjects
public virtual bool ShouldCreateDayDetails() public virtual bool ShouldCreateDayDetails()
{ {
if (Settings.ShowWorktime && Settings.EnableArbeitszeiterfassung)
{
return true;
}
return false; return false;
} }
@@ -1670,16 +1706,11 @@ namespace BeWo.Report.ReportObjects
{ {
MitarbeiterstundenkontoRO.DayDetail dd = new MitarbeiterstundenkontoRO.DayDetail(); MitarbeiterstundenkontoRO.DayDetail dd = new MitarbeiterstundenkontoRO.DayDetail();
dd.ZusammenhaengendeZeitraeume = new List<DateTimeSpan>(); dd.ZusammenhaengendeZeitraeume = new List<DateTimeSpan>();
dd.Date = date.Date; dd.Date = date.Date;
dd.NightStart = 20; dd.NightStart = 20;
dd.NightEnd = 6; dd.NightEnd = 6;
dd.MaxHoursUntilBreak = 6; ConfigurePauseSettings(dd);
dd.BreakMinutes = 30;
if (date.Year == 2022 && date.Month == 12 && date.Day == 27)
{
int test = 0;
}
CalculateAbsenceTimesForDay(dd, ed); CalculateAbsenceTimesForDay(dd, ed);
dd.Feiertag = vacationService.GetFeiertag(date); dd.Feiertag = vacationService.GetFeiertag(date);
@@ -1697,6 +1728,26 @@ namespace BeWo.Report.ReportObjects
return dd; return dd;
} }
public virtual void ConfigurePauseSettings(MitarbeiterstundenkontoRO.DayDetail dd)
{
if (Settings.ShowWorktime && Settings.EnableArbeitszeiterfassung)
{
if (Settings.EnableAutomaticPauses)
{
dd.MaxHoursUntilBreak = 6;
dd.BreakMinutes = 30;
dd.MaxHoursUntilBreak2 = 9;
dd.BreakMinutes2 = 15;
}
}
else
{
//Alter Default
dd.MaxHoursUntilBreak = 6;
dd.BreakMinutes = 30;
}
}
public virtual void BerechneSollStundenFuerDayDetail(MitarbeiterstundenkontoRO.EmployeeDetail ed, MitarbeiterstundenkontoRO.DayDetail dd) public virtual void BerechneSollStundenFuerDayDetail(MitarbeiterstundenkontoRO.EmployeeDetail ed, MitarbeiterstundenkontoRO.DayDetail dd)
{ {
var sollMax = BerechneSollStundenFuerTag(ed, dd.Date); var sollMax = BerechneSollStundenFuerTag(ed, dd.Date);
@@ -2002,6 +2053,18 @@ namespace BeWo.Report.ReportObjects
public virtual bool AddServiceRecordToDuration(ServiceRecord item) public virtual bool AddServiceRecordToDuration(ServiceRecord item)
{ {
if (Settings.ShowWorktime && Settings.EnableArbeitszeiterfassung)
{
if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null)
{
if (item.ServiceDescription.ServiceCategory.Name == "Arbeitszeit")
{
return true;
}
}
return false;
}
return true; return true;
} }

View File

@@ -29,6 +29,7 @@ namespace BeWo.Report.ReportObjects
public override MitarbeiterstundenkontoRO.DayDetail CreateDayDetail(DateTime date, MitarbeiterstundenkontoRO.EmployeeDetail ed) public override MitarbeiterstundenkontoRO.DayDetail CreateDayDetail(DateTime date, MitarbeiterstundenkontoRO.EmployeeDetail ed)
{ {
var dd = base.CreateDayDetail(date, ed); var dd = base.CreateDayDetail(date, ed);
dd.MaxHoursUntilBreak = null; dd.MaxHoursUntilBreak = null;
dd.MaxHoursUntilBreak2 = null; dd.MaxHoursUntilBreak2 = null;
dd.BreakMinutes = null; dd.BreakMinutes = null;

View File

@@ -37,6 +37,8 @@ namespace PariSozial
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand(); this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
this.Detail1 = new DevExpress.XtraReports.UI.DetailBand(); this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
this.xrTable3 = new DevExpress.XtraReports.UI.XRTable(); this.xrTable3 = new DevExpress.XtraReports.UI.XRTable();
@@ -45,6 +47,8 @@ namespace PariSozial
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.ruleRowVisible = new DevExpress.XtraReports.UI.FormattingRule(); this.ruleRowVisible = new DevExpress.XtraReports.UI.FormattingRule();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule(); this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
@@ -78,10 +82,6 @@ namespace PariSozial
this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldBillableFLS = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldBillableFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldAbrechenbareFLS = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldAbrechenbareFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -137,7 +137,7 @@ namespace PariSozial
this.xrTableCell3.StylePriority.UseFont = false; this.xrTableCell3.StylePriority.UseFont = false;
this.xrTableCell3.StylePriority.UseTextAlignment = false; this.xrTableCell3.StylePriority.UseTextAlignment = false;
this.xrTableCell3.Text = "Datum"; this.xrTableCell3.Text = "Datum";
this.xrTableCell3.Weight = 0.20524816333368198D; this.xrTableCell3.Weight = 0.2194732505113928D;
// //
// xrTableCell4 // xrTableCell4
// //
@@ -147,7 +147,7 @@ namespace PariSozial
this.xrTableCell4.StylePriority.UseFont = false; this.xrTableCell4.StylePriority.UseFont = false;
this.xrTableCell4.StylePriority.UseTextAlignment = false; this.xrTableCell4.StylePriority.UseTextAlignment = false;
this.xrTableCell4.Text = "Uhrzeit\r\nvon ..... bis"; this.xrTableCell4.Text = "Uhrzeit\r\nvon ..... bis";
this.xrTableCell4.Weight = 0.25401997956299693D; this.xrTableCell4.Weight = 0.24873635183344678D;
// //
// xrTableCell11 // xrTableCell11
// //
@@ -157,7 +157,7 @@ namespace PariSozial
this.xrTableCell11.StylePriority.UseFont = false; this.xrTableCell11.StylePriority.UseFont = false;
this.xrTableCell11.StylePriority.UseTextAlignment = false; this.xrTableCell11.StylePriority.UseTextAlignment = false;
this.xrTableCell11.Text = "Anzahl Minuten"; this.xrTableCell11.Text = "Anzahl Minuten";
this.xrTableCell11.Weight = 0.21661999388924277D; this.xrTableCell11.Weight = 0.20767853444108209D;
// //
// xrTableCell1 // xrTableCell1
// //
@@ -166,6 +166,20 @@ namespace PariSozial
this.xrTableCell1.Text = "Tätigkeitszweck"; this.xrTableCell1.Text = "Tätigkeitszweck";
this.xrTableCell1.Weight = 0.365788748861114D; this.xrTableCell1.Weight = 0.365788748861114D;
// //
// xrTableCell7
//
this.xrTableCell7.Multiline = true;
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.Text = "Einsatzkraft";
this.xrTableCell7.Weight = 0.23166620596447055D;
//
// xrTableCell5
//
this.xrTableCell5.Multiline = true;
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.Text = "Unterschrift\r\nKlient/in";
this.xrTableCell5.Weight = 0.31174150625791663D;
//
// DetailReport // DetailReport
// //
this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -222,39 +236,36 @@ namespace PariSozial
this.xrTableCell13.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { this.xrTableCell13.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.StartDate", "{0:dd.MM.yyyy}")}); new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.StartDate", "{0:dd.MM.yyyy}")});
this.xrTableCell13.Name = "xrTableCell13"; this.xrTableCell13.Name = "xrTableCell13";
this.xrTableCell13.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell13.StylePriority.UseFont = false; this.xrTableCell13.StylePriority.UseFont = false;
this.xrTableCell13.StylePriority.UsePadding = false; this.xrTableCell13.StylePriority.UsePadding = false;
this.xrTableCell13.StylePriority.UseTextAlignment = false; this.xrTableCell13.StylePriority.UseTextAlignment = false;
this.xrTableCell13.Text = "xrTableCell13"; this.xrTableCell13.Text = "xrTableCell13";
this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell13.Weight = 0.10627102845134587D; this.xrTableCell13.Weight = 0.11363633041512793D;
// //
// xrTableCell14 // xrTableCell14
// //
this.xrTableCell14.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { this.xrTableCell14.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.TimeRangeString")}); new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.TimeRangeString")});
this.xrTableCell14.Name = "xrTableCell14"; this.xrTableCell14.Name = "xrTableCell14";
this.xrTableCell14.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell14.StylePriority.UseFont = false; this.xrTableCell14.StylePriority.UseFont = false;
this.xrTableCell14.StylePriority.UsePadding = false; this.xrTableCell14.StylePriority.UsePadding = false;
this.xrTableCell14.StylePriority.UseTextAlignment = false; this.xrTableCell14.StylePriority.UseTextAlignment = false;
this.xrTableCell14.Text = "xrTableCell14"; this.xrTableCell14.Text = "xrTableCell14";
this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell14.Weight = 0.13152356364414533D; this.xrTableCell14.Weight = 0.1287878484060771D;
// //
// xrTableCell15 // xrTableCell15
// //
this.xrTableCell15.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { this.xrTableCell15.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.Minutes", "{0:0.##}")}); new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.Minutes", "{0:0.##}")});
this.xrTableCell15.Name = "xrTableCell15"; this.xrTableCell15.Name = "xrTableCell15";
this.xrTableCell15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 5, 0, 0, 100F);
this.xrTableCell15.StylePriority.UseFont = false; this.xrTableCell15.StylePriority.UseFont = false;
this.xrTableCell15.StylePriority.UsePadding = false; this.xrTableCell15.StylePriority.UsePadding = false;
this.xrTableCell15.StylePriority.UseTextAlignment = false; this.xrTableCell15.StylePriority.UseTextAlignment = false;
this.xrTableCell15.Text = "xrTableCell15"; this.xrTableCell15.Text = "xrTableCell15";
this.xrTableCell15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell15.Weight = 0.11215893165550706D; this.xrTableCell15.Weight = 0.10752934492979321D;
// //
// xrTableCell2 // xrTableCell2
// //
@@ -265,6 +276,23 @@ namespace PariSozial
this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell2.Weight = 0.18939389467655621D; this.xrTableCell2.Weight = 0.18939389467655621D;
// //
// xrTableCell8
//
this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.EmployeeAbbr")});
this.xrTableCell8.Multiline = true;
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.StylePriority.UseTextAlignment = false;
this.xrTableCell8.Text = "xrTableCell8";
this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell8.Weight = 0.11994946282466618D;
//
// xrTableCell6
//
this.xrTableCell6.Multiline = true;
this.xrTableCell6.Name = "xrTableCell6";
this.xrTableCell6.Weight = 0.16140998371105708D;
//
// ruleRowVisible // ruleRowVisible
// //
this.ruleRowVisible.Condition = "(Not Contains([ServiceCategory], \'Assistenz\')) And (Not Contains([ServiceDescript" + this.ruleRowVisible.Condition = "(Not Contains([ServiceCategory], \'Assistenz\')) And (Not Contains([ServiceDescript" +
@@ -559,10 +587,9 @@ namespace PariSozial
| DevExpress.XtraPrinting.BorderSide.Bottom))); | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.lblSummeMinuten.BorderWidth = 1F; this.lblSummeMinuten.BorderWidth = 1F;
this.lblSummeMinuten.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.lblSummeMinuten.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold);
this.lblSummeMinuten.LocationFloat = new DevExpress.Utils.PointFloat(229.5001F, 0F); this.lblSummeMinuten.LocationFloat = new DevExpress.Utils.PointFloat(232.0001F, 0F);
this.lblSummeMinuten.Name = "lblSummeMinuten"; this.lblSummeMinuten.Name = "lblSummeMinuten";
this.lblSummeMinuten.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F); this.lblSummeMinuten.SizeF = new System.Drawing.SizeF(86.32974F, 30F);
this.lblSummeMinuten.SizeF = new System.Drawing.SizeF(88.83F, 30F);
this.lblSummeMinuten.StylePriority.UseBorders = false; this.lblSummeMinuten.StylePriority.UseBorders = false;
this.lblSummeMinuten.StylePriority.UseBorderWidth = false; this.lblSummeMinuten.StylePriority.UseBorderWidth = false;
this.lblSummeMinuten.StylePriority.UseFont = false; this.lblSummeMinuten.StylePriority.UseFont = false;
@@ -581,7 +608,7 @@ namespace PariSozial
this.xrLabel3.StylePriority.UseFont = false; this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.StylePriority.UseTextAlignment = false; this.xrLabel3.StylePriority.UseTextAlignment = false;
this.xrLabel3.Text = "Summe"; this.xrLabel3.Text = "Summe";
this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
// //
// fieldAbrechenbareMinuten // fieldAbrechenbareMinuten
// //
@@ -602,37 +629,6 @@ namespace PariSozial
this.fieldAbrechenbareFLS.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; this.fieldAbrechenbareFLS.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldAbrechenbareFLS.Name = "fieldAbrechenbareFLS"; this.fieldAbrechenbareFLS.Name = "fieldAbrechenbareFLS";
// //
// xrTableCell5
//
this.xrTableCell5.Multiline = true;
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.Text = "Unterschrift\r\nKlient/in";
this.xrTableCell5.Weight = 0.31174150625791663D;
//
// xrTableCell6
//
this.xrTableCell6.Multiline = true;
this.xrTableCell6.Name = "xrTableCell6";
this.xrTableCell6.Weight = 0.16140998371105708D;
//
// xrTableCell7
//
this.xrTableCell7.Multiline = true;
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.Text = "Einsatzkraft";
this.xrTableCell7.Weight = 0.23166620596447055D;
//
// xrTableCell8
//
this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.EmployeeAbbr")});
this.xrTableCell8.Multiline = true;
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.StylePriority.UseTextAlignment = false;
this.xrTableCell8.Text = "xrTableCell8";
this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell8.Weight = 0.11994946282466618D;
//
// AssistenzstundenReport // AssistenzstundenReport
// //
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -647,6 +643,7 @@ namespace PariSozial
this.fieldBillableFLS, this.fieldBillableFLS,
this.fieldAbrechenbareFLS}); this.fieldAbrechenbareFLS});
this.DataSource = this.bindingSource1; this.DataSource = this.bindingSource1;
this.DisplayName = "AssistenzstundenBeleg";
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] { this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
this.formattingRuleStartDate, this.formattingRuleStartDate,
this.formattingRuleServiceDesc, this.formattingRuleServiceDesc,

View File

@@ -10,8 +10,8 @@ using System.Collections.Generic;
namespace PariSozial namespace PariSozial
{ {
public partial class AssistenzstundenReport : XtraReport public partial class AssistenzstundenReport : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
{ {
public AssistenzstundenReport() public AssistenzstundenReport()
{ {
InitializeComponent(); InitializeComponent();
@@ -23,15 +23,10 @@ namespace PariSozial
if (pRO.Services != null) if (pRO.Services != null)
{ {
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services) foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services)
{ {
if (s.ServiceCategory.Contains("Assistenz") || s.ServiceDescription.Contains("Assistenz")) minTotal += s.Minutes;
{
minTotal += s.Minutes;
}
} }
@@ -41,44 +36,32 @@ namespace PariSozial
lblSummeMinuten.Text = string.Format("{0:0.##}", minTotal); lblSummeMinuten.Text = string.Format("{0:0.##}", minTotal);
var approved = pRO.ApprovedFLSPerWeek; SetApprovedPerWeek(pRO);
//var stats = GetStatistics(pRO);
//if (stats != null)
//{
// approved = stats.MinutesApprovedPerWeek / 60;
//}
} }
private SupportConceptPeriodStatisticsDC GetStatistics(ServicesOverviewRO ro) private void SetApprovedPerWeek(ServicesOverviewRO ro)
{ {
if (ro.CostBearer2SupportConceptList != null && ro.CostBearer2SupportConceptList.Count > 0) if (ro.CostBearer2SupportConceptList != null && ro.CostBearer2SupportConceptList.Count > 0)
{ {
var service = new OperationsServiceImp();
foreach (var cb2sc in ro.CostBearer2SupportConceptList) foreach (var cb2sc in ro.CostBearer2SupportConceptList)
{ {
long cb2scOid = cb2sc.Oid.Value; foreach (var scap in cb2sc.ApprovalPeriodList)
{
if (scap.ServiceCategory != null && scap.ServiceCategory.Name.Contains("Assistenz"))
var stats = service.CreateSupportConceptStatistics(cb2scOid, ro.EndDate); {
if (scap.ApprovedBEPerInterval.HasValue)
if (stats.PeriodStatistics != null && stats.PeriodStatistics.Count > 0) {
{ ro.ApprovedFLSPerWeek = scap.ApprovedBEPerInterval.Value;
foreach (var ps in stats.PeriodStatistics) }
{ }
if (ps.SupportConceptApprovalPeriod != null && ps.SupportConceptApprovalPeriod.ServiceCategory != null && }
ps.SupportConceptApprovalPeriod.ServiceCategory.Name.Contains("Assistenz"))
{ }
return ps;
}
}
}
}
} }
return null;
} }
} }
} }

View File

@@ -61,6 +61,7 @@
<Compile Include="AssistenzstundenReport.Designer.cs"> <Compile Include="AssistenzstundenReport.Designer.cs">
<DependentUpon>AssistenzstundenReport.cs</DependentUpon> <DependentUpon>AssistenzstundenReport.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="CustomReportCreator.cs" />
<Compile Include="Invoicing\AssistenzInvoiceCreation.cs" /> <Compile Include="Invoicing\AssistenzInvoiceCreation.cs" />
<Compile Include="Invoicing\CustomInvoiceFactory.cs" /> <Compile Include="Invoicing\CustomInvoiceFactory.cs" />
<Compile Include="Invoicing\CustomSettlementInvoiceCreation.cs" /> <Compile Include="Invoicing\CustomSettlementInvoiceCreation.cs" />

View File

@@ -65,6 +65,7 @@ namespace PariSozial
this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel18 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel18 = new DevExpress.XtraReports.UI.XRLabel();
this.xrTableCell49 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell49 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule(); this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.xrPictureBox3 = new DevExpress.XtraReports.UI.XRPictureBox(); this.xrPictureBox3 = new DevExpress.XtraReports.UI.XRPictureBox();
@@ -122,13 +123,12 @@ namespace PariSozial
this.xrLabel13 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel13 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel();
this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
// //
// Detail // Detail
@@ -592,6 +592,10 @@ namespace PariSozial
this.xrTableCell49.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; this.xrTableCell49.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell49.Weight = 0.44692737430167606D; this.xrTableCell49.Weight = 0.44692737430167606D;
// //
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// formattingRuleStartDate // formattingRuleStartDate
// //
this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]"; this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]";
@@ -645,10 +649,10 @@ namespace PariSozial
this.xrLabel8.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Right) this.xrLabel8.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom))); | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel8.Font = new DevExpress.Drawing.DXFont("Arial", 10F); this.xrLabel8.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(535.6389F, 77.6111F); this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(535.6389F, 77.61108F);
this.xrLabel8.Name = "xrLabel8"; this.xrLabel8.Name = "xrLabel8";
this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel8.SizeF = new System.Drawing.SizeF(158.3612F, 30.50001F); this.xrLabel8.SizeF = new System.Drawing.SizeF(199.361F, 30.50001F);
this.xrLabel8.StylePriority.UseBackColor = false; this.xrLabel8.StylePriority.UseBackColor = false;
this.xrLabel8.StylePriority.UseBorders = false; this.xrLabel8.StylePriority.UseBorders = false;
this.xrLabel8.StylePriority.UseFont = false; this.xrLabel8.StylePriority.UseFont = false;
@@ -662,10 +666,10 @@ namespace PariSozial
this.xrLabel6.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Right) this.xrLabel6.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom))); | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel6.Font = new DevExpress.Drawing.DXFont("Arial", 10F); this.xrLabel6.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(170F, 77.6111F); this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(140.8333F, 77.61108F);
this.xrLabel6.Name = "xrLabel6"; this.xrLabel6.Name = "xrLabel6";
this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel6.SizeF = new System.Drawing.SizeF(209.3611F, 30.50001F); this.xrLabel6.SizeF = new System.Drawing.SizeF(238.5278F, 30.50001F);
this.xrLabel6.StylePriority.UseBackColor = false; this.xrLabel6.StylePriority.UseBackColor = false;
this.xrLabel6.StylePriority.UseBorders = false; this.xrLabel6.StylePriority.UseBorders = false;
this.xrLabel6.StylePriority.UseFont = false; this.xrLabel6.StylePriority.UseFont = false;
@@ -678,10 +682,10 @@ namespace PariSozial
// //
this.xrLabel5.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Right))); this.xrLabel5.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Right)));
this.xrLabel5.Font = new DevExpress.Drawing.DXFont("Arial", 10F); this.xrLabel5.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(170F, 47.11109F); this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(140.8333F, 47.1111F);
this.xrLabel5.Name = "xrLabel5"; this.xrLabel5.Name = "xrLabel5";
this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel5.SizeF = new System.Drawing.SizeF(158.3612F, 30.50001F); this.xrLabel5.SizeF = new System.Drawing.SizeF(187.5279F, 30.5F);
this.xrLabel5.StylePriority.UseBackColor = false; this.xrLabel5.StylePriority.UseBackColor = false;
this.xrLabel5.StylePriority.UseBorders = false; this.xrLabel5.StylePriority.UseBorders = false;
this.xrLabel5.StylePriority.UseFont = false; this.xrLabel5.StylePriority.UseFont = false;
@@ -697,10 +701,10 @@ namespace PariSozial
| DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom))); | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel4.Font = new DevExpress.Drawing.DXFont("Arial", 10F); this.xrLabel4.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(49.36111F, 77.6111F); this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 77.61108F);
this.xrLabel4.Name = "xrLabel4"; this.xrLabel4.Name = "xrLabel4";
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel4.SizeF = new System.Drawing.SizeF(120.6389F, 30.50001F); this.xrLabel4.SizeF = new System.Drawing.SizeF(140.8333F, 30.50001F);
this.xrLabel4.StylePriority.UseBackColor = false; this.xrLabel4.StylePriority.UseBackColor = false;
this.xrLabel4.StylePriority.UseBorders = false; this.xrLabel4.StylePriority.UseBorders = false;
this.xrLabel4.StylePriority.UseFont = false; this.xrLabel4.StylePriority.UseFont = false;
@@ -715,10 +719,10 @@ namespace PariSozial
this.xrLabel3.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) this.xrLabel3.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right))); | DevExpress.XtraPrinting.BorderSide.Right)));
this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Arial", 10F); this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(49.3611F, 47.11109F); this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 47.1111F);
this.xrLabel3.Name = "xrLabel3"; this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel3.SizeF = new System.Drawing.SizeF(120.6389F, 30.50001F); this.xrLabel3.SizeF = new System.Drawing.SizeF(140.8333F, 30.5F);
this.xrLabel3.StylePriority.UseBackColor = false; this.xrLabel3.StylePriority.UseBackColor = false;
this.xrLabel3.StylePriority.UseBorders = false; this.xrLabel3.StylePriority.UseBorders = false;
this.xrLabel3.StylePriority.UseFont = false; this.xrLabel3.StylePriority.UseFont = false;
@@ -1304,10 +1308,6 @@ namespace PariSozial
this.fieldKontaktArt.FieldType = DevExpress.XtraReports.UI.FieldType.String; this.fieldKontaktArt.FieldType = DevExpress.XtraReports.UI.FieldType.String;
this.fieldKontaktArt.Name = "fieldKontaktArt"; this.fieldKontaktArt.Name = "fieldKontaktArt";
// //
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// Quittierungsbeleg // Quittierungsbeleg
// //
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -1336,10 +1336,10 @@ namespace PariSozial
this.Watermarks.Add(xrWatermark1); this.Watermarks.Add(xrWatermark1);
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
} }

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using BeWo.Data.Access; using BeWo.Data.Access;
using BeWo.Data.Entities; using BeWo.Data.Entities;
using BS.Shared; using BS.Shared;
using BS.Shared.Core;
namespace BeWo.Service.Configuration namespace BeWo.Service.Configuration
{ {
@@ -63,6 +64,12 @@ namespace BeWo.Service.Configuration
public int DienstplanungStandardZeilenAnzahl { get; set; } public int DienstplanungStandardZeilenAnzahl { get; set; }
public bool ShowWorktime { get; set; }
public bool EnableArbeitszeiterfassung { get; set; }
public bool EnableAutomaticPauses { get; set; }
public bool EnableRestTimeWarning { get; set; }
public int MaxWorkTimeHoursBeforeWarning { get; set; }
public static AppSettings CreateSettings() public static AppSettings CreateSettings()
{ {
@@ -98,134 +105,167 @@ namespace BeWo.Service.Configuration
if (mandator != null) if (mandator != null)
{ {
string val = GetSettingValue(mandator.Settings, "IsServiceRecordNoticeMandatory"); string settingsString = mandator.Settings;
if (!String.IsNullOrEmpty(mandator.LastModules))
{
settingsString += ";" + mandator.LastModules;
}
string val = GetSettingValue(settingsString, "IsServiceRecordNoticeMandatory");
if (val != null && val.Equals("0")) if (val != null && val.Equals("0"))
{ {
isServiceRecordNoticeMandatory = false; isServiceRecordNoticeMandatory = false;
} }
val = GetSettingValue(mandator.Settings, "IsPasswordSecurityActiv"); val = GetSettingValue(settingsString, "IsPasswordSecurityActiv");
if (val != null && val.Equals("1")) if (val != null && val.Equals("1"))
{ {
isPasswordSecurityActiv = true; isPasswordSecurityActiv = true;
} }
settings.UseTwoFactorAuth = false; settings.UseTwoFactorAuth = false;
val = GetSettingValue(mandator.Settings, "UseTwoFactorAuth"); val = GetSettingValue(settingsString, "UseTwoFactorAuth");
if (val != null && val.Equals("1")) if (val != null && val.Equals("1"))
{ {
settings.UseTwoFactorAuth = true; settings.UseTwoFactorAuth = true;
} }
val = GetSettingValue(mandator.Settings, "IsEndDateVisible"); val = GetSettingValue(settingsString, "IsEndDateVisible");
if (val != null && val.Equals("0")) if (val != null && val.Equals("0"))
{ {
isEndDateVisible = false; isEndDateVisible = false;
} }
val = GetSettingValue(mandator.Settings, "IsOnlyYearMonthVisible"); val = GetSettingValue(settingsString, "IsOnlyYearMonthVisible");
if (val != null && val.Equals("0")) if (val != null && val.Equals("0"))
{ {
isOnlyYearMonthVisible = false; isOnlyYearMonthVisible = false;
} }
val = GetSettingValue(mandator.Settings, "IsZeiterfassDateNormal"); val = GetSettingValue(settingsString, "IsZeiterfassDateNormal");
if (val != null && val.Equals("0")) if (val != null && val.Equals("0"))
{ {
isZeiterfassDateNormal = false; isZeiterfassDateNormal = false;
} }
val = GetSettingValue(mandator.Settings, "IsZeiterfassungInStdMin"); val = GetSettingValue(settingsString, "IsZeiterfassungInStdMin");
if (val != null && val.Equals("0")) if (val != null && val.Equals("0"))
{ {
isZeiterfassungInStdMin = false; isZeiterfassungInStdMin = false;
} }
val = GetSettingValue(mandator.Settings, "MaxDaysEditServiceRecordsAllowed"); val = GetSettingValue(settingsString, "MaxDaysEditServiceRecordsAllowed");
if(int.TryParse(val, out var result)) if(int.TryParse(val, out var result))
{ {
maxDaysEditServiceRecordsAllowed = result; maxDaysEditServiceRecordsAllowed = result;
} }
val = GetSettingValue(mandator.Settings, "hilfeplanAuslaufAuswahl"); val = GetSettingValue(settingsString, "hilfeplanAuslaufAuswahl");
if (int.TryParse(val, out var resulthilf)) if (int.TryParse(val, out var resulthilf))
{ {
hilfeplanAuslaufAuswahl = resulthilf; hilfeplanAuslaufAuswahl = resulthilf;
} }
val = GetSettingValue(mandator.Settings, "AnzTageZeiterfassErfolgt"); val = GetSettingValue(settingsString, "AnzTageZeiterfassErfolgt");
if (int.TryParse(val, out var resultanzeit)) if (int.TryParse(val, out var resultanzeit))
{ {
anzTageZeiterfassErfolgt = resultanzeit; anzTageZeiterfassErfolgt = resultanzeit;
} }
val = GetSettingValue(mandator.Settings, "ZeiterfassungsSchwellwert"); val = GetSettingValue(settingsString, "ZeiterfassungsSchwellwert");
if (int.TryParse(val, out var resultschwell)) if (int.TryParse(val, out var resultschwell))
{ {
zeiterfassungsSchwellwert = resultschwell; zeiterfassungsSchwellwert = resultschwell;
} }
val = GetSettingValue(mandator.Settings, "DienstplanungStandardZeilenAnzahl"); val = GetSettingValue(settingsString, "DienstplanungStandardZeilenAnzahl");
if (int.TryParse(val, out var zeilenanzahl)) if (int.TryParse(val, out var zeilenanzahl))
{ {
settings.DienstplanungStandardZeilenAnzahl = zeilenanzahl; settings.DienstplanungStandardZeilenAnzahl = zeilenanzahl;
} }
val = GetSettingValue(mandator.Settings, "ShowDistanceFields"); val = GetSettingValue(settingsString, "ShowDistanceFields");
if (val != null && val.Equals("1")) if (val != null && val.Equals("1"))
{ {
showServiceRecordsDistanceFields = true; showServiceRecordsDistanceFields = true;
} }
val = GetSettingValue(mandator.Settings, "ShowCustomerDistanceFields"); val = GetSettingValue(settingsString, "ShowCustomerDistanceFields");
if (val != null && val.Equals("1")) if (val != null && val.Equals("1"))
{ {
showCustomerDistanceFields = true; showCustomerDistanceFields = true;
} }
val = GetSettingValue(mandator.Settings, "ShowAdditionalService"); val = GetSettingValue(settingsString, "ShowAdditionalService");
if (val != null && val.Equals("1")) if (val != null && val.Equals("1"))
{ {
showAdditionalService = true; showAdditionalService = true;
} }
val = GetSettingValue(mandator.Settings, "ShowRoundedDurationInEmployeeAnalysis"); val = GetSettingValue(settingsString, "ShowRoundedDurationInEmployeeAnalysis");
if (val != null && val.Equals("0")) if (val != null && val.Equals("0"))
{ {
showRoundedDurationInEmployeeAnalysis = false; showRoundedDurationInEmployeeAnalysis = false;
} }
val = GetSettingValue(mandator.Settings, "SortServiceDescriptionAlphabetically"); val = GetSettingValue(settingsString, "ShowWorktime");
if (val != null && val.Equals("1"))
{
settings.ShowWorktime = true;
}
val = GetSettingValue(settingsString, SettingsKeys.EnableArbeitszeiterfassung);
if (val != null && val.Equals("1"))
{
settings.EnableArbeitszeiterfassung = true;
}
val = GetSettingValue(settingsString, SettingsKeys.EnableAutomaticPauses);
if (val != null && val.Equals("1"))
{
settings.EnableAutomaticPauses = true;
}
val = GetSettingValue(settingsString, SettingsKeys.EnableRestTimeWarning);
if (val != null && val.Equals("1"))
{
settings.EnableRestTimeWarning = true;
}
val = GetSettingValue(settingsString, SettingsKeys.MaxWorkTimeHoursBeforeWarning);
int hours;
if (Int32.TryParse(val, out hours))
{
settings.MaxWorkTimeHoursBeforeWarning = hours;
}
val = GetSettingValue(settingsString, "SortServiceDescriptionAlphabetically");
if (val != null && val.Equals("1")) if (val != null && val.Equals("1"))
{ {
sortServiceDescriptionAlphabetically = true; sortServiceDescriptionAlphabetically = true;
} }
val = GetSettingValue(mandator.Settings, "PrinterSettingsUseLandscape"); val = GetSettingValue(settingsString, "PrinterSettingsUseLandscape");
if (val != null && val.Equals("1")) if (val != null && val.Equals("1"))
{ {
printerSettingsUseLandscape = true; printerSettingsUseLandscape = true;
} }
val = GetSettingValue(mandator.Settings, "PrinterSettingsUseMargins"); val = GetSettingValue(settingsString, "PrinterSettingsUseMargins");
if (val != null && val.Equals("1")) if (val != null && val.Equals("1"))
{ {
printerSettingsUseMargins = true; printerSettingsUseMargins = true;
} }
val = GetSettingValue(mandator.Settings, "PrinterSettingsUsePaperKind"); val = GetSettingValue(settingsString, "PrinterSettingsUsePaperKind");
if (val != null && val.Equals("1")) if (val != null && val.Equals("1"))
{ {
printerSettingsUsePaperKind = true; printerSettingsUsePaperKind = true;
} }
val = GetSettingValue(mandator.Settings, "ShowSignature"); val = GetSettingValue(settingsString, "ShowSignature");
if (val != null && val.Equals("1")) if (val != null && val.Equals("1"))
{ {
showSignatures = true; showSignatures = true;
} }
val = GetSettingValue(mandator.Settings, "ShowRtfTextfeld"); val = GetSettingValue(settingsString, "ShowRtfTextfeld");
if (val != null && val.Equals("1")) if (val != null && val.Equals("1"))
{ {
showRtfTextfeld = true; showRtfTextfeld = true;
} }
val = GetSettingValue(mandator.Settings, "ShowChat"); val = GetSettingValue(settingsString, "ShowChat");
if (val != null && val.Equals("1")) if (val != null && val.Equals("1"))
{ {
settings.ShowChat = true; settings.ShowChat = true;

View File

@@ -17,47 +17,49 @@ namespace BeWo.Service.Import.Perseh
HilfeplanImportDC result = new HilfeplanImportDC(); HilfeplanImportDC result = new HilfeplanImportDC();
result.Gruppen = new List<HilfeplanImportItemDC>(); result.Gruppen = new List<HilfeplanImportItemDC>();
using (var processor = new PdfDocumentProcessor()) var gruppe1 = new HilfeplanImportItemDC { Label = "Leistungssuchende oder leistungsberechtigte Person", Items = new List<HilfeplanImportItemDC>() };
{ gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Name", Content = "Bäurle", FieldName = "LastName" });
using (var ms = new MemoryStream(daten)) gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Vorname", Content = "Christian", FieldName = "FirstName" });
{ gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Geburtsdatum", Content = "08.04.1972", FieldName = "Birthdate" });
processor.LoadDocument(ms); gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Nationalität", Content = "deutsch" });
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Beruf", Content = "Wirt" });
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "GP-Nummer/Az", Content = "73.20-2100009313-01" });
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Erstellt von der\nleistungssuchenden oder\nleistungsberechtigten Person\nmit Behinderung unter", Content = "Max Mustermann (Bezugsbetreuer)\nMaria Musterfrau (Sozialarbeiterin)" });
var pdfText = processor.Text; result.Gruppen.Add(gruppe1);
var gruppe1 = new HilfeplanImportItemDC { Label = "Leistungssuchende oder leistungsberechtigte Person", Items = new List<HilfeplanImportItemDC>() }; gruppe1 = new HilfeplanImportItemDC { Label = "Gruppe 2", Items = new List<HilfeplanImportItemDC>() };
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Name", Content = "Bäurle", FieldName = "LastName" }); gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Name", Content = "Bäurle", FieldName = "LastName" });
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Vorname", Content = "Christian", FieldName = "FirstName" }); gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Vorname", Content = "Christian", FieldName = "FirstName" });
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Geburtsdatum", Content = "08.04.1972", FieldName = "Birthdate" }); gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Geburtsdatum", Content = "08.04.1972", FieldName = "Birthdate" });
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Nationalität", Content = "deutsch"}); gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Nationalität", Content = "deutsch" });
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Beruf", Content = "Wirt" }); gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Beruf", Content = "Wirt" });
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "GP-Nummer/Az", Content = "73.20-2100009313-01" }); gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "GP-Nummer/Az", Content = "73.20-2100009313-01" });
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Erstellt von der\nleistungssuchenden oder\nleistungsberechtigten Person\nmit Behinderung unter", Content = "Max Mustermann (Bezugsbetreuer)\nMaria Musterfrau (Sozialarbeiterin)" }); gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Erstellt von der\nleistungssuchenden oder\nleistungsberechtigten Person\nmit Behinderung unter", Content = "Max Mustermann (Bezugsbetreuer)\nMaria Musterfrau (Sozialarbeiterin)" });
result.Gruppen.Add(gruppe1); result.Gruppen.Add(gruppe1);
gruppe1 = new HilfeplanImportItemDC { Label = "Gruppe 2", Items = new List<HilfeplanImportItemDC>() };
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Name", Content = "Bäurle", FieldName = "LastName" });
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Vorname", Content = "Christian", FieldName = "FirstName" });
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Geburtsdatum", Content = "08.04.1972", FieldName = "Birthdate" });
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Nationalität", Content = "deutsch" });
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Beruf", Content = "Wirt" });
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "GP-Nummer/Az", Content = "73.20-2100009313-01" });
gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Erstellt von der\nleistungssuchenden oder\nleistungsberechtigten Person\nmit Behinderung unter", Content = "Max Mustermann (Bezugsbetreuer)\nMaria Musterfrau (Sozialarbeiterin)" });
result.Gruppen.Add(gruppe1);
result.Ziele = new List<HilfeplanImportZielDC>();
result.Ziele.Add(new HilfeplanImportZielDC { Bereich = "Lernen und Wissensanwendung", ZielName = "Ziel 1", ZielBeschreibung = "Herr Sowieso hat eine seinen Bedürfnissen entsprechende und ihn stabilisierende Tagesstruktur mit einer regelmäßigen, genesungsfördernden Beschäftigung(z.B.Ergotherapie) entwickelt." });
result.Ziele.Add(new HilfeplanImportZielDC { Bereich = "Lernen und Wissensanwendung", ZielName = "Ziel 2", ZielBeschreibung = "Herr Sowieso hat Angstbewältigungsstrategien sowie Stabilisierungstechniken erlernt und kann diese in Alltagssituationen anwenden" });
result.Ziele.Add(new HilfeplanImportZielDC { Bereich = "Allgemeine Aufgaben und Anforderungen", ZielName = "Ziel 1", ZielBeschreibung = "Herr Sowieso hat eine seinen Bedürfnissen entsprechende und ihn stabilisierende Tagesstruktur mit einer regelmäßigen, genesungsfördernden Beschäftigung(z.B.Ergotherapie) entwickelt." });
result.Ziele.Add(new HilfeplanImportZielDC { Bereich = "Allgemeine Aufgaben und Anforderungen", ZielName = "Ziel 2", ZielBeschreibung = "Herr Sowieso hat Angstbewältigungsstrategien sowie Stabilisierungstechniken erlernt und kann diese in Alltagssituationen anwenden" });
//using (var processor = new PdfDocumentProcessor())
//{
// using (var ms = new MemoryStream(daten))
// {
// processor.LoadDocument(ms);
// var pdfText = processor.Text;
// }
result.Ziele = new List<HilfeplanImportZielDC>(); //}
result.Ziele.Add(new HilfeplanImportZielDC { Bereich = "Lernen und Wissensanwendung", ZielName = "Ziel 1", ZielBeschreibung = "Herr Sowieso hat eine seinen Bedürfnissen entsprechende und ihn stabilisierende Tagesstruktur mit einer regelmäßigen, genesungsfördernden Beschäftigung(z.B.Ergotherapie) entwickelt." });
result.Ziele.Add(new HilfeplanImportZielDC { Bereich = "Lernen und Wissensanwendung", ZielName = "Ziel 2", ZielBeschreibung = "Herr Sowieso hat Angstbewältigungsstrategien sowie Stabilisierungstechniken erlernt und kann diese in Alltagssituationen anwenden" });
result.Ziele.Add(new HilfeplanImportZielDC { Bereich = "Allgemeine Aufgaben und Anforderungen", ZielName = "Ziel 1", ZielBeschreibung = "Herr Sowieso hat eine seinen Bedürfnissen entsprechende und ihn stabilisierende Tagesstruktur mit einer regelmäßigen, genesungsfördernden Beschäftigung(z.B.Ergotherapie) entwickelt." });
result.Ziele.Add(new HilfeplanImportZielDC { Bereich = "Allgemeine Aufgaben und Anforderungen", ZielName = "Ziel 2", ZielBeschreibung = "Herr Sowieso hat Angstbewältigungsstrategien sowie Stabilisierungstechniken erlernt und kann diese in Alltagssituationen anwenden" });
}
}
return result; return result;
} }

View File

@@ -24,7 +24,26 @@ namespace BeWo.Service.Plugins
{ {
public AiChatDC CreateAiQueryForServiceRecords(AiChatDC acdc, long cb2scOid, DateTime startdate, DateTime enddate) public AiChatDC CreateAiQueryForServiceRecords(AiChatDC acdc, long cb2scOid, DateTime startdate, DateTime enddate)
{ {
String context = CreateContextForServiceRecords(cb2scOid, startdate, enddate);
return CreateWebRequest(acdc, context);
}
public AiChatDC CreateAiQueryForSingleCustomer(AiChatDC acdc, long customerOid)
{
String context = "";
return CreateWebRequest(acdc, context);
}
public AiChatDC CreateAiQueryForObjects(AiChatDC acdc, long objectTid)
{
String context = "";
return CreateWebRequest(acdc, context);
}
public AiChatDC CreateWebRequest(AiChatDC acdc, String context)
{
using (WebClient client = new WebClient()) using (WebClient client = new WebClient())
{ {
String url = "https://ai1.ownsoft.de/osaiquery.php"; String url = "https://ai1.ownsoft.de/osaiquery.php";
@@ -33,11 +52,11 @@ namespace BeWo.Service.Plugins
//stm = Der Kontext->Auf welcher Datenbasis soll eure Frage beantwortet werden.Kann auch leer sein. //stm = Der Kontext->Auf welcher Datenbasis soll eure Frage beantwortet werden.Kann auch leer sein.
//pmt = Der Prompt->Eure Frage //pmt = Der Prompt->Eure Frage
//opt = Art der Rückgabe(json oder plaintext) //opt = Art der Rückgabe(json oder plaintext)
String kontext = CreateContextForServiceRecords(cb2scOid, startdate, enddate);
var nvc = new NameValueCollection(); var nvc = new NameValueCollection();
nvc.Add("mel", "llama3-gradient"); nvc.Add("mel", "llama3-gradient");
nvc.Add("stm", kontext); nvc.Add("stm", context);
nvc.Add("pmt", acdc.Prompt); nvc.Add("pmt", acdc.Prompt);
nvc.Add("opt", "json"); nvc.Add("opt", "json");
@@ -51,9 +70,8 @@ namespace BeWo.Service.Plugins
} }
return new AiChatDC { Result = "Das kann ich leider nicht beantworten:)" }; return new AiChatDC { Result = "Das kann ich leider nicht beantworten:)" };
}
}
public virtual string CreateContextForServiceRecords(long cb2scOid, DateTime startdate, DateTime enddate) public virtual string CreateContextForServiceRecords(long cb2scOid, DateTime startdate, DateTime enddate)
{ {
var c2s = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(cb2scOid); var c2s = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(cb2scOid);

View File

@@ -20,7 +20,7 @@ namespace BeWo.Service.Plugins
#if DEBUG #if DEBUG
var t = "demo"; var t = "demo";
//t = "irgendwaswasesnichtgibt"; t = "irgendwaswasesnichtgibt";
//t = "5473568546"; //Interner Chat //t = "5473568546"; //Interner Chat
//t = "2356097460"; // Lebenshilfe Würzburg //t = "2356097460"; // Lebenshilfe Würzburg
//t = "1234567890"; // Präsentationsdatenbank //t = "1234567890"; // Präsentationsdatenbank
@@ -70,7 +70,7 @@ namespace BeWo.Service.Plugins
//t = "5351926758"; // Viva a Vida //t = "5351926758"; // Viva a Vida
//t = "2215396183"; // Diakonie Remscheid Lennep //t = "2215396183"; // Diakonie Remscheid Lennep
//t = "5157599087"; // SHG Schwerte //t = "5157599087"; // SHG Schwerte
//t = "4526293996"; // Fortis t = "4526293996"; // Fortis
//t = "3647969417"; // Caritas Bottrop //t = "3647969417"; // Caritas Bottrop
//t = "3057313346"; // SSB Mainz //t = "3057313346"; // SSB Mainz
//t = "6246287823"; // BeWo Alsdorf //t = "6246287823"; // BeWo Alsdorf
@@ -82,7 +82,7 @@ namespace BeWo.Service.Plugins
//t = "8001550599"; // Biallas BeWo //t = "8001550599"; // Biallas BeWo
//t = "7282396774"; // Caritas Unna //t = "7282396774"; // Caritas Unna
//t = "6884855402"; // IBP //t = "6884855402"; // IBP
t = "4867997795"; // ADiK Kleve //t = "4867997795"; // ADiK Kleve
//t = "3184859776"; // Sergej Becker //t = "3184859776"; // Sergej Becker
//t = "7752610643"; // BWK Gbr //t = "7752610643"; // BWK Gbr
//t = "3785623125"; // Betreuwo //t = "3785623125"; // Betreuwo
@@ -386,7 +386,7 @@ namespace BeWo.Service.Plugins
//t = "7113513872"; // Verein für Beratung und Therapie - LOK //t = "7113513872"; // Verein für Beratung und Therapie - LOK
//t = "1676990640"; // Perspektive - Selbständiges Leben //t = "1676990640"; // Perspektive - Selbständiges Leben
//t = "2544632712"; // Wabe gGmbH //t = "2544632712"; // Wabe gGmbH
//t = "7077286353"; // PariSozial t = "7077286353"; // PariSozial
//t = "5000000000"; //t = "5000000000";
return t; return t;

View File

@@ -94,7 +94,7 @@ namespace BeWo.Service.Plugins
AddOrReplaceTranslation(dict, "EmployeeSchutzstufe", "Schutzstufe"); AddOrReplaceTranslation(dict, "EmployeeSchutzstufe", "Schutzstufe");
AddOrReplaceTranslation(dict, "EmployeeBemerkungenSbd", "Allgemeine Bemerkungen"); AddOrReplaceTranslation(dict, "EmployeeBemerkungenSbd", "Allgemeine Bemerkungen");
AddOrReplaceTranslation(dict, "Zwei Faktor Authentifizierung erforderlich", "Es wurde ein Code an Ihre E-Mail Adresse gesendet.\n\nBitte geben Sie den Code hier ein:"); AddOrReplaceTranslation(dict, "Zwei Faktor Authentifizierung erforderlich", "Zwei Faktor Authentifizierung erforderlich.\nEs wurde ein Code an ownChat gesendet.\n\nBitte geben Sie hier den Code ein:");
AddOrReplaceTranslation(dict, "Neue Mitarbeiterlizenz bestellen", "Neue Lizenz bestellen"); AddOrReplaceTranslation(dict, "Neue Mitarbeiterlizenz bestellen", "Neue Lizenz bestellen");

View File

@@ -38,7 +38,7 @@ namespace BeWo.Service.Security
// TODO Hier kann man jetzt etwas bauen wer sich für welchen service autorisieren muss... // TODO Hier kann man jetzt etwas bauen wer sich für welchen service autorisieren muss...
var skip = new string[] { "Download", "Download2", "DownloadInfo", "GetUpdatePlan", "GetUpdateFile", "ResetAllTenants" }; var skip = new string[] { "Download", "Download2", "DownloadInfo", "GetUpdatePlan", "GetUpdateFile", "ResetAllTenants" };
if (lMethodName == "IsUserValid" || lMethodName == "IsUserValidTwoFactor" || lMethodName == "ResetTenant" || lMethodName == "ResetAllTenant" || lMethodName == "GetEmailForUserName") if (lMethodName == "IsUserValid" || lMethodName == "IsUserValidTwoFactor" || lMethodName == "ResetTenant" || lMethodName == "ResetAllTenant" || lMethodName == "GetEmailForUserName" || lMethodName == "GetTranslationDictionary")
{ {
return null; return null;
} }

View File

@@ -1371,5 +1371,13 @@ namespace BeWo.Service.ServiceContracts
[FaultContract(typeof(BeWoFault))] [FaultContract(typeof(BeWoFault))]
[OperationContract] [OperationContract]
AiChatDC CreateAiQueryForServiceRecords(AiChatDC acdc, long cb2scOid, DateTime startdate, DateTime enddate); AiChatDC CreateAiQueryForServiceRecords(AiChatDC acdc, long cb2scOid, DateTime startdate, DateTime enddate);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
AiChatDC CreateAiQueryForSingleCustomer(AiChatDC acdc, long customerOid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
AiChatDC CreateAiQueryForObjects(AiChatDC acdc, long objectTid);
} }
} }

View File

@@ -975,13 +975,13 @@ namespace BeWo.Service.ServiceImplementations
} }
} }
if (!settingValueDict.ContainsKey("Arbeitszeiterfassung") && settingValueDict.ContainsKey("ShowWorktime")) //if (!settingValueDict.ContainsKey("Arbeitszeiterfassung") && settingValueDict.ContainsKey("ShowWorktime"))
{ //{
if (settingValueDict["ShowWorktime"] != "0") // if (settingValueDict["ShowWorktime"] != "0")
{ // {
settingValueDict.Add("Arbeitszeiterfassung", "1"); // settingValueDict.Add("Arbeitszeiterfassung", "1");
} // }
} //}
if (!settingValueDict.ContainsKey("ShowScheduler") && man.IsSchedulerAllowed) if (!settingValueDict.ContainsKey("ShowScheduler") && man.IsSchedulerAllowed)
{ {
@@ -8910,6 +8910,36 @@ namespace BeWo.Service.ServiceImplementations
throw Utils.CreateBeWoFaultException(e); throw Utils.CreateBeWoFaultException(e);
} }
} }
public AiChatDC CreateAiQueryForSingleCustomer(AiChatDC acdc, long customerOid)
{
try
{
var s = PluginLoader.FindClass<AiService>();
return s.CreateAiQueryForSingleCustomer(acdc, customerOid);
}
catch (Exception e)
{
throw Utils.CreateBeWoFaultException(e);
}
}
public AiChatDC CreateAiQueryForObjects(AiChatDC acdc, long objectTid)
{
try
{
var s = PluginLoader.FindClass<AiService>();
return s.CreateAiQueryForObjects(acdc, objectTid);
}
catch (Exception e)
{
throw Utils.CreateBeWoFaultException(e);
}
}
} }
public class ServiceRecord2SignatureStates public class ServiceRecord2SignatureStates

View File

@@ -55,7 +55,7 @@
public static string DontShowSpitzabrechnung => "DontShowSpitzabrechnung"; public static string DontShowSpitzabrechnung => "DontShowSpitzabrechnung";
public static string ShowDienstplanung => "ShowDienstplanung"; public static string ShowDienstplanung => "ShowDienstplanung";
public static string Arbeitszeiterfassung => "Arbeitszeiterfassung"; public static string ShowWorktime => "ShowWorktime";
public static string EnableArbeitszeiterfassung => "EnableArbeitszeiterfassung"; public static string EnableArbeitszeiterfassung => "EnableArbeitszeiterfassung";
public static string EnableAutomaticPauses => "EnableAutomaticPauses"; public static string EnableAutomaticPauses => "EnableAutomaticPauses";
public static string EnableRestTimeWarning => "EnableRestTimeWarning"; public static string EnableRestTimeWarning => "EnableRestTimeWarning";
@@ -88,6 +88,7 @@
public static string ShowInfoButtonInCalender => "ShowInfoButtonInCalender"; public static string ShowInfoButtonInCalender => "ShowInfoButtonInCalender";
public static string ShowHilfeplanStatistikReport => "ShowHilfeplanStatistikReport"; public static string ShowHilfeplanStatistikReport => "ShowHilfeplanStatistikReport";
public static string ShowAI => "ShowAI"; public static string ShowAI => "ShowAI";
public static string ShowAIInternal => "ShowAIInternal";
public static string MoKSessionTimeout => "MoKSessionTimeout"; public static string MoKSessionTimeout => "MoKSessionTimeout";

View File

@@ -76,6 +76,37 @@ namespace BS.Shared.DataContracts.Compact
set { } set { }
} }
public string CommunicationString
{
get
{
string info = string.Empty;
if (!string.IsNullOrEmpty(this.Communication1))
info = this.Communication1;
if (!string.IsNullOrEmpty(this.Communication2))
{
if (info.Length > 0)
info += " ";
info += this.Communication2;
}
if (!string.IsNullOrEmpty(this.Communication3))
{
if (info.Length > 0)
info += " ";
info += this.Communication3;
}
if (!string.IsNullOrEmpty(this.Communication4))
{
if (info.Length > 0)
info += " ";
info += this.Communication4;
}
return info;
}
set { }
}
public string Birthday public string Birthday
{ {
get get
@@ -102,8 +133,7 @@ namespace BS.Shared.DataContracts.Compact
{ {
get get
{ {
return this.Title + " " + this.FirstName + " " + this.LastName + " " + this.Function + " " + this.AddressString + return this.Title + " " + this.FirstName + " " + this.LastName + " " + this.Function + " " + this.AddressString + " " + this.CommunicationString + " " + this.Organisation;
this.Organisation;
} }
} }