- Neue Einstellungen beim Mandator
- History für Abwesenheiten - History überarbeitet - Berichte für Einträge ohne Unterschriften
This commit is contained in:
@@ -239,6 +239,18 @@ namespace BeWo
|
||||
isServiceRecordNoticeMandatory = false;
|
||||
}
|
||||
|
||||
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.IsServiceRecordGoalMandatory);
|
||||
if (val != null && val.Equals("1"))
|
||||
{
|
||||
AppSettings.IsServiceRecordGoalMandatory = true;
|
||||
}
|
||||
|
||||
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.IsServiceRecordRatingMandatory);
|
||||
if (val != null && val.Equals("1"))
|
||||
{
|
||||
AppSettings.IsServiceRecordRatingMandatory = true;
|
||||
}
|
||||
|
||||
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.IsPasswordSecurityActiv);
|
||||
if (val != null && val.Equals("1"))
|
||||
{
|
||||
@@ -491,9 +503,9 @@ namespace BeWo
|
||||
AppSettings.ShowKlientenBetreuungszeiten = true;
|
||||
}
|
||||
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.FilterGroupServiceCategories);
|
||||
if (val != null && val.Equals("0"))
|
||||
if (val != null && val.Equals("1"))
|
||||
{
|
||||
AppSettings.FilterGroupServiceCategories = false;
|
||||
AppSettings.FilterGroupServiceCategories = true;
|
||||
}
|
||||
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowInfoButtonInCalender);
|
||||
if (val != null && val.Equals("1"))
|
||||
|
||||
@@ -63,6 +63,7 @@ using BeWo.View.Detail.Zeiterfassung;
|
||||
using DevExpress.Xpf.Scheduling;
|
||||
using CommandBarStyle = DevExpress.Xpf.DocumentViewer.CommandBarStyle;
|
||||
using ImageSource = System.Windows.Media.ImageSource;
|
||||
using BS.Shared.Translation;
|
||||
|
||||
namespace BeWo.Core
|
||||
{
|
||||
@@ -1666,11 +1667,19 @@ namespace BeWo.Core
|
||||
MessageBox.Show("Bitte wählen Sie eine Leistung aus. Sollten keine Leistungen für die gewählte Kategorie verfügbar sein, müssen diese zunächst in der Verwaltung angelegt werden.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
return false;
|
||||
}
|
||||
if(vm.GoalTree != null && vm.GoalTree.Count > 0 && (cb2ScOids == null || cb2ScOids.Count < 2))
|
||||
if(vm.GoalTree != null && vm.GoalTree.Count > 0)
|
||||
{
|
||||
if(vm.SelectedGoals.Count == 0 && MessageBox.Show("Es wurde kein Ziel zugeordnet. Sind Sie sicher, dass Sie speichern möchten?", "Speichern", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No)
|
||||
if(vm.SelectedGoals.Count == 0)
|
||||
{
|
||||
return false;
|
||||
if (BeWoApp.AppSettings.IsServiceRecordGoalMandatory)
|
||||
{
|
||||
MessageBox.Show(Translator.Translate("Sie müssen mindestens ein Ziel auswählen, bevor Sie speichern können."), "Speichern", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
return false;
|
||||
}
|
||||
else if (MessageBox.Show("Es wurde kein Ziel zugeordnet. Sind Sie sicher, dass Sie speichern möchten?", "Speichern", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace BeWo.Core.Config
|
||||
public class AppSettings
|
||||
{
|
||||
private bool mIsServiceRecordNoticeMandatory = true;
|
||||
private bool mIsServiceRecordGoalMandatory = false;
|
||||
private bool mIsServiceRecordRatingMandatory = false;
|
||||
|
||||
private bool mIsPasswordSecurityActiv = false;
|
||||
|
||||
@@ -28,7 +30,7 @@ namespace BeWo.Core.Config
|
||||
|
||||
private bool _showExpiredSupportConcepts = true;
|
||||
private bool _showServiceRecordGridControl = true;
|
||||
private bool _filterGroupServiceCategories = true;
|
||||
private bool _filterGroupServiceCategories = false;
|
||||
private bool mOpenReportInNewWindow = false;
|
||||
|
||||
private WindowStateType mWindowStateType = WindowStateType.Default;
|
||||
@@ -67,6 +69,19 @@ namespace BeWo.Core.Config
|
||||
set { mIsServiceRecordNoticeMandatory = value; }
|
||||
}
|
||||
|
||||
public bool IsServiceRecordGoalMandatory
|
||||
{
|
||||
get { return mIsServiceRecordGoalMandatory; }
|
||||
|
||||
set { mIsServiceRecordGoalMandatory = value; }
|
||||
}
|
||||
|
||||
public bool IsServiceRecordRatingMandatory
|
||||
{
|
||||
get { return mIsServiceRecordRatingMandatory; }
|
||||
|
||||
set { mIsServiceRecordRatingMandatory = value; }
|
||||
}
|
||||
public bool IsPasswordSecurityActiv
|
||||
{
|
||||
get { return mIsPasswordSecurityActiv; }
|
||||
|
||||
@@ -346,6 +346,9 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="430" />
|
||||
@@ -358,9 +361,26 @@
|
||||
Margin="3,5,3,5"
|
||||
Content="{markup:Translate Dokumentationstext in der Zeiterfassung Pflichtfeld}"
|
||||
IsChecked="{Binding Path=IsServiceRecordNoticeMandatory}" />
|
||||
|
||||
<TextBlock
|
||||
<CheckBox
|
||||
Grid.Row="1"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="3,5,3,5"
|
||||
Content="{markup:Translate Ziele in der Zeiterfassung Pflichtfeld (falls Ziele vorhanden sind)}"
|
||||
IsChecked="{Binding Path=IsServiceRecordGoalMandatory}" />
|
||||
<CheckBox
|
||||
Grid.Row="2"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="3,5,3,5"
|
||||
Content="{markup:Translate Bewertung von Zielen in der Zeiterfassung Pflichtfeld (falls vorhanden)}"
|
||||
IsChecked="{Binding Path=IsServiceRecordRatingMandatory}" />
|
||||
<CheckBox
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="3,5,3,5"
|
||||
Content="{markup:Translate Bei Gruppenbuchungen nur Schnittmenge aller Leistungen anbieten}"
|
||||
IsChecked="{Binding Path=FilterGroupServiceCategories}" />
|
||||
<TextBlock
|
||||
Grid.Row="4"
|
||||
Grid.Column="0"
|
||||
Margin="3,5,3,5"
|
||||
VerticalAlignment="Center"
|
||||
@@ -368,7 +388,7 @@
|
||||
Text="{markup:Translate Anzahl Tage des Folgemonats\, nach denen die Zeiterfassungseinträge des vergangenen Monats nicht mehr verändert werden oder neue Zeiterfassungseinträge angelegt werden dürfen (0 für unbegrenzt).}"
|
||||
TextWrapping="Wrap" />
|
||||
<dxe:SpinEdit
|
||||
Grid.Row="1"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
Height="23"
|
||||
Margin="3,5,3,5"
|
||||
@@ -378,7 +398,7 @@
|
||||
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.Row="5"
|
||||
Grid.Column="0"
|
||||
Margin="3,5,3,5"
|
||||
VerticalAlignment="Center"
|
||||
@@ -386,7 +406,7 @@
|
||||
Text="{markup:Translate Anzahl Tage\, in der die Zeiterfassung erfolgen muss (0 für unbegrenzt)}"
|
||||
TextWrapping="Wrap" />
|
||||
<TextBlock
|
||||
Grid.Row="3"
|
||||
Grid.Row="6"
|
||||
Grid.Column="0"
|
||||
Margin="3,5,3,5"
|
||||
VerticalAlignment="Center"
|
||||
@@ -396,7 +416,7 @@
|
||||
|
||||
<dxe:SpinEdit
|
||||
x:Name="AnzTageZeiterfassErfolgt"
|
||||
Grid.Row="2"
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
Height="23"
|
||||
Margin="3,5,3,5"
|
||||
@@ -407,7 +427,7 @@
|
||||
|
||||
<dxe:SpinEdit
|
||||
x:Name="ZeiterfassungsSchwellwert"
|
||||
Grid.Row="3"
|
||||
Grid.Row="6"
|
||||
Grid.Column="1"
|
||||
Height="23"
|
||||
Margin="3,5,3,5"
|
||||
@@ -419,7 +439,7 @@
|
||||
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="4"
|
||||
Grid.Row="7"
|
||||
Grid.Column="0"
|
||||
Margin="3,5,3,5"
|
||||
VerticalAlignment="Center"
|
||||
@@ -428,7 +448,7 @@
|
||||
TextWrapping="Wrap" />
|
||||
<ComboBox
|
||||
x:Name="ComboZeiteinheit"
|
||||
Grid.Row="4"
|
||||
Grid.Row="7"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Height="23"
|
||||
@@ -438,7 +458,7 @@
|
||||
|
||||
|
||||
<CheckBox
|
||||
Grid.Row="6"
|
||||
Grid.Row="8"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="3,5,3,5"
|
||||
Content="{markup:Translate Enddatum anzeigen}"
|
||||
@@ -446,21 +466,21 @@
|
||||
|
||||
<CheckBox
|
||||
x:Name="EnableArbeitszeiterfassung"
|
||||
Grid.Row="7"
|
||||
Grid.Row="9"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="3,20,3,5"
|
||||
Content="{markup:Translate Arbeitszeit mit BeWoPlaner erfassen}"
|
||||
IsChecked="{Binding Path=EnableArbeitszeiterfassung}" Checked="EnableArbeitszeiterfassung_Checked" Unchecked="EnableArbeitszeiterfassung_Checked"/>
|
||||
<CheckBox
|
||||
x:Name="EnableAutomaticPauses"
|
||||
Grid.Row="8"
|
||||
Grid.Row="10"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="3,5,3,5"
|
||||
Content="{markup:Translate Automatischer Pausenabzug}"
|
||||
IsChecked="{Binding Path=EnableAutomaticPauses}" />
|
||||
<CheckBox
|
||||
x:Name="EnableRestTimeWarning"
|
||||
Grid.Row="9"
|
||||
Grid.Row="11"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="3,5,3,5"
|
||||
Content="{markup:Translate Warnung bei nicht einhalten der Ruhezeit}"
|
||||
@@ -468,7 +488,7 @@
|
||||
|
||||
<TextBlock
|
||||
x:Name="TextBlockShowWarning"
|
||||
Grid.Row="10"
|
||||
Grid.Row="12"
|
||||
Grid.Column="0"
|
||||
Margin="3,5,3,5"
|
||||
VerticalAlignment="Center"
|
||||
@@ -477,7 +497,7 @@
|
||||
TextWrapping="Wrap" />
|
||||
<dxe:SpinEdit
|
||||
x:Name="SpinEditShowWarning"
|
||||
Grid.Row="10"
|
||||
Grid.Row="12"
|
||||
Grid.Column="1"
|
||||
Height="23"
|
||||
Margin="3,5,3,5"
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace BeWo.View.Detail
|
||||
var newName = pName;
|
||||
var counter = 1;
|
||||
|
||||
while(ViewModel.VMList.Any(a => a.Name.Equals(newName)))
|
||||
while(ViewModel.VMList.Any(a => a.Name != null && a.Name.Equals(newName)))
|
||||
{
|
||||
newName = pName + " " + counter;
|
||||
counter++;
|
||||
|
||||
@@ -96,109 +96,108 @@
|
||||
<RowDefinition Height="23" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Details" Margin="0 1" Grid.Row="1" Name="Details"
|
||||
<TextBlock Text="{Binding Path=DetailText}" Margin="0 1" Grid.Row="1" Name="Details"
|
||||
VerticalAlignment="Bottom"
|
||||
TextElement.FontSize="16"
|
||||
TextElement.Foreground="{StaticResource TabItemHotTextBrush}"
|
||||
TextElement.FontFamily="Microsoft Sans Serif"
|
||||
/>
|
||||
/>
|
||||
|
||||
<Grid Margin="0" Grid.Row="0" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="0" Grid.Row="0" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="0,3,3,3" VerticalAlignment="Center" >Gültig von</Label>
|
||||
<Label Grid.Column="2" Grid.Row="0" Margin="3" VerticalAlignment="Center">Gültig bis</Label>
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="0,3,3,3" VerticalAlignment="Center" >Gültig von</Label>
|
||||
<Label Grid.Column="2" Grid.Row="0" Margin="3" VerticalAlignment="Center">Gültig bis</Label>
|
||||
|
||||
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" AllowNullInput="True" Grid.Column="1" Grid.Row="0" Margin="3" Width="125" Height="23" EditValue="{Binding Path=GueltigVon, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" AllowNullInput="True" Grid.Column="3" Grid.Row="0" Margin="3" Width="125" Height="23" EditValue="{Binding Path=GueltigBis, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
|
||||
|
||||
|
||||
<Button Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Content="Neuen Arbeitstag hinzufügen" HorizontalAlignment="Left" Click="AddArbeitszeitToView_Click" Height="23" Margin="0,10,0,0"/>
|
||||
|
||||
<controls:PopupNonTopmost Name="popup_newArbeitszeitEintrag" Placement="MousePoint" StaysOpen="True" >
|
||||
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray">
|
||||
<GroupBox Name="groupbox_newArbeistzeit" Header="Neuen Eintrag hinzufügen" Style="{DynamicResource ObjectEditGroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center" Content="{markup:Translate Klient}"/>
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Tag</Label>
|
||||
<Label Grid.Column="0" Grid.Row="2" Margin="3" VerticalAlignment="Center">Uhrzeit von</Label>
|
||||
<Label Grid.Column="0" Grid.Row="3" Margin="3" VerticalAlignment="Center">Uhrzeit bis</Label>
|
||||
<Label Grid.Column="0" Grid.Row="4" Margin="3" VerticalAlignment="Top">Bemerkungen</Label>
|
||||
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" AllowNullInput="True" Grid.Column="1" Grid.Row="0" Margin="3" Width="125" Height="23" EditValue="{Binding Path=GueltigVon, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" AllowNullInput="True" Grid.Column="3" Grid.Row="0" Margin="3" Width="125" Height="23" EditValue="{Binding Path=GueltigBis, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
|
||||
|
||||
<controls1:PopUpEdit Cursor="Arrow"
|
||||
|
||||
<Button Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Content="Neuen Arbeitstag hinzufügen" HorizontalAlignment="Left" Click="AddArbeitszeitToView_Click" Height="23" Margin="0,10,0,0"/>
|
||||
|
||||
<controls:PopupNonTopmost Name="popup_newArbeitszeitEintrag" Placement="MousePoint" StaysOpen="True" >
|
||||
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray">
|
||||
<GroupBox Name="groupbox_newArbeistzeit" Header="Neuen Eintrag hinzufügen" Style="{DynamicResource ObjectEditGroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center" Content="{markup:Translate Klient}"/>
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Tag</Label>
|
||||
<Label Grid.Column="0" Grid.Row="2" Margin="3" VerticalAlignment="Center">Uhrzeit von</Label>
|
||||
<Label Grid.Column="0" Grid.Row="3" Margin="3" VerticalAlignment="Center">Uhrzeit bis</Label>
|
||||
<Label Grid.Column="0" Grid.Row="4" Margin="3" VerticalAlignment="Top">Bemerkungen</Label>
|
||||
|
||||
|
||||
<controls1:PopUpEdit Cursor="Arrow"
|
||||
IsReadOnly="True"
|
||||
x:Name="popupedit_KlientSearch" Grid.Column="1" Margin="3" Height="23"
|
||||
Grid.Row="1" DeleteButtonVisibility="Collapsed"
|
||||
PopUpClick="Popupedit_KlientVertretungSearch_OnPopUpClick" />
|
||||
|
||||
|
||||
<dxe:ComboBoxEdit Grid.Column="1" Grid.Row="0" VerticalContentAlignment="Center" Margin="3" Height="23" ItemsSource="{Binding Source={StaticResource AppointmentDayOfWeeks}}"
|
||||
|
||||
|
||||
<dxe:ComboBoxEdit Grid.Column="1" Grid.Row="0" VerticalContentAlignment="Center" Margin="3" Height="23" ItemsSource="{Binding Source={StaticResource AppointmentDayOfWeeks}}"
|
||||
EditValue="{validation:ValidationBinding Path=ArbeitszeitEintraege.NewVM.Tag, UpdateSourceTrigger=PropertyChanged}"
|
||||
Name="Tag" IsTextEditable="False"/>
|
||||
|
||||
<dxe:TextEdit Grid.Column="1" Grid.Row="2" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True" Name="UhrzeitVon"
|
||||
<dxe:TextEdit Grid.Column="1" Grid.Row="2" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True" Name="UhrzeitVon"
|
||||
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
|
||||
EditValue="{validation:ValidationBinding Path=ArbeitszeitEintraege.NewVM.UhrzeitVon, UpdateSourceTrigger=PropertyChanged}"
|
||||
Height="23"
|
||||
Margin="3,3,3,3"/>
|
||||
|
||||
<dxe:TextEdit Grid.Column="1" Grid.Row="3" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True" Name="UhrzeitBis"
|
||||
<dxe:TextEdit Grid.Column="1" Grid.Row="3" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True" Name="UhrzeitBis"
|
||||
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
|
||||
EditValue="{validation:ValidationBinding Path=ArbeitszeitEintraege.NewVM.UhrzeitBis, UpdateSourceTrigger=PropertyChanged}"
|
||||
Height="23"
|
||||
Margin="3,3,3,3"/>
|
||||
|
||||
<dxe:TextEdit Grid.Column="1" Grid.Row="4" Grid.RowSpan="2" Name="Notiz" Margin="3,3,3,3" TextWrapping="Wrap" AcceptsReturn="True" Width="250" Height="125" VerticalContentAlignment="Top" VerticalScrollBarVisibility="Auto"
|
||||
<dxe:TextEdit Grid.Column="1" Grid.Row="4" Grid.RowSpan="2" Name="Notiz" Margin="3,3,3,3" TextWrapping="Wrap" AcceptsReturn="True" Width="250" Height="125" VerticalContentAlignment="Top" VerticalScrollBarVisibility="Auto"
|
||||
EditValue="{validation:ValidationBinding Path=ArbeitszeitEintraege.NewVM.Notice, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
|
||||
|
||||
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Click="PopupNewArbeitszeit_Click" Content="Hinzufügen" Height="25"
|
||||
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Click="PopupNewArbeitszeit_Click" Content="Hinzufügen" Height="25"
|
||||
FontWeight="Normal" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<Button HorizontalAlignment="Right" VerticalAlignment="Center" Height="25"
|
||||
<Button HorizontalAlignment="Right" VerticalAlignment="Center" Height="25"
|
||||
Margin="3" Content="Abbrechen" Click="PopupArbeitszeitClose_Click" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Border>
|
||||
</controls:PopupNonTopmost>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Border>
|
||||
</controls:PopupNonTopmost>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox.Header>
|
||||
|
||||
<dxg:GridControl Name="grid_Arbeitszeiten" Tag="{Binding}" MaxWidth="{Binding ElementName=BlubbTest, Path=ActualWidth}" DataSource="{Binding Path=ArbeitszeitEintraege.VMList, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" CustomColumnSort="GridControl_OnCustomColumnSort" >
|
||||
|
||||
@@ -140,6 +140,48 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool IsServiceRecordGoalMandatory
|
||||
{
|
||||
get { return BeWoApp.AppSettings.IsServiceRecordGoalMandatory; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(BeWoApp.AppSettings.IsServiceRecordGoalMandatory, value))
|
||||
{
|
||||
BeWoApp.AppSettings.IsServiceRecordGoalMandatory = value;
|
||||
|
||||
this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "IsServiceRecordGoalMandatory", value ? "1" : "0");
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool IsServiceRecordRatingMandatory
|
||||
{
|
||||
get { return BeWoApp.AppSettings.IsServiceRecordRatingMandatory; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(BeWoApp.AppSettings.IsServiceRecordRatingMandatory, value))
|
||||
{
|
||||
BeWoApp.AppSettings.IsServiceRecordRatingMandatory = value;
|
||||
|
||||
this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "IsServiceRecordRatingMandatory", value ? "1" : "0");
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool FilterGroupServiceCategories
|
||||
{
|
||||
get { return BeWoApp.AppSettings.FilterGroupServiceCategories; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(BeWoApp.AppSettings.FilterGroupServiceCategories, value))
|
||||
{
|
||||
BeWoApp.AppSettings.FilterGroupServiceCategories = value;
|
||||
|
||||
this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "FilterGroupServiceCategories", value ? "1" : "0");
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool IsPasswordSecurityActiv
|
||||
{
|
||||
get { return BeWoApp.AppSettings.IsPasswordSecurityActiv; }
|
||||
|
||||
@@ -206,6 +206,7 @@
|
||||
<Compile Include="Access\UserDAO.cs" />
|
||||
<Compile Include="ASPHibernateSessionManager.cs" />
|
||||
<Compile Include="DefaultHibernateSessionManager.cs" />
|
||||
<Compile Include="Entities\AbsenceTimeHistory.cs" />
|
||||
<Compile Include="Entities\AiSettings.cs" />
|
||||
<Compile Include="Entities\CustomerVermittlungArbeit.cs" />
|
||||
<Compile Include="Entities\CustomerWohnhilfe.cs" />
|
||||
@@ -405,6 +406,7 @@
|
||||
<Compile Include="Entities\Person.cs" />
|
||||
<Compile Include="UpdInsInterceptor.cs" />
|
||||
<Compile Include="Utils\AppointmentSearchResult.cs" />
|
||||
<Compile Include="Utils\ServiceRecord2SignatureStates.cs" />
|
||||
<Compile Include="Utils\IntervalFinderHelper.cs" />
|
||||
<Compile Include="Utils\SignatureStateInfoFromServiceRecordHistoryEntry.cs" />
|
||||
<Compile Include="WCFHibernateSessionManager.cs" />
|
||||
@@ -780,6 +782,9 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Mappings\TwoFactorCode.hbm.xml" />
|
||||
<EmbeddedResource Include="Mappings\AiSettings.hbm.xml" />
|
||||
<EmbeddedResource Include="Mappings\AbsenceTimeHistory.hbm.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Content Include="Mappings\Timesheet2Mail.hbm.xml" />
|
||||
<EmbeddedResource Include="Mappings\ContactHistory.hbm.xml">
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
34
Data/Entities/AbsenceTimeHistory.cs
Normal file
34
Data/Entities/AbsenceTimeHistory.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
|
||||
namespace BeWo.Data.Entities
|
||||
{
|
||||
public class AbsenceTimeHistory : BeWoEntityBase
|
||||
{
|
||||
|
||||
public AbsenceTimeHistory()
|
||||
{
|
||||
this._Tid = TableID.AbsenceTimeHistory;
|
||||
}
|
||||
|
||||
public virtual StatementType ChangeType { get; set; }
|
||||
|
||||
public virtual long AbsenceTimeOid { get; set; }
|
||||
|
||||
public virtual long? AbsenceReasonOid { get; set; }
|
||||
|
||||
public virtual DateTime? AbsenceTimeEnd { get; set; }
|
||||
|
||||
public virtual DateTime? AbsenceTimeStart { get; set; }
|
||||
|
||||
public virtual DateTime? AbsenceTimeKrankheitsMeldung { get; set; }
|
||||
|
||||
public virtual long? AbsenceTimeCustomerOid { get; set; }
|
||||
|
||||
public virtual long? AbsenceTimeEmployeeOid { get; set; }
|
||||
|
||||
public virtual String AbsenceTimeNotice { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -59,18 +59,6 @@ namespace BeWo.Data.Entities
|
||||
}
|
||||
}
|
||||
|
||||
public virtual EmploymentType ContractHistoryEmploymentType
|
||||
{
|
||||
get { return this._EmploymentType; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._EmploymentType, value))
|
||||
{
|
||||
this._EmploymentType = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual decimal? ContractHistoryLeaveDays
|
||||
{
|
||||
@@ -195,12 +183,16 @@ namespace BeWo.Data.Entities
|
||||
}
|
||||
}
|
||||
|
||||
public virtual CostRatePeriod ContractHistoryHourlyRateCostRateValue { get; set; }
|
||||
|
||||
public virtual decimal? ContractHistoryProbationPeriod2 { get; set; }
|
||||
|
||||
public virtual ValueListEntry ContractHistoryContractTypeValueListEntry { get; set; }
|
||||
public virtual long? ContractOid { get; set; }
|
||||
|
||||
public virtual ValueListEntry ContractHistoryQualifikationsBedarfValueListEntry { get; set; }
|
||||
public virtual long? ContractHistoryEmploymentTypeOid { get; set; }
|
||||
|
||||
public virtual long? ContractHistoryHourlyRateCostRateValueOid { get; set; }
|
||||
|
||||
public virtual long? ContractHistoryContractTypeValueListEntryOid { get; set; }
|
||||
|
||||
public virtual long? ContractHistoryQualifikationsBedarfValueListEntryOid { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<property column="InsTs" type="DateTime" name="InsTs" />
|
||||
<property column="InsUser" type="String" name="InsUser" length="256" />
|
||||
<property column="UdpUser" type="String" name="UdpUser" length="256" />
|
||||
<property column="UpdTs" type="DateTime" name="UpdTs" />
|
||||
<property column="IsActive" type="BS.Shared.ActivationTypeId, BS.Shared" name="IsActive" />
|
||||
<property column="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" name="SystemEntryID" />
|
||||
<property column="EmployeeOid" type="Int64" name="EmployeeOid" update="false" insert="false" />
|
||||
|
||||
28
Data/Mappings/AbsenceTimeHistory.hbm.xml
Normal file
28
Data/Mappings/AbsenceTimeHistory.hbm.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="BeWo.Data.Entities.AbsenceTimeHistory, BeWo.Data" table="AbsenceTimeHistory">
|
||||
<id name="Oid" column="Oid" type="Int64" unsaved-value="null">
|
||||
<generator class="identity" />
|
||||
</id>
|
||||
<version type="Int64" column="Version" name="Version" />
|
||||
<property column="Tid" type="BS.Shared.TableID, BS.Shared" name="_Tid" access="field" />
|
||||
<property column="Notice" type="String" name="Notice" length="1024" />
|
||||
<property column="InsTs" type="DateTime" name="InsTs" />
|
||||
<property column="InsUser" type="String" name="InsUser" length="256" />
|
||||
<property column="UdpUser" type="String" name="UdpUser" length="256" />
|
||||
<property column="UpdTs" type="DateTime" name="UpdTs" />
|
||||
<property column="IsActive" type="BS.Shared.ActivationTypeId, BS.Shared" name="IsActive" />
|
||||
<property column="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" name="SystemEntryID" />
|
||||
<property name="ChangeType" type="BS.Shared.StatementType, BS.Shared" />
|
||||
|
||||
<property name="AbsenceTimeOid" type="Int64" />
|
||||
<property name="AbsenceReasonOid" type="Int64" />
|
||||
<property name="AbsenceTimeStart" type="DateTime" />
|
||||
<property name="AbsenceTimeEnd" type="DateTime" />
|
||||
<property name="AbsenceTimeKrankheitsMeldung" type="DateTime" />
|
||||
<property name="AbsenceTimeCustomerOid" type="Int64" />
|
||||
<property name="AbsenceTimeEmployeeOid" type="Int64" />
|
||||
<property name="AbsenceTimeNotice" type="String" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -9,6 +9,7 @@
|
||||
<property column="Notice" type="String" name="Notice" length="1024" />
|
||||
<property column="InsTs" type="DateTime" name="InsTs" />
|
||||
<property column="InsUser" type="String" name="InsUser" length="256" />
|
||||
<property column="UpdTs" type="DateTime" name="UpdTs" />
|
||||
<property column="UdpUser" type="String" name="UdpUser" length="256" />
|
||||
<property column="IsActive" type="BS.Shared.ActivationTypeId, BS.Shared" name="IsActive" />
|
||||
<property column="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" name="SystemEntryID" />
|
||||
|
||||
@@ -28,10 +28,11 @@
|
||||
<property column="ContractHistoryProbationPeriod" type="Int32" name="ContractHistoryProbationPeriod" />
|
||||
<property column="ContractHistoryProbationPeriod2" type="Decimal" name="ContractHistoryProbationPeriod2" />
|
||||
<property column="ContractHistoryWeeklyDays" type="Int32" name="ContractHistoryWeeklyDays" />
|
||||
<many-to-one name="ContractHistoryEmploymentType" column="ContractHistoryEmploymentTypeOid" class="BeWo.Data.Entities.EmploymentType,BeWo.Data" cascade="none" />
|
||||
<many-to-one name="ContractHistoryHourlyRateCostRateValue" column="ContractHistoryHourlyRateCostRateValueOid" class="BeWo.Data.Entities.CostRatePeriod,BeWo.Data" cascade="none" />
|
||||
<many-to-one name="ContractHistoryContractTypeValueListEntry" column="ContractHistoryContractTypeValueListEntryOid" class="BeWo.Data.Entities.ValueListEntry,BeWo.Data" cascade="none" />
|
||||
<many-to-one name="ContractHistoryQualifikationsBedarfValueListEntry" column="ContractHistoryQualifikationsBedarfValueListEntryOid" class="BeWo.Data.Entities.ValueListEntry,BeWo.Data" cascade="none" />
|
||||
<property name="ContractOid" type="Int64" />
|
||||
<property name="ContractHistoryEmploymentTypeOid" type="Int64" />
|
||||
<property name="ContractHistoryHourlyRateCostRateValueOid" type="Int64" />
|
||||
<property name="ContractHistoryContractTypeValueListEntryOid" type="Int64" />
|
||||
<property name="ContractHistoryQualifikationsBedarfValueListEntryOid" type="Int64" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
|
||||
|
||||
43
Data/Utils/ServiceRecord2SignatureStates.cs
Normal file
43
Data/Utils/ServiceRecord2SignatureStates.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using BeWo.Data.Entities;
|
||||
using BS.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.Data.Utils
|
||||
{
|
||||
public class ServiceRecord2SignatureStates
|
||||
{
|
||||
public ServiceRecord ServiceRecord { get; }
|
||||
public SignatureStateType? SingleSignatureStateType { get; set; }
|
||||
public SignatureStateType? CustomerMonthlySignatureStateType { get; set; }
|
||||
public SignatureStateType? EmployeeMonthlySignatreStateType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Erzeugt das Objekt mit den SignatureStates. Wird als Wert eines States null übergeben, wird beim Erzeugen des ServiceRecordHistory-Eintrags der Wert des vorherigen ServiceRecordHistory-Eintrags genommen, falls vorhanden.
|
||||
/// </summary>
|
||||
/// <param name="serviceRecord"></param>
|
||||
/// <param name="singleSignatureStateType"></param>
|
||||
/// <param name="customerMonthlySignatureStateType"></param>
|
||||
/// <param name="employeeMonthlySignatreStateType"></param>
|
||||
public ServiceRecord2SignatureStates(ServiceRecord serviceRecord, SignatureStateType? singleSignatureStateType, SignatureStateType? customerMonthlySignatureStateType, SignatureStateType? employeeMonthlySignatreStateType)
|
||||
{
|
||||
ServiceRecord = serviceRecord;
|
||||
SingleSignatureStateType = singleSignatureStateType;
|
||||
CustomerMonthlySignatureStateType = customerMonthlySignatureStateType;
|
||||
EmployeeMonthlySignatreStateType = employeeMonthlySignatreStateType;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is ServiceRecord2SignatureStates sr2Ss && sr2Ss.ServiceRecord != null)
|
||||
{
|
||||
return ServiceRecord?.Equals(sr2Ss.ServiceRecord) ?? false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<NameOfLastUsedPublishProfile>BeWo2.0</NameOfLastUsedPublishProfile>
|
||||
@@ -10,7 +10,7 @@
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
|
||||
31
Model/Changes_2025_03_07 AbsenceTimeHistory.txt
Normal file
31
Model/Changes_2025_03_07 AbsenceTimeHistory.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
ALTER TABLE `Contract`
|
||||
ADD COLUMN `UpdTs` datetime NULL DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `ContractHistory`
|
||||
ADD COLUMN `ContractOid` bigint NULL DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `AbsenceTime`
|
||||
ADD COLUMN `UpdTs` datetime NULL DEFAULT NULL;
|
||||
|
||||
CREATE TABLE `AbsenceTimeHistory` (
|
||||
`Oid` bigint NOT NULL AUTO_INCREMENT,
|
||||
`Tid` int NOT NULL,
|
||||
`Notice` varchar(1024) DEFAULT NULL,
|
||||
`InsTs` datetime DEFAULT NULL,
|
||||
`InsUser` varchar(256) DEFAULT NULL,
|
||||
`Version` bigint DEFAULT NULL,
|
||||
`UdpUser` varchar(256) DEFAULT NULL,
|
||||
`UpdTs` datetime DEFAULT NULL,
|
||||
`IsActive` tinyint DEFAULT NULL,
|
||||
`SystemEntryID` int DEFAULT NULL,
|
||||
`ChangeType` tinyint NULL DEFAULT NULL,
|
||||
`AbsenceTimeOid` bigint NULL DEFAULT NULL,
|
||||
`AbsenceReasonOid` bigint DEFAULT NULL,
|
||||
`AbsenceTimeStart` datetime DEFAULT NULL,
|
||||
`AbsenceTimeEnd` datetime DEFAULT NULL,
|
||||
`AbsenceTimeKrankheitsMeldung` datetime DEFAULT NULL,
|
||||
`AbsenceTimeNotice` varchar(1024) DEFAULT NULL,
|
||||
`AbsenceTimeEmployeeOid` bigint DEFAULT NULL,
|
||||
`AbsenceTimeCustomerOid` bigint DEFAULT NULL,
|
||||
PRIMARY KEY (`Oid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
@@ -1419,6 +1419,7 @@ ADD COLUMN `CustomDate3` datetime NULL DEFAULT NULL,
|
||||
ADD COLUMN `CustomDate4` datetime NULL DEFAULT NULL,
|
||||
ADD COLUMN `CustomDate5` datetime NULL DEFAULT NULL;
|
||||
|
||||
|
||||
CREATE TABLE `gkvabrechnung` (
|
||||
`Oid` bigint NOT NULL AUTO_INCREMENT,
|
||||
`Tid` int NOT NULL,
|
||||
@@ -1484,4 +1485,42 @@ CREATE TABLE `gkvtransferprotokoll` (
|
||||
PRIMARY KEY (`Oid`),
|
||||
KEY `FK_GKVTRANSFERPROTOKOLL_GKVABRECHNUNG` (`GkvAbrechnungOid`),
|
||||
CONSTRAINT `FK_GKVTRANSFERPROTOKOLL_GKVABRECHNUNG` FOREIGN KEY (`GkvAbrechnungOid`) REFERENCES `gkvabrechnung` (`Oid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
ALTER TABLE `gkvabrechnung`
|
||||
ADD COLUMN `OrganisationOid` BIGINT NULL DEFAULT NULL AFTER `Verfahrensstufe`;
|
||||
|
||||
ALTER TABLE `Parameter`
|
||||
ADD COLUMN `DefaultValue` VARCHAR(256) NULL DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `Contract`
|
||||
ADD COLUMN `UpdTs` datetime NULL DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `ContractHistory`
|
||||
ADD COLUMN `ContractOid` bigint NULL DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `AbsenceTime`
|
||||
ADD COLUMN `UpdTs` datetime NULL DEFAULT NULL;
|
||||
|
||||
CREATE TABLE `AbsenceTimeHistory` (
|
||||
`Oid` bigint NOT NULL AUTO_INCREMENT,
|
||||
`Tid` int NOT NULL,
|
||||
`Notice` varchar(1024) DEFAULT NULL,
|
||||
`InsTs` datetime DEFAULT NULL,
|
||||
`InsUser` varchar(256) DEFAULT NULL,
|
||||
`Version` bigint DEFAULT NULL,
|
||||
`UdpUser` varchar(256) DEFAULT NULL,
|
||||
`UpdTs` datetime DEFAULT NULL,
|
||||
`IsActive` tinyint DEFAULT NULL,
|
||||
`SystemEntryID` int DEFAULT NULL,
|
||||
`ChangeType` tinyint NULL DEFAULT NULL,
|
||||
`AbsenceTimeOid` bigint NULL DEFAULT NULL,
|
||||
`AbsenceReasonOid` bigint DEFAULT NULL,
|
||||
`AbsenceTimeStart` datetime DEFAULT NULL,
|
||||
`AbsenceTimeEnd` datetime DEFAULT NULL,
|
||||
`AbsenceTimeKrankheitsMeldung` datetime DEFAULT NULL,
|
||||
`AbsenceTimeNotice` varchar(1024) DEFAULT NULL,
|
||||
`AbsenceTimeEmployeeOid` bigint DEFAULT NULL,
|
||||
`AbsenceTimeCustomerOid` bigint DEFAULT NULL,
|
||||
PRIMARY KEY (`Oid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
@@ -26,9 +26,6 @@ order by p.Lastname, sr.startdate
|
||||
|
||||
|
||||
|
||||
INSERT INTO `query` (`Oid`,`Tid`,`Type`,`Title`,`SQL`,`Notice`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`,`UserGroupOids`,`ReportTypeName`,`FileName`,`ExportTitle`) VALUES (4713,24,0,'Einträge ohne Monatsunterschrift der Hauptbetreuung','SELECT \np.LastName as \'Nachname\',\np.Firstname as \'Vorname\',\nc2s.ApprovedStartDate as \'Bewilligt von\',\nc2s.ApprovedEndDate as \'Bewilligt bis\',\nscat.Name as \'Kategorie\',\nDate_Format(sr.StartDate, \'%d.%m.%Y\') as \'Datum\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(sr.StartDate, \'%H:%i\')) as \'von\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(Date_Add(sr.StartDate, INTERVAL sr.Roundedduration MINUTE), \'%H:%i\')) as \'bis\',\nRound(sr.Roundedduration, 0) as \'Minuten\',\n(select CONCAT(emp1p.`FirstName`, \' \', emp1p.`LastName`) from employee emp1 join `person` emp1p on emp1p.`Oid` = emp1.`PersonOid` where emp1.`Oid` in (select employeeoid from `employee2customer` e2c1 join `valuelistentry2object` vl2o on e2c1.`Oid` = vl2o.`ObjectOid` join `valuelistentry` vle on vl2o.`ValueListEntryOid` = vle.`Oid` where e2c1.`CustomerOid` = c.`Oid` and vle.`SystemEntryID` = 3) LIMIT 1) as \'Hauptbetreuung\',\n(select t.`Name` from team t where t.`Oid` in (select teamoid from `team2customer` t2c where t2c.`CustomerOid` = c.`Oid`) LIMIT 1) as \'Team\' \nFROM servicerecord sr\njoin costbearer2supportconcept c2s on sr.costbearer2supportconceptoid = c2s.oid\njoin supportconcept sc on c2s.supportconceptoid = sc.oid\njoin customer c on sc.customeroid = c.oid\njoin person p on c.personoid = p.oid\njoin servicedescription sd on sd.oid = sr.servicedescriptionoid\njoin servicecategory scat on scat.oid = sd.servicecategoryoid\nwhere sr.oid \nnot in (select servicerecordoid from confirmationreceiptsignature2servicerecord crs2s\njoin confirmationreceiptsignature crs on crs2s.confirmationreceiptsignatureoid = crs.oid where crs.employeeoid is not null and crs.customeroid is null) and\nscat.billable = true and\nsr.startdate >= \':Von\' and sr.startdate < \':bis\'\norder by p.Lastname, sr.startdate',NULL,NULL,NULL,NULL,1,1,NULL,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `query` (`Oid`,`Tid`,`Type`,`Title`,`SQL`,`Notice`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`,`UserGroupOids`,`ReportTypeName`,`FileName`,`ExportTitle`) VALUES (4713,24,0,'Einträge ohne Monatsunterschrift der Hauptbetreuung','SELECT \np.LastName as \'Nachname\',\np.Firstname as \'Vorname\',\nc2s.ApprovedStartDate as \'Bewilligt von\',\nc2s.ApprovedEndDate as \'Bewilligt bis\',\nscat.Name as \'Kategorie\',\nDate_Format(sr.StartDate, \'%d.%m.%Y\') as \'Datum\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(sr.StartDate, \'%H:%i\')) as \'von\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(Date_Add(sr.StartDate, INTERVAL sr.Roundedduration MINUTE), \'%H:%i\')) as \'bis\',\nRound(sr.Roundedduration, 0) as \'Minuten\',\n(select CONCAT(emp1p.`FirstName`, \' \', emp1p.`LastName`) from employee emp1 join `person` emp1p on emp1p.`Oid` = emp1.`PersonOid` where emp1.`Oid` in (select employeeoid from `employee2customer` e2c1 join `valuelistentry2object` vl2o on e2c1.`Oid` = vl2o.`ObjectOid` join `valuelistentry` vle on vl2o.`ValueListEntryOid` = vle.`Oid` where e2c1.`CustomerOid` = c.`Oid` and vle.`SystemEntryID` = 3) LIMIT 1) as \'Hauptbetreuung\',\n(select t.`Name` from team t where t.`Oid` in (select teamoid from `team2customer` t2c where t2c.`CustomerOid` = c.`Oid`) LIMIT 1) as \'Team\' \nFROM servicerecord sr\njoin costbearer2supportconcept c2s on sr.costbearer2supportconceptoid = c2s.oid\njoin supportconcept sc on c2s.supportconceptoid = sc.oid\njoin customer c on sc.customeroid = c.oid\njoin person p on c.personoid = p.oid\njoin servicedescription sd on sd.oid = sr.servicedescriptionoid\njoin servicecategory scat on scat.oid = sd.servicecategoryoid\nwhere sr.oid \nnot in (select servicerecordoid from confirmationreceiptsignature2servicerecord crs2s\njoin confirmationreceiptsignature crs on crs2s.confirmationreceiptsignatureoid = crs.oid where crs.employeeoid is not null and crs.customeroid is null) and\nscat.billable = true and\nsr.startdate >= \':Von\' and sr.startdate < \':bis\'\norder by p.Lastname, sr.startdate',NULL,NULL,NULL,NULL,1,1,NULL,`1`,NULL,NULL,NULL);
|
||||
INSERT INTO `parameter` (`QueryOid`,`Tid`,`Name`,`Type`,`DbType`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`,`DefaultValue`) VALUES (4713,25,'Von_bis',5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'aktueller Monat');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ order by p.Lastname, sr.startdate
|
||||
|
||||
|
||||
|
||||
INSERT INTO `query` (`Oid`,`Tid`,`Type`,`Title`,`SQL`,`Notice`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`,`UserGroupOids`,`ReportTypeName`,`FileName`,`ExportTitle`) VALUES (4712,24,0,'Einträge ohne Monatsunterschrift des Klienten','SELECT \np.LastName as \'Nachname\',\np.Firstname as \'Vorname\',\nc2s.ApprovedStartDate as \'Bewilligt von\',\nc2s.ApprovedEndDate as \'Bewilligt bis\',\nscat.Name as \'Kategorie\',\nDate_Format(sr.StartDate, \'%d.%m.%Y\') as \'Datum\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(sr.StartDate, \'%H:%i\')) as \'von\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(Date_Add(sr.StartDate, INTERVAL sr.Roundedduration MINUTE), \'%H:%i\')) as \'bis\',\nRound(sr.Roundedduration, 0) as \'Minuten\',\n(select CONCAT(emp1p.`FirstName`, \' \', emp1p.`LastName`) from employee emp1 join `person` emp1p on emp1p.`Oid` = emp1.`PersonOid` where emp1.`Oid` in (select employeeoid from `employee2customer` e2c1 join `valuelistentry2object` vl2o on e2c1.`Oid` = vl2o.`ObjectOid` join `valuelistentry` vle on vl2o.`ValueListEntryOid` = vle.`Oid` where e2c1.`CustomerOid` = c.`Oid` and vle.`SystemEntryID` = 3) LIMIT 1) as \'Hauptbetreuung\',\n(select t.`Name` from team t where t.`Oid` in (select teamoid from `team2customer` t2c where t2c.`CustomerOid` = c.`Oid`) LIMIT 1) as \'Team\' \nFROM servicerecord sr\njoin costbearer2supportconcept c2s on sr.costbearer2supportconceptoid = c2s.oid\njoin supportconcept sc on c2s.supportconceptoid = sc.oid\njoin customer c on sc.customeroid = c.oid\njoin person p on c.personoid = p.oid\njoin servicedescription sd on sd.oid = sr.servicedescriptionoid\njoin servicecategory scat on scat.oid = sd.servicecategoryoid\nwhere sr.oid \nnot in (select servicerecordoid from confirmationreceiptsignature2servicerecord crs2s\njoin confirmationreceiptsignature crs on crs2s.confirmationreceiptsignatureoid = crs.oid where crs.employeeoid is null and crs.customeroid is not null) and\nscat.billable = true and\nsr.startdate >= \':Von\' and sr.startdate < \':bis\'\norder by p.Lastname, sr.startdate',NULL,NULL,NULL,NULL,1,1,NULL,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `query` (`Oid`,`Tid`,`Type`,`Title`,`SQL`,`Notice`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`,`UserGroupOids`,`ReportTypeName`,`FileName`,`ExportTitle`) VALUES (4712,24,0,'Einträge ohne Monatsunterschrift des Klienten','SELECT \np.LastName as \'Nachname\',\np.Firstname as \'Vorname\',\nc2s.ApprovedStartDate as \'Bewilligt von\',\nc2s.ApprovedEndDate as \'Bewilligt bis\',\nscat.Name as \'Kategorie\',\nDate_Format(sr.StartDate, \'%d.%m.%Y\') as \'Datum\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(sr.StartDate, \'%H:%i\')) as \'von\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(Date_Add(sr.StartDate, INTERVAL sr.Roundedduration MINUTE), \'%H:%i\')) as \'bis\',\nRound(sr.Roundedduration, 0) as \'Minuten\',\n(select CONCAT(emp1p.`FirstName`, \' \', emp1p.`LastName`) from employee emp1 join `person` emp1p on emp1p.`Oid` = emp1.`PersonOid` where emp1.`Oid` in (select employeeoid from `employee2customer` e2c1 join `valuelistentry2object` vl2o on e2c1.`Oid` = vl2o.`ObjectOid` join `valuelistentry` vle on vl2o.`ValueListEntryOid` = vle.`Oid` where e2c1.`CustomerOid` = c.`Oid` and vle.`SystemEntryID` = 3) LIMIT 1) as \'Hauptbetreuung\',\n(select t.`Name` from team t where t.`Oid` in (select teamoid from `team2customer` t2c where t2c.`CustomerOid` = c.`Oid`) LIMIT 1) as \'Team\' \nFROM servicerecord sr\njoin costbearer2supportconcept c2s on sr.costbearer2supportconceptoid = c2s.oid\njoin supportconcept sc on c2s.supportconceptoid = sc.oid\njoin customer c on sc.customeroid = c.oid\njoin person p on c.personoid = p.oid\njoin servicedescription sd on sd.oid = sr.servicedescriptionoid\njoin servicecategory scat on scat.oid = sd.servicecategoryoid\nwhere sr.oid \nnot in (select servicerecordoid from confirmationreceiptsignature2servicerecord crs2s\njoin confirmationreceiptsignature crs on crs2s.confirmationreceiptsignatureoid = crs.oid where crs.employeeoid is null and crs.customeroid is not null) and\nscat.billable = true and\nsr.startdate >= \':Von\' and sr.startdate < \':bis\'\norder by p.Lastname, sr.startdate',NULL,NULL,NULL,NULL,1,1,NULL,`1`,NULL,NULL,NULL);
|
||||
INSERT INTO `parameter` (`QueryOid`,`Tid`,`Name`,`Type`,`DbType`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`,`DefaultValue`) VALUES (4712,25,'Von_bis',5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'aktueller Monat');
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ order by p.Lastname, sr.startdate
|
||||
|
||||
|
||||
|
||||
INSERT INTO `query` (`Oid`,`Tid`,`Type`,`Title`,`SQL`,`Notice`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`,`UserGroupOids`,`ReportTypeName`,`FileName`,`ExportTitle`) VALUES (4711,24,0,'Einträge ohne Unterschrift','SELECT \np.LastName as \'Nachname\',\np.Firstname as \'Vorname\',\nc2s.ApprovedStartDate as \'Bewilligt von\',\nc2s.ApprovedEndDate as \'Bewilligt bis\',\nscat.Name as \'Kategorie\',\nDate_Format(sr.StartDate, \'%d.%m.%Y\') as \'Datum\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(sr.StartDate, \'%H:%i\')) as \'von\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(Date_Add(sr.StartDate, INTERVAL sr.Roundedduration MINUTE), \'%H:%i\')) as \'bis\',\nRound(sr.Roundedduration, 0) as \'Minuten\',\n(select CONCAT(emp1p.`FirstName`, \' \', emp1p.`LastName`) from employee emp1 join `person` emp1p on emp1p.`Oid` = emp1.`PersonOid` where emp1.`Oid` in (select employeeoid from `employee2customer` e2c1 join `valuelistentry2object` vl2o on e2c1.`Oid` = vl2o.`ObjectOid` join `valuelistentry` vle on vl2o.`ValueListEntryOid` = vle.`Oid` where e2c1.`CustomerOid` = c.`Oid` and vle.`SystemEntryID` = 3) LIMIT 1) as \'Hauptbetreuung\',\n(select t.`Name` from team t where t.`Oid` in (select teamoid from `team2customer` t2c where t2c.`CustomerOid` = c.`Oid`) LIMIT 1) as \'Team\' \nFROM servicerecord sr\njoin costbearer2supportconcept c2s on sr.costbearer2supportconceptoid = c2s.oid\njoin supportconcept sc on c2s.supportconceptoid = sc.oid\njoin customer c on sc.customeroid = c.oid\njoin person p on c.personoid = p.oid\njoin servicedescription sd on sd.oid = sr.servicedescriptionoid\njoin servicecategory scat on scat.oid = sd.servicecategoryoid\nwhere sr.SignatureOID is null and\nscat.billable = true and\nsr.startdate >= \':Von\' and sr.startdate < \':bis\'\norder by p.Lastname, sr.startdate',NULL,NULL,NULL,NULL,1,1,NULL,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `query` (`Oid`,`Tid`,`Type`,`Title`,`SQL`,`Notice`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`,`UserGroupOids`,`ReportTypeName`,`FileName`,`ExportTitle`) VALUES (4711,24,0,'Einträge ohne Unterschrift','SELECT \np.LastName as \'Nachname\',\np.Firstname as \'Vorname\',\nc2s.ApprovedStartDate as \'Bewilligt von\',\nc2s.ApprovedEndDate as \'Bewilligt bis\',\nscat.Name as \'Kategorie\',\nDate_Format(sr.StartDate, \'%d.%m.%Y\') as \'Datum\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(sr.StartDate, \'%H:%i\')) as \'von\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(Date_Add(sr.StartDate, INTERVAL sr.Roundedduration MINUTE), \'%H:%i\')) as \'bis\',\nRound(sr.Roundedduration, 0) as \'Minuten\',\n(select CONCAT(emp1p.`FirstName`, \' \', emp1p.`LastName`) from employee emp1 join `person` emp1p on emp1p.`Oid` = emp1.`PersonOid` where emp1.`Oid` in (select employeeoid from `employee2customer` e2c1 join `valuelistentry2object` vl2o on e2c1.`Oid` = vl2o.`ObjectOid` join `valuelistentry` vle on vl2o.`ValueListEntryOid` = vle.`Oid` where e2c1.`CustomerOid` = c.`Oid` and vle.`SystemEntryID` = 3) LIMIT 1) as \'Hauptbetreuung\',\n(select t.`Name` from team t where t.`Oid` in (select teamoid from `team2customer` t2c where t2c.`CustomerOid` = c.`Oid`) LIMIT 1) as \'Team\' \nFROM servicerecord sr\njoin costbearer2supportconcept c2s on sr.costbearer2supportconceptoid = c2s.oid\njoin supportconcept sc on c2s.supportconceptoid = sc.oid\njoin customer c on sc.customeroid = c.oid\njoin person p on c.personoid = p.oid\njoin servicedescription sd on sd.oid = sr.servicedescriptionoid\njoin servicecategory scat on scat.oid = sd.servicecategoryoid\nwhere sr.SignatureOID is null and\nscat.billable = true and\nsr.startdate >= \':Von\' and sr.startdate < \':bis\'\norder by p.Lastname, sr.startdate',NULL,NULL,NULL,NULL,1,1,NULL,`1`,NULL,NULL,NULL);
|
||||
INSERT INTO `parameter` (`QueryOid`,`Tid`,`Name`,`Type`,`DbType`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`,`DefaultValue`) VALUES (4711,25,'Von_bis',5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'aktueller Monat');
|
||||
|
||||
|
||||
|
||||
@@ -22,8 +22,10 @@ namespace AlphaEv.Invoicing
|
||||
public override ServiceInvoice CreateSingleInvoice(int invoiceCounter, CostBearer costBearer, DateTimeSpan invoicePeriod, CompactSupportConceptDC supportConcept, List<ServiceRecordDC> serviceRecords)
|
||||
{
|
||||
var invoice = base.CreateSingleInvoice(invoiceCounter, costBearer, invoicePeriod, supportConcept, serviceRecords);
|
||||
SetAmountAdvancePayments(invoice);
|
||||
|
||||
if (invoice != null)
|
||||
{
|
||||
SetAmountAdvancePayments(invoice);
|
||||
}
|
||||
return invoice;
|
||||
}
|
||||
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
|
||||
@@ -765,7 +765,7 @@ namespace ChristopherusHausMID
|
||||
this.xrTable3.Name = "xrTable3";
|
||||
this.xrTable3.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
|
||||
this.xrTableRow5});
|
||||
this.xrTable3.SizeF = new System.Drawing.SizeF(747F, 25F);
|
||||
this.xrTable3.SizeF = new System.Drawing.SizeF(745F, 25F);
|
||||
this.xrTable3.StylePriority.UseBorders = false;
|
||||
this.xrTable3.StylePriority.UseFont = false;
|
||||
this.xrTable3.StylePriority.UsePadding = false;
|
||||
@@ -814,7 +814,7 @@ namespace ChristopherusHausMID
|
||||
xrSummary1.Running = DevExpress.XtraReports.UI.SummaryRunning.Group;
|
||||
this.xrTableCell42.Summary = xrSummary1;
|
||||
this.xrTableCell42.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
|
||||
this.xrTableCell42.Weight = 0.20955252338615338D;
|
||||
this.xrTableCell42.Weight = 0.20405005159415032D;
|
||||
//
|
||||
// GroupFooter2
|
||||
//
|
||||
|
||||
@@ -123,7 +123,10 @@ namespace HphBersenbrueckFreizeitUndReisen
|
||||
|
||||
var serviceRecords = DAOFactory.SearchDAO.FindEmployeeServiceRecords(emp.Oid.Value, span, null, null);
|
||||
|
||||
|
||||
if (ro.KlientVorname == "Herbort")
|
||||
{
|
||||
int test = 0;
|
||||
}
|
||||
|
||||
|
||||
//Eingliederungshilfe Einzelbetreuung
|
||||
@@ -344,15 +347,18 @@ namespace HphBersenbrueckFreizeitUndReisen
|
||||
//Kostenstelle 35950
|
||||
else if ((desc.Contains("Freizeitangebote") || desc.Contains("Freizeittreff") || desc.Contains("Tagesfahrt") || desc.Contains("Freizeithelfer")) && (cat.Contains("Entlastungsbetrag") || cat.Contains("Verhinderungspflege") || cat.Contains("Selbstzahler") || cat.Contains("Helferentgelt")))
|
||||
{
|
||||
add = true;
|
||||
if (sr.RoundedDuration > 0)
|
||||
{
|
||||
add = true;
|
||||
|
||||
if (isMinijobber)
|
||||
{
|
||||
ro.StundenLoa51_35950 = (ro.StundenLoa51_35950 ?? 0) + sr.RoundedDuration / 60;
|
||||
}
|
||||
else
|
||||
{
|
||||
ro.StundenLoA44_35950 = (ro.StundenLoA44_35950 ?? 0) + sr.RoundedDuration / 60;
|
||||
if (isMinijobber)
|
||||
{
|
||||
ro.StundenLoa51_35950 = (ro.StundenLoa51_35950 ?? 0) + sr.RoundedDuration / 60;
|
||||
}
|
||||
else
|
||||
{
|
||||
ro.StundenLoA44_35950 = (ro.StundenLoA44_35950 ?? 0) + sr.RoundedDuration / 60;
|
||||
}
|
||||
}
|
||||
}
|
||||
//Kostenstelle 35900
|
||||
@@ -373,7 +379,12 @@ namespace HphBersenbrueckFreizeitUndReisen
|
||||
{
|
||||
add = true;
|
||||
|
||||
ro.FührungszeugnisseLoa494 = (ro.FührungszeugnisseLoa494 ?? 0) + sr.RoundedDuration / 60;
|
||||
var preis = GetPreisVonServiceDescription(sr.ServiceDescription, reportMonat);
|
||||
if (preis.HasValue)
|
||||
{
|
||||
ro.FührungszeugnisseLoa494 = (ro.FührungszeugnisseLoa494 ?? 0) + preis;
|
||||
}
|
||||
//ro.FührungszeugnisseLoa494 = (ro.FührungszeugnisseLoa494 ?? 0) + sr.RoundedDuration / 60;
|
||||
}
|
||||
if (sr.DistanceInMeter.HasValue)
|
||||
{
|
||||
|
||||
@@ -23,14 +23,17 @@ namespace InputFamilienhilfe
|
||||
|
||||
public override decimal GetFeiertagsFaktor(DateTime start)
|
||||
{
|
||||
if (start.Month == 12)
|
||||
//CB: Halbe Feiertage erst ab 2024
|
||||
if (start.Year >= 2024)
|
||||
{
|
||||
if (start.Day == 24 || start.Day == 31)
|
||||
if (start.Month == 12)
|
||||
{
|
||||
return 0.5m;
|
||||
if (start.Day == 24 || start.Day == 31)
|
||||
{
|
||||
return 0.5m;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return base.GetFeiertagsFaktor(start);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,19 +15,32 @@ namespace InputFamilienhilfe.Service
|
||||
List<FeiertagDC> list = base.GetFeiertage(year, bundesland);
|
||||
|
||||
list.Add(new FeiertagDC { Datum = new DateTime(year, 1, 6), Name = "Heilige Drei Könige" });
|
||||
list.Add(new FeiertagDC { Datum = new DateTime(year, 12, 31), Name = "Silvester" });
|
||||
|
||||
//Ab 2024 sind Heilig Abend und Silverster nur halbe Feiertag, vorher gar kein Feiertag
|
||||
if (year >= 2024)
|
||||
{
|
||||
list.Add(new FeiertagDC { Datum = new DateTime(year, 12, 31), Name = "Silvester" });
|
||||
}
|
||||
else
|
||||
{
|
||||
var weihnachten = list.FirstOrDefault(f => f.Name == "Heilig Abend");
|
||||
if (weihnachten != null)
|
||||
list.Remove(weihnachten);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
public override decimal GetFeiertagsFaktor(DateTime start)
|
||||
{
|
||||
if (start.Month == 12)
|
||||
if (start.Year >= 2024)
|
||||
{
|
||||
if (start.Day == 24 || start.Day == 31)
|
||||
if (start.Month == 12)
|
||||
{
|
||||
return 0.5m;
|
||||
if (start.Day == 24 || start.Day == 31)
|
||||
{
|
||||
return 0.5m;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace BeWo.Service.DCEntityMapper
|
||||
SettlementDC dc = null;
|
||||
if (pEntity.InvoiceBase != null && !String.IsNullOrEmpty(pEntity.InvoiceBase.XMLData))
|
||||
{
|
||||
dc = Utils.XMLDeserializeFromString<SettlementDC>(pEntity.InvoiceBase.XMLData);
|
||||
dc = BS.Shared.Core.Utils.XMLDeserializeFromString<SettlementDC>(pEntity.InvoiceBase.XMLData);
|
||||
}
|
||||
|
||||
if (dc == null)
|
||||
@@ -279,7 +279,7 @@ namespace BeWo.Service.DCEntityMapper
|
||||
|
||||
var dcToSerialize = new SettlementDC();
|
||||
MapDC22DC(pDataContract, dcToSerialize);
|
||||
pEntity.InvoiceBase.XMLData = Utils.XMLSerializeToString(dcToSerialize);
|
||||
pEntity.InvoiceBase.XMLData = BS.Shared.Core.Utils.XMLSerializeToString(dcToSerialize);
|
||||
|
||||
MapperFactory.InvoiceItemDC_InvoiceItem.MergeWithEntitys(pDataContract.InvoiceItems, pEntity.InvoiceBase.InvoiceItems);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace BeWo.Service.Import.Perseh
|
||||
|
||||
|
||||
var tenant = MultitenancyOperationContextExt.Current?.Tenant;
|
||||
if ("9876543210".Equals(tenant) || "demo".Equals(tenant))
|
||||
if ("9876543210".Equals(tenant)) // || "demo".Equals(tenant))
|
||||
{
|
||||
//Hack für Simpsons DB um die Präsi zu vereinfachen
|
||||
|
||||
@@ -96,6 +96,10 @@ namespace BeWo.Service.Import.Perseh
|
||||
}
|
||||
|
||||
result.Ziele = ErstelleAlleZiele(pdfText);
|
||||
if (result.Ziele.Count == 0) // Keine Ziele gefunden, versuche andere PDF Version
|
||||
{
|
||||
result.Ziele = ErstelleAlleZiele2(pdfText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,6 +132,99 @@ namespace BeWo.Service.Import.Perseh
|
||||
var ziele = new List<HilfeplanImportZielDC>();
|
||||
//Suche Zeile "Zielplanung". So beginnt hinten im Dokument der Bereich mit der Zusammenfassung der Ziele
|
||||
|
||||
var zeilen = pdfText.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var startIdx = -1;
|
||||
var endIdx = -1;
|
||||
var uebersichtLeistungsplanungIdx = -1;
|
||||
var gesamtUebersichtIdx = -1;
|
||||
var zielplanungStart = -1;
|
||||
var lastLebensbereichIdx = -1;
|
||||
|
||||
StringBuilder gesamtTextMitZielen = new StringBuilder();
|
||||
|
||||
for (int i = zeilen.Length - 1; i >= 0; i--)
|
||||
{
|
||||
var z = zeilen[i];
|
||||
|
||||
if (z == "Zielplanung")
|
||||
{
|
||||
zielplanungStart = i;
|
||||
startIdx = i;
|
||||
}
|
||||
if (z.StartsWith("Übersicht der Leistungsplanung "))
|
||||
{
|
||||
uebersichtLeistungsplanungIdx = i;
|
||||
}
|
||||
if (z.StartsWith("Lebensbereich ") && lastLebensbereichIdx == -1)
|
||||
{
|
||||
lastLebensbereichIdx = i;
|
||||
}
|
||||
if (z.StartsWith("Gesamtübersicht Stunden pro Woche"))
|
||||
{
|
||||
gesamtUebersichtIdx = i;
|
||||
}
|
||||
}
|
||||
|
||||
endIdx = uebersichtLeistungsplanungIdx;
|
||||
if (lastLebensbereichIdx > endIdx && gesamtUebersichtIdx > lastLebensbereichIdx)
|
||||
{
|
||||
endIdx = gesamtUebersichtIdx;
|
||||
}
|
||||
else
|
||||
{
|
||||
endIdx = zeilen.Length - 1;
|
||||
}
|
||||
|
||||
//if (endIdx < startIdx)
|
||||
//{
|
||||
// for (int i = zeilen.Length - 1; i >= 0; i--)
|
||||
// {
|
||||
// var z = zeilen[i];
|
||||
// if (z.StartsWith("Gesamtübersicht Stunden pro Woche"))
|
||||
// {
|
||||
// endIdx = i;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
if (startIdx >= 0)
|
||||
{
|
||||
for (int i = startIdx; i < endIdx; i++)
|
||||
{
|
||||
gesamtTextMitZielen.AppendLine(zeilen[i]);
|
||||
}
|
||||
zeilen = gesamtTextMitZielen.ToString().Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
startIdx = 0;
|
||||
while (startIdx >= 0)
|
||||
{
|
||||
var ta = TextAbschnittReader.LeseBisText(zeilen, startIdx, "Lebensbereich ", true, false, false);
|
||||
if (ta.Success)
|
||||
{
|
||||
ziele.AddRange(ErstelleBereichMitZielen(zeilen, ta));
|
||||
startIdx = ta.ZeilenIndex + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
startIdx = -1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (zielplanungStart >= 0)
|
||||
{
|
||||
ErstelleMassnahmen(pdfText, zielplanungStart, ziele);
|
||||
}
|
||||
return ziele;
|
||||
|
||||
}
|
||||
|
||||
private IList<HilfeplanImportZielDC> ErstelleAlleZiele2(string pdfText)
|
||||
{
|
||||
var ziele = new List<HilfeplanImportZielDC>();
|
||||
//Suche Zeile "Zielplanung". So beginnt hinten im Dokument der Bereich mit der Zusammenfassung der Ziele
|
||||
|
||||
var zeilen = pdfText.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var startIdx = -1;
|
||||
var endIdx = -1;
|
||||
@@ -159,7 +256,7 @@ namespace BeWo.Service.Import.Perseh
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (startIdx >= 0)
|
||||
{
|
||||
@@ -185,8 +282,10 @@ namespace BeWo.Service.Import.Perseh
|
||||
|
||||
}
|
||||
}
|
||||
ErstelleMassnahmen(pdfText, zielplanungStart, ziele);
|
||||
|
||||
if (zielplanungStart >= 0)
|
||||
{
|
||||
ErstelleMassnahmen(pdfText, zielplanungStart, ziele);
|
||||
}
|
||||
return ziele;
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ using BeWo.Data.Entities;
|
||||
using BeWo.Data.Security;
|
||||
using BeWo.Service.Core;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
|
||||
using BeWo.ServiceUtils.History;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
@@ -1022,7 +1022,7 @@ namespace BeWo.Service.Plugins
|
||||
|
||||
DAOFactory.GenericDAO.Insert(lSupportConcept);
|
||||
|
||||
MakeSupportConceptHistoryEntry(lSupportConcept, lSupportConcept.Oid.Value, StatementType.Insert);
|
||||
HistoryCreator.MakeSupportConceptHistoryEntry(lSupportConcept, lSupportConcept.Oid.Value, StatementType.Insert);
|
||||
|
||||
return lSupportConcept.Oid.Value;
|
||||
}
|
||||
@@ -1037,90 +1037,12 @@ namespace BeWo.Service.Plugins
|
||||
lOriginal.Customer.Customer2CostBearerList.AddRange(lOriginal.CostBearer2SupportConceptList.Where(cb2sc => !lOriginal.Customer.Customer2CostBearerList.Exists(c2cb => c2cb.CostBearer.Equals(cb2sc.CostBearer))).Select(c2cb => new Customer2CostBearer { CostBearer = c2cb.CostBearer, ReferenceNumber = c2cb.CustomerReferenceNumber }));
|
||||
|
||||
DAOFactory.GenericDAO.Update(lOriginal);
|
||||
MakeSupportConceptHistoryEntry(lOriginal, lOriginal.Oid.Value, StatementType.Update);
|
||||
HistoryCreator.MakeSupportConceptHistoryEntry(lOriginal, lOriginal.Oid.Value, StatementType.Update);
|
||||
|
||||
return lOriginal.Oid.Value;
|
||||
}
|
||||
|
||||
public static void MakeSupportConceptHistoryEntry(SupportConcept lOriginal, long? Oid, StatementType statementType)
|
||||
{
|
||||
var supportConceptHistoryEntry = new SupportConceptHistory()
|
||||
{
|
||||
ChangeType = statementType,
|
||||
SupportConcept_ApprovalDate = lOriginal.ApprovalDate,
|
||||
SupportConcept_Conference = lOriginal.Conference,
|
||||
SupportConcept_ConferenceDate = lOriginal.ConferenceDate,
|
||||
SupportConcept_ConferenceVenue = lOriginal.ConferenceVenue,
|
||||
SupportConcept_ConsultingNeeded = lOriginal.ConsultingNeeded,
|
||||
//SupportConcept_CostBearer2SupportConceptList = lOriginal.CostBearer2SupportConceptList,
|
||||
SupportConcept_CustomerOid = lOriginal.Customer.Oid,
|
||||
SupportConcept_EmployeeOid = lOriginal.Originator.Oid,
|
||||
SupportConcept_RenewalSendDate = lOriginal.RenewalSendDate,
|
||||
SupportConcept_RequisitionSendDate = lOriginal.RequisitionSendDate,
|
||||
SupportConcept_SupportConceptSendDate = lOriginal.RequisitionSendDate,
|
||||
SupportConceptOid = lOriginal.Oid,
|
||||
Notice = lOriginal.Notice
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(supportConceptHistoryEntry);
|
||||
|
||||
List<CostBearer2SupportConceptHistory> cb2schToInsert = new List<CostBearer2SupportConceptHistory>();
|
||||
List<SupportConceptApprovalPeriodHistory> scApprovalPeriodHistoriesToInsert = new List<SupportConceptApprovalPeriodHistory>();
|
||||
foreach (var originalC2S in lOriginal.CostBearer2SupportConceptList)
|
||||
{
|
||||
var C2SHistory = new CostBearer2SupportConceptHistory()
|
||||
{
|
||||
//CostBearer2SupportConcept_AccountingTransactions = originalC2S.AccountingTransactions,
|
||||
CostBearer2SupportConcept_ApprovedEndDate = originalC2S.ApprovedEndDate,
|
||||
CostBearer2SupportConcept_ApprovedStartDate = originalC2S.ApprovedStartDate,
|
||||
CostBearer2SupportConcept_AuswahlBezeichnung = originalC2S.AuswahlBezeichnung,
|
||||
CostBearer2SupportConcept_CostBearerContactPersonOid = originalC2S.CostBearerContactPerson?.Oid,
|
||||
CostBearer2SupportConcept_CostBearerOid = originalC2S.CostBearer?.Oid,
|
||||
CostBearer2SupportConcept_CustomerReferenceNumber = originalC2S.CustomerReferenceNumber,
|
||||
CostBearer2SupportConcept_MonthlyPayment = originalC2S.MonthlyPayment,
|
||||
CostBearer2SupportConcept_RequestedEndDate = originalC2S.RequestedEndDate,
|
||||
CostBearer2SupportConcept_RequestedStartDate = originalC2S.RequestedStartDate,
|
||||
//CostBearer2SupportConcept_ServiceRecords = originalC2S.ServiceRecords,
|
||||
CostBearer2SupportConcept_Status = originalC2S.Status,
|
||||
//CostBearer2SupportConcept_SupportConceptApprovalPeriodList = originalC2S.ApprovalPeriodList
|
||||
CostBearer2SupportConcept_SupportConceptHistoryOid = lOriginal.Oid.Value,
|
||||
ChangeType = statementType,
|
||||
Notice = originalC2S.Notice
|
||||
};
|
||||
DAOFactory.GenericDAO.Insert(C2SHistory);
|
||||
|
||||
foreach (var item in originalC2S.ApprovalPeriodList)
|
||||
{
|
||||
var scApprovalPeriodHistory = new SupportConceptApprovalPeriodHistory()
|
||||
{
|
||||
ChangeType = statementType,
|
||||
SupportConceptApprovalPeriod_ApprovedBEInterval = item.ApprovedBEInterval,
|
||||
SupportConceptApprovalPeriod_ApprovedBEPerInterval = item.ApprovedBEPerInterval,
|
||||
SupportConceptApprovalPeriod_ApprovedBETotal = item.ApprovedBETotal,
|
||||
SupportConceptApprovalPeriod_ApprovedFixedAmount = item.ApprovedFixedAmount,
|
||||
SupportConceptApprovalPeriod_ApprovedFixedAmountInterval = item.ApprovedFixedAmountInterval,
|
||||
SupportConceptApprovalPeriod_Bewilligungsart = item.Bewilligungsart,
|
||||
SupportConceptApprovalPeriod_BudgetOid = item.Budget?.Oid.Value,
|
||||
SupportConceptApprovalPeriod_ContactCountInterval = item.ContactCountInterval,
|
||||
SupportConceptApprovalPeriod_ContactCountPerInterval = item.ContactCountPerInterval,
|
||||
SupportConceptApprovalPeriod_CostBearer2SupportConceptHistoryOid = originalC2S.Oid.Value,
|
||||
SupportConceptApprovalPeriod_EndDate = item.EndDate,
|
||||
SupportConceptApprovalPeriod_IsApprovedBEShifting = item.IsApprovedBEShifting,
|
||||
SupportConceptApprovalPeriod_IsApprovedFixedAmountShifting = item.IsApprovedFixedAmountShifting,
|
||||
SupportConceptApprovalPeriod_MonthlyPayment = item.MonthlyPayment,
|
||||
SupportConceptApprovalPeriod_StartDate = item.StartDate,
|
||||
SupportConceptApprovalPeriod_SupportConceptApprovalPeriod2Employee = item.SupportConceptApprovalPeriod2Employee,
|
||||
SupportConceptApprovalPeriod_SupportConceptHistoryOid = supportConceptHistoryEntry.Oid.Value,
|
||||
Notice = item.Notice
|
||||
};
|
||||
DAOFactory.GenericDAO.Insert(scApprovalPeriodHistory);
|
||||
}
|
||||
}
|
||||
//MakeHistoryEntry(lOriginal.Customer2PersonList, originalCustomer2PersonList, lOriginal.Oid, statementType);
|
||||
//MakeHistoryEntry(lOriginal.Customer2OrganisationList, originalC2OList, lOriginal.Oid, statementType);
|
||||
//MakeHistoryEntry(lOriginal.Employee2CustomerList, originale2CList, lOriginal.Oid, statementType);
|
||||
}
|
||||
|
||||
|
||||
public static void CheckDefaultServiceCategory(SupportConceptDC pSupportConcept)
|
||||
{
|
||||
if (pSupportConcept.ServiceAccountings != null)
|
||||
|
||||
@@ -4,9 +4,8 @@ using System.Linq;
|
||||
using BeWo.Data;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Data.Utils;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
|
||||
using BeWo.ServiceUtils.History;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
@@ -42,7 +41,7 @@ namespace BeWo.Service.Plugins
|
||||
var newSrList = ErstelleStundenplanEintraege(span.StartDateTime.Date, span.EndDate.Date, c2s, vs, srList);
|
||||
|
||||
DAOFactory.GenericDAO.Insert(newSrList);
|
||||
OperationService.MakeServiceRecordHistoryEntry(newSrList, newSrList.Select(sr => sr.Oid.Value).ToList(), StatementType.Insert);
|
||||
HistoryCreator.MakeServiceRecordHistoryEntry(newSrList, newSrList.Select(sr => sr.Oid.Value).ToList(), StatementType.Insert);
|
||||
if (ReturnMessage.Length > 0)
|
||||
{
|
||||
ReturnMessage += "\n";
|
||||
@@ -448,105 +447,6 @@ namespace BeWo.Service.Plugins
|
||||
}
|
||||
|
||||
|
||||
// ToDo: Unterschriftenbemerkung hier einbauen
|
||||
public static void MakeServiceRecordHistoryEntry(List<ServiceRecord> lOriginals, IEnumerable<long> serviceRecordOidList, StatementType statementType)
|
||||
{
|
||||
var serviceRecordHistoryEntries = new List<ServiceRecordHistory>();
|
||||
|
||||
if (statementType.Equals(StatementType.Insert) && serviceRecordOidList != null)
|
||||
{
|
||||
var iterator = 0;
|
||||
foreach (var history in lOriginals.Select(serviceRecordOriginal => new ServiceRecordHistory
|
||||
{
|
||||
TimeStamp = DateTime.Now,
|
||||
ChangeType = statementType,
|
||||
CostBearer2SupportConcept = serviceRecordOriginal.CostBearer2SupportConcept,
|
||||
CostBearer2SupportConceptOid = serviceRecordOriginal.CostBearer2SupportConceptOid,
|
||||
Customer = serviceRecordOriginal.Customer,
|
||||
CustomerOid = serviceRecordOriginal.CustomerOid,
|
||||
Employee = serviceRecordOriginal.Employee,
|
||||
EmployeeOid = serviceRecordOriginal.EmployeeOid,
|
||||
End = serviceRecordOriginal.End,
|
||||
Group = serviceRecordOriginal.Group,
|
||||
GroupEmployeeCount = serviceRecordOriginal.GroupEmployeeCount,
|
||||
GroupOid = serviceRecordOriginal.GroupOid,
|
||||
GroupPersonCount = serviceRecordOriginal.GroupPersonCount,
|
||||
GroupRoundedDuration = serviceRecordOriginal.GroupRoundedDuration,
|
||||
IP = serviceRecordOriginal.IP,
|
||||
IsActive = serviceRecordOriginal.IsActive,
|
||||
Notice = serviceRecordOriginal.Notice,
|
||||
ServiceRecordOid = serviceRecordOidList.ElementAt(iterator),
|
||||
RoundedDuration = serviceRecordOriginal.RoundedDuration,
|
||||
ServiceDescription = serviceRecordOriginal.ServiceDescription,
|
||||
ServiceRecordType = serviceRecordOriginal.ServiceRecordType,
|
||||
ServiceRecordInsTs = serviceRecordOriginal.InsTs,
|
||||
ServiceRecordVersion = serviceRecordOriginal.Version ?? 0,
|
||||
ServiceRecordInsUser = serviceRecordOriginal.InsUser,
|
||||
ServiceRecordUdpUser = serviceRecordOriginal.UdpUser,
|
||||
Start = serviceRecordOriginal.Start,
|
||||
SupportConcept = serviceRecordOriginal.SupportConcept,
|
||||
SystemEntryID = serviceRecordOriginal.SystemEntryID,
|
||||
DistanceInMeter = serviceRecordOriginal.DistanceInMeter,
|
||||
IsCreatedInMobileClient = serviceRecordOriginal.IsCreatedInMobileClient
|
||||
}))
|
||||
{
|
||||
iterator++;
|
||||
serviceRecordHistoryEntries.Add(history);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var original in lOriginals)
|
||||
{
|
||||
SignatureStateInfoFromServiceRecordHistoryEntry previousRecordHistorySignatureInfo = null;
|
||||
|
||||
if (original.Oid.HasValue)
|
||||
{
|
||||
previousRecordHistorySignatureInfo = DAOFactory.SearchDAO.FindMostRecentSignatureStatusInfoByServiceRecordOid(original.Oid.Value);
|
||||
}
|
||||
|
||||
serviceRecordHistoryEntries.AddIfNotIn(new ServiceRecordHistory
|
||||
{
|
||||
TimeStamp = DateTime.Now,
|
||||
ChangeType = statementType,
|
||||
CostBearer2SupportConcept = original.CostBearer2SupportConcept,
|
||||
CostBearer2SupportConceptOid = original.CostBearer2SupportConceptOid,
|
||||
Customer = original.Customer,
|
||||
CustomerOid = original.CustomerOid,
|
||||
Employee = original.Employee,
|
||||
EmployeeOid = original.EmployeeOid,
|
||||
End = original.End,
|
||||
Group = original.Group,
|
||||
GroupEmployeeCount = original.GroupEmployeeCount,
|
||||
GroupOid = original.GroupOid,
|
||||
GroupPersonCount = original.GroupPersonCount,
|
||||
GroupRoundedDuration = original.GroupRoundedDuration,
|
||||
IP = original.IP,
|
||||
IsActive = original.IsActive,
|
||||
Notice = original.Notice,
|
||||
ServiceRecordOid = original.Oid,
|
||||
RoundedDuration = original.RoundedDuration,
|
||||
ServiceDescription = original.ServiceDescription,
|
||||
ServiceRecordType = original.ServiceRecordType,
|
||||
ServiceRecordInsTs = original.InsTs,
|
||||
ServiceRecordVersion = original.Version ?? 0,
|
||||
ServiceRecordInsUser = original.InsUser,
|
||||
ServiceRecordUdpUser = original.UdpUser,
|
||||
Start = original.Start,
|
||||
SupportConcept = original.SupportConcept,
|
||||
SystemEntryID = original.SystemEntryID,
|
||||
DistanceInMeter = original.DistanceInMeter,
|
||||
IsCreatedInMobileClient = original.IsCreatedInMobileClient,
|
||||
ServiceRecordSignatureStateType = previousRecordHistorySignatureInfo?.ServiceRecordSignatureStateType ?? SignatureStateType.None,
|
||||
CustomerConfirmationReceiptSignatureStateType = previousRecordHistorySignatureInfo?.CustomerConfirmationReceiptSignatureStateType ?? SignatureStateType.None,
|
||||
EmployeeConfirmationReceiptSignatureStateType = previousRecordHistorySignatureInfo?.EmployeeConfirmationReceiptSignatureStateType ?? SignatureStateType.None,
|
||||
CustomerConfirmationReceiptSignatureOid = previousRecordHistorySignatureInfo?.CustomerConfirmationReceiptSignatureOid,
|
||||
EmployeeConfirmationReceiptSignatureOid = previousRecordHistorySignatureInfo?.EmployeeConfirmationReceiptSignatureOid
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
DAOFactory.GenericDAO.Insert(serviceRecordHistoryEntries);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -350,7 +350,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "3226307161"; // Roman Roger Puth
|
||||
//t = "3522103738"; // AWO Münsterland-Recklinghausen
|
||||
//t = "5592509446"; // Kontakt Verein für psychosoziale Hilfen e.V
|
||||
t = "5344902949"; // SHK Service GmbH SBD
|
||||
//t = "5344902949"; // SHK Service GmbH SBD
|
||||
//t = "1422963536"; // Malteser-Johanniter-Johanneshaus gGmbH
|
||||
//t = "5433105975"; // aha e.V.
|
||||
//t = "1701920223"; // SKFM Monheim
|
||||
|
||||
@@ -517,6 +517,7 @@
|
||||
<Compile Include="UnitOfWork\HibernateSessionBehaviorExtension.cs" />
|
||||
<Compile Include="UnitOfWork\HibernateSessionContextInitializer.cs" />
|
||||
<Compile Include="Urlaubsplanung\UrlaubsplanungsManager.cs" />
|
||||
<Compile Include="ServiceUtils\History\HistoryCreator.cs" />
|
||||
<Compile Include="Vorlagen\VorlagenManager.cs" />
|
||||
<Compile Include="XAMLInformation\InfoViaXAMLManager.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.ServiceModel;
|
||||
@@ -13,6 +12,7 @@ using BeWo.Service.Dienstplanung;
|
||||
using BeWo.Service.OwnChat;
|
||||
using BeWo.Service.Plugins;
|
||||
using BeWo.Service.ServiceContracts;
|
||||
using BeWo.ServiceUtils.History;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
@@ -39,7 +39,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
foreach (var sc in c.SupportConcepts)
|
||||
ServiceLogic.SetActivationType<SupportConcept>(sc.Oid.Value, sc.Version.Value, ActivationTypeId.Archived);
|
||||
|
||||
MakeCustomerHistoryEntry(c, null, StatementType.Archived, null, null, null);
|
||||
HistoryCreator.MakeCustomerHistoryEntry(c, MapperFactory.CustomerDC_Customer.MapToNewDC(c), null, StatementType.Archived, null, null, null);
|
||||
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
try
|
||||
{
|
||||
var e = DAOFactory.GenericDAO.LoadByID<Person>(pOid);
|
||||
MakeNewPersonHistoryEntry(e, StatementType.Archived);
|
||||
HistoryCreator.MakeNewPersonHistoryEntry(e, MapperFactory.PersonDC_Person.MapToNewDC(e), StatementType.Archived);
|
||||
|
||||
ServiceLogic.SetActivationType<Person>(pOid, pVersion, ActivationTypeId.Archived);
|
||||
}
|
||||
@@ -75,7 +75,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
try
|
||||
{
|
||||
ServiceLogic.SetActivationType<SupportConcept>(pOid, pVersion, ActivationTypeId.Archived);
|
||||
CustomerService.MakeSupportConceptHistoryEntry(DAOFactory.GenericDAO.GetByID<SupportConcept>(pOid), pOid, StatementType.Archived);
|
||||
HistoryCreator.MakeSupportConceptHistoryEntry(DAOFactory.GenericDAO.GetByID<SupportConcept>(pOid), pOid, StatementType.Archived);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -122,7 +122,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
foreach (var sc in customer.SupportConcepts)
|
||||
ServiceLogic.SetActivationType<SupportConcept>(sc.Oid.Value, sc.Version.Value, ActivationTypeId.Deleted);
|
||||
|
||||
MakeCustomerHistoryEntry(customer, null, StatementType.Delete, null, null, null);
|
||||
HistoryCreator.MakeCustomerHistoryEntry(customer, MapperFactory.CustomerDC_Customer.MapToNewDC(customer), null, StatementType.Delete, null, null, null);
|
||||
}
|
||||
|
||||
public void DeactivateOrganisation(long pOid, long pVersion)
|
||||
@@ -154,7 +154,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
try
|
||||
{
|
||||
var e = DAOFactory.GenericDAO.LoadByID<Person>(pOid);
|
||||
MakeNewPersonHistoryEntry(e, StatementType.Delete);
|
||||
HistoryCreator.MakeNewPersonHistoryEntry(e, MapperFactory.PersonDC_Person.MapToNewDC(e), StatementType.Delete);
|
||||
|
||||
ServiceLogic.SetActivationType<Person>(pOid, pVersion, ActivationTypeId.Deleted);
|
||||
}
|
||||
@@ -181,7 +181,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
try
|
||||
{
|
||||
ServiceLogic.SetActivationType<SupportConcept>(pOid, pVersion, ActivationTypeId.Deleted);
|
||||
CustomerService.MakeSupportConceptHistoryEntry(DAOFactory.GenericDAO.GetByID<SupportConcept>(pOid), pOid, StatementType.Delete);
|
||||
HistoryCreator.MakeSupportConceptHistoryEntry(DAOFactory.GenericDAO.GetByID<SupportConcept>(pOid), pOid, StatementType.Delete);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -195,7 +195,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
ServiceLogic.SetActivationType<SupportConcept>(pOid2Version, ActivationTypeId.Deleted);
|
||||
foreach (var item in pOid2Version)
|
||||
CustomerService.MakeSupportConceptHistoryEntry(DAOFactory.GenericDAO.GetByID<SupportConcept>(item.Key), item.Key, StatementType.Delete);
|
||||
HistoryCreator.MakeSupportConceptHistoryEntry(DAOFactory.GenericDAO.GetByID<SupportConcept>(item.Key), item.Key, StatementType.Delete);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -251,7 +251,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
lOriginals.DoForEach(or => MapperFactory.CustomerDC_Customer.ConcurrencyCheck(pOid2Version[or.Oid.Value], or));
|
||||
|
||||
foreach (Customer lOriginal in lOriginals)
|
||||
MakeCustomerHistoryEntry(lOriginal, null, StatementType.Delete, null, null, null);
|
||||
HistoryCreator.MakeCustomerHistoryEntry(lOriginal, MapperFactory.CustomerDC_Customer.MapToNewDC(lOriginal), null, StatementType.Delete, null, null, null);
|
||||
|
||||
DAOFactory.GenericDAO.Delete(lOriginals);
|
||||
}
|
||||
@@ -1016,7 +1016,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
var lOriginal = DAOFactory.GenericDAO.LoadByID<Customer>(oid);
|
||||
|
||||
object[] Lists = GetFromNHibernateDecoupledCustomerRelatedLists(lOriginal);
|
||||
MakeCustomerHistoryEntry(lOriginal, lOriginal.Oid.Value, StatementType.Insert, Lists[0] as List<Customer2Person>, Lists[1] as List<Customer2Organisation>, Lists[2] as List<Employee2Customer>);
|
||||
HistoryCreator.MakeCustomerHistoryEntry(lOriginal, MapperFactory.CustomerDC_Customer.MapToNewDC(lOriginal), lOriginal.Oid.Value, StatementType.Insert, Lists[0] as List<Customer2Person>, Lists[1] as List<Customer2Organisation>, Lists[2] as List<Employee2Customer>);
|
||||
|
||||
OwnChatHelper.StartOwnChatSync();
|
||||
return oid;
|
||||
@@ -1047,7 +1047,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
Person pPerson = MapperFactory.PersonDC_Person.MapToNewEntity(pPersonDC);
|
||||
DAOFactory.GenericDAO.Insert(pPerson);
|
||||
MakeNewPersonHistoryEntry(pPerson, StatementType.Insert);
|
||||
HistoryCreator.MakeNewPersonHistoryEntry(pPerson, pPersonDC, StatementType.Insert);
|
||||
|
||||
return pPerson.Oid.Value;
|
||||
}
|
||||
@@ -1254,7 +1254,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
DAOFactory.GenericDAO.Update(lOriginal);
|
||||
|
||||
MakeCustomerHistoryEntry(lOriginal, null, StatementType.Update, Lists[0] as List<Customer2Person>, Lists[1] as List<Customer2Organisation>, Lists[2] as List<Employee2Customer>);
|
||||
HistoryCreator.MakeCustomerHistoryEntry(lOriginal, MapperFactory.CustomerDC_Customer.MapToNewDC(lOriginal), null, StatementType.Update, Lists[0] as List<Customer2Person>, Lists[1] as List<Customer2Organisation>, Lists[2] as List<Employee2Customer>);
|
||||
|
||||
CheckUpdatedReferenceNumbers(pCustomerDC, lOriginal);
|
||||
|
||||
@@ -1332,8 +1332,8 @@ namespace BeWo.Service.ServiceImplementations
|
||||
try
|
||||
{
|
||||
var lOrigial = DAOFactory.GenericDAO.LoadByID<Person>(pPersonDC.PersonOid.Value);
|
||||
HistoryCreator.MakeNewPersonHistoryEntry(lOrigial, pPersonDC, StatementType.Update);
|
||||
MapperFactory.PersonDC_Person.MergeWithEntity(pPersonDC, lOrigial);
|
||||
MakeNewPersonHistoryEntry(lOrigial, StatementType.Update);
|
||||
DAOFactory.GenericDAO.Update(lOrigial);
|
||||
return lOrigial.Oid.Value;
|
||||
}
|
||||
@@ -1556,6 +1556,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
List<AppointmentAbsenceTime> lOriginals = DAOFactory.GenericDAO.LoadByIDs<AppointmentAbsenceTime>(pDCList.Select(b => b.AbsenceTimeOid.Value));
|
||||
MapperFactory.AbsenceTimeDC_AppointmentAbsenceTime.MergeWithEntitys(pDCList, lOriginals);
|
||||
|
||||
DAOFactory.GenericDAO.Update(lOriginals);
|
||||
|
||||
return MapperFactory.AbsenceTimeDC_AppointmentAbsenceTime.MapToNewDCs(lOriginals);
|
||||
@@ -2078,146 +2079,8 @@ namespace BeWo.Service.ServiceImplementations
|
||||
return dc;
|
||||
}
|
||||
|
||||
private static void MakeCustomerHistoryEntry(Customer lOriginal, long? Oid, StatementType statementType, List<Customer2Person> originalCustomer2PersonList, List<Customer2Organisation> originalC2OList, List<Employee2Customer> originale2CList)
|
||||
{
|
||||
var lCustomerHistory = new CustomerHistory
|
||||
{
|
||||
ChangeType = statementType,
|
||||
Childs = lOriginal.Childs,
|
||||
CostCenter = lOriginal.CostCenter,
|
||||
CustomerInsTs = lOriginal.InsTs,
|
||||
CustomerInsUser = lOriginal.InsUser,
|
||||
CustomerOid = Oid ?? lOriginal.Oid,
|
||||
CustomerUdpUser = lOriginal.UdpUser,
|
||||
CustomerVersion = lOriginal.Version ?? 0,
|
||||
DebitorNumber = lOriginal.DebitorNumber,
|
||||
Diagnosis = lOriginal.Diagnosis,
|
||||
Environment = lOriginal.Environment,
|
||||
EquityContribution = lOriginal.EquityContribution,
|
||||
ICD10Diagnosis = lOriginal.ICD10Diagnosis,
|
||||
IsAdvisedOrAttended = lOriginal.IsAdvisedOrAttended,
|
||||
Medication = lOriginal.Medication,
|
||||
Notice = lOriginal.Notice,
|
||||
Person = lOriginal.Person,
|
||||
ReferenceNumber = lOriginal.ReferenceNumber,
|
||||
TerminationDate = lOriginal.TerminationDate,
|
||||
AssistanceBegin = lOriginal.AssistanceBegin
|
||||
//Jugendamt = lOriginal.Jugendamt,
|
||||
//Ansprechpartner = lOriginal.Ansprechpartner
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(lCustomerHistory);
|
||||
|
||||
MakeHistoryEntry(lOriginal.Customer2PersonList, originalCustomer2PersonList, lOriginal.Oid, statementType);
|
||||
MakeHistoryEntry(lOriginal.Customer2OrganisationList, originalC2OList, lOriginal.Oid, statementType);
|
||||
MakeHistoryEntry(lOriginal.Employee2CustomerList, originale2CList, lOriginal.Oid, statementType);
|
||||
|
||||
var person = lOriginal.Person;
|
||||
MakeNewPersonHistoryEntry(person, statementType);
|
||||
}
|
||||
|
||||
|
||||
private static void MakeHistoryEntry<T>(IList<T> lNewList, List<T> lOriginalList, long? customerOid, StatementType sType) where T : BeWoEntityBase
|
||||
{
|
||||
if (sType.Equals(StatementType.Delete) || sType.Equals(StatementType.Insert) || sType.Equals(StatementType.Archived) || sType.Equals(StatementType.Reactivate))
|
||||
{
|
||||
foreach (T newObject in lNewList)
|
||||
MakeActualHistoryEntry(newObject, sType, customerOid);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
List<long?> OidOfOriginalsList = lOriginalList.Select(element => element.Oid.Value).Select(oid => (long?)oid).ToList();
|
||||
List<long?> OidOfNewsList = lNewList.Select(element => element.Oid.Value).Select(oid => (long?)oid).ToList();
|
||||
|
||||
if (lOriginalList.Count <= 0 && lNewList.Count <= 0)
|
||||
return;
|
||||
|
||||
foreach (T newObject in lNewList)
|
||||
{
|
||||
if (!OidOfOriginalsList.Contains(newObject.Oid))
|
||||
MakeActualHistoryEntry(newObject, StatementType.Insert, customerOid);
|
||||
else
|
||||
{
|
||||
T TObject = lOriginalList.Find(t => t.Oid.Equals(newObject.Oid));
|
||||
if (TObject.Version != newObject.Version)
|
||||
MakeActualHistoryEntry(newObject, StatementType.Update, customerOid);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (T oldObject in lOriginalList.Where(oldObject => !OidOfNewsList.Contains(oldObject.Oid)))
|
||||
MakeActualHistoryEntry(oldObject, StatementType.Delete, customerOid);
|
||||
}
|
||||
|
||||
private static void MakeActualHistoryEntry<T>(T entityObj, StatementType sType, long? customerOid)
|
||||
{
|
||||
Customer customer = null;
|
||||
if (customerOid != null)
|
||||
customer = DAOFactory.GenericDAO.LoadByID<Customer>(customerOid.Value);
|
||||
|
||||
if (entityObj is Customer2Person)
|
||||
{
|
||||
var customer2Person = entityObj as Customer2Person;
|
||||
var historyEntry = new Customer2PersonHistory
|
||||
{
|
||||
ChangeType = sType,
|
||||
Customer2PersonInsTs = customer2Person.InsTs,
|
||||
Customer2PersonInsUser = customer2Person.InsUser,
|
||||
Customer2PersonOid = customer2Person.Oid,
|
||||
Customer2PersonUdpUser = customer2Person.UdpUser,
|
||||
Customer2PersonVersion = customer2Person.Version.Value,
|
||||
Notice = customer2Person.Notice,
|
||||
Person = customer2Person.Person,
|
||||
CustomerOid = customer.Oid
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(historyEntry);
|
||||
}
|
||||
else if (entityObj is Customer2Organisation)
|
||||
{
|
||||
var customer2Organisation = entityObj as Customer2Organisation;
|
||||
var historyEntry = new Customer2OrganisationHistory
|
||||
{
|
||||
ChangeType = sType,
|
||||
Organisation = customer2Organisation.Organisation,
|
||||
Notice = customer2Organisation.Notice,
|
||||
Customer2OrganisationInsTs = customer2Organisation.InsTs,
|
||||
Customer2OrganisationOid = customer2Organisation.Oid,
|
||||
Customer2OrganisationInsUser = customer2Organisation.InsUser,
|
||||
Customer2OrganisationUdpUser = customer2Organisation.UdpUser,
|
||||
Customer2OrganisationVersion = customer2Organisation.Version.Value,
|
||||
Info1 = customer2Organisation.Info1,
|
||||
Info2 = customer2Organisation.Info2,
|
||||
Info3 = customer2Organisation.Info3,
|
||||
Info4 = customer2Organisation.Info4,
|
||||
Info5 = customer2Organisation.Info5,
|
||||
CustomerOid = customer.Oid
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(historyEntry);
|
||||
}
|
||||
else if (entityObj is Employee2Customer)
|
||||
{
|
||||
var employee2Customer = entityObj as Employee2Customer;
|
||||
var historyEntry = new Employee2CustomerHistory
|
||||
{
|
||||
ChangeType = sType,
|
||||
Customer = customer,
|
||||
CustomerOid = customer.Oid,
|
||||
Employee = employee2Customer.Employee,
|
||||
EmployeeOid = employee2Customer.EmployeeOid,
|
||||
Employee2CustomerInsTs = employee2Customer.InsTs,
|
||||
Employee2CustomerInsUser = employee2Customer.InsUser,
|
||||
Employee2CustomerOid = employee2Customer.Oid.Value,
|
||||
Employee2CustomerUdpUser = employee2Customer.UdpUser,
|
||||
Employee2CustomerVersion = employee2Customer.Version.Value,
|
||||
Notice = employee2Customer.Notice
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(historyEntry);
|
||||
}
|
||||
}
|
||||
|
||||
private static object[] GetFromNHibernateDecoupledCustomerRelatedLists(Customer customer)
|
||||
{
|
||||
var CustomerRelatedListsList = new object[3];
|
||||
@@ -2439,7 +2302,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
ServiceLogic.SetActivationType<Customer>(pOid, pVersion, ActivationTypeId.Active);
|
||||
|
||||
MakeCustomerHistoryEntry(c, null, StatementType.Reactivate, null, null, null);
|
||||
HistoryCreator.MakeCustomerHistoryEntry(c, MapperFactory.CustomerDC_Customer.MapToNewDC(c), null, StatementType.Reactivate, null, null, null);
|
||||
}
|
||||
|
||||
public void ReactivateSupportConcept(long pOid, long pVersion)
|
||||
@@ -2447,7 +2310,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
try
|
||||
{
|
||||
ServiceLogic.SetActivationType<SupportConcept>(pOid, pVersion, ActivationTypeId.Active);
|
||||
CustomerService.MakeSupportConceptHistoryEntry(DAOFactory.GenericDAO.GetByID<SupportConcept>(pOid), pOid, StatementType.Reactivate);
|
||||
HistoryCreator.MakeSupportConceptHistoryEntry(DAOFactory.GenericDAO.GetByID<SupportConcept>(pOid), pOid, StatementType.Reactivate);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -2475,7 +2338,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
e.Version = pVersion;
|
||||
e.IsActive = ActivationTypeId.Active;
|
||||
|
||||
MakeNewPersonHistoryEntry(e, StatementType.Reactivate);
|
||||
HistoryCreator.MakeNewPersonHistoryEntry(e, MapperFactory.PersonDC_Person.MapToNewDC(e), StatementType.Reactivate);
|
||||
|
||||
ServiceLogic.SetActivationType<Person>(pOid, pVersion, ActivationTypeId.Active);
|
||||
}
|
||||
@@ -3910,99 +3773,6 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public static void MakeNewPersonHistoryEntry(Person person, StatementType statementType)
|
||||
{
|
||||
var personHistoryEntry = new PersonHistory
|
||||
{
|
||||
ChangeType = statementType,
|
||||
Person_Oid = person.Oid,
|
||||
|
||||
Person_Abbreviation = person.Abbreviation,
|
||||
Person_AufenthaltsStatus = person.AufenthaltsStatus?.Value ?? "",
|
||||
Person_DateOfBirth = person.DateOfBirth,
|
||||
Person_FamilyStatus = person.FamilyStatus,
|
||||
Person_FirstName = person.FirstName,
|
||||
Person_Function = person.Function?.Value ?? "",
|
||||
Person_InsTs = person.InsTs,
|
||||
Person_InsUser = person.InsUser,
|
||||
Person_IsActive = person.IsActive,
|
||||
Person_IsMigrant = person.IsMigrant,
|
||||
Person_LastName = person.LastName,
|
||||
Person_Nationalitaet = person.Nationalitaet?.Value ?? "",
|
||||
Person_Notice = person.Notice,
|
||||
|
||||
Person_Profession = person.Profession,
|
||||
Person_Sex = person.Sex,
|
||||
Person_SystemEntryID = person.SystemEntryID,
|
||||
|
||||
Person_Tid = person.Tid,
|
||||
Person_Title = person.Title?.Value ?? "",
|
||||
Person_Type = person.Type,
|
||||
Person_UdpUser = person.UdpUser,
|
||||
Person_Version = person.Version
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(personHistoryEntry);
|
||||
|
||||
if (person.Address != null)
|
||||
MakeNewAddressHistoryEntry(person.Address, statementType);
|
||||
|
||||
if (person.Contacts != null)
|
||||
if (personHistoryEntry.Oid != null)
|
||||
foreach (var contact in person.Contacts)
|
||||
{
|
||||
MakeNewContactHistoryEntry(personHistoryEntry.Oid.Value, contact, statementType);
|
||||
}
|
||||
}
|
||||
|
||||
private static void MakeNewContactHistoryEntry(long personId, Contact contact, StatementType statementType)
|
||||
{
|
||||
var contactHistoryEntry = new ContactHistory
|
||||
{
|
||||
ChangeType = statementType,
|
||||
Contact_InsTs = contact.InsTs,
|
||||
Contact_InsUser = contact.InsUser,
|
||||
Contact_IsActive = contact.IsActive,
|
||||
Contact_Notice = contact.Notice,
|
||||
Contact_Tid = contact.Tid,
|
||||
Contact_SystemEntryID = contact.SystemEntryID,
|
||||
Contact_Type = contact.Type,
|
||||
Contact_Value = contact.Value,
|
||||
Contact_Oid = contact.Oid,
|
||||
Contact_Version = contact.Version,
|
||||
Contact_UdpUser = contact.UdpUser,
|
||||
Contact_PersonOid = personId
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(contactHistoryEntry);
|
||||
}
|
||||
|
||||
private static void MakeNewAddressHistoryEntry(Address address, StatementType statementType)
|
||||
{
|
||||
var addressHistoryEntry = new AddressHistory
|
||||
{
|
||||
ChangeType = statementType,
|
||||
|
||||
Address_AddressLine1 = address.AddressLine1,
|
||||
Address_AddressLine2 = address.AddressLine2,
|
||||
Address_Country = address.Country,
|
||||
Address_InsTs = address.InsTs,
|
||||
Address_InsUser = address.InsUser,
|
||||
Address_IsActive = address.IsActive,
|
||||
Address_Notice = address.Notice,
|
||||
Address_Oid = address.Oid,
|
||||
Address_PostalCode = address.PostalCode,
|
||||
Address_State = address.State,
|
||||
Address_Street = address.Street,
|
||||
Address_SystemEntryID = address.SystemEntryID,
|
||||
Address_Tid = address.Tid,
|
||||
Address_Town = address.Town,
|
||||
Address_UdpUser = address.UdpUser,
|
||||
Address_Version = address.Version
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(addressHistoryEntry);
|
||||
}
|
||||
|
||||
public List<ContactDC> LoadContactInformationForCustomer(long customerOid)
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@ using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
using NHibernate;
|
||||
using BeWo.ServiceUtils.History;
|
||||
|
||||
namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
@@ -34,7 +35,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
var e = DAOFactory.GenericDAO.LoadByID<Employee>(pOid);
|
||||
e.Person.IsActive = ActivationTypeId.Archived;
|
||||
|
||||
MakeNewEmployeeHistoryEntry(e, StatementType.Archived);
|
||||
HistoryCreator.MakeNewEmployeeHistoryEntry(e, MapperFactory.EmployeeDC_Employee.MapToNewDC(e), StatementType.Archived);
|
||||
|
||||
ServiceLogic.SetActivationType<Employee>(pOid, pVersion, ActivationTypeId.Archived);
|
||||
|
||||
@@ -93,7 +94,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
e.Person.IsActive = ActivationTypeId.Deleted;
|
||||
ServiceLogic.SetActivationType<Employee>(pOid, pVersion, ActivationTypeId.Deleted);
|
||||
|
||||
MakeNewEmployeeHistoryEntry(e, StatementType.Delete);
|
||||
HistoryCreator.MakeNewEmployeeHistoryEntry(e, MapperFactory.EmployeeDC_Employee.MapToNewDC(e), StatementType.Delete);
|
||||
|
||||
DeleteEmployeeCustomerRelationForEmployee(pOid);
|
||||
}
|
||||
@@ -214,7 +215,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
foreach (Employee e in lOriginals)
|
||||
{
|
||||
MakeNewEmployeeHistoryEntry(e, StatementType.Delete);
|
||||
HistoryCreator.MakeNewEmployeeHistoryEntry(e, MapperFactory.EmployeeDC_Employee.MapToNewDC(e), StatementType.Delete);
|
||||
}
|
||||
|
||||
DAOFactory.GenericDAO.Delete(lOriginals);
|
||||
@@ -717,7 +718,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
var id = es.InsertNewEmployee(pEmployeeDC);
|
||||
var temp = DAOFactory.GenericDAO.LoadByID<Employee>(id);
|
||||
|
||||
MakeNewEmployeeHistoryEntry(temp, StatementType.Insert);
|
||||
HistoryCreator.MakeNewEmployeeHistoryEntry(temp, pEmployeeDC, StatementType.Insert);
|
||||
|
||||
OwnChatHelper.StartOwnChatSync();
|
||||
|
||||
@@ -894,9 +895,11 @@ namespace BeWo.Service.ServiceImplementations
|
||||
try
|
||||
{
|
||||
var lOriginal = DAOFactory.GenericDAO.LoadByID<Employee>(pEmployeeDC.EmployeeOid.Value);
|
||||
|
||||
HistoryCreator.MakeNewEmployeeHistoryEntry(lOriginal, pEmployeeDC, StatementType.Update);
|
||||
MapperFactory.EmployeeDC_Employee.MergeWithEntity(pEmployeeDC, lOriginal);
|
||||
|
||||
MakeNewEmployeeHistoryEntry(lOriginal, StatementType.Update);
|
||||
|
||||
|
||||
DAOFactory.GenericDAO.Update(lOriginal);
|
||||
|
||||
@@ -1314,7 +1317,9 @@ namespace BeWo.Service.ServiceImplementations
|
||||
var lOriginals = DAOFactory.GenericDAO.LoadByIDs<Auszahlungsart>(pOid2Version.Select(e => e.Key));
|
||||
lOriginals.DoForEach(or => MapperFactory.AuszahlungsartDC_Auszahlungsart.ConcurrencyCheck(pOid2Version[or.Oid.Value], or));
|
||||
|
||||
DAOFactory.GenericDAO.Delete(lOriginals);
|
||||
//ServiceLogic.SetActivationType<Auszahlungsart>(pOid2Version, ActivationTypeId.Archived);
|
||||
|
||||
DAOFactory.GenericDAO.Delete(lOriginals);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -1579,7 +1584,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
try
|
||||
{
|
||||
var e = DAOFactory.GenericDAO.LoadByID<Employee>(pOid);
|
||||
MakeNewEmployeeHistoryEntry(e, StatementType.Reactivate);
|
||||
HistoryCreator.MakeNewEmployeeHistoryEntry(e, MapperFactory.EmployeeDC_Employee.MapToNewDC(e), StatementType.Reactivate);
|
||||
|
||||
ServiceLogic.SetActivationType<Employee>(pOid, pVersion, ActivationTypeId.Active);
|
||||
}
|
||||
@@ -1604,64 +1609,6 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public void MakeNewEmployeeHistoryEntry(Employee employee, StatementType statementType)
|
||||
{
|
||||
try
|
||||
{
|
||||
var employeeHistory = new EmployeeHistory
|
||||
{
|
||||
ChangeType = statementType,
|
||||
|
||||
Employee_Aggressiv = employee.Aggressiv,
|
||||
//Employee_ApplicationUserOid,
|
||||
//Employee_CancellationPeriod,
|
||||
Employee_EmployeeColor = employee.EmployeeColor,
|
||||
//Employee_EntryDate,
|
||||
Employee_HealthInsurance = employee.HealthInsurance,
|
||||
//Employee_HourlyRate,
|
||||
Employee_Hygienebelehrung = employee.Hygienebelehrung,
|
||||
Employee_InsTs = employee.InsTs,
|
||||
Employee_InsuranceNumber = employee.InsuranceNumber,
|
||||
Employee_InsUser = employee.InsUser,
|
||||
Employee_IsActive = employee.IsActive,
|
||||
Employee_IsQualified = employee.IsQualified,
|
||||
//Employee_leavedays,
|
||||
Employee_Notice = employee.Notice,
|
||||
Employee_Notice2 = employee.Notice2,
|
||||
Employee_Oid = employee.Oid,
|
||||
Employee_PersonnelNumber = employee.PersonnelNumber,
|
||||
//Employee_PersonOid,
|
||||
Employee_Pflege = employee.Pflege,
|
||||
//Employee_ProbationPeriod,
|
||||
Employee_Schutzstufe = employee.Schutzstufe,
|
||||
//Employee_Sequence,
|
||||
Employee_SystemEntryID = employee.SystemEntryID,
|
||||
Employee_TaxNumber = employee.TaxNumber,
|
||||
Employee_Text1 = employee.Text1,
|
||||
Employee_Text2 = employee.Text2,
|
||||
Employee_Text3 = employee.Text3,
|
||||
Employee_Text4 = employee.Text4,
|
||||
Employee_Text5 = employee.Text5,
|
||||
Employee_Tid = employee.Tid,
|
||||
Employee_Toilettengang = employee.Toilettengang,
|
||||
Employee_UdpUser = employee.UdpUser,
|
||||
Employee_Version = employee.Version,
|
||||
//Employee_weeklyfls = employee,
|
||||
//Employee_weeklytotalhours,
|
||||
};
|
||||
|
||||
CustomerServiceImp.MakeNewPersonHistoryEntry(employee.Person, statementType);
|
||||
|
||||
MakeNewContractHistoryEntry(employee, statementType);
|
||||
|
||||
DAOFactory.GenericDAO.Insert(employeeHistory);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public List<long> LoadTeamsRelatedCustomerOids(long employeeOid)
|
||||
{
|
||||
try
|
||||
@@ -2234,40 +2181,6 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
|
||||
|
||||
public void MakeNewContractHistoryEntry(Employee employee, StatementType statementType)
|
||||
{
|
||||
foreach (var contract in employee.Contracts)
|
||||
{
|
||||
var historyEntry = new ContractHistory()
|
||||
{
|
||||
ContractHistoryCancellationPeriod = contract.CancellationPeriod,
|
||||
ContractHistoryContractEndDate = contract.ContractEndDate,
|
||||
ContractHistoryContractTypeValueListEntry = contract.ContractTypeValueListEntry,
|
||||
ContractHistoryEmployeeOid = employee.Oid.Value,
|
||||
ContractHistoryEmploymentType = contract.EmploymentType,
|
||||
ContractHistoryEntryDate = contract.EntryDate,
|
||||
ContractHistoryHourlyRate = contract.HourlyRate,
|
||||
ContractHistoryHourlyRateCostRateValue = contract.HourlyRateCostRateValue,
|
||||
ContractHistoryLeaveDays = contract.LeaveDays,
|
||||
ContractHistoryMonthlyFLS = contract.MonthlyFLS,
|
||||
ContractHistoryMonthlyTotalHours = contract.MonthlyTotalHours,
|
||||
ContractHistoryProbationPeriod = contract.ProbationPeriod,
|
||||
ContractHistoryProbationPeriod2 = contract.ProbationPeriod2,
|
||||
ContractHistoryQualifikationsBedarfValueListEntry = contract.QualifikationsBedarfValueListEntry,
|
||||
ContractHistoryWeeklyDays = contract.WeeklyDays,
|
||||
ContractHistoryWeeklyFLS = contract.WeeklyFLS,
|
||||
ContractHistoryWeeklyTotalHours = contract.WeeklyTotalHours,
|
||||
IsActive = contract.IsActive,
|
||||
Notice = contract.Notice,
|
||||
SystemEntryID = contract.SystemEntryID,
|
||||
Version = contract.Version,
|
||||
ChangeType = statementType,
|
||||
InsTs = DateTime.Now
|
||||
};
|
||||
DAOFactory.GenericDAO.Insert(historyEntry);
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
public CompactEmployeeDC FindCompactEmployeeByFullname(string fullname)
|
||||
{
|
||||
|
||||
@@ -40,6 +40,7 @@ using System.Windows;
|
||||
using BeWo.Data.Utils;
|
||||
using Utils = BeWo.Service.Core.Utils;
|
||||
using System.Collections.Specialized;
|
||||
using BeWo.ServiceUtils.History;
|
||||
|
||||
namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
@@ -359,7 +360,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
private static void DeleteServiceRecordsFromAppointments(List<ServiceRecord> serviceRecords, bool deleteSignatures)
|
||||
{
|
||||
OperationService.MakeServiceRecordHistoryEntry(serviceRecords, null, StatementType.Delete);
|
||||
HistoryCreator.MakeServiceRecordHistoryEntry(serviceRecords, null, StatementType.Delete);
|
||||
|
||||
if (deleteSignatures)
|
||||
{
|
||||
@@ -1817,7 +1818,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
if (lServiceRecords.Count > 0)
|
||||
{
|
||||
OperationService.MakeServiceRecordHistoryEntry(lServiceRecords, lServiceRecords.Select(sr => sr.Oid.Value).ToList(), StatementType.Insert);
|
||||
HistoryCreator.MakeServiceRecordHistoryEntry(lServiceRecords, lServiceRecords.Select(sr => sr.Oid.Value).ToList(), StatementType.Insert);
|
||||
}
|
||||
|
||||
var newGroupDC = MapperFactory.ServiceRecordGroupDC_ServiceRecordGroup.MapToNewDC(group);
|
||||
@@ -2162,7 +2163,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
DAOFactory.GenericDAO.Insert(lServiceRecords);
|
||||
|
||||
OperationService.MakeServiceRecordHistoryEntry(lServiceRecords.ToList(), lServiceRecords.Select(sr => sr.Oid.Value).ToList(), StatementType.Insert);
|
||||
HistoryCreator.MakeServiceRecordHistoryEntry(lServiceRecords.ToList(), lServiceRecords.Select(sr => sr.Oid.Value).ToList(), StatementType.Insert);
|
||||
|
||||
return lServiceRecords.Select(sr => sr.Oid.Value).ToList();
|
||||
}
|
||||
@@ -2422,7 +2423,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
// Die ServiceRecords, deren Einzelunterschriften duch bearbeitete Zeitangaben im Zuge des Updates gelöscht werden zu der SignatureStatus-Liste hinzugefügt (sollte eigentlich nicht vorkommen)
|
||||
var serviceRecords2SignatureStates = GenerateSignatureStates(serviceRecordOidsWithDeletedSingleSignatures, serviceRecordsdWithRemovedConfirmationReceiptSignatures, lOriginal.ServiceRecordList.ToList());
|
||||
|
||||
MakeServiceRecordHistoryEntryWithSignatureStates(serviceRecords2SignatureStates, StatementType.Update);
|
||||
HistoryCreator.MakeServiceRecordHistoryEntryWithSignatureStates(serviceRecords2SignatureStates, StatementType.Update);
|
||||
|
||||
var newGroupDC = MapperFactory.ServiceRecordGroupDC_ServiceRecordGroup.MapToNewDC(lOriginal);
|
||||
|
||||
@@ -2436,68 +2437,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
private static void MakeServiceRecordHistoryEntryWithSignatureStates(List<ServiceRecord2SignatureStates> serviceRecords2SignatureStates, StatementType statementType)
|
||||
{
|
||||
var serviceRecordHistoryEntries = new List<ServiceRecordHistory>();
|
||||
|
||||
foreach (var serviceRecord2SignatureState in serviceRecords2SignatureStates)
|
||||
{
|
||||
var serviceRecord = serviceRecord2SignatureState.ServiceRecord;
|
||||
var singleSignatureState = serviceRecord2SignatureState.SingleSignatureStateType;
|
||||
var customerMonthlySignatureState = serviceRecord2SignatureState.CustomerMonthlySignatureStateType;
|
||||
var employeeMonthlySignatureState = serviceRecord2SignatureState.EmployeeMonthlySignatreStateType;
|
||||
|
||||
SignatureStateInfoFromServiceRecordHistoryEntry previousRecordHistorySignatureInfo = null;
|
||||
|
||||
if (serviceRecord.Oid.HasValue)
|
||||
{
|
||||
//previousRecordHistoryEntry = DAOFactory.SearchDAO.FindMostRecentServiceRecordHistoryEntryByServiceRecordOid(serviceRecord.Oid.Value);
|
||||
previousRecordHistorySignatureInfo = DAOFactory.SearchDAO.FindMostRecentSignatureStatusInfoByServiceRecordOid(serviceRecord.Oid.Value);
|
||||
}
|
||||
|
||||
serviceRecordHistoryEntries.AddIfNotIn(new ServiceRecordHistory
|
||||
{
|
||||
TimeStamp = DateTime.Now,
|
||||
ChangeType = statementType,
|
||||
CostBearer2SupportConcept = serviceRecord.CostBearer2SupportConcept,
|
||||
CostBearer2SupportConceptOid = serviceRecord.CostBearer2SupportConceptOid,
|
||||
Customer = serviceRecord.Customer,
|
||||
CustomerOid = serviceRecord.CustomerOid,
|
||||
Employee = serviceRecord.Employee,
|
||||
EmployeeOid = serviceRecord.EmployeeOid,
|
||||
End = serviceRecord.End,
|
||||
Group = serviceRecord.Group,
|
||||
GroupEmployeeCount = serviceRecord.GroupEmployeeCount,
|
||||
GroupOid = serviceRecord.GroupOid,
|
||||
GroupPersonCount = serviceRecord.GroupPersonCount,
|
||||
GroupRoundedDuration = serviceRecord.GroupRoundedDuration,
|
||||
IP = serviceRecord.IP,
|
||||
IsActive = serviceRecord.IsActive,
|
||||
Notice = serviceRecord.Notice,
|
||||
ServiceRecordOid = serviceRecord.Oid,
|
||||
RoundedDuration = serviceRecord.RoundedDuration,
|
||||
ServiceDescription = serviceRecord.ServiceDescription,
|
||||
ServiceRecordType = serviceRecord.ServiceRecordType,
|
||||
ServiceRecordInsTs = serviceRecord.InsTs,
|
||||
ServiceRecordVersion = serviceRecord.Version ?? 0,
|
||||
ServiceRecordInsUser = serviceRecord.InsUser,
|
||||
ServiceRecordUdpUser = serviceRecord.UdpUser,
|
||||
Start = serviceRecord.Start,
|
||||
SupportConcept = serviceRecord.SupportConcept,
|
||||
SystemEntryID = serviceRecord.SystemEntryID,
|
||||
DistanceInMeter = serviceRecord.DistanceInMeter,
|
||||
IsCreatedInMobileClient = serviceRecord.IsCreatedInMobileClient,
|
||||
ServiceRecordSignatureStateType = singleSignatureState ?? previousRecordHistorySignatureInfo?.ServiceRecordSignatureStateType ?? SignatureStateType.None,
|
||||
CustomerConfirmationReceiptSignatureStateType = customerMonthlySignatureState ?? previousRecordHistorySignatureInfo?.CustomerConfirmationReceiptSignatureStateType ?? SignatureStateType.None,
|
||||
EmployeeConfirmationReceiptSignatureStateType = employeeMonthlySignatureState ?? previousRecordHistorySignatureInfo?.EmployeeConfirmationReceiptSignatureStateType ?? SignatureStateType.None,
|
||||
CustomerConfirmationReceiptSignatureOid = previousRecordHistorySignatureInfo?.CustomerConfirmationReceiptSignatureOid,
|
||||
EmployeeConfirmationReceiptSignatureOid = previousRecordHistorySignatureInfo?.EmployeeConfirmationReceiptSignatureOid
|
||||
});
|
||||
}
|
||||
|
||||
DAOFactory.GenericDAO.Insert(serviceRecordHistoryEntries);
|
||||
}
|
||||
|
||||
|
||||
private static List<ServiceRecord2SignatureStates> GenerateSignatureStates(List<ServiceRecord> serviceRecordsWithDeletedSingleSignatures, List<ServiceRecord2SignatureStates> serviceRecordsdWithRemovedConfirmationReceiptSignatures, List<ServiceRecord> originals)
|
||||
{
|
||||
var serviceRecords2SignatureStates = new List<ServiceRecord2SignatureStates>();
|
||||
@@ -2635,7 +2575,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
var serviceRecords2SignatureStates = GenerateSignatureStates(serviceRecordsWithDeletedSingleSignatures, serviceRecordsdWithRemovedConfirmationReceiptSignatures, lOriginals);//new List<ServiceRecord2SignatureStates>();
|
||||
|
||||
MakeServiceRecordHistoryEntryWithSignatureStates(serviceRecords2SignatureStates, StatementType.Update);
|
||||
HistoryCreator.MakeServiceRecordHistoryEntryWithSignatureStates(serviceRecords2SignatureStates, StatementType.Update);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -3602,7 +3542,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
var transaction = DAOFactory.GenericDAO.LoadByID<Bargeldtransaktion>(s.BargeldtransaktionsOid.Value);
|
||||
|
||||
CreateTransactionHistoryObject(transaction, StatementType.Signature, SignatureStateType.Valid);
|
||||
HistoryCreator.CreateTransactionHistoryObject(transaction, StatementType.Signature, SignatureStateType.Valid);
|
||||
}
|
||||
|
||||
return updatedSignatureDC;
|
||||
@@ -4219,7 +4159,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
signatureStateType = SignatureStateType.ManuallyDeleted;
|
||||
}
|
||||
|
||||
transactionHistoryEntries.Add(CreateTransactionHistoryObject(deletedTransaction, StatementType.Delete, signatureStateType));
|
||||
transactionHistoryEntries.Add(HistoryCreator.CreateTransactionHistoryObject(deletedTransaction, StatementType.Delete, signatureStateType));
|
||||
}
|
||||
|
||||
MapperFactory.BargeldkassenDCBargeldkasseDC_BargeldkassenDCBargeldkasse.MergeWithEntity(pBargeldkasse, lOriginal);
|
||||
@@ -4231,7 +4171,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
// Nach dem Insert der neuen Transaktionen haben diese eine Oid und es können die History-Einträge gemacht werden
|
||||
foreach (var newTransaction in newTransactions)
|
||||
{
|
||||
transactionHistoryEntries.Add(CreateTransactionHistoryObject(newTransaction, StatementType.Insert, SignatureStateType.None));
|
||||
transactionHistoryEntries.Add(HistoryCreator.CreateTransactionHistoryObject(newTransaction, StatementType.Insert, SignatureStateType.None));
|
||||
}
|
||||
|
||||
// Die History-Einträge für die bearbeiteten werden gemacht
|
||||
@@ -4244,7 +4184,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
continue;
|
||||
}
|
||||
|
||||
transactionHistoryEntries.Add(CreateTransactionHistoryObject(editedTransaction, oid2ChangeTypes.Value.Key, oid2ChangeTypes.Value.Value));
|
||||
transactionHistoryEntries.Add(HistoryCreator.CreateTransactionHistoryObject(editedTransaction, oid2ChangeTypes.Value.Key, oid2ChangeTypes.Value.Value));
|
||||
}
|
||||
|
||||
DAOFactory.GenericDAO.Insert(transactionHistoryEntries);
|
||||
@@ -4288,7 +4228,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
foreach (var transaction in bargeldkasse.Bargeldtransaktionen)
|
||||
{
|
||||
var signatureState = transaction.SignatureOid is null ? SignatureStateType.None : SignatureStateType.AutomaticallyDeleted;
|
||||
historyEntries.Add(CreateTransactionHistoryObject(transaction, StatementType.Delete, signatureState));
|
||||
historyEntries.Add(HistoryCreator.CreateTransactionHistoryObject(transaction, StatementType.Delete, signatureState));
|
||||
}
|
||||
|
||||
DAOFactory.GenericDAO.Delete(signatures2Delete);
|
||||
@@ -4312,26 +4252,6 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
private static Bargeldtransaktionshistory CreateTransactionHistoryObject(Bargeldtransaktion transaction, StatementType changeType, SignatureStateType signatureState)
|
||||
{
|
||||
return new Bargeldtransaktionshistory
|
||||
{
|
||||
Betrag = transaction.Betrag,
|
||||
BargeldtransaktionOid = transaction.Oid,
|
||||
BargeldtransaktionInsTs = transaction.InsTs,
|
||||
BargeldtransaktionInsUser = transaction.InsUser,
|
||||
BargeldtransaktionUdpUser = transaction.UdpUser,
|
||||
BargeldtransaktionVersion = transaction.Version,
|
||||
ChangeType = changeType,
|
||||
Belegnummer = transaction.Belegnummer,
|
||||
Notice = transaction.Notice,
|
||||
IsActive = ActivationTypeId.Active,
|
||||
SignatureOid = transaction.SignatureOid,
|
||||
SignatureState = signatureState,
|
||||
Zahlungstyp = transaction.Zahlungstyp,
|
||||
Zahlungsdatum = transaction.Zahlungsdatum
|
||||
};
|
||||
}
|
||||
|
||||
public List<NotizenKategorieDC> LoadNotizenKategorienForObject(TableID objectTid, long objectOid)
|
||||
{
|
||||
@@ -9045,36 +8965,4 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
}
|
||||
|
||||
public class ServiceRecord2SignatureStates
|
||||
{
|
||||
public ServiceRecord ServiceRecord { get; }
|
||||
public SignatureStateType? SingleSignatureStateType { get; set; }
|
||||
public SignatureStateType? CustomerMonthlySignatureStateType { get; set; }
|
||||
public SignatureStateType? EmployeeMonthlySignatreStateType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Erzeugt das Objekt mit den SignatureStates. Wird als Wert eines States null übergeben, wird beim Erzeugen des ServiceRecordHistory-Eintrags der Wert des vorherigen ServiceRecordHistory-Eintrags genommen, falls vorhanden.
|
||||
/// </summary>
|
||||
/// <param name="serviceRecord"></param>
|
||||
/// <param name="singleSignatureStateType"></param>
|
||||
/// <param name="customerMonthlySignatureStateType"></param>
|
||||
/// <param name="employeeMonthlySignatreStateType"></param>
|
||||
public ServiceRecord2SignatureStates(ServiceRecord serviceRecord, SignatureStateType? singleSignatureStateType, SignatureStateType? customerMonthlySignatureStateType, SignatureStateType? employeeMonthlySignatreStateType)
|
||||
{
|
||||
ServiceRecord = serviceRecord;
|
||||
SingleSignatureStateType = singleSignatureStateType;
|
||||
CustomerMonthlySignatureStateType = customerMonthlySignatureStateType;
|
||||
EmployeeMonthlySignatreStateType = employeeMonthlySignatreStateType;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is ServiceRecord2SignatureStates sr2Ss && sr2Ss.ServiceRecord != null)
|
||||
{
|
||||
return ServiceRecord?.Equals(sr2Ss.ServiceRecord) ?? false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
741
Service/ServiceUtils/History/HistoryCreator.cs
Normal file
741
Service/ServiceUtils/History/HistoryCreator.cs
Normal file
@@ -0,0 +1,741 @@
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Data.Utils;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.ServiceUtils.History
|
||||
{
|
||||
public class HistoryCreator
|
||||
{
|
||||
public static void MakeNewEmployeeHistoryEntry(Employee originalEmployee, EmployeeDC newEmployee, StatementType statementType)
|
||||
{
|
||||
var employeeHistory = new EmployeeHistory
|
||||
{
|
||||
ChangeType = statementType,
|
||||
|
||||
Employee_Aggressiv = newEmployee.Aggressiv,
|
||||
//Employee_ApplicationUserOid,
|
||||
//Employee_CancellationPeriod,
|
||||
Employee_EmployeeColor = newEmployee.EmployeeColor,
|
||||
//Employee_EntryDate,
|
||||
Employee_HealthInsurance = newEmployee.HealthInsurance,
|
||||
//Employee_HourlyRate,
|
||||
Employee_Hygienebelehrung = newEmployee.Hygienebelehrung,
|
||||
Employee_InsTs = originalEmployee.InsTs,
|
||||
Employee_InsuranceNumber = newEmployee.InsuranceNumber,
|
||||
Employee_InsUser = originalEmployee.InsUser,
|
||||
Employee_IsActive = originalEmployee.IsActive,
|
||||
Employee_IsQualified = newEmployee.IsQualified,
|
||||
//Employee_leavedays,
|
||||
Employee_Notice = originalEmployee.Notice,
|
||||
Employee_Notice2 = newEmployee.Notice2,
|
||||
Employee_Oid = originalEmployee.Oid,
|
||||
Employee_PersonnelNumber = newEmployee.PersonnelNumber,
|
||||
//Employee_PersonOid,
|
||||
Employee_Pflege = newEmployee.Pflege,
|
||||
//Employee_ProbationPeriod,
|
||||
Employee_Schutzstufe = newEmployee.Schutzstufe,
|
||||
//Employee_Sequence,
|
||||
Employee_SystemEntryID = originalEmployee.SystemEntryID,
|
||||
Employee_TaxNumber = newEmployee.TaxNumber,
|
||||
Employee_Text1 = newEmployee.Text1,
|
||||
Employee_Text2 = newEmployee.Text2,
|
||||
Employee_Text3 = newEmployee.Text3,
|
||||
Employee_Text4 = newEmployee.Text4,
|
||||
Employee_Text5 = newEmployee.Text5,
|
||||
Employee_Toilettengang = newEmployee.Toilettengang,
|
||||
Employee_UdpUser = originalEmployee.UdpUser,
|
||||
Employee_Version = originalEmployee.Version,
|
||||
//Employee_weeklyfls = employee,
|
||||
//Employee_weeklytotalhours,
|
||||
};
|
||||
|
||||
MakeNewPersonHistoryEntry(originalEmployee.Person, newEmployee, statementType);
|
||||
|
||||
CreateContractHistoryEntries(originalEmployee.Oid.Value, originalEmployee.Contracts, newEmployee.Contracts);
|
||||
|
||||
foreach (var item in newEmployee.AbsenceTimes)
|
||||
{
|
||||
if (!item.EmployeeOid.HasValue)
|
||||
{
|
||||
item.EmployeeOid = originalEmployee.Oid.Value;
|
||||
}
|
||||
}
|
||||
CreateAbsenceTimeHistoryEntry(originalEmployee.AbsenceTimes, newEmployee.AbsenceTimes);
|
||||
|
||||
|
||||
|
||||
DAOFactory.GenericDAO.Insert(employeeHistory);
|
||||
|
||||
}
|
||||
|
||||
public static void CreateContractHistoryEntries(long employeeOid, IList<Contract> originalContracts, IList<ContractDC> newContracts)
|
||||
{
|
||||
if (newContracts != null)
|
||||
{
|
||||
foreach (var nc in newContracts)
|
||||
{
|
||||
if (!nc.ContractOid.HasValue)
|
||||
{
|
||||
CreateContractHistoryEntry(employeeOid, nc, StatementType.Insert);
|
||||
}
|
||||
else
|
||||
{
|
||||
var oldAt = originalContracts.Where(a => a.Oid == nc.ContractOid).FirstOrDefault();
|
||||
|
||||
if (oldAt != null)
|
||||
{
|
||||
CreateContractHistoryEntry(employeeOid, nc, StatementType.Update);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Wurde gelöscht?
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var oc in originalContracts)
|
||||
{
|
||||
//wenn es einen Vertrag gibt, der nicht mehr in der neuen Liste enthalten ist, wurde er gelöscht
|
||||
|
||||
var nc = newContracts.Where(c => c.ContractOid == oc.Oid).FirstOrDefault();
|
||||
|
||||
if (nc == null)
|
||||
{
|
||||
CreateContractHistoryEntry(employeeOid, MapperFactory.ContractDC_Contract.MapToNewDC(oc), StatementType.Delete);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void CreateContractHistoryEntry(long employeeOid, ContractDC contract, StatementType statementType)
|
||||
{
|
||||
|
||||
var historyEntry = new ContractHistory()
|
||||
{
|
||||
ContractOid = contract.ContractOid,
|
||||
ContractHistoryCancellationPeriod = contract.CancellationPeriod,
|
||||
ContractHistoryContractEndDate = contract.ContractEndDate,
|
||||
ContractHistoryContractTypeValueListEntryOid = contract.ContractTypeValueListEntry?.ValueListEntryOid,
|
||||
ContractHistoryEmployeeOid = employeeOid,
|
||||
ContractHistoryEmploymentTypeOid = contract.EmploymentType?.EmploymentTypeOid,
|
||||
ContractHistoryEntryDate = contract.EntryDate,
|
||||
ContractHistoryHourlyRate = contract.HourlyRate,
|
||||
ContractHistoryHourlyRateCostRateValueOid = contract.HourlyRateCostRateValue?.CostRatePeriodOid,
|
||||
ContractHistoryLeaveDays = contract.LeaveDays,
|
||||
ContractHistoryMonthlyFLS = contract.MonthlyFLS,
|
||||
ContractHistoryMonthlyTotalHours = contract.MonthlyTotalHours,
|
||||
ContractHistoryProbationPeriod = contract.ProbationPeriod,
|
||||
ContractHistoryProbationPeriod2 = contract.ProbationPeriod2,
|
||||
ContractHistoryQualifikationsBedarfValueListEntryOid = contract.QualifikationsBedarfValueListEntry?.ValueListEntryOid,
|
||||
ContractHistoryWeeklyDays = contract.WeeklyDays,
|
||||
ContractHistoryWeeklyFLS = contract.WeeklyFLS,
|
||||
ContractHistoryWeeklyTotalHours = contract.WeeklyTotalHours,
|
||||
Notice = contract.Notice,
|
||||
ChangeType = statementType
|
||||
};
|
||||
DAOFactory.GenericDAO.Insert(historyEntry);
|
||||
|
||||
}
|
||||
|
||||
public static void CreateAbsenceTimeHistoryEntry(IList<AbsenceTime> originalAbsenceTimes, IList<AbsenceTimeDC> newAbsenceTimes)
|
||||
{
|
||||
if (newAbsenceTimes != null)
|
||||
{
|
||||
foreach (var na in newAbsenceTimes)
|
||||
{
|
||||
if (!na.AbsenceTimeOid.HasValue)
|
||||
{
|
||||
CreateAbsenceTimeHistoryEntry(na, StatementType.Insert);
|
||||
}
|
||||
else
|
||||
{
|
||||
var oldAt = originalAbsenceTimes.Where(a => a.Oid == na.AbsenceTimeOid).FirstOrDefault();
|
||||
|
||||
if (oldAt != null)
|
||||
{
|
||||
CreateAbsenceTimeHistoryEntry(na, StatementType.Update);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Wurde gelöscht?
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var oat in originalAbsenceTimes)
|
||||
{
|
||||
//wenn es eine Abwesenheit gibt, der nicht mehr in der neuen Liste enthalten ist, wurde er gelöscht
|
||||
|
||||
var na = newAbsenceTimes.Where(a => a.AbsenceTimeOid == oat.Oid).FirstOrDefault();
|
||||
|
||||
if (na == null)
|
||||
{
|
||||
CreateAbsenceTimeHistoryEntry(MapperFactory.AbsenceTimeDC_AbsenceTime.MapToNewDC(oat), StatementType.Delete);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void CreateAbsenceTimeHistoryEntry(AbsenceTimeDC newAbsenceTime, StatementType statementType)
|
||||
{
|
||||
|
||||
var historyEntry = new AbsenceTimeHistory()
|
||||
{
|
||||
AbsenceTimeOid = newAbsenceTime.AbsenceTimeOid ?? 0,
|
||||
AbsenceReasonOid = newAbsenceTime.Reason?.AbsenceReasonOid ?? 0,
|
||||
AbsenceTimeStart = newAbsenceTime.Start,
|
||||
AbsenceTimeEnd = newAbsenceTime.End,
|
||||
AbsenceTimeKrankheitsMeldung = newAbsenceTime.KrankheitsMeldung,
|
||||
AbsenceTimeNotice = newAbsenceTime.Notice,
|
||||
AbsenceTimeCustomerOid = newAbsenceTime.CustomerOid,
|
||||
AbsenceTimeEmployeeOid = newAbsenceTime.EmployeeOid,
|
||||
ChangeType = statementType
|
||||
};
|
||||
DAOFactory.GenericDAO.Insert(historyEntry);
|
||||
|
||||
}
|
||||
|
||||
public static void MakeCustomerHistoryEntry(Customer lOriginal, CustomerDC newCustomer, long? Oid, StatementType statementType, List<Customer2Person> originalCustomer2PersonList, List<Customer2Organisation> originalC2OList, List<Employee2Customer> originale2CList)
|
||||
{
|
||||
var lCustomerHistory = new CustomerHistory
|
||||
{
|
||||
ChangeType = statementType,
|
||||
Childs = lOriginal.Childs,
|
||||
CostCenter = lOriginal.CostCenter,
|
||||
CustomerInsTs = lOriginal.InsTs,
|
||||
CustomerInsUser = lOriginal.InsUser,
|
||||
CustomerOid = Oid ?? lOriginal.Oid,
|
||||
CustomerUdpUser = lOriginal.UdpUser,
|
||||
CustomerVersion = lOriginal.Version ?? 0,
|
||||
DebitorNumber = lOriginal.DebitorNumber,
|
||||
Diagnosis = lOriginal.Diagnosis,
|
||||
Environment = lOriginal.Environment,
|
||||
EquityContribution = lOriginal.EquityContribution,
|
||||
ICD10Diagnosis = lOriginal.ICD10Diagnosis,
|
||||
IsAdvisedOrAttended = lOriginal.IsAdvisedOrAttended,
|
||||
Medication = lOriginal.Medication,
|
||||
Notice = lOriginal.Notice,
|
||||
Person = lOriginal.Person,
|
||||
ReferenceNumber = lOriginal.ReferenceNumber,
|
||||
TerminationDate = lOriginal.TerminationDate,
|
||||
AssistanceBegin = lOriginal.AssistanceBegin
|
||||
//Jugendamt = lOriginal.Jugendamt,
|
||||
//Ansprechpartner = lOriginal.Ansprechpartner
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(lCustomerHistory);
|
||||
|
||||
MakeHistoryEntry(lOriginal.Customer2PersonList, originalCustomer2PersonList, lOriginal.Oid, statementType);
|
||||
MakeHistoryEntry(lOriginal.Customer2OrganisationList, originalC2OList, lOriginal.Oid, statementType);
|
||||
MakeHistoryEntry(lOriginal.Employee2CustomerList, originale2CList, lOriginal.Oid, statementType);
|
||||
|
||||
var person = lOriginal.Person;
|
||||
MakeNewPersonHistoryEntry(person, newCustomer, statementType);
|
||||
|
||||
foreach (var item in newCustomer.AbsenceTimes)
|
||||
{
|
||||
if (!item.CustomerOid.HasValue)
|
||||
{
|
||||
item.CustomerOid = lOriginal.Oid.Value;
|
||||
}
|
||||
}
|
||||
|
||||
CreateAbsenceTimeHistoryEntry(lOriginal.AbsenceTimes, newCustomer.AbsenceTimes);
|
||||
}
|
||||
|
||||
public static void MakeNewPersonHistoryEntry(Person originalPerson, PersonDC newPerson, StatementType statementType)
|
||||
{
|
||||
var personHistoryEntry = new PersonHistory
|
||||
{
|
||||
ChangeType = statementType,
|
||||
Person_Oid = originalPerson.Oid,
|
||||
|
||||
Person_Abbreviation = newPerson.Abbreviation,
|
||||
Person_AufenthaltsStatus = newPerson.AufenthaltsStatus?.TypeDescription ?? "",
|
||||
Person_DateOfBirth = newPerson.DateOfBirth,
|
||||
Person_FamilyStatus = newPerson.FamilyStatus,
|
||||
Person_FirstName = newPerson.FirstName,
|
||||
Person_Function = newPerson.Function?.TypeDescription ?? "",
|
||||
Person_InsTs = originalPerson.InsTs,
|
||||
Person_InsUser = originalPerson.InsUser,
|
||||
Person_IsActive = originalPerson.IsActive,
|
||||
Person_IsMigrant = newPerson.IsMigrant,
|
||||
Person_LastName = newPerson.LastName,
|
||||
Person_Nationalitaet = newPerson.Nationalitaet?.TypeDescription ?? "",
|
||||
Person_Notice = newPerson.PersonNotice,
|
||||
|
||||
Person_Profession = newPerson.Profession,
|
||||
Person_Sex = newPerson.Sex,
|
||||
Person_SystemEntryID = originalPerson.SystemEntryID,
|
||||
|
||||
Person_Tid = originalPerson.Tid,
|
||||
Person_Title = newPerson.Title?.TypeDescription ?? "",
|
||||
Person_Type = newPerson.Type,
|
||||
Person_Version = originalPerson.Version
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(personHistoryEntry);
|
||||
|
||||
|
||||
MakeNewAddressHistoryEntry(originalPerson.Address, newPerson, statementType);
|
||||
MakeNewContactHistoryEntry(originalPerson.Oid.Value, originalPerson.Contacts, newPerson.ContactInformations, statementType);
|
||||
|
||||
}
|
||||
|
||||
private static void MakeNewContactHistoryEntry(long personOid, IList<Contact> originalContacts, IList<ContactDC> newContacts, StatementType statementType)
|
||||
{
|
||||
foreach (var nc in newContacts)
|
||||
{
|
||||
|
||||
if (!nc.ContactOID.HasValue)
|
||||
{
|
||||
var ec = originalContacts.Where(c => c.Type == nc.ContactType && c.Value.EqualsNullCheck(nc.ContactValue)).FirstOrDefault();
|
||||
long oid = 0;
|
||||
if (ec != null && ec.Oid.HasValue)
|
||||
{
|
||||
oid = ec.Oid.Value;
|
||||
|
||||
}
|
||||
CreateContactHistoryEntry(personOid, oid, nc.ContactValue, StatementType.Insert);
|
||||
}
|
||||
else
|
||||
{
|
||||
var oldC = originalContacts.Where(c => c.Oid == nc.ContactOID).FirstOrDefault();
|
||||
if (oldC != null && !oldC.Value.EqualsNullCheck(nc.ContactValue))
|
||||
{
|
||||
CreateContactHistoryEntry(personOid, nc.ContactOID.Value, nc.ContactValue, StatementType.Update);
|
||||
}
|
||||
else if (oldC == null)
|
||||
{
|
||||
//Wurde gelöscht?
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var oc in originalContacts)
|
||||
{
|
||||
//wenn es eine Abwesenheit gibt, der nicht mehr in der neuen Liste enthalten ist, wurde er gelöscht
|
||||
|
||||
var nc = newContacts.Where(c => c.ContactOID == oc.Oid).FirstOrDefault();
|
||||
|
||||
if (nc == null)
|
||||
{
|
||||
CreateContactHistoryEntry(personOid, oc.Oid, oc.Value, StatementType.Delete);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void CreateContactHistoryEntry(long personOid, long? contactOid, String contactAddress, StatementType statementType)
|
||||
{
|
||||
var contactHistoryEntry = new ContactHistory
|
||||
{
|
||||
ChangeType = statementType,
|
||||
Contact_Value = contactAddress,
|
||||
Contact_Oid = contactOid,
|
||||
Contact_PersonOid = personOid
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(contactHistoryEntry);
|
||||
}
|
||||
|
||||
private static void MakeNewAddressHistoryEntry(Address originalAddress, PersonDC newPerson, StatementType statementType)
|
||||
{
|
||||
if (originalAddress != null || !String.IsNullOrEmpty(newPerson.AddressLine1) || !String.IsNullOrEmpty(newPerson.PostalCode) || !String.IsNullOrEmpty(newPerson.Street) || !String.IsNullOrEmpty(newPerson.Town))
|
||||
{
|
||||
long oid = 0;
|
||||
if (originalAddress != null && originalAddress.Oid.HasValue)
|
||||
{
|
||||
oid = originalAddress.Oid.Value;
|
||||
}
|
||||
var addressHistoryEntry = new AddressHistory
|
||||
{
|
||||
ChangeType = statementType,
|
||||
|
||||
Address_AddressLine1 = newPerson.AddressLine1,
|
||||
Address_InsTs = originalAddress?.InsTs,
|
||||
Address_InsUser = originalAddress?.InsUser,
|
||||
Address_Oid = oid,
|
||||
Address_PostalCode = newPerson.PostalCode,
|
||||
Address_Street = newPerson.Street,
|
||||
Address_SystemEntryID = originalAddress?.SystemEntryID,
|
||||
Address_Town = newPerson.Town
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(addressHistoryEntry);
|
||||
}
|
||||
}
|
||||
|
||||
public static void MakeSupportConceptHistoryEntry(SupportConcept lOriginal, long? Oid, StatementType statementType)
|
||||
{
|
||||
var supportConceptHistoryEntry = new SupportConceptHistory()
|
||||
{
|
||||
ChangeType = statementType,
|
||||
SupportConcept_ApprovalDate = lOriginal.ApprovalDate,
|
||||
SupportConcept_Conference = lOriginal.Conference,
|
||||
SupportConcept_ConferenceDate = lOriginal.ConferenceDate,
|
||||
SupportConcept_ConferenceVenue = lOriginal.ConferenceVenue,
|
||||
SupportConcept_ConsultingNeeded = lOriginal.ConsultingNeeded,
|
||||
//SupportConcept_CostBearer2SupportConceptList = lOriginal.CostBearer2SupportConceptList,
|
||||
SupportConcept_CustomerOid = lOriginal.Customer.Oid,
|
||||
SupportConcept_EmployeeOid = lOriginal.Originator.Oid,
|
||||
SupportConcept_RenewalSendDate = lOriginal.RenewalSendDate,
|
||||
SupportConcept_RequisitionSendDate = lOriginal.RequisitionSendDate,
|
||||
SupportConcept_SupportConceptSendDate = lOriginal.RequisitionSendDate,
|
||||
SupportConceptOid = lOriginal.Oid,
|
||||
Notice = lOriginal.Notice
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(supportConceptHistoryEntry);
|
||||
|
||||
List<CostBearer2SupportConceptHistory> cb2schToInsert = new List<CostBearer2SupportConceptHistory>();
|
||||
List<SupportConceptApprovalPeriodHistory> scApprovalPeriodHistoriesToInsert = new List<SupportConceptApprovalPeriodHistory>();
|
||||
foreach (var originalC2S in lOriginal.CostBearer2SupportConceptList)
|
||||
{
|
||||
var C2SHistory = new CostBearer2SupportConceptHistory()
|
||||
{
|
||||
//CostBearer2SupportConcept_AccountingTransactions = originalC2S.AccountingTransactions,
|
||||
CostBearer2SupportConcept_ApprovedEndDate = originalC2S.ApprovedEndDate,
|
||||
CostBearer2SupportConcept_ApprovedStartDate = originalC2S.ApprovedStartDate,
|
||||
CostBearer2SupportConcept_AuswahlBezeichnung = originalC2S.AuswahlBezeichnung,
|
||||
CostBearer2SupportConcept_CostBearerContactPersonOid = originalC2S.CostBearerContactPerson?.Oid,
|
||||
CostBearer2SupportConcept_CostBearerOid = originalC2S.CostBearer?.Oid,
|
||||
CostBearer2SupportConcept_CustomerReferenceNumber = originalC2S.CustomerReferenceNumber,
|
||||
CostBearer2SupportConcept_MonthlyPayment = originalC2S.MonthlyPayment,
|
||||
CostBearer2SupportConcept_RequestedEndDate = originalC2S.RequestedEndDate,
|
||||
CostBearer2SupportConcept_RequestedStartDate = originalC2S.RequestedStartDate,
|
||||
//CostBearer2SupportConcept_ServiceRecords = originalC2S.ServiceRecords,
|
||||
CostBearer2SupportConcept_Status = originalC2S.Status,
|
||||
//CostBearer2SupportConcept_SupportConceptApprovalPeriodList = originalC2S.ApprovalPeriodList
|
||||
CostBearer2SupportConcept_SupportConceptHistoryOid = lOriginal.Oid.Value,
|
||||
ChangeType = statementType,
|
||||
Notice = originalC2S.Notice
|
||||
};
|
||||
DAOFactory.GenericDAO.Insert(C2SHistory);
|
||||
|
||||
foreach (var item in originalC2S.ApprovalPeriodList)
|
||||
{
|
||||
var scApprovalPeriodHistory = new SupportConceptApprovalPeriodHistory()
|
||||
{
|
||||
ChangeType = statementType,
|
||||
SupportConceptApprovalPeriod_ApprovedBEInterval = item.ApprovedBEInterval,
|
||||
SupportConceptApprovalPeriod_ApprovedBEPerInterval = item.ApprovedBEPerInterval,
|
||||
SupportConceptApprovalPeriod_ApprovedBETotal = item.ApprovedBETotal,
|
||||
SupportConceptApprovalPeriod_ApprovedFixedAmount = item.ApprovedFixedAmount,
|
||||
SupportConceptApprovalPeriod_ApprovedFixedAmountInterval = item.ApprovedFixedAmountInterval,
|
||||
SupportConceptApprovalPeriod_Bewilligungsart = item.Bewilligungsart,
|
||||
SupportConceptApprovalPeriod_BudgetOid = item.Budget?.Oid.Value,
|
||||
SupportConceptApprovalPeriod_ContactCountInterval = item.ContactCountInterval,
|
||||
SupportConceptApprovalPeriod_ContactCountPerInterval = item.ContactCountPerInterval,
|
||||
SupportConceptApprovalPeriod_CostBearer2SupportConceptHistoryOid = originalC2S.Oid.Value,
|
||||
SupportConceptApprovalPeriod_EndDate = item.EndDate,
|
||||
SupportConceptApprovalPeriod_IsApprovedBEShifting = item.IsApprovedBEShifting,
|
||||
SupportConceptApprovalPeriod_IsApprovedFixedAmountShifting = item.IsApprovedFixedAmountShifting,
|
||||
SupportConceptApprovalPeriod_MonthlyPayment = item.MonthlyPayment,
|
||||
SupportConceptApprovalPeriod_StartDate = item.StartDate,
|
||||
SupportConceptApprovalPeriod_SupportConceptApprovalPeriod2Employee = item.SupportConceptApprovalPeriod2Employee,
|
||||
SupportConceptApprovalPeriod_SupportConceptHistoryOid = supportConceptHistoryEntry.Oid.Value,
|
||||
Notice = item.Notice
|
||||
};
|
||||
DAOFactory.GenericDAO.Insert(scApprovalPeriodHistory);
|
||||
}
|
||||
}
|
||||
//MakeHistoryEntry(lOriginal.Customer2PersonList, originalCustomer2PersonList, lOriginal.Oid, statementType);
|
||||
//MakeHistoryEntry(lOriginal.Customer2OrganisationList, originalC2OList, lOriginal.Oid, statementType);
|
||||
//MakeHistoryEntry(lOriginal.Employee2CustomerList, originale2CList, lOriginal.Oid, statementType);
|
||||
}
|
||||
|
||||
// ToDo: Unterschriftenbemerkung hier einbauen
|
||||
public static void MakeServiceRecordHistoryEntry(List<ServiceRecord> lOriginals, IEnumerable<long> serviceRecordOidList, StatementType statementType)
|
||||
{
|
||||
var serviceRecordHistoryEntries = new List<ServiceRecordHistory>();
|
||||
|
||||
if (statementType.Equals(StatementType.Insert) && serviceRecordOidList != null)
|
||||
{
|
||||
var iterator = 0;
|
||||
foreach (var history in lOriginals.Select(serviceRecordOriginal => new ServiceRecordHistory
|
||||
{
|
||||
TimeStamp = DateTime.Now,
|
||||
ChangeType = statementType,
|
||||
CostBearer2SupportConcept = serviceRecordOriginal.CostBearer2SupportConcept,
|
||||
CostBearer2SupportConceptOid = serviceRecordOriginal.CostBearer2SupportConceptOid,
|
||||
Customer = serviceRecordOriginal.Customer,
|
||||
CustomerOid = serviceRecordOriginal.CustomerOid,
|
||||
Employee = serviceRecordOriginal.Employee,
|
||||
EmployeeOid = serviceRecordOriginal.EmployeeOid,
|
||||
End = serviceRecordOriginal.End,
|
||||
Group = serviceRecordOriginal.Group,
|
||||
GroupEmployeeCount = serviceRecordOriginal.GroupEmployeeCount,
|
||||
GroupOid = serviceRecordOriginal.GroupOid,
|
||||
GroupPersonCount = serviceRecordOriginal.GroupPersonCount,
|
||||
GroupRoundedDuration = serviceRecordOriginal.GroupRoundedDuration,
|
||||
IP = serviceRecordOriginal.IP,
|
||||
IsActive = serviceRecordOriginal.IsActive,
|
||||
Notice = serviceRecordOriginal.Notice,
|
||||
ServiceRecordOid = serviceRecordOidList.ElementAt(iterator),
|
||||
RoundedDuration = serviceRecordOriginal.RoundedDuration,
|
||||
ServiceDescription = serviceRecordOriginal.ServiceDescription,
|
||||
ServiceRecordType = serviceRecordOriginal.ServiceRecordType,
|
||||
ServiceRecordInsTs = serviceRecordOriginal.InsTs,
|
||||
ServiceRecordVersion = serviceRecordOriginal.Version ?? 0,
|
||||
ServiceRecordInsUser = serviceRecordOriginal.InsUser,
|
||||
ServiceRecordUdpUser = serviceRecordOriginal.UdpUser,
|
||||
Start = serviceRecordOriginal.Start,
|
||||
SupportConcept = serviceRecordOriginal.SupportConcept,
|
||||
SystemEntryID = serviceRecordOriginal.SystemEntryID,
|
||||
DistanceInMeter = serviceRecordOriginal.DistanceInMeter,
|
||||
IsCreatedInMobileClient = serviceRecordOriginal.IsCreatedInMobileClient
|
||||
}))
|
||||
{
|
||||
iterator++;
|
||||
serviceRecordHistoryEntries.Add(history);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var original in lOriginals)
|
||||
{
|
||||
SignatureStateInfoFromServiceRecordHistoryEntry previousRecordHistorySignatureInfo = null;
|
||||
|
||||
if (original.Oid.HasValue)
|
||||
{
|
||||
previousRecordHistorySignatureInfo = DAOFactory.SearchDAO.FindMostRecentSignatureStatusInfoByServiceRecordOid(original.Oid.Value);
|
||||
}
|
||||
|
||||
serviceRecordHistoryEntries.AddIfNotIn(new ServiceRecordHistory
|
||||
{
|
||||
TimeStamp = DateTime.Now,
|
||||
ChangeType = statementType,
|
||||
CostBearer2SupportConcept = original.CostBearer2SupportConcept,
|
||||
CostBearer2SupportConceptOid = original.CostBearer2SupportConceptOid,
|
||||
Customer = original.Customer,
|
||||
CustomerOid = original.CustomerOid,
|
||||
Employee = original.Employee,
|
||||
EmployeeOid = original.EmployeeOid,
|
||||
End = original.End,
|
||||
Group = original.Group,
|
||||
GroupEmployeeCount = original.GroupEmployeeCount,
|
||||
GroupOid = original.GroupOid,
|
||||
GroupPersonCount = original.GroupPersonCount,
|
||||
GroupRoundedDuration = original.GroupRoundedDuration,
|
||||
IP = original.IP,
|
||||
IsActive = original.IsActive,
|
||||
Notice = original.Notice,
|
||||
ServiceRecordOid = original.Oid,
|
||||
RoundedDuration = original.RoundedDuration,
|
||||
ServiceDescription = original.ServiceDescription,
|
||||
ServiceRecordType = original.ServiceRecordType,
|
||||
ServiceRecordInsTs = original.InsTs,
|
||||
ServiceRecordVersion = original.Version ?? 0,
|
||||
ServiceRecordInsUser = original.InsUser,
|
||||
ServiceRecordUdpUser = original.UdpUser,
|
||||
Start = original.Start,
|
||||
SupportConcept = original.SupportConcept,
|
||||
SystemEntryID = original.SystemEntryID,
|
||||
DistanceInMeter = original.DistanceInMeter,
|
||||
IsCreatedInMobileClient = original.IsCreatedInMobileClient,
|
||||
ServiceRecordSignatureStateType = previousRecordHistorySignatureInfo?.ServiceRecordSignatureStateType ?? SignatureStateType.None,
|
||||
CustomerConfirmationReceiptSignatureStateType = previousRecordHistorySignatureInfo?.CustomerConfirmationReceiptSignatureStateType ?? SignatureStateType.None,
|
||||
EmployeeConfirmationReceiptSignatureStateType = previousRecordHistorySignatureInfo?.EmployeeConfirmationReceiptSignatureStateType ?? SignatureStateType.None,
|
||||
CustomerConfirmationReceiptSignatureOid = previousRecordHistorySignatureInfo?.CustomerConfirmationReceiptSignatureOid,
|
||||
EmployeeConfirmationReceiptSignatureOid = previousRecordHistorySignatureInfo?.EmployeeConfirmationReceiptSignatureOid
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
DAOFactory.GenericDAO.Insert(serviceRecordHistoryEntries);
|
||||
}
|
||||
|
||||
public static void MakeServiceRecordHistoryEntryWithSignatureStates(List<ServiceRecord2SignatureStates> serviceRecords2SignatureStates, StatementType statementType)
|
||||
{
|
||||
var serviceRecordHistoryEntries = new List<ServiceRecordHistory>();
|
||||
|
||||
foreach (var serviceRecord2SignatureState in serviceRecords2SignatureStates)
|
||||
{
|
||||
var serviceRecord = serviceRecord2SignatureState.ServiceRecord;
|
||||
var singleSignatureState = serviceRecord2SignatureState.SingleSignatureStateType;
|
||||
var customerMonthlySignatureState = serviceRecord2SignatureState.CustomerMonthlySignatureStateType;
|
||||
var employeeMonthlySignatureState = serviceRecord2SignatureState.EmployeeMonthlySignatreStateType;
|
||||
|
||||
SignatureStateInfoFromServiceRecordHistoryEntry previousRecordHistorySignatureInfo = null;
|
||||
|
||||
if (serviceRecord.Oid.HasValue)
|
||||
{
|
||||
//previousRecordHistoryEntry = DAOFactory.SearchDAO.FindMostRecentServiceRecordHistoryEntryByServiceRecordOid(serviceRecord.Oid.Value);
|
||||
previousRecordHistorySignatureInfo = DAOFactory.SearchDAO.FindMostRecentSignatureStatusInfoByServiceRecordOid(serviceRecord.Oid.Value);
|
||||
}
|
||||
|
||||
serviceRecordHistoryEntries.AddIfNotIn(new ServiceRecordHistory
|
||||
{
|
||||
TimeStamp = DateTime.Now,
|
||||
ChangeType = statementType,
|
||||
CostBearer2SupportConcept = serviceRecord.CostBearer2SupportConcept,
|
||||
CostBearer2SupportConceptOid = serviceRecord.CostBearer2SupportConceptOid,
|
||||
Customer = serviceRecord.Customer,
|
||||
CustomerOid = serviceRecord.CustomerOid,
|
||||
Employee = serviceRecord.Employee,
|
||||
EmployeeOid = serviceRecord.EmployeeOid,
|
||||
End = serviceRecord.End,
|
||||
Group = serviceRecord.Group,
|
||||
GroupEmployeeCount = serviceRecord.GroupEmployeeCount,
|
||||
GroupOid = serviceRecord.GroupOid,
|
||||
GroupPersonCount = serviceRecord.GroupPersonCount,
|
||||
GroupRoundedDuration = serviceRecord.GroupRoundedDuration,
|
||||
IP = serviceRecord.IP,
|
||||
IsActive = serviceRecord.IsActive,
|
||||
Notice = serviceRecord.Notice,
|
||||
ServiceRecordOid = serviceRecord.Oid,
|
||||
RoundedDuration = serviceRecord.RoundedDuration,
|
||||
ServiceDescription = serviceRecord.ServiceDescription,
|
||||
ServiceRecordType = serviceRecord.ServiceRecordType,
|
||||
ServiceRecordInsTs = serviceRecord.InsTs,
|
||||
ServiceRecordVersion = serviceRecord.Version ?? 0,
|
||||
ServiceRecordInsUser = serviceRecord.InsUser,
|
||||
ServiceRecordUdpUser = serviceRecord.UdpUser,
|
||||
Start = serviceRecord.Start,
|
||||
SupportConcept = serviceRecord.SupportConcept,
|
||||
SystemEntryID = serviceRecord.SystemEntryID,
|
||||
DistanceInMeter = serviceRecord.DistanceInMeter,
|
||||
IsCreatedInMobileClient = serviceRecord.IsCreatedInMobileClient,
|
||||
ServiceRecordSignatureStateType = singleSignatureState ?? previousRecordHistorySignatureInfo?.ServiceRecordSignatureStateType ?? SignatureStateType.None,
|
||||
CustomerConfirmationReceiptSignatureStateType = customerMonthlySignatureState ?? previousRecordHistorySignatureInfo?.CustomerConfirmationReceiptSignatureStateType ?? SignatureStateType.None,
|
||||
EmployeeConfirmationReceiptSignatureStateType = employeeMonthlySignatureState ?? previousRecordHistorySignatureInfo?.EmployeeConfirmationReceiptSignatureStateType ?? SignatureStateType.None,
|
||||
CustomerConfirmationReceiptSignatureOid = previousRecordHistorySignatureInfo?.CustomerConfirmationReceiptSignatureOid,
|
||||
EmployeeConfirmationReceiptSignatureOid = previousRecordHistorySignatureInfo?.EmployeeConfirmationReceiptSignatureOid
|
||||
});
|
||||
}
|
||||
|
||||
DAOFactory.GenericDAO.Insert(serviceRecordHistoryEntries);
|
||||
}
|
||||
|
||||
public static Bargeldtransaktionshistory CreateTransactionHistoryObject(Bargeldtransaktion transaction, StatementType changeType, SignatureStateType signatureState)
|
||||
{
|
||||
return new Bargeldtransaktionshistory
|
||||
{
|
||||
Betrag = transaction.Betrag,
|
||||
BargeldtransaktionOid = transaction.Oid,
|
||||
BargeldtransaktionInsTs = transaction.InsTs,
|
||||
BargeldtransaktionInsUser = transaction.InsUser,
|
||||
BargeldtransaktionUdpUser = transaction.UdpUser,
|
||||
BargeldtransaktionVersion = transaction.Version,
|
||||
ChangeType = changeType,
|
||||
Belegnummer = transaction.Belegnummer,
|
||||
Notice = transaction.Notice,
|
||||
IsActive = ActivationTypeId.Active,
|
||||
SignatureOid = transaction.SignatureOid,
|
||||
SignatureState = signatureState,
|
||||
Zahlungstyp = transaction.Zahlungstyp,
|
||||
Zahlungsdatum = transaction.Zahlungsdatum
|
||||
};
|
||||
}
|
||||
|
||||
public static void MakeHistoryEntry<T>(IList<T> lNewList, List<T> lOriginalList, long? customerOid, StatementType sType) where T : BeWoEntityBase
|
||||
{
|
||||
if (sType.Equals(StatementType.Delete) || sType.Equals(StatementType.Insert) || sType.Equals(StatementType.Archived) || sType.Equals(StatementType.Reactivate))
|
||||
{
|
||||
foreach (T newObject in lNewList)
|
||||
MakeActualHistoryEntry(newObject, sType, customerOid);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
List<long?> OidOfOriginalsList = lOriginalList.Select(element => element.Oid.Value).Select(oid => (long?)oid).ToList();
|
||||
List<long?> OidOfNewsList = lNewList.Select(element => element.Oid.Value).Select(oid => (long?)oid).ToList();
|
||||
|
||||
if (lOriginalList.Count <= 0 && lNewList.Count <= 0)
|
||||
return;
|
||||
|
||||
foreach (T newObject in lNewList)
|
||||
{
|
||||
if (!OidOfOriginalsList.Contains(newObject.Oid))
|
||||
MakeActualHistoryEntry(newObject, StatementType.Insert, customerOid);
|
||||
else
|
||||
{
|
||||
T TObject = lOriginalList.Find(t => t.Oid.Equals(newObject.Oid));
|
||||
if (TObject.Version != newObject.Version)
|
||||
MakeActualHistoryEntry(newObject, StatementType.Update, customerOid);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (T oldObject in lOriginalList.Where(oldObject => !OidOfNewsList.Contains(oldObject.Oid)))
|
||||
MakeActualHistoryEntry(oldObject, StatementType.Delete, customerOid);
|
||||
}
|
||||
|
||||
public static void MakeActualHistoryEntry<T>(T entityObj, StatementType sType, long? customerOid)
|
||||
{
|
||||
Customer customer = null;
|
||||
if (customerOid != null)
|
||||
customer = DAOFactory.GenericDAO.LoadByID<Customer>(customerOid.Value);
|
||||
|
||||
if (entityObj is Customer2Person)
|
||||
{
|
||||
var customer2Person = entityObj as Customer2Person;
|
||||
var historyEntry = new Customer2PersonHistory
|
||||
{
|
||||
ChangeType = sType,
|
||||
Customer2PersonInsTs = customer2Person.InsTs,
|
||||
Customer2PersonInsUser = customer2Person.InsUser,
|
||||
Customer2PersonOid = customer2Person.Oid,
|
||||
Customer2PersonUdpUser = customer2Person.UdpUser,
|
||||
Customer2PersonVersion = customer2Person.Version.Value,
|
||||
Notice = customer2Person.Notice,
|
||||
Person = customer2Person.Person,
|
||||
CustomerOid = customer.Oid
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(historyEntry);
|
||||
}
|
||||
else if (entityObj is Customer2Organisation)
|
||||
{
|
||||
var customer2Organisation = entityObj as Customer2Organisation;
|
||||
var historyEntry = new Customer2OrganisationHistory
|
||||
{
|
||||
ChangeType = sType,
|
||||
Organisation = customer2Organisation.Organisation,
|
||||
Notice = customer2Organisation.Notice,
|
||||
Customer2OrganisationInsTs = customer2Organisation.InsTs,
|
||||
Customer2OrganisationOid = customer2Organisation.Oid,
|
||||
Customer2OrganisationInsUser = customer2Organisation.InsUser,
|
||||
Customer2OrganisationUdpUser = customer2Organisation.UdpUser,
|
||||
Customer2OrganisationVersion = customer2Organisation.Version.Value,
|
||||
Info1 = customer2Organisation.Info1,
|
||||
Info2 = customer2Organisation.Info2,
|
||||
Info3 = customer2Organisation.Info3,
|
||||
Info4 = customer2Organisation.Info4,
|
||||
Info5 = customer2Organisation.Info5,
|
||||
CustomerOid = customer.Oid
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(historyEntry);
|
||||
}
|
||||
else if (entityObj is Employee2Customer)
|
||||
{
|
||||
var employee2Customer = entityObj as Employee2Customer;
|
||||
var historyEntry = new Employee2CustomerHistory
|
||||
{
|
||||
ChangeType = sType,
|
||||
Customer = customer,
|
||||
CustomerOid = customer.Oid,
|
||||
Employee = employee2Customer.Employee,
|
||||
EmployeeOid = employee2Customer.EmployeeOid,
|
||||
Employee2CustomerInsTs = employee2Customer.InsTs,
|
||||
Employee2CustomerInsUser = employee2Customer.InsUser,
|
||||
Employee2CustomerOid = employee2Customer.Oid.Value,
|
||||
Employee2CustomerUdpUser = employee2Customer.UdpUser,
|
||||
Employee2CustomerVersion = employee2Customer.Version.Value,
|
||||
Notice = employee2Customer.Notice
|
||||
};
|
||||
|
||||
DAOFactory.GenericDAO.Insert(historyEntry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -179,7 +179,8 @@ namespace BS.Shared
|
||||
TwoFactorCode = 172,
|
||||
CustomerWohnhilfe = 173,
|
||||
AiSettings = 174,
|
||||
SignatureDeletionHistory = 175
|
||||
SignatureDeletionHistory = 175,
|
||||
AbsenceTimeHistory = 176,
|
||||
}
|
||||
|
||||
public enum SystemEntryID
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
public static string ShowSignature => "ShowSignature";
|
||||
public static string ShowDistanceFields => "ShowDistanceFields";
|
||||
public static string IsServiceRecordNoticeMandatory => "IsServiceRecordNoticeMandatory";
|
||||
public static string IsServiceRecordGoalMandatory => "IsServiceRecordGoalMandatory";
|
||||
public static string IsServiceRecordRatingMandatory => "IsServiceRecordRatingMandatory";
|
||||
public static string IsEndDateVisible => "IsEndDateVisible";
|
||||
public static string IsZeiterfassungInStdMin => "IsZeiterfassungInStdMin";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user