71 lines
1.9 KiB
C#
71 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
using BeWo.Data.Access;
|
|
using BeWo.Data.Entities;
|
|
using BeWo.Service.DCEntityMapper;
|
|
|
|
using BS.Shared;
|
|
using BS.Shared.Core;
|
|
using BS.Shared.DataContracts;
|
|
using BS.Shared.DataContracts.Compact;
|
|
using BS.Shared.Extensions;
|
|
using BS.Shared.Services;
|
|
using BeWo.Service.Configuration;
|
|
using BeWo.Service.Plugins;
|
|
|
|
namespace SynpraxReports
|
|
{
|
|
public class CustomSupportConceptAnalysisCreator : SupportConceptAnalysisCreator
|
|
{
|
|
public override List<SupportConceptOverviewDC> GetSupportConceptAnalysis2(IList<long> c2sOids, long? employeeOid, long? teamOid, long? catOid, DateTime? startDate, DateTime? endDate,
|
|
int? expiredMonths, bool showArchivedScs)
|
|
{
|
|
|
|
var liste = base.GetSupportConceptAnalysis2(c2sOids, employeeOid, teamOid, catOid, startDate, endDate, expiredMonths, showArchivedScs);
|
|
|
|
; DateTime dt = DateTime.Now;
|
|
if (endDate.HasValue)
|
|
{
|
|
dt = endDate.Value;
|
|
}
|
|
List<SupportConceptOverviewDC> result = new List<SupportConceptOverviewDC>();
|
|
|
|
|
|
foreach (var dc in liste)
|
|
{
|
|
DateTime startdate = DateTime.MinValue;
|
|
DateTime enddate = DateTime.MaxValue;
|
|
|
|
if (dc.ApprovedStartDate.HasValue)
|
|
{
|
|
startdate = dc.ApprovedStartDate.Value;
|
|
|
|
}
|
|
else if (dc.RequestedStartDate.HasValue)
|
|
{
|
|
startdate = dc.RequestedStartDate.Value;
|
|
}
|
|
|
|
if (dc.ApprovedEndDate.HasValue)
|
|
{
|
|
enddate = dc.ApprovedEndDate.Value;
|
|
|
|
}
|
|
else if (dc.RequestedEndDate.HasValue)
|
|
{
|
|
enddate = dc.RequestedEndDate.Value;
|
|
}
|
|
|
|
if (startdate <= dt && dt <= enddate)
|
|
{
|
|
result.Add(dc);
|
|
}
|
|
|
|
}
|
|
|
|
return result;
|
|
}
|
|
}
|
|
} |