using System;
using System.Collections.Generic;
using System.ServiceModel;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.DataContracts.Reports;

namespace BeWo.Service.ServiceContracts
{
    [ServiceContract]
    public interface IAnalysisService
    {
        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        List<AuslastungAnalysisRootDC> GetAuslastungAnalysis(DateTime? startDate, DateTime? endDate, long? employeeOid, long? teamOid);

        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        List<AccountingAnalysisDC> GetAccountingAnalysis(DateTimeSpan pSpan);

        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        List<FLSAnalysisRootDC> GetCostBearerFLSAnalysis(DateTime? startDate, DateTime? endDate, bool fetchServiceRecordNotice, List<long> goalOids);

        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        List<FLSAnalysisRootDC> GetTeamFLSAnalysis(DateTime? startDate, DateTime? endDate, bool fetchServiceRecordNotice, List<long> goalOids, List<long> teamOids);

        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        List<FLSAnalysisRootDC> GetCustomerFLSAnalysis(DateTime? startDate, DateTime? endDate, bool fetchApprovedFLS, bool fetchServiceRecordNotice, long? employeeOid, List<long> goalOids);

        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        List<FLSAnalysisRootDC> GetCustomerFLSAnalysisForCustomer(long customerOid, DateTime? startDate, DateTime? endDate, bool fetchApprovedFLS, bool fetchServiceRecordNotice, long? employeeOid, List<long> goalOids);

        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        List<FLSAnalysisRootDC> GetEmployeeFLSAnalysis(DateTime? startDate, DateTime? endDate, bool fetchApprovedFLS, bool fetchServiceRecordNotice, long? customerOid, List<long> goalOids, String text1, String text2, String text3, String text4, String text5);

        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        List<FLSAnalysisRootDC> GetEmployeeFLSAnalysisForEmployee(long employeeOid, DateTime? startDate, DateTime? endDate, bool fetchApprovedFLS, bool fetchServiceRecordNotice, long? customerOid, List<long> goalOids);

		[FaultContract(typeof(BeWoFault))]
		[OperationContract]
		List<FLSAnalysisRootDC> GetFLSAnalysis(FLSAnalysisConfigDC config);
		
        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        List<CompactSupportConceptDC> GetExpiringSupportConcepts(long? employeeOid, DateTime expiredUntil);

        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        List<LoginDC> GetLastLogins(string loginName);

        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        List<FinanceOverviewItemDC> GetOutstandingReceivables(bool showOnlyOutstanding, bool showOnlyArchivedSCs);

        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        List<CompactPersonDC> GetPersonsHavingBirthday(DateTime birthdayUntil);

        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        List<SupportConceptOverviewDC> GetSupportConceptAnalysis(long? currentEmployeeOid, bool showOnlyRelatedSCs, bool showOnlyArchivedSCs, DateTime? appointedDate);

        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        List<CompactSupportConceptDC> GetSupportConceptsWithConferenceDate(long? employeeOid, DateTime conferenceDateUntil);

        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        List<TaskDC> GetTasksForEmployee(long employeeOid);

        [FaultContract(typeof (BeWoFault))]
        [OperationContract]
        List<AnnualReportDC> CreateAnnualReport(long? costbearerOid, long? teamOid, long? customerCareTypeValueListEntryOid, DateTime startDate, DateTime endDate);

        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        AccountingReportDC CreateAccountingReport(DateTime start, DateTime end);

        [FaultContract(typeof(BeWoFault))]
        [OperationContract]
        List<TaskDC> GetTasksForEmployeeByDate(long employeeOid, DateTime date);
    }
}