예제 #1
0
        public Task <string> GetEvaluationReport(string keyValue)
        {
            var entity          = _service.FindEntity(keyValue);
            var patient         = _uow.GetRepository <PatientEntity>().FindEntity(entity.F_Pid);
            var fBusinessObject = new List <Category>();
            var category        = new Category()
            {
                Name        = patient.F_Name,
                Age         = patient.F_BirthDay == null ? "" : ((int)(DateTime.Now - (DateTime)patient.F_BirthDay).TotalDays / 365).ToString() + "岁",
                CreateDate  = entity.F_CreatorTime,
                Dept        = "",
                No          = patient.F_DialysisNo,
                Gender      = patient.F_Gender,
                Evaluations = new List <EvaluationEntity> {
                    entity
                }
            };

            fBusinessObject.Add(category);
            string reportFilePath = FileHelper.MapPath("\\ReportFiles\\Evaluation.frx");
            string dataSetName    = "Categories";
            string exportFormat   = "html";

            return(Task.FromResult(FastReportHelper.GetReportString(reportFilePath, dataSetName, fBusinessObject, exportFormat)));
        }
예제 #2
0
        public async Task <string> GetEvaluationReport(string keyValue)
        {
            var entity = await _service.FindEntityAsync(keyValue);

            var patient = await _uow.GetRepository <PatientEntity>().FindEntityAsync((object)entity.F_Pid);

            List <Category> FBusinessObject;

            FBusinessObject = new List <Category>();
            Category category = new Category()
            {
                Name        = patient.F_Name,
                Age         = patient.F_BirthDay == null ? "" : ((int)(DateTime.Now - (DateTime)patient.F_BirthDay).TotalDays / 365).ToString() + "岁",
                CreateDate  = entity.F_CreatorTime,
                Dept        = "",
                No          = patient.F_DialysisNo,
                Gender      = patient.F_Gender,
                Evaluations = new List <EvaluationEntity> {
                    entity
                }
            };

            FBusinessObject.Add(category);
            string reportFilePath = Path.Combine(AppConsts.AppRootPath, "upload", "reportfiles", "Evaluation.frx");
            string dataSetName    = "Categories";
            string exportFormat   = "html";

            return(FastReportHelper.GetReportString(reportFilePath, dataSetName, FBusinessObject, exportFormat));
        }
예제 #3
0
        public string GetImageReport(List <ProcessSummeryInfo> processSummeryInfos)
        {
            var reportFilePath = Path.Combine(AppConsts.AppRootPath, "upload", "reportfiles", "MachineProcess.frx");// FileHelper.MapPath("\\ReportFiles\\MachineProcess.frx");
            var dataSetName    = "ProcessSummeryInfo";
            var exportFormat   = "html";

            return(FastReportHelper.GetReportString(reportFilePath, dataSetName, processSummeryInfos, exportFormat));
        }
예제 #4
0
        private string GetBillReport(List <FeeCategory> categories)
        {
            var reportFilePath = Path.Combine(AppConsts.AppRootPath, "ReportFiles", "Bill.frx");
            var dataSetName    = "FeeCategories";
            var exportFormat   = "html";

            return(FastReportHelper.GetReportString(reportFilePath, dataSetName, categories, exportFormat));
        }
예제 #5
0
        /// <summary>
        /// 打印护士核对卡片
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        public Task <string> GetDialysisCheckImage(List <DialysisCheckRecord> data)
        {
            var          reportFilePath = Path.Combine(AppConsts.AppRootPath, "upload", "reportfiles", "DialysisCheckRecord.frx");// FileHelper.MapPath("\\ReportFiles\\DialysisCheckRecord.frx");
            const string dataSetName    = "DialysisCheckRecord";
            const string exportFormat   = "html";

            return(Task.FromResult(FastReportHelper.GetReportString(reportFilePath, dataSetName, data, exportFormat)));
        }
예제 #6
0
        /// <summary>
        /// 打印透前记录单
        /// </summary>
        /// <param name="categories"></param>
        /// <returns></returns>
        public Task <string> GetRecordReportTQ(List <Category> categories)
        {
            var          reportFilePath = Path.Combine(AppConsts.AppRootPath, "upload", "reportfiles", "DialysisRecordTQ.frx"); //FileHelper.MapPath("\\ReportFiles\\DialysisRecordTQ.frx");
            const string dataSetName    = "Categories";
            const string exportFormat   = "html";

            return(Task.FromResult(FastReportHelper.GetReportString(reportFilePath, dataSetName, categories, exportFormat)));
        }
예제 #7
0
        public Task <string> GetStorageLogReport(List <StorageCategory> categories)
        {
            string reportFilePath = Path.Combine(AppConsts.AppRootPath, "upload", "reportfiles", "StorageLog.frx");; //FileHelper.MapPath("\\ReportFiles\\StorageLog.frx");
            string dataSetName    = "StorageCategories";
            string exportFormat   = "html";

            return(Task.FromResult(FastReportHelper.GetReportString(reportFilePath, dataSetName, categories, exportFormat)));
        }
예제 #8
0
        public string GetImageReport(List <MachineInfo> machineInfos)
        {
            var reportFilePath = Path.Combine(AppConsts.AppRootPath, "upload", "reportfiles", "MachineDisinfection.frx");
            var dataSetName    = "MachineInfo";
            var exportFormat   = "html";

            return(FastReportHelper.GetReportString(reportFilePath, dataSetName, machineInfos, exportFormat));
        }
예제 #9
0
        /// <summary>
        /// 生成FastReport报告
        /// </summary>
        /// <param name="category"></param>
        /// <returns></returns>
        public string GetImageReport(MachineDisinfectionCategory category)
        {
            var reportFilePath =
                Path.Combine(AppConsts.AppRootPath, "upload", "reportfiles", "MachineDisinfection.frx");//FileHelper.MapPath("\\ReportFiles\\MachineDisinfection.frx");
            var dataSetName  = "Categories";
            var exportFormat = "html";

            return(FastReportHelper.GetReportString(reportFilePath, dataSetName, category.MachineInfos, exportFormat));
        }
예제 #10
0
        public string GetReport(WaterMLog waterMLog)
        {
            var FBusinessObject = new List <WaterMLog>
            {
                waterMLog
            };
            var reportFilePath = Path.Combine(AppConsts.AppRootPath, "upload", "reportfiles", "WaterMLog.frx");//FileHelper.MapPath("\\ReportFiles\\WaterMLog.frx");
            var dataSetName    = "WaterMLog";
            var exportFormat   = "html";

            return(FastReportHelper.GetReportString(reportFilePath, dataSetName, FBusinessObject, exportFormat));
        }
예제 #11
0
        /// <summary>
        /// 打印透前准备清单
        /// </summary>
        /// <param name="dialysisPrepare"></param>
        /// <returns></returns>
        public Task <string> GetPrepareReport(DialysisPrepare dialysisPrepare)
        {
            var fBusinessObject = new List <DialysisPrepare>
            {
                dialysisPrepare
            };
            var          reportFilePath = Path.Combine(AppConsts.AppRootPath, "upload", "reportfiles", "DialysisPrepare.frx"); //FileHelper.MapPath("\\ReportFiles\\DialysisPrepare.frx");
            const string dataSetName    = "DialysisPrepare";
            const string exportFormat   = "html";

            return(Task.FromResult(FastReportHelper.GetReportString(reportFilePath, dataSetName, fBusinessObject, exportFormat)));
        }
예제 #12
0
        public MemoryStream GenPDFFile(string reportname, CommissionCollectionViewModel commissionCollectionViewModel)
        {
            List <CommissionMasterReportModel> commissionMasterReports = MapperCommission(commissionCollectionViewModel);

            return(FastReportHelper.ShowData(reportname, commissionMasterReports));
        }
        public string GetReport(string keyValue)
        {
            var       reportFilePath = Path.Combine(AppConsts.AppRootPath, "upload", "reportfiles", "Schedule.frx");//.MapPath("\\ReportFiles\\Schedule.frx");
            string    dataSetName    = "HSDataSet";
            DataSet   data           = new DataSet();
            DataTable title          = new DataTable("ScheduleTitle");

            title.Columns.AddRange(new DataColumn[]
            {
                new DataColumn("VisitDate1"),
                new DataColumn("VisitDate2"),
                new DataColumn("VisitDate3"),
                new DataColumn("VisitDate4"),
                new DataColumn("VisitDate5"),
                new DataColumn("VisitDate6"),
                new DataColumn("VisitDate7")
            });
            DateTime date = DateTime.Parse(keyValue);

            title.Rows.Add(new object[]
            {
                date.ToString("yyyy-MM-dd"),
                date.AddDays(1).ToString("yyyy-MM-dd"),
                date.AddDays(2).ToString("yyyy-MM-dd"),
                date.AddDays(3).ToString("yyyy-MM-dd"),
                date.AddDays(4).ToString("yyyy-MM-dd"),
                date.AddDays(5).ToString("yyyy-MM-dd"),
                date.AddDays(6).ToString("yyyy-MM-dd")
            });

            data.Tables.Add(title);
            DataTable detail = new DataTable("ScheduleDetail");

            detail.Columns.AddRange(new DataColumn[]
            {
                new DataColumn("Id"),
                new DataColumn("BId"),
                new DataColumn("Name1"),
                new DataColumn("Name2"),
                new DataColumn("Name3"),
                new DataColumn("Name4"),
                new DataColumn("Name5"),
                new DataColumn("Name6"),
                new DataColumn("Name7"),
                new DataColumn("Name8"),
                new DataColumn("Name9"),
                new DataColumn("Name10"),
                new DataColumn("Name11"),
                new DataColumn("Name12"),
                new DataColumn("Name13"),
                new DataColumn("Name14"),
                new DataColumn("Name15"),
                new DataColumn("Name16"),
                new DataColumn("Name17"),
                new DataColumn("Name18"),
                new DataColumn("Name19"),
                new DataColumn("Name20"),
                new DataColumn("Name21")
            });
            foreach (var e in GetList(date, date.AddDays(6)))
            {
                if (string.IsNullOrEmpty(e.F_PId))
                {
                    continue;
                }
                if (e.F_VisitDate == null)
                {
                    continue;
                }
                DataRow[] rows = detail.Select("Id='" + e.F_BId + "'");
                DataRow   row;
                bool      isAdd = false;
                if (rows.Length > 0)
                {
                    row = rows[0];
                }
                else
                {
                    isAdd = true;
                    row   = detail.NewRow();
                }
                DateTime visitDate = (DateTime)e.F_VisitDate;
                int      ts        = (int)visitDate.Subtract(date).TotalDays;
                int      bc        = (int)e.F_VisitNo;
                row[ts * 3 + 1 + bc] = e.F_Name;
                if (isAdd)
                {
                    row[0] = e.F_BId;
                    row[1] = e.F_GroupName + e.F_DialysisBedNo;
                    detail.Rows.Add(row);
                }
            }
            detail.DefaultView.Sort = "BId ASC";
            detail = detail.DefaultView.ToTable();
            data.Tables.Add(detail);
            //string exportFormat = "png";
            string exportFormat = "html";

            return(FastReportHelper.GetReportString(reportFilePath, dataSetName, data, exportFormat));
        }