Todos für Version 3.29
- Aktuelle Einstellung speichern in Stundenübersicht - Suchfeld Dokumentation in Stundenübersicht - Neue Rechte "Mitarbeiter Abwesenheiten bearbeiten" und "Mitarbeiter Überstunden bearbeiten"
This commit is contained in:
@@ -56,9 +56,9 @@ namespace BeWo
|
||||
public static LoginControl LoginControl;
|
||||
public static MainControl MainControl;
|
||||
|
||||
public static string ShortVersion = "3.28";
|
||||
public static string ShortVersion = "3.29";
|
||||
|
||||
public static string Version = "Version 3.28";
|
||||
public static string Version = "Version 3.29";
|
||||
|
||||
public static int RenderTier = 0;
|
||||
public static bool IsInDesignMode = DesignerProperties.GetIsInDesignMode(new DependencyObject());
|
||||
@@ -954,6 +954,8 @@ namespace BeWo
|
||||
UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.SchedulingViewType, ((int) _AppSettings.SchedulingViewType).ToString(), _LoggedOnUser.Settings);
|
||||
UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.OpenReportInNewWindow, _AppSettings.OpenReportInNewWindow ? "1" : "0", _LoggedOnUser.Settings);
|
||||
|
||||
UserSettingsUtils.SetDefaultFlsConfigSetting(_AppSettings.DefaultFlsAnalysisConfig, _LoggedOnUser.Settings);
|
||||
|
||||
string val = string.Empty;
|
||||
if (_AppSettings.StartupPanelOrder != null)
|
||||
{
|
||||
@@ -1312,6 +1314,8 @@ namespace BeWo
|
||||
_AppSettings.OpenReportInNewWindow = (i > 0);
|
||||
}
|
||||
|
||||
_AppSettings.DefaultFlsAnalysisConfig = UserSettingsUtils.GetDefaultFlsConfigSetting(settings, _LoggedOnUser.Employee.EmployeeOid);
|
||||
|
||||
_AppSettings.IsDirty = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using BeWo.View.Navigation.Filter;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using DevExpress.Xpf.Accordion;
|
||||
using DevExpress.Xpf.Scheduling;
|
||||
using DevExpress.XtraScheduler;
|
||||
@@ -49,6 +50,8 @@ namespace BeWo.Core.Config
|
||||
|
||||
private ZeiterfassungsDauer mLetzteZeiterfassungsDauer = ZeiterfassungsDauer.Minuten;
|
||||
|
||||
private FLSAnalysisConfigDC _DefaultFlsAnalysisConfig = null;
|
||||
|
||||
public enum WindowStateType
|
||||
{
|
||||
Default,
|
||||
@@ -597,9 +600,20 @@ namespace BeWo.Core.Config
|
||||
if (mOpenReportInNewWindow != value)
|
||||
{
|
||||
mOpenReportInNewWindow = value;
|
||||
IsDirty = true;
|
||||
IsDirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public FLSAnalysisConfigDC DefaultFlsAnalysisConfig
|
||||
{
|
||||
get { return _DefaultFlsAnalysisConfig; }
|
||||
set
|
||||
{
|
||||
_DefaultFlsAnalysisConfig = value;
|
||||
IsDirty = true;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -523,6 +523,12 @@ namespace BeWo.ServiceProxy
|
||||
"t", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactCustomerDC> GetAllActiveCustomersForEmployee(bool fetchReferenceNumbers);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomerService/GetSupportConceptCostBearerRelationById", ReplyAction="http://tempuri.org/ICustomerService/GetSupportConceptCostBearerRelationByIdRespon" +
|
||||
"se")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/ICustomerService/GetSupportConceptCostBearerRelationByIdBeWoFa" +
|
||||
"ultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
|
||||
BS.Shared.DataContracts.SupportConceptCostBearerRelDC GetSupportConceptCostBearerRelationById(long oid);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomerService/UpdateCustomer", ReplyAction="http://tempuri.org/ICustomerService/UpdateCustomerResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/ICustomerService/UpdateCustomerBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
|
||||
long UpdateCustomer(BS.Shared.DataContracts.CustomerDC pCustomerDC);
|
||||
@@ -1409,6 +1415,11 @@ namespace BeWo.ServiceProxy
|
||||
return base.Channel.GetAllActiveCustomersForEmployee(fetchReferenceNumbers);
|
||||
}
|
||||
|
||||
public BS.Shared.DataContracts.SupportConceptCostBearerRelDC GetSupportConceptCostBearerRelationById(long oid)
|
||||
{
|
||||
return base.Channel.GetSupportConceptCostBearerRelationById(oid);
|
||||
}
|
||||
|
||||
public long UpdateCustomer(BS.Shared.DataContracts.CustomerDC pCustomerDC)
|
||||
{
|
||||
return base.Channel.UpdateCustomer(pCustomerDC);
|
||||
|
||||
@@ -59,6 +59,11 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/UploadPersehFile", ReplyAction="http://tempuri.org/IStreamingService/UploadPersehFileResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IStreamingService/UploadPersehFileBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
|
||||
BeWo.ServiceProxy.UploadPersehDocumentResult UploadPersehFile(BeWo.ServiceProxy.UploadPackage request);
|
||||
|
||||
// CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UploadPackage) von Nachricht "UploadPackage" nicht mit dem Standardwert (UploadAviseFile) übereinstimmt.
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/UploadAviseFile", ReplyAction="http://tempuri.org/IStreamingService/UploadAviseFileResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IStreamingService/UploadAviseFileBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
|
||||
BeWo.ServiceProxy.UploadImportFileResult UploadAviseFile(BeWo.ServiceProxy.UploadPackage request);
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
@@ -441,5 +446,26 @@ namespace BeWo.ServiceProxy
|
||||
BeWo.ServiceProxy.UploadPersehDocumentResult retVal = ((BeWo.ServiceProxy.IStreamingService)(this)).UploadPersehFile(inValue);
|
||||
return retVal.HilfeplanImportData;
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
BeWo.ServiceProxy.UploadImportFileResult BeWo.ServiceProxy.IStreamingService.UploadAviseFile(BeWo.ServiceProxy.UploadPackage request)
|
||||
{
|
||||
return base.Channel.UploadAviseFile(request);
|
||||
}
|
||||
|
||||
public string UploadAviseFile(System.Nullable<long> BeWoFolderOid, int FileAttachmentTypeId, string FileName, string Notice, long ObjectOid, int TableID, System.IO.Stream Stream, out bool Success)
|
||||
{
|
||||
BeWo.ServiceProxy.UploadPackage inValue = new BeWo.ServiceProxy.UploadPackage();
|
||||
inValue.BeWoFolderOid = BeWoFolderOid;
|
||||
inValue.FileAttachmentTypeId = FileAttachmentTypeId;
|
||||
inValue.FileName = FileName;
|
||||
inValue.Notice = Notice;
|
||||
inValue.ObjectOid = ObjectOid;
|
||||
inValue.TableID = TableID;
|
||||
inValue.Stream = Stream;
|
||||
BeWo.ServiceProxy.UploadImportFileResult retVal = ((BeWo.ServiceProxy.IStreamingService)(this)).UploadAviseFile(inValue);
|
||||
Success = retVal.Success;
|
||||
return retVal.ResultMessage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,22 @@ namespace BeWo.View.Detail
|
||||
}
|
||||
|
||||
public bool CheckEnddate { get; set; }
|
||||
public void SetReadOnly(bool ro)
|
||||
{
|
||||
if (ro)
|
||||
{
|
||||
GroupBoxNewAbsenceTime.Visibility = Visibility.Collapsed;
|
||||
foreach (var col in DataGridAbsenceTimes.Columns)
|
||||
{
|
||||
if (col.Header == "")
|
||||
{
|
||||
col.Visible = false;
|
||||
}
|
||||
col.ReadOnly = true;
|
||||
col.AllowEditing = DevExpress.Utils.DefaultBoolean.False;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AddAbsenceTimes()
|
||||
{
|
||||
|
||||
@@ -76,6 +76,8 @@
|
||||
<Grid>
|
||||
<Grid x:Name="rootGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
@@ -104,9 +106,24 @@
|
||||
DeleteButtonVisibility="Collapsed"
|
||||
IsReadOnly="True"
|
||||
PopUpClick="popupedit_file_PopUpClick" />
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
VerticalAlignment="Center"
|
||||
Content="Buchungsdatum" />
|
||||
<dxe:DateEdit
|
||||
x:Name="DateEditDefaultImportBuchungsdatum"
|
||||
Grid.Row="0"
|
||||
Grid.Column="3"
|
||||
Height="23"
|
||||
Width="100"
|
||||
Margin="3"
|
||||
AllowNullInput="False"
|
||||
Background="White"
|
||||
MaskType="DateTimeAdvancingCaret" />
|
||||
<Button
|
||||
x:Name="ButtonImport"
|
||||
Grid.Column="2"
|
||||
Grid.Column="4"
|
||||
Height="22"
|
||||
Margin="5,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
@@ -118,7 +135,7 @@
|
||||
x:Name="customerInfoGrid"
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="3"
|
||||
Grid.ColumnSpan="5"
|
||||
Margin="0,3,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="250" />
|
||||
@@ -157,7 +174,7 @@
|
||||
x:Name="customerDetailGrid"
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="3"
|
||||
Grid.ColumnSpan="5"
|
||||
Margin="0,5,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
|
||||
@@ -55,6 +55,9 @@ namespace BeWo.View.Detail
|
||||
public AccountingTransactionBookingView(AccountingBookingVM pViewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
DateEditDefaultImportBuchungsdatum.EditValue = DateTime.Now.Date;
|
||||
|
||||
popup_content.Visibility = Visibility.Hidden;
|
||||
ViewModel = pViewModel;
|
||||
|
||||
@@ -704,15 +707,15 @@ namespace BeWo.View.Detail
|
||||
// }));
|
||||
long oid = 0;
|
||||
|
||||
var lUlPackage = new UploadPackage(null, 0, _UploadFileName, null, 0, 0, upload);
|
||||
String notice = String.Format("{0:dd.MM.yyyy}", DateEditDefaultImportBuchungsdatum.EditValue); //Als Workaround um keine neue Server Methode schreiben zu müssen, wird das Buchungsdatum in der Notice übergeben
|
||||
|
||||
var lUlPackage = new UploadPackage(null, 0, _UploadFileName, notice, 0, 0, upload);
|
||||
|
||||
ServiceFacade.DoStreamingServiceAsync(
|
||||
s => s.UploadImportFile(lUlPackage),
|
||||
s => s.UploadAviseFile(lUlPackage),
|
||||
r => this.Dispatch(
|
||||
delegate
|
||||
{
|
||||
|
||||
|
||||
//_UploadFileName = null;
|
||||
//button_uploadDocument.IsEnabled = false;
|
||||
//popupedit_file.Text = string.Empty;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel HorizontalAlignment="Stretch" Orientation="Horizontal">
|
||||
<Button Command="{Binding AddVMCommand}" Content="Neue Wohnhilfe hinzufügen" />
|
||||
<Button Command="{Binding AddVMCommand}" Content="{t:Translate Neuen Basisdatensatz anlegen}" />
|
||||
<Button
|
||||
Command="{Binding InsertDetailsCommand}"
|
||||
Content="Übertragen"
|
||||
|
||||
@@ -1681,7 +1681,7 @@
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="Abwesenheiten">
|
||||
<detail:AbsenceTimesView CheckEnddate="True" AbsenceTimes="{Binding ViewModel.AbsenceTimes, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay, ElementName=EmployeeBeWoView}" />
|
||||
<detail:AbsenceTimesView x:Name="AbsenceTimeView" CheckEnddate="True" AbsenceTimes="{Binding ViewModel.AbsenceTimes, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay, ElementName=EmployeeBeWoView}" />
|
||||
</TabItem>
|
||||
<TabItem
|
||||
x:Name="OvertimeTabItem"
|
||||
|
||||
@@ -83,6 +83,13 @@ namespace BeWo.View.Detail
|
||||
|
||||
OvertimeTabItem.Visibility = BeWoApp.LoggedOnUser.HasRight(UserRightType.OvertimeView) ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
groupbox_newOvertime.Visibility = BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowEditOvertimes) ? Visibility.Visible : Visibility.Collapsed;
|
||||
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowEditAbsenceTimes))
|
||||
{
|
||||
AbsenceTimeView.SetReadOnly(true);
|
||||
}
|
||||
|
||||
|
||||
tabitem_arbeitszeit.Visibility = Visibility.Visible;
|
||||
|
||||
if (pEmployeeDC.VarFields == null || pEmployeeDC.VarFields.VMList.Count == 0)
|
||||
@@ -623,6 +630,19 @@ namespace BeWo.View.Detail
|
||||
|
||||
GroupBoxOvertimes.Content = _GridOvertimes;
|
||||
|
||||
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowEditOvertimes))
|
||||
{
|
||||
foreach (var col in _GridOvertimes.Columns)
|
||||
{
|
||||
if (col.Header == "")
|
||||
{
|
||||
col.Visible = false;
|
||||
}
|
||||
col.ReadOnly = true;
|
||||
col.AllowEditing = DevExpress.Utils.DefaultBoolean.False;
|
||||
}
|
||||
|
||||
}
|
||||
if (ViewModel.AbsenceTimes != null && _GridOvertimes != null)
|
||||
{
|
||||
_GridOvertimes.Columns["Auszahlungsart"].EditSettings = new ComboBoxEditSettings
|
||||
|
||||
@@ -37,5 +37,7 @@ namespace BeWo.View.Report.FLSReport
|
||||
public bool ShowOnlyDeleted { get; set; }
|
||||
|
||||
public bool ShowEinheitInMinuten { get; set; }
|
||||
|
||||
public String Suchtext { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -33,20 +33,24 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button x:Name="button_generate" Grid.Column="0" Content="Aktualisieren" Click="button_generate_Click" Height="24" HorizontalAlignment="Left" Width="80" />
|
||||
<RadioButton x:Name="radioEmployeeReport" Grid.Column="1" Content="{markup:Translate Nach Mitarbeiter gruppieren}" GroupName="radioReportType" IsChecked="True" Margin="4,4,0,0" Checked="RadioButton_Checked" />
|
||||
<RadioButton x:Name="radioClientReport" Grid.Column="2" GroupName="radioReportType" Content="{markup:Translate Nach Klient gruppieren}" Margin="4,4,0,0" Checked="RadioButton_Checked" />
|
||||
<RadioButton x:Name="radioCostbearerReport" Grid.Column="3" GroupName="radioReportType" Content="{markup:Translate Nach Kostenträger gruppieren}" Margin="4,4,0,0" Checked="RadioButton_Checked" />
|
||||
<RadioButton x:Name="radioTeamReport" Grid.Column="4" GroupName="radioReportType" Content="{markup:Translate Nach Team gruppieren}" Margin="4,4,0,0" Checked="RadioButton_Checked"/>
|
||||
<Button x:Name="button_saveConfig" Grid.Column="5" Content="{t:Translate Aktuelle Einstellung speichern}" ToolTip="{t:Translate Speichert den aktuell eingestellten Filter als Grundeinstellung für zukünftige Auswertungen}" Click="button_saveConfig_Click" Height="24" HorizontalAlignment="Left" Margin="5,0,0,0" />
|
||||
</Grid>
|
||||
</uc:ExpanderPanel.Header>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -110,9 +114,11 @@
|
||||
<CheckBox x:Name="checkbox_sortBySubGroup" Grid.Column="3" Grid.Row="5" IsChecked="False" Content="{markup:Translate Nach Klienten sortieren}" Margin="10,5,0,0" Grid.ColumnSpan="1" />
|
||||
<CheckBox x:Name="checkbox_showChart" Grid.Column="3" Grid.Row="6" IsChecked="False" Content="Diagramm anzeigen" Margin="10,5,0,0" Grid.ColumnSpan="1" />
|
||||
|
||||
<CheckBox x:Name="checkbox_showDeleted" Grid.Column="3" Grid.Row="4" IsChecked="False" Content="Nur gelöschte Einträge anzeigen" Margin="170,5,0,0" />
|
||||
<CheckBox x:Name="checkbox_showMarker" Grid.Column="3" Grid.Row="5" IsChecked="False" Content="Nur Marker anzeigen" Margin="170,5,0,0" />
|
||||
<CheckBox x:Name="checkbox_showDeleted" Grid.Column="3" Grid.ColumnSpan="2" Grid.Row="4" IsChecked="False" Content="Nur gelöschte Einträge anzeigen" Margin="170,5,0,0" />
|
||||
<CheckBox x:Name="checkbox_showMarker" Grid.Column="3" Grid.ColumnSpan="2" Grid.Row="5" IsChecked="False" Content="Nur Marker anzeigen" Margin="170,5,0,0" />
|
||||
|
||||
<Label Grid.Column="4" Grid.Row="0" Content="{t:Translate Dokumentation}" Margin="0,0,0,0" Padding="0,5,0,0" />
|
||||
<TextBox x:Name="TextBoxDokutext" Grid.Column="4" Grid.Row="1" Width="250"></TextBox>
|
||||
</Grid>
|
||||
</uc:ExpanderPanel>
|
||||
<Grid Background="{DynamicResource EmployeeContentBrush}" x:Name="reportContent" Grid.Row="1" Grid.ColumnSpan="7" Margin="0,0,0,18" />
|
||||
|
||||
@@ -51,29 +51,59 @@ namespace BeWo.View.Report.FLSReport
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
var startDate = DateTime.Now.AddMonths(-1);
|
||||
datePickerStartDate.DateTime = new DateTime(startDate.Year, startDate.Month, 1);
|
||||
datePickerEndDate.DateTime = DateTime.Now;
|
||||
checkbox_showChart.IsChecked = false;
|
||||
checkbox_showServiceRecords.IsChecked = false;
|
||||
checkbox_sortBySubGroup.IsChecked = true;
|
||||
checkbox_showMarker.IsChecked = false;
|
||||
var config = BeWoApp.AppSettings.DefaultFlsAnalysisConfig;
|
||||
if (config == null)
|
||||
{
|
||||
config = CreateDefaultConfig();
|
||||
}
|
||||
|
||||
datePickerStartDate.EditValue = config.StartDate;
|
||||
datePickerEndDate.EditValue = config.EndDate;
|
||||
checkbox_showChart.IsChecked = config.ShowChart;
|
||||
checkbox_showServiceRecords.IsChecked = config.ShowServiceRecords;
|
||||
checkbox_sortBySubGroup.IsChecked = !config.ShowOnlyTotalRows;
|
||||
checkbox_showMarker.IsChecked = config.ShowOnlyMarker;
|
||||
checkbox_showDeleted.IsChecked = config.ShowOnlyDeleted;
|
||||
|
||||
radioEinheitInMinuten.IsChecked = config.ShowEinheitInMinuten;
|
||||
radioEinheitInStunden.IsChecked = !config.ShowEinheitInMinuten;
|
||||
|
||||
|
||||
if (config.EmployeeOid.HasValue && config.EmployeeOid.Value == BeWoApp.LoggedOnUser.Employee.EmployeeOid)
|
||||
{
|
||||
_SelectedEmployee = BeWoApp.LoggedOnUser.Employee;
|
||||
}
|
||||
else if (config.EmployeeOid.HasValue)
|
||||
{
|
||||
var empDcs = Cache.GetInstance().GetAllActiveEmployeesCompactSync();
|
||||
_SelectedEmployee = empDcs.FirstOrDefault(e => e.EmployeeOid == config.EmployeeOid);
|
||||
}
|
||||
|
||||
_SelectedEmployee = BeWoApp.LoggedOnUser.Employee;
|
||||
if (_SelectedEmployee != null)
|
||||
{
|
||||
popupedit_employee.Text = _SelectedEmployee.ToString();
|
||||
}
|
||||
|
||||
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_EmployeeOverviewAll_View))
|
||||
{
|
||||
popupedit_employee.IsEnabled = false;
|
||||
checkbox_all.IsEnabled = false;
|
||||
}
|
||||
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_EmployeeOverviewAll_View) && _SelectedEmployee == null)
|
||||
{
|
||||
popupedit_employee.IsEnabled = false;
|
||||
checkbox_all.IsEnabled = false;
|
||||
_SelectedEmployee = BeWoApp.LoggedOnUser.Employee;
|
||||
}
|
||||
else if (_SelectedEmployee == null)
|
||||
{
|
||||
checkbox_all.IsChecked = true;
|
||||
}
|
||||
|
||||
|
||||
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_AllowFLSOverviewForCostbearer))
|
||||
|
||||
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_AllowFLSOverviewForCostbearer))
|
||||
{
|
||||
radioCostbearerReport.IsEnabled = false;
|
||||
if (config.ReportType == FLSReportType.Costbearer)
|
||||
{
|
||||
config.ReportType = FLSReportType.Employee;
|
||||
}
|
||||
}
|
||||
|
||||
var teamEnabled = false;
|
||||
@@ -91,9 +121,41 @@ namespace BeWo.View.Report.FLSReport
|
||||
checkbox_showMarker.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
radioTeamReport.IsEnabled = teamEnabled;
|
||||
if (!teamEnabled && config.ReportType == FLSReportType.Team)
|
||||
{
|
||||
config.ReportType = FLSReportType.Employee;
|
||||
}
|
||||
|
||||
checkbox_all_client.IsChecked = true;
|
||||
InitServiceCategoryTree();
|
||||
radioEmployeeReport.IsChecked = config.ReportType == FLSReportType.Employee;
|
||||
radioClientReport.IsChecked = config.ReportType == FLSReportType.Customer;
|
||||
radioTeamReport.IsChecked = config.ReportType == FLSReportType.Team;
|
||||
radioCostbearerReport.IsChecked = config.ReportType == FLSReportType.Costbearer;
|
||||
|
||||
radioButtonIntervalDay.IsChecked = config.DateInterval == (int)DateInterval.Day;
|
||||
radioButtonIntervalWeek.IsChecked = config.DateInterval == (int)DateInterval.Week;
|
||||
radioButtonIntervalMonth.IsChecked = config.DateInterval == (int)DateInterval.Month;
|
||||
radioButtonIntervalQuarter.IsChecked = config.DateInterval == (int)DateInterval.Quarter;
|
||||
radioButtonIntervalYear.IsChecked = config.DateInterval == (int)DateInterval.Year;
|
||||
|
||||
|
||||
if (config.CustomerOid.HasValue)
|
||||
{
|
||||
//_SelectedCustomer = customerSearchView.ObjectList;
|
||||
//customerSearchView.ObjectList
|
||||
var custList = Cache.GetInstance().GetAllActiveCustomersCompactSync();
|
||||
_SelectedCustomer = custList.FirstOrDefault(c => c.CustomerOid == config.CustomerOid);
|
||||
}
|
||||
|
||||
if (_SelectedCustomer != null)
|
||||
{
|
||||
popupedit_client.Text = _SelectedCustomer.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
checkbox_all_client.IsChecked = true;
|
||||
}
|
||||
|
||||
InitServiceCategoryTree();
|
||||
InitAllGoals();
|
||||
DownloadLinkEngine = new DownloadLinkEngine();
|
||||
linkExcelExport.NavigateUri = DownloadLinkEngine.GenerateNewExcelLink();
|
||||
@@ -102,6 +164,25 @@ namespace BeWo.View.Report.FLSReport
|
||||
ComboBoxTreeViewControlV2.Imitationheader.Width = 300;
|
||||
}
|
||||
|
||||
private FLSAnalysisConfigDC CreateDefaultConfig()
|
||||
{
|
||||
var config = new FLSAnalysisConfigDC();
|
||||
|
||||
var startDate = DateTime.Now.AddMonths(-1);
|
||||
|
||||
config.StartDate = new DateTime(startDate.Year, startDate.Month, 1);
|
||||
config.EndDate = DateTime.Now;
|
||||
|
||||
config.ShowChart = false;
|
||||
config.ShowServiceRecords = false;
|
||||
config.ShowOnlyTotalRows = false;
|
||||
config.ShowOnlyMarker = false;
|
||||
|
||||
config.EmployeeOid = BeWoApp.LoggedOnUser.Employee.EmployeeOid;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public DownloadLinkEngine DownloadLinkEngine { get; set; }
|
||||
|
||||
private void ChangeReportType()
|
||||
@@ -318,7 +399,9 @@ namespace BeWo.View.Report.FLSReport
|
||||
{
|
||||
var config = new FLSOverviewConfig();
|
||||
|
||||
if (radioEmployeeReport.IsChecked != null && radioEmployeeReport.IsChecked.Value)
|
||||
config.Suchtext = TextBoxDokutext.Text;
|
||||
|
||||
if (radioEmployeeReport.IsChecked != null && radioEmployeeReport.IsChecked.Value)
|
||||
{
|
||||
config.ReportType = FLSReportType.Employee;
|
||||
}
|
||||
@@ -514,16 +597,18 @@ namespace BeWo.View.Report.FLSReport
|
||||
var categories = dict.Keys;
|
||||
var tree = new List<ServiceCategoryTreeItem>();
|
||||
|
||||
var config = BeWoApp.AppSettings.DefaultFlsAnalysisConfig;
|
||||
|
||||
foreach (var dc in categories)
|
||||
{
|
||||
var catItem = new ServiceCategoryTreeItem {ServiceCategory = dc, IsChecked = false};
|
||||
foreach (var item in dict[dc])
|
||||
{
|
||||
var descItem = new ServiceCategoryTreeItem
|
||||
{
|
||||
ServiceDescription = item,
|
||||
IsChecked = false
|
||||
};
|
||||
{
|
||||
ServiceDescription = item,
|
||||
IsChecked = config.ServiceDescriptionOids != null && config.ServiceDescriptionOids.Count > 0 && config.ServiceDescriptionOids.Contains(item.ServiceDescriptionOid.Value)
|
||||
};
|
||||
catItem.Children.Add(descItem);
|
||||
}
|
||||
tree.Add(catItem);
|
||||
@@ -586,43 +671,9 @@ namespace BeWo.View.Report.FLSReport
|
||||
_GoalsChanged = false;
|
||||
|
||||
var config = CreateFLSOverviewConfig();
|
||||
|
||||
var configDc = new FLSAnalysisConfigDC();
|
||||
|
||||
if (_SelectedCustomer != null)
|
||||
{
|
||||
configDc.CustomerOid = _SelectedCustomer.CustomerOid;
|
||||
}
|
||||
|
||||
if (_SelectedEmployee != null)
|
||||
{
|
||||
configDc.EmployeeOid = _SelectedEmployee.EmployeeOid;
|
||||
}
|
||||
|
||||
if (checkbox_archivierte_mitarbeiter.IsChecked != null && checkbox_archivierte_mitarbeiter.IsVisible)
|
||||
configDc.ShouldAnalyzeArchivedEmployees = checkbox_archivierte_mitarbeiter.IsChecked.Value;
|
||||
|
||||
configDc.ReportType = config.ReportType;
|
||||
configDc.StartDate = config.StartDate;
|
||||
configDc.EndDate = config.EndDate;
|
||||
configDc.GoalOids = config.GoalOids;
|
||||
configDc.ShowOnlyMarker = config.ShowOnlyMarker;
|
||||
configDc.ShowOnlyDeleted = config.ShowOnlyDeleted;
|
||||
|
||||
if (config.ServiceDesciptions != null)
|
||||
{
|
||||
configDc.ServiceDescriptionOids = config.ServiceDesciptions.Select(sd => sd.ServiceDescriptionOid != null ? sd.ServiceDescriptionOid.Value : 0).ToList();
|
||||
}
|
||||
if (config.ReportType == FLSReportType.Team)
|
||||
{
|
||||
List<long> teamoids = null;
|
||||
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_AllowFLSOverviewForAllTeams) && BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_AllowFLSOverviewForTeam) && BeWoApp.LoggedOnUser.Employee.IsTeamLeader)
|
||||
{
|
||||
teamoids = BeWoApp.LoggedOnUser.Employee.LeadingTeamOids;
|
||||
}
|
||||
configDc.TeamOids = teamoids;
|
||||
}
|
||||
|
||||
|
||||
var configDc = CreateConfigDC(config);
|
||||
|
||||
ServiceFacade.DoAnalysisServiceAsync(s => s.GetFLSAnalysis(configDc), r => this.Dispatch(() => CreateReportView(r, config)));
|
||||
|
||||
//if (config.ReportType == FLSReportType.Employee)
|
||||
@@ -693,6 +744,102 @@ namespace BeWo.View.Report.FLSReport
|
||||
}
|
||||
}
|
||||
|
||||
private void button_saveConfig_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var config = CreateFLSOverviewConfig();
|
||||
var configDc = CreateConfigDC(config);
|
||||
|
||||
if (configDc.ServiceDescriptionOids != null && configDc.ServiceDescriptionOids.Count > 0)
|
||||
{
|
||||
if (SindAlleServiceDesciptionsAngehakt())
|
||||
{
|
||||
configDc.ServiceDescriptionOids.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
BeWoApp.AppSettings.DefaultFlsAnalysisConfig = configDc;
|
||||
|
||||
BeWoApp.SaveAppSettings();
|
||||
|
||||
MessageBox.Show("Die aktuellen Einstellungen wurden erfolgreich gespeichert und werden beim nächsten Öffen der Stundenübersicht automatisch geladen.", "Einstellungen", MessageBoxButton.OK);
|
||||
}
|
||||
|
||||
private bool SindAlleServiceDesciptionsAngehakt()
|
||||
{
|
||||
var sctree = ComboBoxTreeViewControlV2.TreeViewSourceList;
|
||||
|
||||
foreach (var sc in sctree)
|
||||
{
|
||||
foreach (var sd in sc.Children)
|
||||
{
|
||||
if (!sd.IsChecked)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private FLSAnalysisConfigDC CreateConfigDC(FLSOverviewConfig config)
|
||||
{
|
||||
var configDc = new FLSAnalysisConfigDC();
|
||||
configDc.Suchtext = config.Suchtext;
|
||||
|
||||
|
||||
if (_SelectedCustomer != null)
|
||||
{
|
||||
configDc.CustomerOid = _SelectedCustomer.CustomerOid;
|
||||
}
|
||||
|
||||
if (_SelectedEmployee != null)
|
||||
{
|
||||
configDc.EmployeeOid = _SelectedEmployee.EmployeeOid;
|
||||
}
|
||||
|
||||
if (checkbox_archivierte_mitarbeiter.IsChecked != null && checkbox_archivierte_mitarbeiter.IsVisible)
|
||||
configDc.ShouldAnalyzeArchivedEmployees = checkbox_archivierte_mitarbeiter.IsChecked.Value;
|
||||
|
||||
configDc.ReportType = config.ReportType;
|
||||
|
||||
configDc.StartDate = config.StartDate;
|
||||
configDc.EndDate = config.EndDate;
|
||||
|
||||
if (datePickerStartDate.EditValue == null)
|
||||
{
|
||||
configDc.StartDate = null;
|
||||
}
|
||||
if (datePickerEndDate.EditValue == null)
|
||||
{
|
||||
configDc.EndDate = null;
|
||||
}
|
||||
|
||||
configDc.GoalOids = config.GoalOids;
|
||||
configDc.ShowOnlyMarker = config.ShowOnlyMarker;
|
||||
configDc.ShowOnlyDeleted = config.ShowOnlyDeleted;
|
||||
configDc.DateInterval = (int)config.DateInterval;
|
||||
configDc.ShowChart = config.ShowChart;
|
||||
configDc.ShowServiceRecords = config.ShowServiceRecords;
|
||||
configDc.ShowOnlyTotalRows = config.ShowOnlyTotalRows;
|
||||
configDc.ShowEinheitInMinuten = config.ShowEinheitInMinuten;
|
||||
|
||||
if (config.ServiceDesciptions != null)
|
||||
{
|
||||
configDc.ServiceDescriptionOids = config.ServiceDesciptions.Select(sd => sd.ServiceDescriptionOid != null ? sd.ServiceDescriptionOid.Value : 0).ToList();
|
||||
}
|
||||
if (config.ReportType == FLSReportType.Team)
|
||||
{
|
||||
List<long> teamoids = null;
|
||||
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_AllowFLSOverviewForAllTeams) && BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_AllowFLSOverviewForTeam) && BeWoApp.LoggedOnUser.Employee.IsTeamLeader)
|
||||
{
|
||||
teamoids = BeWoApp.LoggedOnUser.Employee.LeadingTeamOids;
|
||||
}
|
||||
configDc.TeamOids = teamoids;
|
||||
}
|
||||
return configDc;
|
||||
}
|
||||
|
||||
private void childItem_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
SupportConceptGoalDC selectedGoal = sender as SupportConceptGoalDC;
|
||||
|
||||
@@ -180,6 +180,8 @@ namespace BeWo.Data.Security
|
||||
|
||||
if (isRightVersion326(r))
|
||||
return "3.26";
|
||||
if (isRightVersion329(r))
|
||||
return "3.29";
|
||||
|
||||
return BASE_VERSION;
|
||||
}
|
||||
@@ -218,5 +220,11 @@ namespace BeWo.Data.Security
|
||||
return r == UserRightType.AiModuleChatClone
|
||||
|| r == UserRightType.AiModuleViewSetting;
|
||||
}
|
||||
|
||||
private static bool isRightVersion329(UserRightType r)
|
||||
{
|
||||
return r == UserRightType.Employee_AllowEditAbsenceTimes
|
||||
|| r == UserRightType.Employee_AllowEditOvertimes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>C:\Projects\Bewo\BeWo - Main\Host\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
|
||||
|
||||
@@ -1777,4 +1777,8 @@ ALTER TABLE `assessmentsheetvalue`
|
||||
CHANGE COLUMN `Sign` `Sign` VARCHAR(256) NULL DEFAULT NULL ;
|
||||
|
||||
|
||||
ALTER TABLE `CustomerVermittlungArbeit` ADD COLUMN Fallnummer VARCHAR(256) NULL DEFAULT NULL;
|
||||
ALTER TABLE `CustomerVermittlungArbeit` ADD COLUMN Fallnummer VARCHAR(256) NULL DEFAULT NULL;
|
||||
|
||||
|
||||
ALTER TABLE `settings`
|
||||
CHANGE COLUMN `Value` `Value` MEDIUMTEXT NULL DEFAULT NULL ;
|
||||
@@ -65,6 +65,13 @@ namespace LebenshilfeBadKreuznachFUD.Reporting
|
||||
}
|
||||
}
|
||||
|
||||
if (qro.Rows[0].Field4 != null && Int64.TryParse(qro.Rows[0].Field4.ToString(), out var teamOid))
|
||||
{
|
||||
if (teamOid > 0)
|
||||
{
|
||||
config.TeamOids = new List<long> { teamOid };
|
||||
}
|
||||
}
|
||||
|
||||
var plugin = PluginLoader.FindClass<StundenuebersichtAuswertung>();
|
||||
|
||||
|
||||
@@ -1,23 +1,28 @@
|
||||
using BeWo.Service.Import.AvisImport;
|
||||
using BeWo.Service.MessageContracts;
|
||||
using BS.Shared.Core;
|
||||
|
||||
using System;
|
||||
|
||||
namespace BeWo.Service.Plugins
|
||||
{
|
||||
public class DataImporter : AbstractIDSpecificDefaultClass<DataImporter>
|
||||
{
|
||||
public virtual UploadImportFileResult ImportAvise(string filename, DateTime? buchungsDatum, byte[] daten)
|
||||
{
|
||||
return ImportLvrAvise(filename, buchungsDatum, daten);
|
||||
}
|
||||
|
||||
public virtual UploadImportFileResult ImportData(string filename, byte[] daten)
|
||||
{
|
||||
|
||||
#if DEBUG
|
||||
//das ist nur zum Testen
|
||||
return ImportLvrAvise(filename, daten);
|
||||
return ImportLvrAvise(filename, null, daten);
|
||||
|
||||
#endif
|
||||
|
||||
//LVR ist erstmal Standard
|
||||
return ImportLvrAvise(filename, daten);
|
||||
return ImportLvrAvise(filename, null, daten);
|
||||
//return new UploadImportFileResult
|
||||
//{
|
||||
// Success = false,
|
||||
@@ -26,7 +31,7 @@ namespace BeWo.Service.Plugins
|
||||
|
||||
}
|
||||
|
||||
public virtual UploadImportFileResult ImportLvrAvise(string filename, byte[] daten)
|
||||
public virtual UploadImportFileResult ImportLvrAvise(string filename, DateTime? buchungsDatum, byte[] daten)
|
||||
{
|
||||
var aviseImport = PluginLoader.FindClass<LvrAviseImporter>();
|
||||
var message = aviseImport.ImportAvise(filename, daten);
|
||||
|
||||
@@ -362,7 +362,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "1372050368"; // Petra Wagner Matthes
|
||||
//t = "1253359817"; // Lebenshilfe Bad Kreuznach e.V.
|
||||
//t = "9696466498"; // Lebenshilfe Bad Kreuznach (Wohnstätte)
|
||||
//t = "3141157568"; // Lebenshilfe Bad Kreuznach (Familienunterstützender Dienst)
|
||||
t = "3141157568"; // Lebenshilfe Bad Kreuznach (Familienunterstützender Dienst)
|
||||
//t = "6038574522"; // I-Wohl
|
||||
//t = "2438529184"; // Alloheim Seniorenresidenzen SE
|
||||
//t = "7564067748"; // SKM Aachen
|
||||
@@ -407,7 +407,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "6203102637"; // BeWo Neuss-Lauth u. Lauth GbR
|
||||
//t = "7060431533"; // Arche Tecklenburg e.V.
|
||||
//t = "1159580198"; // Wendepunkt Velbert gGmbH
|
||||
//t = "5094575560"; // Christopherus Haus MID
|
||||
t = "5094575560"; // Christopherus Haus MID
|
||||
//t = "5261046426"; // SelbstWerk EN / Bettina Heckrodt
|
||||
//t = "6652893693"; // Claudia Heizmann
|
||||
//t = "5850903700"; // Alzey (Verein für Integration und Teilhabe am Leben e.V.)
|
||||
@@ -424,7 +424,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "8743996874"; // Pflegedienst Rahn und Freitag GmbH
|
||||
//t = "6666827209"; //Ruhrstern GmbH
|
||||
//t = "6652760522"; // BBI Rhein-Sieg gGmbH
|
||||
t = "6095094585"; // IBAHS e.V.
|
||||
//t = "6095094585"; // IBAHS e.V.
|
||||
|
||||
return t;
|
||||
#else
|
||||
|
||||
@@ -61,12 +61,31 @@ namespace BeWo.Service.Plugins
|
||||
|
||||
foreach (var iCustomer in DAOFactory.GenericDAO.GetAllActiveAndArchived<Customer>())
|
||||
{
|
||||
lResult.Add(this.CreateCustomerFLSOverviewDC(iCustomer, config));
|
||||
if (CustomerBelongsToTeam(iCustomer, config.TeamOids))
|
||||
{
|
||||
lResult.Add(this.CreateCustomerFLSOverviewDC(iCustomer, config));
|
||||
}
|
||||
}
|
||||
|
||||
return lResult;
|
||||
}
|
||||
|
||||
public virtual bool CustomerBelongsToTeam(Customer customer, List<long> teamOids)
|
||||
{
|
||||
if (teamOids == null || teamOids.Count == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
foreach (var t2c in customer.Team2CustomerList)
|
||||
{
|
||||
if (teamOids.Contains(t2c.TeamOid.Value))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual FLSAnalysisRootDC CreateCustomerFLSOverviewDC(Customer customer, FLSAnalysisConfigDC config)
|
||||
{
|
||||
var rootDC = new FLSAnalysisRootDC();
|
||||
@@ -108,7 +127,8 @@ namespace BeWo.Service.Plugins
|
||||
Dictionary<long, bool> groupBookingDict = new Dictionary<long, bool>();
|
||||
foreach (IServiceRecord sr in serviceRecords)
|
||||
{
|
||||
bool cont = true;
|
||||
bool cont = CheckServiceRecordNotice(sr, config.Suchtext);
|
||||
|
||||
//if (sr.Employee != null && sr.Employee.IsActive == ActivationTypeId.Deleted)
|
||||
//{
|
||||
// cont = false;
|
||||
@@ -278,9 +298,9 @@ namespace BeWo.Service.Plugins
|
||||
Dictionary<long, SupportConceptFLSOverviewDC> supportConceptOverviewDict = new Dictionary<long, SupportConceptFLSOverviewDC>();
|
||||
Dictionary<String, bool> groupBookingDict = new Dictionary<String, bool>();
|
||||
|
||||
foreach (ServiceRecord sr in serviceRecordes)
|
||||
foreach (IServiceRecord sr in serviceRecordes)
|
||||
{
|
||||
bool cont = true;
|
||||
bool cont = CheckServiceRecordNotice(sr, config.Suchtext);
|
||||
|
||||
if (sr.Customer != null && sr.Customer.IsActive == ActivationTypeId.Deleted)
|
||||
{
|
||||
@@ -420,10 +440,11 @@ namespace BeWo.Service.Plugins
|
||||
Dictionary<long, SupportConceptFLSOverviewDC> supportConceptOverviewDict = new Dictionary<long, SupportConceptFLSOverviewDC>();
|
||||
decimal archived = 0;
|
||||
decimal notarchived = 0;
|
||||
foreach (ServiceRecord sr in serviceRecordes)
|
||||
foreach (IServiceRecord sr in serviceRecordes)
|
||||
{
|
||||
|
||||
bool cont = true;
|
||||
bool cont = CheckServiceRecordNotice(sr, config.Suchtext);
|
||||
|
||||
if (sr.Customer != null && sr.Customer.IsActive == ActivationTypeId.Deleted)
|
||||
cont = false;
|
||||
if (cont && sr.SupportConcept != null && sr.SupportConcept.IsActive == ActivationTypeId.Deleted)
|
||||
@@ -561,7 +582,7 @@ namespace BeWo.Service.Plugins
|
||||
Dictionary<long, string> varFieldDefs = null;
|
||||
foreach (IServiceRecord sr in serviceRecords)
|
||||
{
|
||||
bool cont = true;
|
||||
bool cont = CheckServiceRecordNotice(sr, config.Suchtext);
|
||||
|
||||
if (sr.Customer != null && sr.Customer.IsActive == ActivationTypeId.Deleted)
|
||||
{
|
||||
@@ -710,6 +731,38 @@ namespace BeWo.Service.Plugins
|
||||
return rootDC;
|
||||
}
|
||||
|
||||
//Prüft, ob irgendwo in Notice1 bis 5 der übergebene Suchtext enthalten ist.
|
||||
private bool CheckServiceRecordNotice(IServiceRecord sr, string suchText)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(suchText))
|
||||
{
|
||||
if (!String.IsNullOrEmpty(sr.Notice) && sr.Notice.ToLower().Contains(suchText.ToLower()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (!String.IsNullOrEmpty(sr.Notice2) && sr.Notice2.ToLower().Contains(suchText.ToLower()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (!String.IsNullOrEmpty(sr.Notice3) && sr.Notice3.ToLower().Contains(suchText.ToLower()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (!String.IsNullOrEmpty(sr.Notice4) && sr.Notice4.ToLower().Contains(suchText.ToLower()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (!String.IsNullOrEmpty(sr.Notice5) && sr.Notice5.ToLower().Contains(suchText.ToLower()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected virtual ServiceRecordFLSOverviewDC CreateServiceRecordFLSOverviewDC(IServiceRecord sr, bool useGroupInfo, bool useRoundedDuration, bool showGroupMinutes)
|
||||
{
|
||||
ServiceRecordFLSOverviewDC srDC = new ServiceRecordFLSOverviewDC();
|
||||
|
||||
@@ -46,5 +46,9 @@ namespace BeWo.Service.ServiceContracts
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
UploadPersehDocumentResult UploadPersehFile(UploadPackage upload);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
UploadImportFileResult UploadAviseFile(UploadPackage upload);
|
||||
}
|
||||
}
|
||||
@@ -207,6 +207,38 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
}
|
||||
|
||||
public UploadImportFileResult UploadAviseFile(UploadPackage upload)
|
||||
{
|
||||
try
|
||||
{
|
||||
var filename = upload.FileName;
|
||||
var daten = BS.Shared.Core.Utils.ReadFully(upload.Stream);
|
||||
|
||||
upload.Stream.Close();
|
||||
upload.Stream.Dispose();
|
||||
|
||||
var importer = PluginLoader.FindClass<DataImporter>();
|
||||
var result = new UploadImportFileResult
|
||||
{
|
||||
ResultMessage = "Die Datei konnte nicht importiert werden."
|
||||
};
|
||||
|
||||
if (importer != null)
|
||||
{
|
||||
DateTime buchungsdatum = DateTime.Now.Date;
|
||||
result = importer.ImportAvise(filename, buchungsdatum, daten);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public UploadPersehDocumentResult UploadPersehFile(UploadPackage upload)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -275,7 +275,8 @@ namespace BS.Shared
|
||||
OpenedApplicationUsersHistory,
|
||||
ApplicationSettings,
|
||||
MinutesToLockUI,
|
||||
OpenedWohnheimHistory
|
||||
OpenedWohnheimHistory,
|
||||
FlsDefaultFilterSettings
|
||||
}
|
||||
|
||||
public enum QueryType
|
||||
@@ -449,6 +450,8 @@ namespace BS.Shared
|
||||
//Employee_AllowViewOwnEmployees => sich selbst in der Mitarbeiteransicht ansehen/bearbeiten dürfen
|
||||
Employee_AllowViewOwnEmployees = 20005,
|
||||
Employee_AllowViewOwnTeam = 20006,
|
||||
Employee_AllowEditAbsenceTimes = 20007,
|
||||
Employee_AllowEditOvertimes = 20008,
|
||||
|
||||
Employee_ViewNotizen = 20010,
|
||||
Employee_EditNotizen = 20011,
|
||||
|
||||
@@ -709,6 +709,8 @@ namespace BS.Shared.Core
|
||||
dict.Add(UserRightType.Employee_ShowFinance, Translator.Translate("MitarbeiterSingular") + " alle Daten bearbeiten");
|
||||
dict.Add(UserRightType.Employee_AllowEditExtendedProperties, Translator.Translate("MitarbeiterSingular") + " erweiterte Felder bearbeiten");
|
||||
dict.Add(UserRightType.Employee_AllowEditContracts, Translator.Translate("MitarbeiterSingular") + " Verträge bearbeiten");
|
||||
dict.Add(UserRightType.Employee_AllowEditAbsenceTimes, Translator.Translate("MitarbeiterSingular") + " Abwesenheiten bearbeiten");
|
||||
dict.Add(UserRightType.Employee_AllowEditOvertimes, Translator.Translate("MitarbeiterSingular") + " Überstungen bearbeiten");
|
||||
dict.Add(UserRightType.Employee_AllowEditOwnEmployees, Translator.Translate("MitarbeiterSingular") + " ändern (Eigenen)");
|
||||
dict.Add(UserRightType.Employee_AllowViewOwnEmployees, Translator.Translate("MitarbeiterSingular") + " ansehen (Eigenen)");
|
||||
dict.Add(UserRightType.Employee_AllowViewOwnTeam, Translator.Translate("MitarbeiterPlural") + " des Teams ansehen");
|
||||
|
||||
@@ -148,5 +148,121 @@ namespace BS.Shared.Core
|
||||
|
||||
return didParse && isDefined ? result : defaultResult;
|
||||
}
|
||||
|
||||
public static void SetDefaultFlsConfigSetting(FLSAnalysisConfigDC config, List<SettingsDC> settings)
|
||||
{
|
||||
if (config != null)
|
||||
{
|
||||
SetSettingValue(SettingsType.FlsDefaultFilterSettings, "StartDate", config.StartDate.HasValue ? String.Format("{0:dd.MM.yyyy}", config.StartDate) : "", settings);
|
||||
SetSettingValue(SettingsType.FlsDefaultFilterSettings, "EndDate", config.EndDate.HasValue ? String.Format("{0:dd.MM.yyyy}", config.EndDate) : "", settings);
|
||||
SetSettingValue(SettingsType.FlsDefaultFilterSettings, "ShowChart", config.ShowChart ? "1" : "0", settings);
|
||||
SetSettingValue(SettingsType.FlsDefaultFilterSettings, "ShowServiceRecords", config.ShowServiceRecords ? "1" : "0", settings);
|
||||
SetSettingValue(SettingsType.FlsDefaultFilterSettings, "ShowOnlyTotalRows", config.ShowOnlyTotalRows ? "1" : "0", settings);
|
||||
SetSettingValue(SettingsType.FlsDefaultFilterSettings, "ShowOnlyMarker", config.ShowOnlyMarker ? "1" : "0", settings);
|
||||
SetSettingValue(SettingsType.FlsDefaultFilterSettings, "ShowEinheitInMinuten", config.ShowEinheitInMinuten ? "1" : "0", settings);
|
||||
SetSettingValue(SettingsType.FlsDefaultFilterSettings, "ShowOnlyDeleted", config.ShowOnlyDeleted ? "1" : "0", settings);
|
||||
SetSettingValue(SettingsType.FlsDefaultFilterSettings, "DateInterval", config.DateInterval.HasValue ? config.DateInterval.Value.ToString() : "", settings);
|
||||
SetSettingValue(SettingsType.FlsDefaultFilterSettings, "ReportType", ((int)config.ReportType).ToString(), settings);
|
||||
SetSettingValue(SettingsType.FlsDefaultFilterSettings, "EmployeeOid", config.EmployeeOid.HasValue ? config.EmployeeOid.Value.ToString() : "", settings);
|
||||
SetSettingValue(SettingsType.FlsDefaultFilterSettings, "CustomerOid", config.CustomerOid.HasValue ? config.CustomerOid.Value.ToString() : "", settings);
|
||||
|
||||
if (config.ServiceDescriptionOids == null)
|
||||
{
|
||||
config.ServiceDescriptionOids = new List<long>();
|
||||
}
|
||||
SetSettingValue(SettingsType.FlsDefaultFilterSettings, "ServiceDescriptionOids", String.Join(",", config.ServiceDescriptionOids), settings);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static FLSAnalysisConfigDC GetDefaultFlsConfigSetting(List<SettingsDC> settings, long loggedInEmployeeOid)
|
||||
{
|
||||
var config = CreateDefaultConfig();
|
||||
config.EmployeeOid = loggedInEmployeeOid;
|
||||
|
||||
var val = GetSettingValue(SettingsType.FlsDefaultFilterSettings, "StartDate", settings);
|
||||
|
||||
if (val != null && DateTime.TryParse(val, out var sdt))
|
||||
{
|
||||
config.StartDate = sdt;
|
||||
}
|
||||
val = GetSettingValue(SettingsType.FlsDefaultFilterSettings, "EndDate", settings);
|
||||
if (val != null && DateTime.TryParse(val, out var edt))
|
||||
{
|
||||
config.EndDate = edt;
|
||||
}
|
||||
val = GetSettingValue(SettingsType.FlsDefaultFilterSettings, "ShowChart", settings);
|
||||
config.ShowChart = "1".Equals(val);
|
||||
|
||||
val = GetSettingValue(SettingsType.FlsDefaultFilterSettings, "ShowServiceRecords", settings);
|
||||
config.ShowServiceRecords = "1".Equals(val);
|
||||
|
||||
val = GetSettingValue(SettingsType.FlsDefaultFilterSettings, "ShowOnlyTotalRows", settings);
|
||||
config.ShowOnlyTotalRows = "1".Equals(val);
|
||||
|
||||
val = GetSettingValue(SettingsType.FlsDefaultFilterSettings, "ShowOnlyMarker", settings);
|
||||
config.ShowOnlyMarker = "1".Equals(val);
|
||||
|
||||
val = GetSettingValue(SettingsType.FlsDefaultFilterSettings, "ShowEinheitInMinuten", settings);
|
||||
config.ShowEinheitInMinuten = "1".Equals(val);
|
||||
|
||||
val = GetSettingValue(SettingsType.FlsDefaultFilterSettings, "ShowOnlyDeleted", settings);
|
||||
config.ShowOnlyDeleted = "1".Equals(val);
|
||||
|
||||
val = GetSettingValue(SettingsType.FlsDefaultFilterSettings, "DateInterval", settings);
|
||||
if (val != null && Int32.TryParse(val, out var di))
|
||||
{
|
||||
config.DateInterval = di;
|
||||
}
|
||||
val = GetSettingValue(SettingsType.FlsDefaultFilterSettings, "ReportType", settings);
|
||||
if (val != null && Int32.TryParse(val, out var rt))
|
||||
{
|
||||
config.ReportType = (FLSReportType)rt;
|
||||
}
|
||||
val = GetSettingValue(SettingsType.FlsDefaultFilterSettings, "EmployeeOid", settings);
|
||||
if (val != null && Int64.TryParse(val, out var eoid))
|
||||
{
|
||||
config.EmployeeOid = eoid;
|
||||
}
|
||||
else
|
||||
{
|
||||
config.EmployeeOid = null;
|
||||
}
|
||||
val = GetSettingValue(SettingsType.FlsDefaultFilterSettings, "CustomerOid", settings);
|
||||
if (val != null && Int64.TryParse(val, out var coid))
|
||||
{
|
||||
config.CustomerOid = coid;
|
||||
}
|
||||
val = GetSettingValue(SettingsType.FlsDefaultFilterSettings, "ServiceDescriptionOids", settings);
|
||||
if (val != null)
|
||||
{
|
||||
config.ServiceDescriptionOids = val.Split(',').Select(s => s.Trim()).Where(s => long.TryParse(s, out _)).Select(long.Parse).ToList();
|
||||
}
|
||||
|
||||
return config;
|
||||
|
||||
}
|
||||
|
||||
private static FLSAnalysisConfigDC CreateDefaultConfig()
|
||||
{
|
||||
var config = new FLSAnalysisConfigDC();
|
||||
|
||||
var startDate = DateTime.Now.AddMonths(-1);
|
||||
|
||||
config.StartDate = new DateTime(startDate.Year, startDate.Month, 1);
|
||||
config.EndDate = DateTime.Now;
|
||||
|
||||
config.ShowChart = false;
|
||||
config.ShowServiceRecords = false;
|
||||
config.ShowOnlyTotalRows = false;
|
||||
config.ShowOnlyMarker = false;
|
||||
config.ShowEinheitInMinuten = false;
|
||||
config.ShowOnlyDeleted = false;
|
||||
config.DateInterval = 4; // Woche, enum DateInterval in FLSOverviewGenerator.cs
|
||||
config.ReportType = FLSReportType.Employee;
|
||||
|
||||
|
||||
return config;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,20 @@ namespace BS.Shared.DataContracts
|
||||
[DataMember]
|
||||
public string Text5 { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Suchtext { get; set; }
|
||||
[DataMember]
|
||||
public bool ShouldAnalyzeArchivedEmployees { get; set; }
|
||||
[DataMember]
|
||||
public int? DateInterval { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public bool ShowChart { get; set; }
|
||||
[DataMember]
|
||||
public bool ShowServiceRecords { get; set; }
|
||||
[DataMember]
|
||||
public bool ShowOnlyTotalRows { get; set; }
|
||||
[DataMember]
|
||||
public bool ShowEinheitInMinuten { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user