SearchDAO und EmployeeKilometerauswertungsListRO - Erweiterung um auf Unterschriften QBs zugreifen zu können
This commit is contained in:
@@ -4149,14 +4149,29 @@ WHERE sc.Billable = 1 and sr.StartDate >= '{0:yyyy-MM-dd}' and sr.StartDate < '{
|
||||
// TODO 16.02.2021: Alias für EmployeeOid erstellen?
|
||||
public IList<ConfirmationReceiptSignature> GetConfirmationReceiptSignaturesByEmployee(long employeeOid, DateTimeSpan timeSpan)
|
||||
{
|
||||
var liste = CreateCriteria<ConfirmationReceiptSignature>()
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.SignatureType), SignatureType.Employee))
|
||||
.Add(Restrictions.Eq(nameof(BeWoEntityBase.IsActive), ActivationTypeId.Active))
|
||||
//.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.EmployeeOid), employeeOid))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.Employee), "e", JoinType.InnerJoin)
|
||||
.Add(Restrictions.Eq(nameof(BeWoEntityBase.Oid), employeeOid))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "s", JoinType.InnerJoin)
|
||||
.Add(CreateBetweenDateTimesCriterion(timeSpan.StartDateTime, timeSpan.EndDateTime, "s.Start", "s.End")).List<ConfirmationReceiptSignature>();
|
||||
|
||||
return liste;
|
||||
}
|
||||
|
||||
public IList<ConfirmationReceiptSignature> GetConfirmationReceiptSignaturesByEmployeeInTimeSpan(long employeeOid, DateTimeSpan timeSpan)
|
||||
{
|
||||
var start = timeSpan.StartDate;
|
||||
var end = timeSpan.EndDate;
|
||||
|
||||
var timeSpanCriterion = CreateBetweenDateTimesCriterion(start, end, $"serviceRecord.{nameof(ServiceRecord.Start)}", $"serviceRecord.{nameof(ServiceRecord.End)}");
|
||||
var liste = CreateCriteria<ConfirmationReceiptSignature>()
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.SignatureType), SignatureType.Employee))
|
||||
.Add(Restrictions.Eq(nameof(BeWoEntityBase.IsActive), ActivationTypeId.Active))
|
||||
//.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.EmployeeOid), employeeOid))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.Employee), "e", JoinType.InnerJoin)
|
||||
.Add(Restrictions.Eq(nameof(BeWoEntityBase.Oid), employeeOid))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "s", JoinType.InnerJoin)
|
||||
.Add(CreateBetweenDateTimesCriterion(timeSpan.StartDateTime, timeSpan.EndDateTime, "s.Start", "s.End")).List<ConfirmationReceiptSignature>();
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "serviceRecord")
|
||||
.Add(Restrictions.Eq($"serviceRecord.{nameof(ServiceRecord.EmployeeOid)}", employeeOid))
|
||||
.Add(timeSpanCriterion).List<ConfirmationReceiptSignature>();
|
||||
|
||||
return liste;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
@@ -79,6 +80,10 @@ namespace BeWo.Report.ReportObjects
|
||||
|
||||
public String TotalCustom1 { get; set; }
|
||||
|
||||
public Bitmap EmployeeSignature { get; set; }
|
||||
|
||||
public DateTime? EmployeeSignatureDate { get; set; }
|
||||
|
||||
public Employee2EmployeeKilometerauswertungsEntry(CompactEmployeeDC employee, IEnumerable<ServiceRecord> serviceRecords)
|
||||
{
|
||||
Employee = employee;
|
||||
|
||||
Reference in New Issue
Block a user