Neue Endpunkte

This commit is contained in:
2025-12-08 15:47:12 +01:00
parent b2a8e1083c
commit a8c6a534dd
6 changed files with 97 additions and 45 deletions

View File

@@ -59,17 +59,21 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/SendNewMessageBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiConversationMessageDC> SendNewMessage(long conversation, string message);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/GetAiPromptbausteineTree", ReplyAction="http://tempuri.org/IAiEnhancedService/GetAiPromptbausteineTreeResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/GetAiPromptbausteineTreeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiPromptbausteinTreeDC> GetAiPromptbausteineTree();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/GetAiPromptbausteine", ReplyAction="http://tempuri.org/IAiEnhancedService/GetAiPromptbausteineResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/GetAiPromptbausteineBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiPromptbausteinTreeDC> GetAiPromptbausteine();
System.Collections.Generic.List<BS.Shared.DataContracts.AiPromptbausteinDC> GetAiPromptbausteine();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/CreateAiPromptbausteine", ReplyAction="http://tempuri.org/IAiEnhancedService/CreateAiPromptbausteineResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/CreateAiPromptbausteineBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiPromptbausteinTreeDC> CreateAiPromptbausteine(System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiPromptbausteinTreeDC> aiPromptbausteinDC);
System.Collections.Generic.List<BS.Shared.DataContracts.AiPromptbausteinDC> CreateAiPromptbausteine(System.Collections.Generic.List<BS.Shared.DataContracts.AiPromptbausteinDC> aiPromptbausteinDC);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/UpdateAiPromptbausteine", ReplyAction="http://tempuri.org/IAiEnhancedService/UpdateAiPromptbausteineResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/UpdateAiPromptbausteineBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
System.Collections.Generic.Dictionary<long, long> UpdateAiPromptbausteine(System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiPromptbausteinTreeDC> aiPromptbausteinDCs);
System.Collections.Generic.Dictionary<long, long> UpdateAiPromptbausteine(System.Collections.Generic.List<BS.Shared.DataContracts.AiPromptbausteinDC> aiPromptbausteinDCs);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/DeleteAiPromptbausteine", ReplyAction="http://tempuri.org/IAiEnhancedService/DeleteAiPromptbausteineResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/DeleteAiPromptbausteineBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")]
@@ -167,17 +171,22 @@ namespace BeWo.ServiceProxy
return base.Channel.SendNewMessage(conversation, message);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiPromptbausteinTreeDC> GetAiPromptbausteine()
public System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiPromptbausteinTreeDC> GetAiPromptbausteineTree()
{
return base.Channel.GetAiPromptbausteineTree();
}
public System.Collections.Generic.List<BS.Shared.DataContracts.AiPromptbausteinDC> GetAiPromptbausteine()
{
return base.Channel.GetAiPromptbausteine();
}
public System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiPromptbausteinTreeDC> CreateAiPromptbausteine(System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiPromptbausteinTreeDC> aiPromptbausteinDC)
public System.Collections.Generic.List<BS.Shared.DataContracts.AiPromptbausteinDC> CreateAiPromptbausteine(System.Collections.Generic.List<BS.Shared.DataContracts.AiPromptbausteinDC> aiPromptbausteinDC)
{
return base.Channel.CreateAiPromptbausteine(aiPromptbausteinDC);
}
public System.Collections.Generic.Dictionary<long, long> UpdateAiPromptbausteine(System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiPromptbausteinTreeDC> aiPromptbausteinDCs)
public System.Collections.Generic.Dictionary<long, long> UpdateAiPromptbausteine(System.Collections.Generic.List<BS.Shared.DataContracts.AiPromptbausteinDC> aiPromptbausteinDCs)
{
return base.Channel.UpdateAiPromptbausteine(aiPromptbausteinDCs);
}

View File

@@ -1,6 +1,7 @@
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Feature.AI;
using System;
using System.Collections.Generic;
@@ -12,7 +13,7 @@ namespace BeWo.Service.Plugins
{
public class AiPromptbausteineService
{
public IEnumerable<AiPromptbausteinTreeDC> GetAiPromptbausteine()
public IEnumerable<AiPromptbausteinTreeDC> GetAiPromptbausteineTree()
{
var allAiPromptbausteine = DAOFactory.GenericDAO.GetAll<AiPromptbaustein>();
MapperFactory.AiPromptbausteinDC_AiPromptbaustein.CreateDcList(allAiPromptbausteine);
@@ -29,16 +30,50 @@ namespace BeWo.Service.Plugins
return predefined.GetFullPromptbausteineTree();
}
public IEnumerable<AiPromptbausteinTreeDC> CreateAiPromptbausteine(IEnumerable<AiPromptbausteinTreeDC> aiPromptbausteinDcs)
//public IEnumerable<AiPromptbausteinTreeDC> CreateAiPromptbausteine(IEnumerable<AiPromptbausteinTreeDC> aiPromptbausteinDcs)
//{
// var aiPromptbausteine = MapperFactory.AiPromptbausteinTree.MapToNewEntities(aiPromptbausteinDcs);
// DAOFactory.GenericDAO.Insert(aiPromptbausteine);
// return MapperFactory.AiPromptbausteinTree.MapToNewDCs(aiPromptbausteine);
//}
//public Dictionary<long, long> UpdateAiPromptbausteine(IEnumerable<AiPromptbausteinTreeDC> aiPromptbausteinDCs)
//{
// throw new System.NotImplementedException();
//}
//public void DeleteAiPromptbausteine(Dictionary<long, long> oid2version)
//{
// throw new System.NotImplementedException();
//}
public IEnumerable<AiPromptbausteinDC> GetAiPromptbausteine()
{
var aiPromptbausteine = MapperFactory.AiPromptbausteinTree.MapToNewEntities(aiPromptbausteinDcs);
var allAiPromptbausteine = DAOFactory.GenericDAO.GetAll<AiPromptbaustein>();
MapperFactory.AiPromptbausteinDC_AiPromptbaustein.CreateDcList(allAiPromptbausteine);
//var dc = new AiPromptbausteinTreeDC();
//dc.Oid = 1;
//dc.IsParent = false;
//dc.Version = 1;
//dc.Text = "Beispiel";
throw new NotImplementedException();
}
public IEnumerable<AiPromptbausteinDC> CreateAiPromptbausteine(IEnumerable<AiPromptbausteinDC> aiPromptbausteinDcs)
{
var aiPromptbausteine = MapperFactory.AiPromptbausteinDC_AiPromptbaustein.MapToNewEntities(aiPromptbausteinDcs);
DAOFactory.GenericDAO.Insert(aiPromptbausteine);
return MapperFactory.AiPromptbausteinTree.MapToNewDCs(aiPromptbausteine);
return MapperFactory.AiPromptbausteinDC_AiPromptbaustein.MapToNewDCs(aiPromptbausteine);
}
public Dictionary<long, long> UpdateAiPromptbausteine(IEnumerable<AiPromptbausteinTreeDC> aiPromptbausteinDCs)
public Dictionary<long, long> UpdateAiPromptbausteine(IEnumerable<AiPromptbausteinDC> aiPromptbausteinDCs)
{
throw new System.NotImplementedException();
}

View File

@@ -70,18 +70,38 @@ namespace BeWo.Service.ServiceContracts.Enhanced
[FaultContract(typeof(BeWoFault))]
[OperationContract]
[RequireWcfAuthorization(UserRightType.AiModulePromptbausteineView)]
IEnumerable<AiPromptbausteinTreeDC> GetAiPromptbausteine();
IEnumerable<AiPromptbausteinTreeDC> GetAiPromptbausteineTree();
//[FaultContract(typeof(BeWoFault))]
//[OperationContract]
//[RequireWcfAuthorization(UserRightType.AiModulePromptbausteineAdd)]
//IEnumerable<AiPromptbausteinTreeDC> CreateAiPromptbausteineTree(IEnumerable<AiPromptbausteinTreeDC> aiPromptbausteinDC);
//[FaultContract(typeof(BeWoFault))]
//[OperationContract]
//[RequireWcfAuthorization(UserRightType.AiModulePromptbausteineEdit)]
//Dictionary<long, long> UpdateAiPromptbausteineTree(IEnumerable<AiPromptbausteinTreeDC> aiPromptbausteinDCs);
//[FaultContract(typeof(BeWoFault))]
//[OperationContract]
//[RequireWcfAuthorization(UserRightType.AiModulePromptbausteineRemove)]
//void DeleteAiPromptbausteineTree(Dictionary<long, long> oid2version);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
[RequireWcfAuthorization(UserRightType.AiModulePromptbausteineView)]
IEnumerable<AiPromptbausteinDC> GetAiPromptbausteine();
[FaultContract(typeof(BeWoFault))]
[OperationContract]
[RequireWcfAuthorization(UserRightType.AiModulePromptbausteineAdd)]
IEnumerable<AiPromptbausteinTreeDC> CreateAiPromptbausteine(IEnumerable<AiPromptbausteinTreeDC> aiPromptbausteinDC);
IEnumerable<AiPromptbausteinDC> CreateAiPromptbausteine(IEnumerable<AiPromptbausteinDC> aiPromptbausteinDC);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
[RequireWcfAuthorization(UserRightType.AiModulePromptbausteineEdit)]
Dictionary<long, long> UpdateAiPromptbausteine(IEnumerable<AiPromptbausteinTreeDC> aiPromptbausteinDCs);
Dictionary<long, long> UpdateAiPromptbausteine(IEnumerable<AiPromptbausteinDC> aiPromptbausteinDCs);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
[RequireWcfAuthorization(UserRightType.AiModulePromptbausteineRemove)]

View File

@@ -4,6 +4,7 @@ using BeWo.Data.Security;
using BeWo.Service.Plugins;
using BeWo.Service.ServiceContracts.Enhanced;
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Feature.AI;
using BS.Shared.DataContracts.Feature.AI.Functions.ServiceRecords;
using System.Collections.Generic;
@@ -52,18 +53,30 @@ namespace BeWo.Service.ServiceImplementations.Enhanced
#endregion
#region Promptbausteine
public IEnumerable<AiPromptbausteinTreeDC> GetAiPromptbausteine()
public IEnumerable<AiPromptbausteinTreeDC> GetAiPromptbausteineTree()
=> GetAiPromptbausteineService().GetAiPromptbausteineTree();
//public IEnumerable<AiPromptbausteinTreeDC> CreateAiPromptbausteineTree(IEnumerable<AiPromptbausteinTreeDC> aiPromptbausteinDC)
// => GetAiPromptbausteineService().CreateAiPromptbausteine(aiPromptbausteinDC);
//public Dictionary<long, long> UpdateAiPromptbausteineTree(IEnumerable<AiPromptbausteinTreeDC> aiPromptbausteinDCs)
// => GetAiPromptbausteineService().UpdateAiPromptbausteine(aiPromptbausteinDCs);
//public void DeleteAiPromptbausteineTree(Dictionary<long, long> oid2version)
// => GetAiPromptbausteineService().DeleteAiPromptbausteine(oid2version);
public IEnumerable<AiPromptbausteinDC> GetAiPromptbausteine()
=> GetAiPromptbausteineService().GetAiPromptbausteine();
public IEnumerable<AiPromptbausteinTreeDC> CreateAiPromptbausteine(IEnumerable<AiPromptbausteinTreeDC> aiPromptbausteinDC)
public IEnumerable<AiPromptbausteinDC> CreateAiPromptbausteine(IEnumerable<AiPromptbausteinDC> aiPromptbausteinDC)
=> GetAiPromptbausteineService().CreateAiPromptbausteine(aiPromptbausteinDC);
public Dictionary<long, long> UpdateAiPromptbausteine(IEnumerable<AiPromptbausteinTreeDC> aiPromptbausteinDCs)
public Dictionary<long, long> UpdateAiPromptbausteine(IEnumerable<AiPromptbausteinDC> aiPromptbausteinDCs)
=> GetAiPromptbausteineService().UpdateAiPromptbausteine(aiPromptbausteinDCs);
public void DeleteAiPromptbausteine(Dictionary<long, long> oid2version)
=> GetAiPromptbausteineService().DeleteAiPromptbausteine(oid2version);
private AiPromptbausteineService GetAiPromptbausteineService()
{
return new AiPromptbausteineService();

View File

@@ -1,24 +0,0 @@
using System.Runtime.Serialization;
using BS.Shared.DataContracts.Compact;
namespace BS.Shared.DataContracts.Feature.AI
{
[DataContract]
public partial class AiPromptbausteinDC : BeWoDataContract
{
[DataMember] public string Displayname { get; set; }
[DataMember] public string Content { get; set; }
[DataMember] public ActivationTypeId ActivationType { get; set; }
[DataMember] public AiPromptbausteinType PromptbausteinType { get; set; }
[DataMember] public string Metadata { get; set; }
[DataMember] public AiActionType AiActionType { get; set; }
[DataMember] public CompactEmployeeDC Creator { get; set; }
[DataMember] public bool IsOnlyForCreator { get; set; }
[DataMember] public long ParentOid { get; set; }
[DataMember] public bool ShowUserPrompt { get; set; }
[DataMember] public bool ShowUserPromptByTenant { get; set; }
[DataMember] public int Position { get; set; }
[DataMember] public bool IsExpanded { get; set; }
}
}

View File

@@ -187,7 +187,6 @@
<Compile Include="DataContracts\AdminService\AdminServiceSumResponseDetailDC.cs" />
<Compile Include="DataContracts\AdminService\IAdminServiceDC.cs" />
<Compile Include="DataContracts\AdminService\AdminServiceSumReqDC.cs" />
<Compile Include="DataContracts\Feature\AI\AiPromptbausteinDC.cs" />
<Compile Include="DataContracts\Invoicing\GkvAbrechnung\GkvServerGetNumberRequestDC.cs" />
<Compile Include="DataContracts\Invoicing\GkvAbrechnung\GkvServerGetNumberResponseDC.cs" />
<Compile Include="DataContracts\Person2TeamDC.cs" />