Neue Service Methoden zum Laden und Speichern von AI Settings

This commit is contained in:
Christian
2024-09-26 11:40:30 +02:00
parent 43ff21435b
commit 9fb43859a1
15 changed files with 453 additions and 49 deletions

View File

@@ -40,17 +40,23 @@
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Button Grid.Row="0" Content="Einstellungen" HorizontalAlignment="Left" Click="btnSettings_Click"/>
<Popup Grid.Row="0" Grid.RowSpan="3" StaysOpen="True" Placement="MousePoint" Width="290" Height="80" Closed="popup_Closed" x:Name="PopupTemplate">
<Grid Background="{StaticResource ControlBackground}" Margin="2,2,2,2">
<Popup Grid.Row="0" Grid.RowSpan="3" StaysOpen="True" Placement="MousePoint" Width="400" Height="300" x:Name="PopupTemplate">
<Grid Background="{DynamicResource ObjectEditBackgroundBrush}" Margin="2,2,2,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="{t:Translate Datensatz Template}"></Label>
<TextBox x:Name="TextBoxTemplate" Grid.Row="2" MinHeight="60" AcceptsReturn="True" AcceptsTab="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"></TextBox>
<TextBox x:Name="TextBoxTemplate" Grid.Row="1" MinHeight="60" AcceptsReturn="True" AcceptsTab="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"></TextBox>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Grid.Row="2" Content="Übernehmen" Click="btnSaveSettings_Click" Margin="3"/>
<Button Grid.Row="2" Content="Abbrechen" Click="btnCancelSettings_Click" Margin="3"/>
</StackPanel>
</Grid>
</Popup>
<Label Grid.Row="1" Content="{t:Translate Formulieren Sie hier Ihre Anfrage}"></Label>

View File

@@ -40,6 +40,7 @@ namespace BeWo.AI.View
private TableID tableID;
private DateTime startDate;
private DateTime endDate;
private AiSettingsDC aiSettings;
public AiChatView()
{
@@ -53,8 +54,11 @@ namespace BeWo.AI.View
this.cb2scOid = c2sOid;
this.startDate = start;
this.endDate = end;
LoadAiSettings(1);
}
public void InitSingleCustomerQuery(long customerOid)
{
type = 1;
@@ -67,6 +71,11 @@ namespace BeWo.AI.View
tableID = tableId;
}
private void LoadAiSettings(int settingsType)
{
aiSettings = ServiceFacade.DoOperationsServiceSync(s => s.GetAiSettings(settingsType));
}
private void ReloadViewModel(AiChatDC dc)
{
TextBoxErgebnis.Text = dc.Result;
@@ -118,12 +127,35 @@ namespace BeWo.AI.View
private void btnSettings_Click(object sender, RoutedEventArgs e)
{
if (aiSettings != null)
{
TextBoxTemplate.Text = aiSettings.Settings;
}
PopupTemplate.IsOpen = true;
}
private void popup_Closed(object sender, EventArgs e)
{
private void btnSaveSettings_Click(object sender, RoutedEventArgs e)
{
PopupTemplate.IsOpen = false;
if (aiSettings != null)
{
aiSettings.Settings = TextBoxTemplate.Text;
ServiceFacade.DoOperationsServiceAsync(s => s.UpdateAiSettings(aiSettings),
dc =>
{
this.Dispatch(delegate
{
aiSettings = dc;
});
});
}
}
private void btnCancelSettings_Click(object sender, RoutedEventArgs e)
{
PopupTemplate.IsOpen = false;
}
}
}

View File

@@ -1759,6 +1759,33 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactOrganisationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactPersonDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactWohnheimDC>))]
[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))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Angebot))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Geschlecht))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Unterbringungsart))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Verbandszugehorigkeit))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.CustomerWohnhilfeBereichEinkommenUndArbeitDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.AufstockungEinkommen))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Beschaftigungsstatus))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.WohnhilfeBoolData))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Einkommenssituation))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Berufsabschluss))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.DauerArbeitslosigkeit))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.CustomerWohnhilfeBereichSozialeKontakteDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.KontaktArzt))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Krankenversicherung))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.CustomerWohnhilfeBereichSozialstrukturDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.ArtDerBeendigung))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.ArtDesHilfeangebots))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Aufenthaltsstatus))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Bundesland))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Familienstand))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Geschlechtidentitat))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Haushaltsstruktur))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.HochsterSchulabschluss))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Staatsangehorigkeit))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<object>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<long, System.Collections.Generic.List<long>>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimbuchungDC))]
@@ -1783,6 +1810,10 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.CustomerCostBearerRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerCostBearerRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.CustomerVermittlungArbeitDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerVermittlungArbeitDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.BeWoDataContract))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerVermittlungBearbeitungsstatus))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.MedikamentenverordnungslisteDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.MedikamentenverordnungslisteDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.MedikamentenverordnungDC>))]
@@ -1829,6 +1860,12 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimCustomerRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.WohnheimEmployeeRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimEmployeeRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.WohneinheitDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohneinheitDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.WohneinheitBelegungDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohneinheitBelegungDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ImageDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ImageDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UserValidationResult))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SupportPinDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.SupportPinDC>))]
@@ -1866,11 +1903,17 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ResourceBookingDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ResourceAppointmentDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ResourceAppointmentDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC))]
[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(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>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SignatureDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AiChatDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AiSettingsDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ConfirmationReceiptSignatureDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.VorlagentabelleDC>))]
@@ -2014,11 +2057,6 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.Compact.CompactCustomerDC, bool>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<long, bool>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.ServiceRecordDC, System.Collections.Generic.List<BS.Shared.ServiceRecordValidationResult>>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC))]
[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(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AccountingReportDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AccountingReportRowDC>))]
@@ -5474,6 +5512,14 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateAiQueryForObjectsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.AiChatDC CreateAiQueryForObjects(BS.Shared.DataContracts.AiChatDC acdc, long objectTid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAiSettings", ReplyAction="http://tempuri.org/IOperationsService/GetAiSettingsResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAiSettingsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.AiSettingsDC GetAiSettings(int settingsId);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateAiSettings", ReplyAction="http://tempuri.org/IOperationsService/UpdateAiSettingsResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateAiSettingsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.AiSettingsDC UpdateAiSettings(BS.Shared.DataContracts.AiSettingsDC settings);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTable", ReplyAction="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTableRespons" +
"e")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTableBeWoFau" +
@@ -5939,6 +5985,33 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactOrganisationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactPersonDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactWohnheimDC>))]
[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))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Angebot))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Geschlecht))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Unterbringungsart))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Verbandszugehorigkeit))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.CustomerWohnhilfeBereichEinkommenUndArbeitDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.AufstockungEinkommen))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Beschaftigungsstatus))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.WohnhilfeBoolData))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Einkommenssituation))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Berufsabschluss))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.DauerArbeitslosigkeit))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.CustomerWohnhilfeBereichSozialeKontakteDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.KontaktArzt))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Krankenversicherung))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.CustomerWohnhilfeBereichSozialstrukturDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.ArtDerBeendigung))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.ArtDesHilfeangebots))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Aufenthaltsstatus))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Bundesland))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Familienstand))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Geschlechtidentitat))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Haushaltsstruktur))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.HochsterSchulabschluss))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.Staatsangehorigkeit))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<object>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<long, System.Collections.Generic.List<long>>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimbuchungDC))]
@@ -5963,6 +6036,10 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.CustomerCostBearerRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerCostBearerRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.CustomerVermittlungArbeitDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerVermittlungArbeitDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.BeWoDataContract))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerVermittlungBearbeitungsstatus))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.MedikamentenverordnungslisteDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.MedikamentenverordnungslisteDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.MedikamentenverordnungDC>))]
@@ -6009,6 +6086,12 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimCustomerRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.WohnheimEmployeeRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimEmployeeRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.WohneinheitDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohneinheitDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.WohneinheitBelegungDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohneinheitBelegungDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ImageDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ImageDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UserValidationResult))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SupportPinDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.SupportPinDC>))]
@@ -6046,11 +6129,17 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ResourceBookingDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ResourceAppointmentDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ResourceAppointmentDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC))]
[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(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>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SignatureDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AiChatDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AiSettingsDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ConfirmationReceiptSignatureDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.VorlagentabelleDC>))]
@@ -6194,11 +6283,6 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.Compact.CompactCustomerDC, bool>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<long, bool>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.ServiceRecordDC, System.Collections.Generic.List<BS.Shared.ServiceRecordValidationResult>>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC))]
[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(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AccountingReportDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AccountingReportRowDC>))]
@@ -7494,6 +7578,16 @@ namespace BeWo.ServiceProxy
return base.Channel.CreateAiQueryForObjects(acdc, objectTid);
}
public BS.Shared.DataContracts.AiSettingsDC GetAiSettings(int settingsId)
{
return base.Channel.GetAiSettings(settingsId);
}
public BS.Shared.DataContracts.AiSettingsDC UpdateAiSettings(BS.Shared.DataContracts.AiSettingsDC settings)
{
return base.Channel.UpdateAiSettings(settings);
}
public void DeleteCertainDienstEintragOutOfTable(long dienstEintragOid)
{
base.Channel.DeleteCertainDienstEintragOutOfTable(dienstEintragOid);

View File

@@ -1,2 +1,2 @@
ALTER TABLE `organisation`
ADD COLUMN `BusinessParnerId` VARCHAR(256) NULL DEFAULT NULL AFTER `Leistungserbringergruppe`;
ADD COLUMN `BusinessPartnerId` VARCHAR(256) NULL DEFAULT NULL AFTER `Leistungserbringergruppe`;

View File

@@ -50,7 +50,7 @@ CONSTRAINT `FK_CUSTOMERVERMITTLUNGARBEIT_CUSTOMER` FOREIGN KEY (`CustomerOid`) R
ALTER TABLE `customervermittlungarbeit`
ADD CONSTRAINT `FK_CUSTOMERVERMITTLUNGARBEIT_AUFTRAGSHERKUNFT`
FOREIGN KEY (`Auftragsherkunft`)
REFERENCES `7375324044`.`valuelistentry` (`Oid`)
REFERENCES `valuelistentry` (`Oid`)
ON DELETE SET NULL
ON UPDATE CASCADE,
ADD CONSTRAINT `FK_CUSTOMERVERMITTLUNGARBEIT_VERMITTLUNGSGRUNDLAGE`

View File

@@ -0,0 +1,16 @@
CREATE TABLE `aisettings` (
`Oid` bigint NOT NULL AUTO_INCREMENT,
`Tid` int NOT NULL,
`Description` varchar(256) DEFAULT NULL,
`Notice` varchar(1024) DEFAULT NULL,
`InsTs` datetime DEFAULT NULL,
`InsUser` varchar(256) DEFAULT NULL,
`Version` bigint DEFAULT NULL,
`UpdTs` datetime DEFAULT NULL,
`UdpUser` varchar(256) DEFAULT NULL,
`IsActive` tinyint DEFAULT NULL,
`SystemEntryID` int DEFAULT NULL,
`SettingsType` int DEFAULT NULL,
`Settings` MEDIUMTEXT DEFAULT NULL,
PRIMARY KEY (`Oid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

View File

@@ -1176,18 +1176,6 @@ CREATE TABLE `CustomerFalldaten` (
PRIMARY KEY (`Oid`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
ALTER TABLE `customer`
ADD COLUMN `CustomerFalldatenOid` BIGINT NULL DEFAULT NULL AFTER `VersichertenStatus`;
ALTER TABLE `customer`
ADD INDEX `FK_CUSTOMERFALLDATEN_idx` (`CustomerFalldatenOid` ASC) VISIBLE;
ALTER TABLE `customer`
ADD CONSTRAINT `FK_CUSTOMERFALLDATEN`
FOREIGN KEY (`CustomerFalldatenOid`)
REFERENCES `customerfalldaten` (`Oid`)
ON DELETE RESTRICT
ON UPDATE RESTRICT;
ALTER TABLE `customerfalldaten`
ADD INDEX `FK_AUFTRAGSHERKUNFT_idx` (`AuftragsherkunftValueListEntryOid` ASC) VISIBLE,
@@ -1249,3 +1237,134 @@ CREATE TABLE `aisettings` (
PRIMARY KEY (`Oid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
CREATE TABLE `CustomerWohnhilfe` (
`Oid` bigint NOT NULL AUTO_INCREMENT,
`InsTs` datetime DEFAULT NULL,
`InsUser` varchar(256) DEFAULT NULL,
`Notice` varchar(1024) DEFAULT NULL,
`Tid` int DEFAULT NULL,
`UdpUser` varchar(256) DEFAULT NULL,
`Version` bigint DEFAULT NULL,
`IsActive` tinyint DEFAULT NULL,
`SystemEntryID` int DEFAULT NULL,
`CustomerOid` bigint NOT NULL,
`Displayname` varchar(256) DEFAULT NULL,
`Verbandszugehorigkeit` tinyint DEFAULT NULL,
`Geschlecht` tinyint DEFAULT NULL,
`AlterAmStichtag` int DEFAULT NULL,
`Haushaltsgrosse` int DEFAULT NULL,
`BerichtseinheitID` varchar(256),
`Unterbringungsart` tinyint DEFAULT NULL,
`OrtDerEinrichtung` int DEFAULT NULL,
`Angebot` tinyint DEFAULT NULL,
`BeginnEinkommenssituation` tinyint,
`EndeEinkommenssituation` tinyint,
`BeginnAufstockungEinkommen` tinyint,
`EndeAufstockungEinkommen` tinyint,
`BeginnEigenesBankkonto` tinyint,
`EndeEigenesBankkonto` tinyint,
`Uberschuldung` tinyint,
`Berufsabschluss` tinyint,
`ErwerbsfahigkeitSinnSGB` tinyint,
`BeginnBeschaftigungsstatus` tinyint,
`EndeBeschaftigungsstatus` tinyint,
`DauerArbeitslosigkeit` tinyint,
`BeginnSozialeKontakte` tinyint,
`BeginnKontaktPartner` tinyint,
`BeginnKontaktMindKinder` tinyint,
`BeginnKontaktVolljahrKinderElternVerwandten` tinyint,
`BeginnKontaktFreundenBekannten` tinyint,
`BeginnKontaktSelbsthilfe` tinyint,
`BeginnKontaktSonstige` tinyint,
`EndeSozialeKontakte` tinyint,
`EndeKontaktPartner` tinyint,
`EndeKontaktMindKinder` tinyint,
`EndeKontaktVolljahrKinderElternVerwandten` tinyint,
`EndeKontaktFreundenBekannten` tinyint,
`EndeKontaktSelbsthilfe` tinyint,
`EndeKontaktSonstige` tinyint,
`BeginnKrankenversicherung` tinyint,
`EndeKrankenversicherung` tinyint,
`BeginnKontaktArzt` tinyint,
`EndeKontaktArzt` tinyint,
`VorlageSchwerbehindertenausweises` tinyint,
`Bundesland` tinyint DEFAULT NULL,
`IsWohnungslosenhilfe` tinyint,
`ArtDesHilfeangebots` tinyint,
`Betreuungsbeginn` datetime DEFAULT NULL,
`Betreuungsende` datetime DEFAULT NULL,
`BetreuungsdauerInTagen` int DEFAULT NULL,
`ArtDerBeendigung` tinyint,
`Geburtsdatum` datetime DEFAULT NULL,
`Geschlechtidentitat` tinyint,
`Staatsangehorigkeit` SMALLINT DEFAULT NULL,
`Aufenthaltsstatus` tinyint,
`Migrationshintergrund` tinyint,
`HochsterSchulabschluss` tinyint,
`Familienstand` tinyint,
`Haushaltsstruktur` tinyint,
`EigeneMindKinderAuserhalbHaushaltsstruktur` tinyint,
PRIMARY KEY (`Oid`),
CONSTRAINT `FK_CUSTOMERWOHNHILFE_CUSTOMER` FOREIGN KEY (`CustomerOid`) REFERENCES `customer` (`Oid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
CREATE TABLE `CustomerVermittlungArbeit` (
`Oid` bigint NOT NULL AUTO_INCREMENT,
`InsTs` datetime DEFAULT NULL,
`InsUser` varchar(256) DEFAULT NULL,
`Notice` varchar(1024) DEFAULT NULL,
`Tid` int DEFAULT NULL,
`UdpUser` varchar(256) DEFAULT NULL,
`Version` bigint DEFAULT NULL,
`IsActive` tinyint DEFAULT NULL,
`SystemEntryID` int DEFAULT NULL,
`CustomerOid` bigint NOT NULL,
`EigenesAktenzeichen` varchar(256),
`Auftragseingang` datetime DEFAULT NULL,
`Auftragsherkunft` bigint DEFAULT NULL,
`Vermittlungsgrundlage` bigint DEFAULT NULL,
`Tagessatze` decimal(18,10) DEFAULT NULL,
`Tagessatzhohe` decimal(18,10) DEFAULT NULL,
`HoheDerGeldstrafe` decimal(18,10) DEFAULT NULL,
`ZuLeistendeArbeitsstunden` decimal(18,10) DEFAULT NULL,
`Hinweis` varchar(256),
`Termin` datetime DEFAULT NULL,
`CustomerVermittlungBearbeitungsstatus` tinyint DEFAULT NULL,
`Auftragsruckgabe` varchar(256),
`Verlauf` varchar(256),
`AbgeleisteteStunden` decimal(18,10) DEFAULT NULL,
`ErsparteHafttage` decimal(18,10) DEFAULT NULL,
`GeleisteteRatenzahlung` decimal(18,10) DEFAULT NULL,
`Bemerkung` varchar(256),
`GeleisteteEinmalzahlung` decimal(18,10) DEFAULT NULL,
`GrundArbeitsunfahig` tinyint,
`GrundSuchtproblem` tinyint,
`GrundPsychischeProbleme` tinyint,
`GrundKeineMotivation` tinyint,
`GrundInHaft` tinyint,
`GrundUnbekannt` tinyint,
`GrundKeinKontakt` tinyint,
`GrundNichtAngetreten` tinyint,
`GrundAbbruchDerTatigkeit` tinyint,
`GrundWiderruf` tinyint,
`Grund459StPO` tinyint,
`GrundAusbleibenDerZahlung` tinyint,
`BesonderheitMehrfacheBeauftragung` tinyint,
`BesonderheitMehrfacheVermittlung` tinyint,
`BesonderheitVermittlungAusHaft` tinyint,
`BesonderheitDurchBGBWAufgesucht` tinyint,
PRIMARY KEY (`Oid`),
CONSTRAINT `FK_CUSTOMERVERMITTLUNGARBEIT_CUSTOMER` FOREIGN KEY (`CustomerOid`) REFERENCES `customer` (`Oid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
ALTER TABLE `customervermittlungarbeit`
ADD CONSTRAINT `FK_CUSTOMERVERMITTLUNGARBEIT_AUFTRAGSHERKUNFT`
FOREIGN KEY (`Auftragsherkunft`)
REFERENCES `valuelistentry` (`Oid`)
ON DELETE SET NULL
ON UPDATE CASCADE,
ADD CONSTRAINT `FK_CUSTOMERVERMITTLUNGARBEIT_VERMITTLUNGSGRUNDLAGE`
FOREIGN KEY (`Vermittlungsgrundlage`)
REFERENCES `valuelistentry` (`Oid`)
ON DELETE SET NULL
ON UPDATE CASCADE;

View File

@@ -0,0 +1,46 @@
using System.Collections.Generic;
using System.Linq;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Wohnhilfe;
namespace BeWo.Service.DCEntityMapper
{
public class AiSettingsDC_AiSettings : AbstractIDCEntityMapper<AiSettings, AiSettingsDC>
{
public override AiSettingsDC MergeWithDC(AiSettings pEntity, AiSettingsDC pDataContract)
{
pDataContract.Oid = pEntity.Oid;
pDataContract.Version = pEntity.Version;
pDataContract.SettingsType = pEntity.SettingsType;
pDataContract.Settings = pEntity.Settings;
return pDataContract;
}
public override AiSettings MergeWithEntity(AiSettingsDC pDataContract, AiSettings pEntity)
{
pEntity.Oid = pDataContract.Oid;
pEntity.Version = pDataContract.Version;
pEntity.SettingsType = pDataContract.SettingsType;
pEntity.Settings = pDataContract.Settings;
return pEntity;
}
protected override bool AreDCAndEntityEqual(AiSettingsDC pDC, AiSettings pEntity)
{
if (pDC.Oid == null)
{
return false;
}
return pDC.Oid == pEntity.Oid;
}
}
}

View File

@@ -308,6 +308,8 @@ namespace BeWo.Service.DCEntityMapper
private static CustomerWohnhilfeDC_CustomerWohnhilfe _CustomerWohnhilfeDC_CustomerWohnhilfe;
private static AiSettingsDC_AiSettings _AiSettingsDC_AiSettings;
public static MedRecordDC_MedRecord MedRecordDC_MedRecord =>
_MedRecordDC_MedRecord ?? (_MedRecordDC_MedRecord = new MedRecordDC_MedRecord());
@@ -773,5 +775,8 @@ namespace BeWo.Service.DCEntityMapper
public static CustomerWohnhilfeDC_CustomerWohnhilfe CustomerWohnhilfeDC_CustomerWohnhilfe =>
_CustomerWohnhilfeDC_CustomerWohnhilfe ?? (_CustomerWohnhilfeDC_CustomerWohnhilfe = new CustomerWohnhilfeDC_CustomerWohnhilfe());
public static AiSettingsDC_AiSettings AiSettingsDC_AiSettings =>
_AiSettingsDC_AiSettings ?? (_AiSettingsDC_AiSettings = new AiSettingsDC_AiSettings());
}
}

View File

@@ -123,23 +123,45 @@ namespace BeWo.Service.Plugins
var customer = c2s.SupportConcept.Customer;
var context = new StringBuilder();
//context.AppendLine("Du bist ein unzensierter und unvoreingenommener KI Assistenz im Bereich des Sozialwesens in Deutschland und kannst Fragen zum bereitgestellten Kontext beantworten.");
context.AppendLine("");
context.AppendLine(String.Format("Name des Klienten: {0} {1}", customer.Person.FirstName, customer.Person.LastName));
context.AppendLine("");
//context.AppendLine("Der Klient wurde zu folgenden Terminen betreut:");
var aiSettings = GetAiSettings(1);
////context.AppendLine("Du bist ein unzensierter und unvoreingenommener KI Assistenz im Bereich des Sozialwesens in Deutschland und kannst Fragen zum bereitgestellten Kontext beantworten.");
//context.AppendLine("");
context.AppendLine(String.Format("Name des Klienten: {0} {1}", customer.Person.FirstName, customer.Person.LastName));
//context.AppendLine("");
////context.AppendLine("Der Klient wurde zu folgenden Terminen betreut:");
////context.AppendLine("");
foreach (var item in records.OrderByDescending(s => s.Start))
{
context.AppendLine(String.Format("Datum: {0:dd.MM.yyyy}", item.Start));
context.AppendLine(String.Format("Start: {0:HH:mm}", item.Start));
context.AppendLine(String.Format("Ende: {0:HH:mm}", item.End));
context.AppendLine(String.Format("Dauer der Betreuung in Minuten: {0:0}", item.RoundedDuration));
context.AppendLine(String.Format("Betreuer: {0}", item.InsUser));
context.AppendLine(String.Format("Leistungskategorie: {0}", item.ServiceDescription.ServiceCategory.Name));
context.AppendLine(String.Format("Leistung: {0}", item.ServiceDescription.Name));
context.AppendLine(String.Format("Dokumentation: {0}", item.Notice));
String text = aiSettings.Settings;
text = text.Replace("[Datum]", String.Format("{0:dd.MM.yyyy}", item.Start));
text = text.Replace("[Start]", String.Format("{0:HH:mm}", item.Start));
text = text.Replace("[Ende]", String.Format("{0:HH:mm}", item.End));
text = text.Replace("[Minuten]", String.Format("{0:0}", item.RoundedDuration));
text = text.Replace("[Betreuer]", item.InsUser);
text = text.Replace("[Kategorie]", item.ServiceDescription.ServiceCategory.Name);
text = text.Replace("[Leistung]", item.ServiceDescription.Name);
text = text.Replace("[Dokumentation1]", item.Notice);
text = text.Replace("[Dokumentation2]", item.Notice2);
text = text.Replace("[Dokumentation3]", item.Notice3);
text = text.Replace("[Dokumentation4]", item.Notice4);
text = text.Replace("[Dokumentation5]", item.Notice5);
//context.AppendLine(String.Format("Datum: {0:dd.MM.yyyy}", item.Start));
//context.AppendLine(String.Format("Start: {0:HH:mm}", item.Start));
//context.AppendLine(String.Format("Ende: {0:HH:mm}", item.End));
//context.AppendLine(String.Format("Dauer der Betreuung in Minuten: {0:0}", item.RoundedDuration));
//context.AppendLine(String.Format("Betreuer: {0}", item.InsUser));
//context.AppendLine(String.Format("Leistungskategorie: {0}", item.ServiceDescription.ServiceCategory.Name));
//context.AppendLine(String.Format("Leistung: {0}", item.ServiceDescription.Name));
//context.AppendLine(String.Format("Dokumentation: {0}", item.Notice));
context.Append(text);
context.AppendLine();
}
return context.ToString();
@@ -147,7 +169,33 @@ namespace BeWo.Service.Plugins
internal AiSettingsDC GetAiSettings(int settingsId)
{
throw new NotImplementedException();
var ais = DAOFactory.GenericDAO.GetAllActive<AiSettings>().FirstOrDefault(s => s.SettingsType == settingsId);
if (ais == null)
{
ais = new AiSettings();
ais.SettingsType = settingsId;
if (settingsId == 1)
{
var context = new StringBuilder();
//context.AppendLine("Name des Klienten: [Vorname] [Nachname]");
//context.AppendLine("");
context.AppendLine("Datum: [Datum]");
context.AppendLine("Start: [Start]");
context.AppendLine("Ende: [Ende]");
context.AppendLine("Dauer der Betreuung in Minuten: [Minuten]");
context.AppendLine("Betreuer: [Betreuer]");
context.AppendLine("Leistungskategorie: [Kategorie]");
context.AppendLine("Leistung: [Leistung]");
context.AppendLine("Dokumentation: [Dokumentation1]");
ais.Settings = context.ToString();
}
}
return MapperFactory.AiSettingsDC_AiSettings.MapToNewDC(ais);
}
}

View File

@@ -228,6 +228,7 @@
<Compile Include="DCEntityMapper\BargeldtransaktionshistoryDC_Bargeldtransaktionshistory.cs" />
<Compile Include="DCEntityMapper\ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.cs" />
<Compile Include="DCEntityMapper\CustomerVermittlungArbeitDC_CustomerVermittlungArbeit.cs" />
<Compile Include="DCEntityMapper\AiSettingsDC_AiSettings.cs" />
<Compile Include="DCEntityMapper\CustomerWohnhilfeDC_CustomerWohnhilfe.cs" />
<Compile Include="DCEntityMapper\ImageDC_Image.cs" />
<Compile Include="DCEntityMapper\DienstvertretungDC_Dienstvertretung.cs" />

View File

@@ -1384,5 +1384,9 @@ namespace BeWo.Service.ServiceContracts
[OperationContract]
AiSettingsDC GetAiSettings(int settingsId);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
AiSettingsDC UpdateAiSettings(AiSettingsDC settings);
}
}

View File

@@ -8978,6 +8978,35 @@ namespace BeWo.Service.ServiceImplementations
throw Utils.CreateBeWoFaultException(e);
}
}
public AiSettingsDC UpdateAiSettings(AiSettingsDC settings)
{
try
{
AiSettings ais = null;
if (settings.Oid.HasValue)
{
ais = DAOFactory.GenericDAO.LoadByID<AiSettings>(settings.Oid.Value);
ais = MapperFactory.AiSettingsDC_AiSettings.MergeWithEntity(settings, ais);
DAOFactory.GenericDAO.Update(ais);
}
else
{
ais = MapperFactory.AiSettingsDC_AiSettings.MapToNewEntity(settings);
DAOFactory.GenericDAO.Insert(ais);
}
return MapperFactory.AiSettingsDC_AiSettings.MapToNewDC(ais);
}
catch (Exception e)
{
throw Utils.CreateBeWoFaultException(e);
}
}
}
public class ServiceRecord2SignatureStates

View File

@@ -786,9 +786,10 @@ namespace BS.Shared
public enum AbsenceReasonVisibilityType
{
All,
Customer,
Employee
Never = -1,
All = 0,
Customer = 1,
Employee = 2
}
public enum ScopeTypeId

View File

@@ -499,13 +499,16 @@ namespace BS.Shared.Core
#region AbsenceReasonVisibility2Translations
AbsenceReasonVisibility2Translations = new Dictionary<AbsenceReasonVisibilityType, String>
{
{
AbsenceReasonVisibilityType.Never, Translator.Translate("Ausblenden")
},
{
AbsenceReasonVisibilityType.All, Translator.Translate("Alle")
},
{
{
AbsenceReasonVisibilityType.Customer, Translator.Translate("Klienten")
},
{
{
AbsenceReasonVisibilityType.Employee, Translator.Translate("MitarbeiterSingular")
},
};