Jahresbericht um Option "Stichtagsbezogen auswerten" und "Nicht bewilligte Hilfepläne berücksichtigen" erweitert.

This commit is contained in:
2026-04-17 17:46:28 +02:00
parent a02abc370e
commit 66ac483c02
14 changed files with 291 additions and 137 deletions

View File

@@ -100,6 +100,10 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IAnalysisService/CreateAnnualReportBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
System.Collections.Generic.List<BS.Shared.DataContracts.AnnualReportDC> CreateAnnualReport(System.Nullable<long> costbearerOid, System.Nullable<long> teamOid, System.Nullable<long> customerCareTypeValueListEntryOid, System.DateTime startDate, System.DateTime endDate);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAnalysisService/CreateAnnualReport2", ReplyAction="http://tempuri.org/IAnalysisService/CreateAnnualReport2Response")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IAnalysisService/CreateAnnualReport2BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
System.Collections.Generic.List<BS.Shared.DataContracts.AnnualReportDC> CreateAnnualReport2(BS.Shared.DataContracts.AnnualReportConfigDC config);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAnalysisService/CreateAccountingReport", ReplyAction="http://tempuri.org/IAnalysisService/CreateAccountingReportResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IAnalysisService/CreateAccountingReportBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
BS.Shared.DataContracts.Reports.AccountingReportDC CreateAccountingReport(System.DateTime start, System.DateTime end);
@@ -243,6 +247,11 @@ namespace BeWo.ServiceProxy
return base.Channel.CreateAnnualReport(costbearerOid, teamOid, customerCareTypeValueListEntryOid, startDate, endDate);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.AnnualReportDC> CreateAnnualReport2(BS.Shared.DataContracts.AnnualReportConfigDC config)
{
return base.Channel.CreateAnnualReport2(config);
}
public BS.Shared.DataContracts.Reports.AccountingReportDC CreateAccountingReport(System.DateTime start, System.DateTime end)
{
return base.Channel.CreateAccountingReport(start, end);

View File

@@ -217,6 +217,11 @@ namespace BeWo.ServiceProxy
"lt", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactTeamDC> FindLeadingCompactTeamsOfEmployee(long employeeOid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/GetActiveCompactEmployeesByOids", ReplyAction="http://tempuri.org/IEmployeeService/GetActiveCompactEmployeesByOidsResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IEmployeeService/GetActiveCompactEmployeesByOidsBeWoFaultFault" +
"", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactEmployeeDC> GetActiveCompactEmployeesByOids(System.Collections.Generic.List<long> employeeOids);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/ArchiveEmployee", ReplyAction="http://tempuri.org/IEmployeeService/ArchiveEmployeeResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IEmployeeService/ArchiveEmployeeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
void ArchiveEmployee(long pOid, long pVersion);
@@ -838,6 +843,11 @@ namespace BeWo.ServiceProxy
return base.Channel.FindLeadingCompactTeamsOfEmployee(employeeOid);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactEmployeeDC> GetActiveCompactEmployeesByOids(System.Collections.Generic.List<long> employeeOids)
{
return base.Channel.GetActiveCompactEmployeesByOids(employeeOids);
}
public void ArchiveEmployee(long pOid, long pVersion)
{
base.Channel.ArchiveEmployee(pOid, pVersion);

View File

@@ -25,6 +25,10 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAIVoiceTranscriptBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
BS.Shared.DataContracts.AiVoiceDataDC GetAIVoiceTranscript(BS.Shared.DataContracts.AiVoiceDataDC data);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetResourcesByOids", ReplyAction="http://tempuri.org/IOperationsService/GetResourcesByOidsResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/GetResourcesByOidsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
System.Collections.Generic.List<BS.Shared.DataContracts.ResourceDC> GetResourcesByOids(System.Collections.Generic.List<long> resourceOids);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateDienstEintrag", ReplyAction="http://tempuri.org/IOperationsService/UpdateDienstEintragResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateDienstEintragBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
void UpdateDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag);
@@ -367,6 +371,9 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisSupportConceptDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisSupportConceptDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AiVoiceDataDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ResourceDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ResourceDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ValueListEntryDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstEintragDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstvertretungDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.DienstEintragDC>))]
@@ -375,7 +382,6 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceRecordDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.CostRatePeriodDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CostRatePeriodDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ValueListEntryDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AbsenceTimeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AbsenceReasonDC))]
@@ -471,8 +477,6 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SchedulerAppointmentDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Employee2SchedulerAppointmentDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Employee2SchedulerAppointmentDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ResourceDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ResourceDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.BargeldtransaktionshistoryDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.BargeldtransaktionshistoryDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.SignatureDC>))]
@@ -614,26 +618,9 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Core.BeWoFault))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Core.BeWoFaultType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Core.DateTimeSpan))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactOrganisationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactCustomerDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactEmployeeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactSupportConceptDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactCostBearerDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactCostBearerDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactPersonDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactWohnheimDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactEmployeeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactCustomerDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactSupportConceptDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactTokenDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactTokenDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactTeamDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactVertreterEmployeeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactVertreterEmployeeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactTeamDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ValueListEntryType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ActivationTypeId))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.CostRatePeriodType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ValueListEntryType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.AbsenceReasonVisibilityType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Sex))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SubstitutionNeed))]
@@ -680,6 +667,23 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Priority))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Status))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.VertretungsStatus))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactOrganisationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactCustomerDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactEmployeeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactSupportConceptDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactCostBearerDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactCostBearerDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactPersonDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactWohnheimDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactEmployeeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactCustomerDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactSupportConceptDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactTokenDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactTokenDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactTeamDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactVertreterEmployeeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactVertreterEmployeeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactTeamDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Wohnhilfe.CustomerWohnhilfeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.CustomerWohnhilfeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.CustomerWohnhilfeBereichBundDC))]
@@ -2008,6 +2012,11 @@ namespace BeWo.ServiceProxy
return base.Channel.GetAIVoiceTranscript(data);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.ResourceDC> GetResourcesByOids(System.Collections.Generic.List<long> resourceOids)
{
return base.Channel.GetResourcesByOids(resourceOids);
}
public void UpdateDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag)
{
base.Channel.UpdateDienstEintrag(dienstEintrag);

View File

@@ -23,9 +23,6 @@
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -46,20 +43,34 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Content="Jahr:" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" />
<ComboBox Grid.Column="1" Grid.Row="0" Margin="3" Height="23" Name="combobox_year" />
<!--<Label Content="Jahr:" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" Visibility="Collapsed"/>
<ComboBox Grid.Column="1" Grid.Row="0" Margin="3" Height="23" Name="combobox_year" Visibility="Collapsed"/>-->
<Label x:Name="lblCostcenter" Content="{markup:Translate Kostenträger:}" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" />
<uc:PopUpEdit Grid.Column="1" Grid.ColumnSpan="1" Grid.Row="1"
IsReadOnly="True" x:Name="popupedit_costcenter" DeleteButtonVisibility="Visible" DeleteClick="popupedit_organisation_DeleteClick" PopUpClick="popupedit_costcenter_PopUpClick" HorizontalAlignment="Left" Width="200" HorizontalContentAlignment="Left" Height="24" Margin="3" />
IsReadOnly="True" x:Name="popupedit_costcenter" DeleteButtonVisibility="Visible" DeleteClick="popupedit_organisation_DeleteClick" PopUpClick="popupedit_costcenter_PopUpClick" HorizontalAlignment="Left" Width="230" HorizontalContentAlignment="Left" Height="24" Margin="3" />
<Label Content="Team:" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" />
<uc:PopUpEdit Grid.Column="1" Grid.ColumnSpan="1" Grid.Row="2" DeleteClick="popupedit_team_DeleteClick"
IsReadOnly="True" x:Name="popupedit_team" DeleteButtonVisibility="Visible" PopUpClick="popupedit_team_PopUpClick"
HorizontalAlignment="Left" Width="200" HorizontalContentAlignment="Left" Height="24" Margin="3" />
HorizontalAlignment="Left" Width="230" HorizontalContentAlignment="Left" Height="24" Margin="3" />
<Label Content="Betreuungsart:" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="3" VerticalAlignment="Center" />
<uc:NullItemComboBox Grid.Column="1" Grid.Row="3" Margin="3" Height="23" Name="combobox_customercaretype" />
<uc:NullItemComboBox Grid.Column="1" Grid.Row="3" Margin="3" Height="23" Name="combobox_customercaretype" />
<CheckBox Grid.Column="2" Grid.Row="0" Margin="10,3,3,3" x:Name="CheckBoxStichtag" IsChecked="True" VerticalAlignment="Center" VerticalContentAlignment="Center" Content="{markup:Translate Stichtagsbezogen auswerten}" Visibility="Visible" ToolTip="{markup:Translate Bei stichtagsbezogenen Auswertungen werden nur Klienten gezählt\, die genau an dem Stichtag z.B. 31.12. des ausgewerteten Jahres einen laufenden Hilfeplan hatten.}" />
<CheckBox Grid.Column="2" Grid.Row="1" Margin="10,3,3,3" x:Name="CheckBoxNurBewilligt" IsChecked="True" VerticalAlignment="Center" VerticalContentAlignment="Center" Content="{markup:Translate Nur bewilligte Hilfepläne berücksichtigen}" Visibility="Visible" />
<Label Content="Zeitraum von" Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" />
<StackPanel Orientation="Horizontal" Grid.Column="1">
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="1" Grid.Row="2" x:Name="datePickerStartDate" Width="100" HorizontalAlignment="Left" Margin="3,0,0,0" />
<Label Content="bis" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center" />
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="3" Grid.Row="2" x:Name="datePickerEndDate" HorizontalAlignment="Left" Width="100" Margin="3,0,0,0" />
</StackPanel>
<Button x:Name="button_generate" Grid.Column="1" Grid.Row="4" Content="Aktualisieren" Click="button_generate_Click" Height="24" HorizontalAlignment="Right" Width="90" Margin="3" />

View File

@@ -28,7 +28,10 @@ namespace BeWo.View.Report.AnnualReport
{
this.InitializeComponent();
InitDateCombos();
//InitDateCombos();
datePickerStartDate.DateTime = new DateTime(DateTime.Now.Year - 1, 1, 1);
datePickerEndDate.DateTime = new DateTime(DateTime.Now.Year - 1, 12, 31);
InitCustomerCareTypeCombo();
//linkPdfExport.NavigateUri = new Uri("http://www.bewoplaner.de");
@@ -51,18 +54,18 @@ namespace BeWo.View.Report.AnnualReport
}
private void InitDateCombos()
{
var years = new List<int>();
for (int i = 0; i <= 10; i++)
{
years.Add(DateTime.Now.Year - i);
}
//private void InitDateCombos()
//{
// var years = new List<int>();
// for (int i = 0; i <= 10; i++)
// {
// years.Add(DateTime.Now.Year - i);
// }
this.combobox_year.ItemsSource = years;
this.combobox_year.SelectedItem = DateTime.Now.Year - 1;
// this.combobox_year.ItemsSource = years;
// this.combobox_year.SelectedItem = DateTime.Now.Year - 1;
}
//}
private void CreateReportView(List<AnnualReportDC> reportList )
{
@@ -120,53 +123,61 @@ namespace BeWo.View.Report.AnnualReport
private void button_generate_Click(object sender, RoutedEventArgs e)
{
//int year = DateTime.Now.Year - 1;
int year = DateTime.Now.Year - 1;
//if (combobox_year.SelectedItem != null)
//{
// year = (int)combobox_year.SelectedItem;
if (combobox_year.SelectedItem != null)
{
//}
year = (int)combobox_year.SelectedItem;
DateTime startDate = datePickerStartDate.DateTime;
DateTime endDate = datePickerEndDate.DateTime;
}
long? costbearerOid = null;
long? teamOid = null;
long? customerCareTypeOid = null;
DateTime startDate = new DateTime(year, 1, 1);
if (_SelectedOrganisation != null)
costbearerOid = _SelectedOrganisation.CostBearerOid;
long? costbearerOid = null;
long? teamOid = null;
long? customerCareTypeOid = null;
if (_SelectedTeam != null)
teamOid = _SelectedTeam.TeamOid;
if (_SelectedOrganisation != null)
costbearerOid = _SelectedOrganisation.CostBearerOid;
ValueListEntryDC en = combobox_customercaretype.SelectedItem as ValueListEntryDC;
if (_SelectedTeam != null)
teamOid = _SelectedTeam.TeamOid;
if (combobox_customercaretype.SelectedItem == null || en.TypeDescription.Equals("")) { }
else
if (combobox_customercaretype.SelectedItem != null)
{
ValueListEntryDC entry = combobox_customercaretype.SelectedItem as ValueListEntryDC;
if (entry != null)
customerCareTypeOid = entry.ValueListEntryOid;
ValueListEntryDC en = combobox_customercaretype.SelectedItem as ValueListEntryDC;
}
var config = new AnnualReportConfigDC
{
CostbearerOid = costbearerOid,
TeamOid = teamOid,
CustomerCareTypeValueListEntryOid = customerCareTypeOid,
StartDate = startDate,
EndDate = endDate,
ShowOnlyApprovedSupportConcepts = CheckBoxNurBewilligt.IsChecked ?? true,
StichtagsbezogenAuswerten = CheckBoxStichtag.IsChecked ?? true
if (combobox_customercaretype.SelectedItem == null || en.TypeDescription.Equals("") ) { }
else
if (combobox_customercaretype.SelectedItem != null)
{
ValueListEntryDC entry = combobox_customercaretype.SelectedItem as ValueListEntryDC;
if (entry != null)
customerCareTypeOid = entry.ValueListEntryOid;
};
}
ServiceFacade.DoAnalysisServiceAsync(s => s.CreateAnnualReport2(config), r => { this.Dispatch(delegate { this.CreateReportView(r); }); });
this.UpdatePDFExportUri(string.Empty);
ServiceFacade.DoAnalysisServiceAsync(s => s.CreateAnnualReport(costbearerOid, teamOid, customerCareTypeOid, startDate, startDate.AddYears(1)), r => { this.Dispatch(delegate { this.CreateReportView(r); }); });
this.UpdatePDFExportUri(string.Empty);
}
private void linkPdfExport_RequestNavigate(object sender, RequestNavigateEventArgs e)
{
string url = String.Format("{0}/ReportView.aspx?y={1}", BeWoApp.SiteOfOrigin, combobox_year.Text);
string url = String.Format("{0}/ReportView.aspx?start={1:dd.MM.yyyy}&end={2:dd.MM.yyyy}", BeWoApp.SiteOfOrigin, datePickerStartDate.DateTime, datePickerEndDate.DateTime);
if (_SelectedOrganisation != null)
@@ -178,7 +189,8 @@ namespace BeWo.View.Report.AnnualReport
{
url += "&t=" + _SelectedTeam.TeamOid;
}
url += String.Format("&appr={0}", CheckBoxNurBewilligt.IsChecked == true ? "1" : "0");
url += String.Format("&stichtag={0}", CheckBoxStichtag.IsChecked == true ? "1" : "0");
ValueListEntryDC en = combobox_customercaretype.SelectedItem as ValueListEntryDC;

View File

@@ -24,6 +24,7 @@ using BeWo.Service.DCEntityMapper;
using BS.Shared.ReportRequests;
using SecurityUtils = BeWo.Service.Security.SecurityUtils;
using DevExpress.DataProcessing;
namespace Host
{
@@ -784,8 +785,33 @@ namespace Host
private XtraReport CreateJahresbericht()
{
int year = int.Parse(Request.Params["y"]);
long? cbOid = null;
int year = DateTime.Now.Year - 1;
if (Request.Params["y"] != null)
{
year = int.Parse(Request.Params["y"]);
}
DateTime start = new DateTime(year, 1, 1);
DateTime end = new DateTime(year, 12, 31);
bool showOnlyApprovedSupportConcepts = true;
bool stichtagsbezogen = true;
if (Request.Params["start"] != null)
{
start = DateTime.Parse(Request.Params["start"]);
}
if (Request.Params["end"] != null)
{
end = DateTime.Parse(Request.Params["end"]);
}
if (Request.Params["appr"] != null)
{
showOnlyApprovedSupportConcepts = "0".Equals(Request.Params["appr"]) ? false : true;
}
if (Request.Params["stichtag"] != null)
{
stichtagsbezogen = "0".Equals(Request.Params["stichtag"]) ? false : true;
}
long? cbOid = null;
if (Request.Params["cb"] != null)
cbOid = long.Parse(Request.Params["cb"]);
@@ -797,7 +823,19 @@ namespace Host
if (Request.Params["art"] != null)
artOid = long.Parse(Request.Params["art"]);
return reportCreator.CreateJahresberichtReport(year, cbOid, teamOid, artOid);
var config = new AnnualReportConfigDC
{
CostbearerOid = cbOid,
TeamOid = teamOid,
CustomerCareTypeValueListEntryOid = artOid,
StartDate = start,
EndDate = end,
ShowOnlyApprovedSupportConcepts = showOnlyApprovedSupportConcepts,
StichtagsbezogenAuswerten = stichtagsbezogen
};
return reportCreator.CreateJahresberichtReport(config);
}
private XtraReport CreateEmployeeDataReport()

View File

@@ -73,7 +73,7 @@ namespace BeWo.Report
public abstract XtraReport CreateFinanceReport(DateTime? start, DateTime? end, bool splitByServiceCategory, bool onlyNotApproved);
public abstract XtraReport CreateJahresberichtReport(int year, long? cbOid, long? teamOid, long? betreuungsartOid);
public abstract XtraReport CreateJahresberichtReport(AnnualReportConfigDC config);
public abstract XtraReport CreateKassenbelegReport(BargeldtransaktionDC transaktion, long objectOid, TableID objectTid);

View File

@@ -1156,11 +1156,11 @@ namespace BeWo.Report
return report as XtraReport;
}
public override XtraReport CreateJahresberichtReport(int year, long? cbOid, long? teamOid, long? betreuungsartOid)
public override XtraReport CreateJahresberichtReport(AnnualReportConfigDC config)
{
var report = FindReportImp<JahresReportRO>();
report.SetReportDataSource(JahresReportRO.Create(year, cbOid, teamOid, betreuungsartOid));
report.SetReportDataSource(JahresReportRO.Create(config));
return report as XtraReport;
}

View File

@@ -64,23 +64,15 @@ namespace BeWo.Report.ReportObjects
}
public static JahresReportRO Create(int year, long? orgOid, long? teamOid, long? betreuungsartOid)
{
DateTime startDate = new DateTime(year, 1, 1);
return Create(startDate, startDate.AddYears(1), orgOid, teamOid, betreuungsartOid);
}
public static JahresReportRO Create(DateTime start, DateTime end, long? orgOid, long? teamOid, long? betreuungsartOid)
public static JahresReportRO Create(AnnualReportConfigDC config)
{
AnalysisServiceImp service = new AnalysisServiceImp();
var list = service.CreateAnnualReport(orgOid, teamOid, betreuungsartOid, start, end);
var list = service.CreateAnnualReport2(config);
var ro = Create(list);
ro.ReportStartDate = start;
ro.ReportEndDate = end;
ro.ReportStartDate = config.StartDate;
ro.ReportEndDate = config.EndDate;
return ro;
}

View File

@@ -1,28 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Plugins;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Services;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Plugins;
using Castle.Components.DictionaryAdapter;
using DevExpress.XtraRichEdit.Model;
using NHibernate.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices.ComTypes;
using System.Text;
namespace BeWo.Service.Reporting
{
public class AnnualReportFactory : AbstractIDSpecificDefaultClass<AnnualReportFactory>
{
protected DateTime ReportStartDate { get; set; }
private bool _StichtagsbezogenAuswerten = true;
private bool _ShowOnlyApprovedSupportConcepts = true;
protected DateTime ReportStartDate { get; set; }
protected DateTime ReportEndDate { get; set; }
protected CostBearer CostBearer { get; set; }
protected long? CostBearerOid { get; set; }
protected long? TeamOid { get; set; }
protected long? CustomerCareTypeValueListEntryOid { get; set; }
protected Dictionary<long, List<CostBearer2SupportConcept>> Cb2ScListPerCustomerOid { get; set; }
protected Dictionary<long, List<CostBearer2SupportConcept>> Cb2ScListPerCustomerOid { get; set; }
protected Dictionary<long, Customer> CustomerByOid { get; set; }
protected Dictionary<long, bool> LiegtImStichtagByCustomerOid { get; set; }
protected Dictionary<long, bool> LiegtImStichtagByC2SOid { get; set; }
@@ -38,18 +44,36 @@ namespace BeWo.Service.Reporting
protected virtual bool StichtagsbezogenAuswerten
{
get { return true; }
get { return _StichtagsbezogenAuswerten; }
}
//Bitte nur noch CreateAnnualReport2 überschreiben
public virtual List<AnnualReportDC> CreateAnnualReport(CostBearer cb, long? teamOid, long? customerCareTypeValueListEntryOid, DateTime reportStartDate,
DateTime reportEndDate)
{
ReportStartDate = reportStartDate;
ReportEndDate = reportEndDate;
CostBearer = cb;
TeamOid = teamOid;
CustomerCareTypeValueListEntryOid = customerCareTypeValueListEntryOid;
var config = new AnnualReportConfigDC
{
CostbearerOid = cb.Oid,
TeamOid = teamOid,
CustomerCareTypeValueListEntryOid = customerCareTypeValueListEntryOid,
StartDate = reportStartDate,
EndDate = reportEndDate,
ShowOnlyApprovedSupportConcepts = true,
StichtagsbezogenAuswerten = true
};
return CreateAnnualReport2(config);
}
public virtual List<AnnualReportDC> CreateAnnualReport2(AnnualReportConfigDC config)
{
ReportStartDate = config.StartDate;
ReportEndDate = config.EndDate;
CostBearerOid = config.CostbearerOid;
TeamOid = config.TeamOid;
_ShowOnlyApprovedSupportConcepts = config.ShowOnlyApprovedSupportConcepts;
_StichtagsbezogenAuswerten = config.StichtagsbezogenAuswerten;
CustomerCareTypeValueListEntryOid = config.CustomerCareTypeValueListEntryOid;
Cb2ScListPerCustomerOid = new Dictionary<long, List<CostBearer2SupportConcept>>();
CustomerByOid = new Dictionary<long, Customer>();
LiegtImStichtagByC2SOid = new Dictionary<long, bool>();
@@ -206,7 +230,7 @@ namespace BeWo.Service.Reporting
if (!StichtagsbezogenAuswerten)
{
if (relDC.EndDate.HasValue && relDC.EndDate < dt && relDC.EndDate >= reportStartDate)
if (relDC.EndDate.HasValue && relDC.EndDate < dt && relDC.EndDate >= ReportStartDate)
{
dt = relDC.EndDate.Value;
}
@@ -268,7 +292,7 @@ namespace BeWo.Service.Reporting
}
if (customer.TerminationDate.HasValue && customer.TerminationDate >= reportStartDate && customer.TerminationDate < reportEndDate)
if (customer.TerminationDate.HasValue && customer.TerminationDate >= ReportStartDate && customer.TerminationDate < ReportEndDate)
{
String grund = "Unbekannter Grund";
@@ -485,10 +509,10 @@ namespace BeWo.Service.Reporting
report.Name = "Anzahl der Zugänge";
reports.Add(report);
report.Data = new List<AnnualReportDataDC>();
var startYear = new DateTime(reportStartDate.Year - 5, 1, 1); //reportStartDate.AddYears(-1); //Vorjahr
var startYear = new DateTime(ReportStartDate.Year - 5, 1, 1); //reportStartDate.AddYears(-1); //Vorjahr
var index = 1;
while (startYear < reportEndDate)
while (startYear < ReportEndDate)
{
if (startYear.Year == 2023)
Console.WriteLine();
@@ -969,7 +993,7 @@ namespace BeWo.Service.Reporting
{
foreach (var iCb2Sc in DAOFactory.GenericDAO.GetAllActiveAndArchived<CostBearer2SupportConcept>())
{
if (CostBearer == null || iCb2Sc.CostBearer.Oid == CostBearer.Oid)
if (!CostBearerOid.HasValue || iCb2Sc.CostBearer.Oid == CostBearerOid)
{
var sc = iCb2Sc.SupportConcept;
var customer = sc.Customer;
@@ -1500,10 +1524,9 @@ namespace BeWo.Service.Reporting
public virtual bool ShouldProcessSupportConcept(CostBearer2SupportConcept iCb2Sc, SupportConcept sc, Customer customer)
{
if (sc.IsActive != ActivationTypeId.Deleted && customer.IsActive != ActivationTypeId.Deleted)
{
if (iCb2Sc.ApprovedStartDate.HasValue && iCb2Sc.ApprovedEndDate.HasValue)
if (!_ShowOnlyApprovedSupportConcepts || (iCb2Sc.ApprovedStartDate.HasValue && iCb2Sc.ApprovedEndDate.HasValue))
{
if (CustomerBelongsToTeam(customer, TeamOid) &&
IsCustomerOfCustomerCareType(customer, CustomerCareTypeValueListEntryOid))

View File

@@ -92,6 +92,10 @@ namespace BeWo.Service.ServiceContracts
[OperationContract]
List<AnnualReportDC> CreateAnnualReport(long? costbearerOid, long? teamOid, long? customerCareTypeValueListEntryOid, DateTime startDate, DateTime endDate);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<AnnualReportDC> CreateAnnualReport2(AnnualReportConfigDC config);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
AccountingReportDC CreateAccountingReport(DateTime start, DateTime end);

View File

@@ -1,26 +1,27 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.ServiceModel;
using System.Threading;
using BeWo.Data.Access;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.Configuration;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Plugins;
using BeWo.Service.Reporting;
using BeWo.Service.ServiceContracts;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.DataContracts.Reports;
using BS.Shared.Extensions;
using BS.Shared.Services;
using DevExpress.XtraRichEdit.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.ComTypes;
using System.ServiceModel;
using System.Threading;
using Utils = BeWo.Service.Core.Utils;
using BS.Shared.DataContracts.Reports;
using BeWo.Service.Reporting;
namespace BeWo.Service.ServiceImplementations
{
@@ -982,23 +983,25 @@ namespace BeWo.Service.ServiceImplementations
return empDC;
}
public List<AnnualReportDC> CreateAnnualReport(long? costbearerOid, long? teamOid, long? customerCareTypeValueListEntryOid, DateTime startDate, DateTime endDate)
public List<AnnualReportDC> CreateAnnualReport2(AnnualReportConfigDC config)
{
try
{
AnnualReportFactory factory = null;
CostBearer cb = null;
if (costbearerOid.HasValue)
{
cb = DAOFactory.GenericDAO.LoadByID<CostBearer>(costbearerOid.Value);
//AnnualReportFactory factory = null;
//CostBearer cb = null;
factory = PluginLoader.FindClass<AnnualReportFactory>(cb.ID) ?? AnnualReportFactory.GetInstance(cb.ID);
}
if (factory == null)
{
factory = PluginLoader.FindClass<AnnualReportFactory>() ?? new AnnualReportFactory();
}
return factory.CreateAnnualReport(cb, teamOid, customerCareTypeValueListEntryOid, startDate, endDate);
//if (config.CostbearerOid.HasValue)
//{
// cb = DAOFactory.GenericDAO.LoadByID<CostBearer>(config.CostbearerOid.Value);
// factory = PluginLoader.FindClass<AnnualReportFactory>(cb.ID) ?? AnnualReportFactory.GetInstance(cb.ID);
//}
//if (factory == null)
//{
// factory = PluginLoader.FindClass<AnnualReportFactory>() ?? new AnnualReportFactory();
//}
AnnualReportFactory factory = PluginLoader.FindClass<AnnualReportFactory>() ?? new AnnualReportFactory();
return factory.CreateAnnualReport2(config);
}
catch (Exception e)
{
@@ -1006,6 +1009,22 @@ namespace BeWo.Service.ServiceImplementations
}
}
public List<AnnualReportDC> CreateAnnualReport(long? costbearerOid, long? teamOid, long? customerCareTypeValueListEntryOid, DateTime startDate, DateTime endDate)
{
var config = new AnnualReportConfigDC
{
CostbearerOid = costbearerOid,
TeamOid = teamOid,
CustomerCareTypeValueListEntryOid = customerCareTypeValueListEntryOid,
StartDate = startDate,
EndDate = endDate,
ShowOnlyApprovedSupportConcepts = true,
StichtagsbezogenAuswerten = true
};
return CreateAnnualReport2(config);
}
public static bool IsServiceRecordActive(ServiceRecord sr)
{
if (sr.Customer != null && sr.Customer.IsActive == ActivationTypeId.Deleted)

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace BS.Shared.DataContracts
{
[DataContract]
public class AnnualReportConfigDC
{
[DataMember]
public DateTime StartDate { get; set; }
[DataMember]
public DateTime EndDate { get; set; }
[DataMember]
public long? CostbearerOid { get; set; }
[DataMember]
public long? TeamOid { get; set; }
[DataMember]
public long? CustomerCareTypeValueListEntryOid { get; set; }
[DataMember]
public bool ShowOnlyApprovedSupportConcepts { get; set; }
[DataMember]
public bool StichtagsbezogenAuswerten { get; set; }
}
}

View File

@@ -197,6 +197,7 @@
<Compile Include="DataContracts\Feature\AI\AiPromptroutineDC.cs" />
<Compile Include="DataContracts\Feature\AI\AiPromptroutineStepDC.cs" />
<Compile Include="DataContracts\Feature\AI\AiUserSettingDC.cs" />
<Compile Include="DataContracts\AnnualReportConfigDC.cs" />
<Compile Include="DataContracts\IAbsenceTime.cs" />
<Compile Include="DataContracts\AiVoiceDataDC.cs" />
<Compile Include="DataContracts\Feature\AI\AiPromptbausteinFolderDC.cs" />