コード例 #1
0
        /// <summary>
        /// Lists the asynchronous.
        /// </summary>
        /// <param name="filter">The filter.</param>
        /// <returns>
        /// the location report parameter list
        /// </returns>
        public async Task<ReconciliationReport> ListAsync(ReconciliationReportSearchParameters filter)
        {
            var reconciliationTask = this.reconciliationReportRepository.ListReconciliationReportAsync(filter);
            var reconciliationReport = new ReconciliationReport();

            reconciliationReport.GuestReconciliationReport = await reconciliationTask;
            var summaryOfShipCount = reconciliationReport.GuestReconciliationReport.SummaryOfShipCount;
            if (summaryOfShipCount != null)
            {
                reconciliationReport.ShipSummaryReportCollection.Add(
                    new ShipCountSummary
                    {
                        SystemType = "SeaNtry",
                        TotalOccupancy = !string.IsNullOrEmpty(summaryOfShipCount.TotalOccupancy) ? Convert.ToInt32(summaryOfShipCount.TotalOccupancy) : 0,
                        StatusCount = !string.IsNullOrEmpty(summaryOfShipCount.Onboard) ? Convert.ToInt32(summaryOfShipCount.Onboard) : 0,
                        NoShowCount = !string.IsNullOrEmpty(summaryOfShipCount.TotalOccupancy) ? Convert.ToInt32(summaryOfShipCount.TotalOccupancy) - Convert.ToInt32(summaryOfShipCount.Onboard) : 0
                    });

                reconciliationReport.ShipSummaryReportCollection.Add(
                    new ShipCountSummary
                    {
                        SystemType = "SPMS",
                        TotalOccupancy = !string.IsNullOrEmpty(summaryOfShipCount.TotalOccupancy) ? Convert.ToInt32(summaryOfShipCount.TotalOccupancy) : 0,
                        StatusCount = !string.IsNullOrEmpty(summaryOfShipCount.CheckedIn) ? Convert.ToInt32(summaryOfShipCount.CheckedIn) : 0,
                        NoShowCount = !string.IsNullOrEmpty(summaryOfShipCount.NotCheckedIn) ? Convert.ToInt32(summaryOfShipCount.NotCheckedIn) : 0
                    });
            }

            return reconciliationReport;
        }
コード例 #2
0
        public ReconciliationReport GetReconciliationReport(DateTime dateStart, DateTime dateEnd)
        {
            dateStart = dateStart.Date;
            dateEnd   = dateEnd.Date;
            var report = new ReconciliationReport()
            {
                DateStart = dateStart, DateEnd = dateEnd
            };

            report.Report = NativeSql.Exec("accountant_getReconciliationReport", new { dateStart, dateEnd, }).Rows <ReconciliationReportItemDa>();
            return(report);
        }
コード例 #3
0
        /// <summary>
        /// Maps the guest reconciliation search result.
        /// </summary>
        /// <param name="reconciliationData">The reconciliation data.</param>
        public void MapGuestReconciliationSearchResult(ReconciliationReport reconciliationData)
        {
            if (reconciliationData != null)
            {
                var shipSummary = reconciliationData.ShipSummaryReportCollection;
                var onboardGuestsData = reconciliationData.GuestReconciliationReport.OnboardGuests;
                var checkedInGuestsData = reconciliationData.GuestReconciliationReport.CheckedInGuests;
                if (shipSummary.Count > 0)
                {
                    this.shipSummaryReport = shipSummary;
                }

                if (onboardGuestsData.Count > 0)
                {
                    this.onboardGuests = onboardGuestsData;
                }

                if (checkedInGuestsData.Count > 0)
                {
                    this.checkedInGuests = checkedInGuestsData;
                }
            }
        }