Neue Client Version ausgeliefert mit diversen Bugfixes (Rechte für KI angepasst, Prüfung von HPs beim Speichern, PIN aktiviert)

This commit is contained in:
2026-03-13 15:13:24 +01:00
parent d4300003bd
commit 9df422a01a
10 changed files with 217 additions and 59 deletions

View File

@@ -43,12 +43,12 @@
<TargetCulture>de-DE</TargetCulture>
<ProductName>BeWoPlaner</ProductName>
<PublisherName>ownSoft GmbH</PublisherName>
<MinimumRequiredVersion>2.0.1.290</MinimumRequiredVersion>
<MinimumRequiredVersion>2.0.1.292</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<TrustUrlParameters>true</TrustUrlParameters>
<ApplicationRevision>291</ApplicationRevision>
<ApplicationRevision>293</ApplicationRevision>
<ApplicationVersion>2.0.1.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>

View File

@@ -138,7 +138,7 @@
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="0" Content="Bemerkungen:" />
<dxre:RichEditControl x:Name="richEditControl1" Grid.Column="0" Grid.Row="1" Height="300" Width="1000" CommandBarStyle="Empty" ActiveViewType="Simple" ShowBorder="False" HorizontalAlignment="Stretch" Margin="3" VerticalAlignment="Stretch" Content="{Binding RTFNotice, Converter={StaticResource rtfToContentConverter}}"/>
<dxre:RichEditControl x:Name="richEditControl1" Grid.Column="0" Grid.Row="1" Height="300" Width="1000" CommandBarStyle="Empty" ActiveViewType="Simple" ShowBorder="False" HorizontalAlignment="Stretch" Margin="3" VerticalAlignment="Stretch" Content="{Binding RTFNotice, Converter={StaticResource rtfToContentConverter}}" ReadOnly="True"/>
</Grid>
</Grid>

View File

@@ -101,7 +101,7 @@ namespace BeWo.ViewModel
{(r) => r == UserRightType.SupportConcept_ImportData, BeWoApp.AppSettings.ShowPersehImport},
//{(r) => r == UserRightType.AiChatInZeiterfassung, BeWoApp.AppSettings.ShowAI},
{IsAiModuleRight, BeWoApp.AppSettings.ShowAI},
{IsAiModuleSettingRight, BeWoApp.AppSettings.ModuleAiSettingsEnabled},
//{IsAiModuleSettingRight, BeWoApp.AppSettings.ModuleAiSettingsEnabled},
{(r) => r == UserRightType.AiVoiceView, BeWoApp.AppSettings.ShowAIVoice},
};
@@ -290,8 +290,8 @@ namespace BeWo.ViewModel
private static bool IsAiModuleRight(UserRightType right) =>
ContainsRight(right, UserRightType.AiModuleServiceRecordChat, UserRightType.AiModuleServiceRecordDocu, UserRightType.AiModulePromptbausteineEdit,
UserRightType.AiModulePromptbausteineView, UserRightType.AiModulePromptbausteinShare, UserRightType.AiVoiceView);
private static bool IsAiModuleSettingRight(UserRightType right) =>
ContainsRight(right);
//private static bool IsAiModuleSettingRight(UserRightType right) =>
// ContainsRight(right);
private static bool ContainsRight(UserRightType right, params UserRightType[] rightTypes)
{

View File

@@ -195,8 +195,6 @@ namespace BeWo.Data.Security
return "3.29";
if (isRightVersion330(r))
return "3.30";
if (isRightVersion3301(r))
return "3.30.1";
return BASE_VERSION;
}
@@ -240,14 +238,11 @@ namespace BeWo.Data.Security
//|| r == UserRightType.AiModulePromptbausteineSeeAll
|| r == UserRightType.AiModulePromptbausteineView
//|| r == UserRightType.AiModulePromptbausteineExecute
|| r == UserRightType.AiModulePromptbausteinShare
|| r == UserRightType.AiModuleServiceRecordChat
|| r == UserRightType.AiModuleServiceRecordDocu
|| r == UserRightType.AiVoiceView;
}
private static bool isRightVersion3301(UserRightType r)
{
return r == UserRightType.AiModulePromptbausteinShare ||
r == UserRightType.AiModuleServiceRecordChat ||
r == UserRightType.AiModuleServiceRecordDocu;
}
}
}

View File

@@ -11,6 +11,9 @@ namespace BeWo.Report.DefaultReports
{
public partial class FLSSollIstWeeklyReport : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<FLSSollIstReportRO>
{
private Dictionary<String, decimal> summeIstNachWochenString = new Dictionary<String, decimal>();
private Dictionary<String, decimal> diffNachWochenString = new Dictionary<String, decimal>();
public FLSSollIstWeeklyReport()
{
InitializeComponent();
@@ -27,12 +30,35 @@ namespace BeWo.Report.DefaultReports
wochen = pRO.RootObjectList[0].Groups[0].WochenSummen;
}
}
//Berechne Wochen Ist Gesamt
foreach (var ro in pRO.RootObjectList)
{
foreach (var grp in ro.Groups)
{
foreach (var woche in grp.WochenSummen)
{
String key = GetWochenKey(woche);
if (!summeIstNachWochenString.ContainsKey(key))
{
summeIstNachWochenString.Add(key, 0);
diffNachWochenString.Add(key, (woche.SollStunden ?? 0) * -1);
}
summeIstNachWochenString[key] += woche.IstStunden ?? 0;
diffNachWochenString[key] += woche.IstStunden ?? 0;
}
}
}
CreateTableCells(wochen);
this.bindingSource1.DataSource = pRO;
}
private String GetWochenKey(FLSSollIstReportRO.FLSSollIstWochenSummen woche)
{
return String.Format("KW {0}, {1:dd.MM.yy} - {2:dd.MM.yy}", woche.KalenderWoche, woche.WocheStart, woche.WocheEnde);
}
private void CreateTableCells(List<FLSSollIstReportRO.FLSSollIstWochenSummen> wochen)
{
xrTableHeader.BeginInit();
@@ -175,9 +201,19 @@ namespace BeWo.Report.DefaultReports
{
if (tag.Contains("Gesamt"))
{
var key = GetWochenKey(ws);
if (tag.Contains("Ist"))
{
cell.Text = String.Format("{0:0.00}", ws.IstStunden);
{
if (summeIstNachWochenString.ContainsKey(key))
{
cell.Text = String.Format("{0:0.00}", summeIstNachWochenString[key]);
}
else
{
cell.Text = String.Format("{0:0.00}", ws.IstStunden);
}
}
else if (tag.Contains("Soll"))
{
@@ -185,9 +221,15 @@ namespace BeWo.Report.DefaultReports
}
else if (tag.Contains("Diff"))
{
cell.Text = String.Format("{0:0.00}", ws.Differenz);
decimal diff = ws.Differenz ?? 0;
if (ws.Differenz < 0)
if (diffNachWochenString.ContainsKey(key))
{
diff = diffNachWochenString[key];
}
cell.Text = String.Format("{0:0.00}", diff);
if (diff < 0)
{
cell.ForeColor = System.Drawing.Color.Red;
}

View File

@@ -170,7 +170,7 @@ namespace BeWo.Service.Plugins
//t = "7803602698"; // Taubblindendienst
//t = "5518600303"; // Wetterleuchten e.V.
//t = "4096649015"; // AWO Dortmund
//t = "3614251071"; // Pusteblume
t = "3614251071"; // Pusteblume
//t = "7755740484"; // Sawo
//t = "8275654834"; // Twg Jonathan
//t = "6586058528"; // Freundeskreis Suchtkrankenhilfe e.V. (FFS)
@@ -427,7 +427,8 @@ namespace BeWo.Service.Plugins
//st = "6095094585"; // IBAHS e.V.
//t = "9453919144"; // Beratung am Stadtwald - Lisa Maria Reeh
//t = "5960095273"; // Flexible Jugendarbeit Frankfurt (Oder) e.V.
t = "6664235818"; // PariMobil gGmbH Krefeld
//t = "6664235818"; // PariMobil gGmbH Krefeld
return t;
#else
if (MultitenancyOperationContextExt.Current != null)

View File

@@ -35,7 +35,7 @@ namespace BeWo.Service.Plugins
{
if (!containsDatumCheck)
{
var val = CheckDate(c2s.StartDate, c2s.EndDate);
var val = CheckDate(c2s.StartDate, c2s.EndDate, c2s, null);
if (val != null)
{
result.Add(val);
@@ -48,7 +48,7 @@ namespace BeWo.Service.Plugins
{
if (!containsDatumCheck)
{
val = CheckDate(ap.StartDate, ap.EndDate);
val = CheckDate(ap.StartDate, ap.EndDate, c2s, ap);
if (val != null)
{
result.Add(val);
@@ -66,12 +66,17 @@ namespace BeWo.Service.Plugins
return result;
}
private ValidationResultDC CheckDate(DateTime? start, DateTime? end)
private ValidationResultDC CheckDate(DateTime? start, DateTime? end, SupportConceptCostBearerRelDC c2s, SupportConceptApprovalPeriodDC scap)
{
if (start.HasValue && end.HasValue && start > end)
{
ValidationResultDC resultDc = new ValidationResultDC();
resultDc.Message = "Das Startdatum darf nicht größer als das Enddatum sein.";
if (scap == null)
{
}
resultDc.AllowSave = false;
return resultDc;
}

View File

@@ -0,0 +1,114 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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 NHibernate.Linq;
namespace BeWo.Service.Reporting.Straffaelligenhilfe
{
public class StatisticBase
{
protected DateTime StartDate { get; set; }
protected DateTime EndDate { get; set; }
protected Dictionary<long, Customer> CustomerByOid { get; set; }
public virtual List<AnnualReportDC> CreateStatistic(DateTime startDate, DateTime endDate)
{
StartDate = startDate;
EndDate = endDate;
CustomerByOid = new Dictionary<long, Customer>();
var reports = new List<AnnualReportDC>();
LoadData();
Dictionary<long, int> customerOid2Days = new Dictionary<long, int>();
StringBuilder sb = new StringBuilder();
foreach (var customerOid in CustomerByOid.Keys)
{
Customer customer = CustomerByOid[customerOid];
ProcessCustomer(customer);
}
return reports;
}
public virtual void LoadData()
{
foreach (var customer in DAOFactory.GenericDAO.GetAllActiveAndArchived<Customer>())
{
if (ShouldProcessCustomer(customer))
{
if (!CustomerByOid.ContainsKey(customer.Oid.Value))
{
CustomerByOid.Add(customer.Oid.Value, customer);
}
}
}
}
public virtual void ProcessCustomer(Customer customer)
{
}
public virtual bool ShouldProcessCustomer(Customer customer)
{
if (customer .IsActive != ActivationTypeId.Deleted)
{
//if (CustomerBelongsToTeam(customer, TeamOid) &&
// IsCustomerOfCustomerCareType(customer, CustomerCareTypeValueListEntryOid))
//{
return true;
//}
}
return false;
}
public virtual bool IsCustomerOfCustomerCareType(Customer customer, long? customerCareTypeValueListEntryOid)
{
bool val = true;
if (customerCareTypeValueListEntryOid.HasValue)
{
val = false;
foreach (var v in customer.ValueList)
{
if (v.Entry.Type == ValueListEntryType.CustomerCareType && v.Entry.Oid == customerCareTypeValueListEntryOid)
return true;
}
}
return val;
}
public virtual bool CustomerBelongsToTeam(Customer customer, long? teamOid)
{
bool val = true;
if (teamOid.HasValue)
{
val = false;
foreach (var t2c in customer.Team2CustomerList)
{
if (t2c.TeamOid == teamOid)
return true;
}
}
return val;
}
}
}

View File

@@ -515,6 +515,7 @@
<Compile Include="Reporting\JahresBerichtNachAlter.cs" />
<Compile Include="Reporting\AnnualReportFilter.cs" />
<Compile Include="Reporting\AnnualReportFactory.cs" />
<Compile Include="Reporting\Straffaelligenhilfe\AnnualReportFactory.cs" />
<Compile Include="SBD\VertretungsAlgorithmus.cs" />
<Compile Include="SBD\VertretungsManager.cs" />
<Compile Include="Security\SecurityBehaviorExtension.cs" />

View File

@@ -460,45 +460,43 @@ namespace BeWo.Service.ServiceImplementations
if (sha256 == "B2-FF-FF-CA-3E-DD-8F-8C-10-5A-05-C7-1F-EB-09-AF-3B-9B-DF-C7-B7-C2-6D-CC-34-56-17-DD-F3-28-B5-B1")
{
//Hier einkommentieren wenn PIN aktiviert werden soll
//Hier einkommentieren wenn PIN aktiviert werden soll
//if (!String.IsNullOrEmpty(pPIN) && pPIN.IndexOf('_') >= 0)
//{
// pin = pPIN.Substring(0, pPIN.IndexOf('_'));
// computerName = pPIN.Substring(pPIN.IndexOf('_') + 1);
//}
//var pins = DAOFactory.GenericDAO.GetAll<SupportPin>();
//var y = pins.Where(p => p.Pin.Equals(pin)).ToList();
if (!String.IsNullOrEmpty(pPIN) && pPIN.IndexOf('_') >= 0)
{
pin = pPIN.Substring(0, pPIN.IndexOf('_'));
computerName = pPIN.Substring(pPIN.IndexOf('_') + 1);
}
var pins = DAOFactory.GenericDAO.GetAll<SupportPin>();
var y = pins.Where(p => p.Pin.Equals(pin)).ToList();
//if (y.Count == 0)
//{
// result = UserValidationResult.IncorrectPin;
// valid = false;
//}
//else
//{
// supportPIN = y[0];
// if (supportPIN.IsUsed.Value ||
// supportPIN.ExpirationDate < DateTime.Now ||
// supportPIN.UsingDate != null)
// {
// if (supportPIN.IsUsed.HasValue && supportPIN.IsUsed.Value)
// result = UserValidationResult.PinAlreadyUsed;
// else if (supportPIN.ExpirationDate < DateTime.Now)
// result = UserValidationResult.PinExpired;
// valid = false;
// }
// else
// {
// supportPIN.IsUsed = true;
// supportPIN.UsingDate = DateTime.Now;
// supportPIN.Notice = computerName;
// }
//}
if (y.Count == 0)
{
result = UserValidationResult.IncorrectPin;
valid = false;
}
else
{
supportPIN = y[0];
if (supportPIN.ExpirationDate < DateTime.Now)
{
//if (supportPIN.IsUsed.HasValue && supportPIN.IsUsed.Value)
// result = UserValidationResult.PinAlreadyUsed;
//else if (supportPIN.ExpirationDate < DateTime.Now)
result = UserValidationResult.PinExpired;
valid = false;
}
else
{
supportPIN.IsUsed = true;
supportPIN.UsingDate = DateTime.Now;
supportPIN.Notice = computerName;
}
}
//Bis hier einkommentieren
}
//Bis hier einkommentieren
}
}
if (!result.HasValue)
@@ -846,6 +844,8 @@ namespace BeWo.Service.ServiceImplementations
{
try
{
//pSupportPin.ExpirationDate = DateTime.Now.AddDays(3);
var lSupportPin = MapperFactory.SupportPinDC_SupportPin.MapToNewEntity(pSupportPin);
DAOFactory.GenericDAO.Insert(lSupportPin);
return lSupportPin.Oid.Value;