Neue Version 3.31 erstellt
This commit is contained in:
@@ -43,12 +43,12 @@
|
||||
<TargetCulture>de-DE</TargetCulture>
|
||||
<ProductName>BeWoPlaner</ProductName>
|
||||
<PublisherName>ownSoft GmbH</PublisherName>
|
||||
<MinimumRequiredVersion>2.0.1.293</MinimumRequiredVersion>
|
||||
<MinimumRequiredVersion>2.0.1.294</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.htm</WebPage>
|
||||
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
|
||||
<TrustUrlParameters>true</TrustUrlParameters>
|
||||
<ApplicationRevision>294</ApplicationRevision>
|
||||
<ApplicationRevision>295</ApplicationRevision>
|
||||
<ApplicationVersion>2.0.1.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace BeWo
|
||||
public static LoginControl LoginControl;
|
||||
public static MainControl MainControl;
|
||||
|
||||
public static string ShortVersion = "3.30.2";
|
||||
public static string ShortVersion = "3.31";
|
||||
public static string Version => BeWoAppInfo.BeWoAppVersion.ToString();
|
||||
public static int RenderTier = 0;
|
||||
|
||||
|
||||
@@ -4048,30 +4048,7 @@
|
||||
FontSize="14"
|
||||
Foreground="#FFD2D2D2"
|
||||
Text="{Binding Path=Teams}" />
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Grid.Column="5"
|
||||
Margin="0,0,3,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="Microsoft Sans Serif"
|
||||
FontSize="12"
|
||||
Foreground="#FFD2D2D2">
|
||||
<TextBlock.Visibility>
|
||||
<Binding ConverterParameter="Employee" Path="IsDeleted">
|
||||
<Binding.Converter>
|
||||
<conv:AnonymizationRight2VisibilityConverter />
|
||||
</Binding.Converter>
|
||||
</Binding>
|
||||
</TextBlock.Visibility>
|
||||
<Hyperlink
|
||||
Click="Hyperlink_Employee_Anonymize_Click"
|
||||
Foreground="#FFF97E7B"
|
||||
Tag="{Binding}"
|
||||
TargetName="_NewWindow">
|
||||
Anonymisieren
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
|
||||
@@ -490,7 +490,7 @@ namespace BeWo.View.Document
|
||||
var filename = selectedFolder.Name;
|
||||
window.Close();
|
||||
|
||||
SaveRtfInBeWoFolder(defaultFolder, newRtfText, filename, objectTid, objectOid, folderSelectedAction);
|
||||
SaveRtfInBeWoFolder(selectedFolder, newRtfText, filename, objectTid, objectOid, folderSelectedAction);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -119,21 +119,7 @@
|
||||
Text="{Binding Path=MainAttendant}" />
|
||||
|
||||
<!-- Image x:Name="imgArchiv" Grid.Row="0" Grid.Column="2" Visibility="Collapsed" Grid.RowSpan="2" Source="..\Ressources\Icons\Archiv.png" Margin="0,0,5,0" Height="30" VerticalAlignment="Center" HorizontalAlignment="Stretch" Width="Auto" RenderTransformOrigin="0.5,0.5" / -->
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Grid.Column="4"
|
||||
Margin="0,0,3,0"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="{Binding Path=IsDeleted, Converter={StaticResource AnonymizationRight2VisibilityConverter}, ConverterParameter=Customer}">
|
||||
<Hyperlink
|
||||
Click="Hyperlink_Anonymize_Click"
|
||||
Foreground="#FFF97E7B"
|
||||
Tag="{Binding}"
|
||||
TargetName="_NewWindow">
|
||||
Anonymisieren
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
|
||||
@@ -191,7 +191,9 @@ namespace BeWo.Data.Security
|
||||
return "3.29";
|
||||
if (isRightVersion330(r))
|
||||
return "3.30";
|
||||
return BASE_VERSION;
|
||||
if (isRightVersion331(r))
|
||||
return "3.31";
|
||||
return BASE_VERSION;
|
||||
}
|
||||
|
||||
private static bool isRightVersion322(UserRightType r)
|
||||
@@ -240,5 +242,15 @@ namespace BeWo.Data.Security
|
||||
|| r == UserRightType.AiVoiceView;
|
||||
}
|
||||
|
||||
}
|
||||
private static bool isRightVersion331(UserRightType r)
|
||||
{
|
||||
return r == UserRightType.VorlagenEditAll
|
||||
|| r == UserRightType.VorlagenEditOwnTeams
|
||||
|| r == UserRightType.VorlagenViewAll
|
||||
|| r == UserRightType.VorlagenViewOwnTeams
|
||||
|| r == UserRightType.Customer_CreateMedication
|
||||
|| r == UserRightType.Customer_DeleteMedication;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "7185105541"; // Nous GmbH
|
||||
//t = "5022131330"; // Tabula Rasa
|
||||
//t = "4189934785"; // Landshuter Netzwerke
|
||||
t = "7584236951"; // Aachener Betreuungsbüro Kirschbaum und Manz GbR
|
||||
//t = "7584236951"; // Aachener Betreuungsbüro Kirschbaum und Manz GbR
|
||||
//t = "3678599942"; // VKM Rietberg
|
||||
//t = "4069072369"; // BeWo Dreilich&Pastor (Projekt TranskulturellesBBPastor)
|
||||
//t = "4160851689"; // BeWo Dreilich&Pastor (Dreilich)
|
||||
|
||||
@@ -78,12 +78,12 @@ namespace BeWo.Service.ServiceContracts
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
[RequireWcfAuthorization(UserRightType.UserView_Create)]
|
||||
[RequireWcfAuthorization(UserRightType.UserView_Create, UserRightType.CreateAll)]
|
||||
long InsertNewUser(UserDC pUser);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
[RequireWcfAuthorization(UserRightType.UserGroupView_Create)]
|
||||
[RequireWcfAuthorization(UserRightType.UserGroupView_Create, UserRightType.CreateAll)]
|
||||
long InsertNewUserGroup(UserGroupDC pUserGroup);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
|
||||
@@ -9116,9 +9116,8 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
try
|
||||
{
|
||||
//var resources = DAOFactory.GenericDAO.GetActiveByIDs<Resource>(resourceOids);
|
||||
var list = new List<InactivePersonDC>();
|
||||
return list;
|
||||
//return list;
|
||||
var sql = @"select null, p.Oid as personoid, p.FirstName, p.LastName, p.DateOfBirth, a.Street as Strasse, a.PostalCode as PLZ, a.Town as Ort, p.insts from person p
|
||||
left join address a on p.Addressoid = a.Oid
|
||||
where (p.isactive = 0 or p.isactive = 2) and (p.SystemEntryID is null || p.SystemEntryID != -1)
|
||||
@@ -9130,7 +9129,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
sql = @"select c.Oid, p.Oid as personoid, p.FirstName, p.LastName, p.DateOfBirth, a.Street as Strasse, a.PostalCode as PLZ, a.Town as Ort, p.insts from customer c
|
||||
join person p on c.PersonOid = p.Oid
|
||||
left join address a on p.Addressoid = a.Oid
|
||||
where (p.isactive = 0 or p.isactive = 2) and (p.SystemEntryID is null || p.SystemEntryID != -1)
|
||||
where (c.isactive = 0 or c.isactive = 2) and (c.SystemEntryID is null || c.SystemEntryID != -1)
|
||||
and c.insts < DATE_SUB(CURDATE(), INTERVAL yyyy YEAR);";
|
||||
}
|
||||
else if (tableId == TableID.Employee)
|
||||
@@ -9138,7 +9137,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
sql = @"select e.Oid, p.Oid as personoid, p.FirstName, p.LastName, p.DateOfBirth, a.Street as Strasse, a.PostalCode as PLZ, a.Town as Ort, p.insts from employee e
|
||||
join person p on e.PersonOid = p.Oid
|
||||
left join address a on p.Addressoid = a.Oid
|
||||
where (p.isactive = 0 or p.isactive = 2) and (p.SystemEntryID is null || p.SystemEntryID != -1)
|
||||
where (e.isactive = 0 or e.isactive = 2) and (e.SystemEntryID is null || e.SystemEntryID != -1)
|
||||
and e.insts < DATE_SUB(CURDATE(), INTERVAL yyyy YEAR)";
|
||||
}
|
||||
|
||||
@@ -9165,6 +9164,18 @@ namespace BeWo.Service.ServiceImplementations
|
||||
list.Add(ip);
|
||||
}
|
||||
|
||||
if (tableId == TableID.Customer)
|
||||
{
|
||||
list = FilterInactiveCustomers(jahreUngenutzt, list);
|
||||
}
|
||||
else if (tableId == TableID.Employee)
|
||||
{
|
||||
list = FilterInactiveCustomers(jahreUngenutzt, list);
|
||||
}
|
||||
else
|
||||
{
|
||||
list = FilterInactiveCustomers(jahreUngenutzt,list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -9173,12 +9184,114 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
private List<InactivePersonDC> FilterInactiveCustomers(int jahreUngenutzt, List<InactivePersonDC> list)
|
||||
{
|
||||
var newList = new List<InactivePersonDC>();
|
||||
var dict = list
|
||||
.Where(x => x.ObjectOid.HasValue)
|
||||
.ToDictionary(x => x.ObjectOid.Value, x => x);
|
||||
|
||||
//Hole alle Hilfepläne und prüfe, ob es noch einen aktiven gibt oder einen archivierten der jünger ist als die Frist
|
||||
var sql = @"select sc.Oid, sc.CustomerOid
|
||||
from supportconcept sc
|
||||
WHERE
|
||||
sc.CustomerOid in
|
||||
(select c.Oid from customer c
|
||||
where (c.isactive = 0 or c.isactive = 2) and (c.SystemEntryID is null || c.SystemEntryID != -1)
|
||||
and c.insts < DATE_SUB(CURDATE(), INTERVAL yyyy YEAR))";
|
||||
|
||||
|
||||
sql = sql.Replace("yyyy", jahreUngenutzt.ToString());
|
||||
|
||||
var sqlresult = DAOFactory.SearchDAO.GetSqlResult(sql);
|
||||
var oidlist = new List<long>();
|
||||
foreach (object[] row in sqlresult)
|
||||
{
|
||||
oidlist.Add((long)row[0]);
|
||||
}
|
||||
|
||||
var scList = DAOFactory.GenericDAO.LoadByIDs<SupportConcept>(oidlist).GroupBy(s => s.Customer.Oid.Value);
|
||||
|
||||
foreach (var item in scList)
|
||||
{
|
||||
foreach (var sc in item)
|
||||
{
|
||||
if (sc.IsActive == ActivationTypeId.Active)
|
||||
{
|
||||
//HP noch aktiv->raus aus Liste
|
||||
if (dict.ContainsKey(sc.Customer.Oid.Value))
|
||||
{
|
||||
dict.Remove(sc.Customer.Oid.Value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (sc.IsActive == ActivationTypeId.Archived)
|
||||
{
|
||||
//Prüfe ob Enddatum > Frist
|
||||
if (sc.EndDate.HasValue && sc.EndDate > DateTime.Now.AddYears(jahreUngenutzt * -1))
|
||||
{
|
||||
if (dict.ContainsKey(sc.Customer.Oid.Value))
|
||||
{
|
||||
dict.Remove(sc.Customer.Oid.Value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//if (item.IsActive == ActivationTypeId.Active)
|
||||
//{
|
||||
// //HP noch aktiv->raus aus Liste
|
||||
// if (dict.ContainsKey(item.Customer.Oid.Value))
|
||||
// {
|
||||
// dict.Remove(item.Customer.Oid.Value);
|
||||
// }
|
||||
//}
|
||||
//else if (item.EndDate.HasValue)
|
||||
}
|
||||
|
||||
//Prüfe, ob es einen ServiceRecord gibt, der innerhalb der Frist entstanden ist
|
||||
sql = @"select sr.CustomerOid, max(sr.EndDate)
|
||||
from servicerecord sr
|
||||
WHERE
|
||||
sr.EndDate > DATE_SUB(CURDATE(), INTERVAL 10 YEAR) and
|
||||
sr.CustomerOid in
|
||||
(select c.Oid from customer c
|
||||
where (c.isactive = 0 or c.isactive = 2) and (c.SystemEntryID is null || c.SystemEntryID != -1)
|
||||
and c.insts < DATE_SUB(CURDATE(), INTERVAL yyyy YEAR))
|
||||
group by sr.CustomerOid";
|
||||
|
||||
|
||||
sql = sql.Replace("yyyy", jahreUngenutzt.ToString());
|
||||
|
||||
sqlresult = DAOFactory.SearchDAO.GetSqlResult(sql);
|
||||
oidlist = new List<long>();
|
||||
foreach (object[] row in sqlresult)
|
||||
{
|
||||
oidlist.Add((long)row[0]);
|
||||
}
|
||||
|
||||
foreach (var oid in oidlist)
|
||||
{
|
||||
//ServiceRecord der nach der innerhalb der letzten x Jahre entstanden ist -> Customer raus aus Liste
|
||||
if (dict.ContainsKey(oid))
|
||||
{
|
||||
dict.Remove(oid);
|
||||
}
|
||||
}
|
||||
return dict.Values.ToList();
|
||||
}
|
||||
|
||||
private bool CheckIfInactive(int jahreUngenutzt, InactivePersonDC item)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public String DeleteInactivePersons(List<InactivePersonDC> persons, bool anonymisieren)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
return "Diese Funktion ist zur Zeit noch in Bearbeitung. Wir arbeiten mit Hochdruck daran, die Funktionalität fertigzustellen.";
|
||||
String msg = "Die gewählten Personen wurden erfolgreich gelöscht.";
|
||||
TableID tid = TableID.Person;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user