예제 #1
0
        /// <summary>
        /// 打印命令单
        /// 2012.1.6 刘爱青
        /// </summary>
        /// <param name="TaskCode"></param>
        /// <returns></returns>
        public static StationCommandInfo PrintCommand(string TaskCode)
        {
            try
            {
                StringBuilder sb = new StringBuilder();
                sb.Append(" select 事件编码=tt.事件编码,收单时刻=tace.发送指令时刻,调度员=tp.工号,台号=right(tt.事件编码,2),现场地址=tace.现场地址,等车地址=tace.等车地址,送往地址=tace.送往地点,");
                sb.Append("呼救电话=tace.呼救电话,联系电话=tace.联系电话+tace.分机,联系人=tace.联系人,车辆='['+ta.实际标识+']'+'['+ta.车牌号码+']',");
                sb.Append("随车人员=tt.司机+' '+tt.医生+' '+tt.护士+' '+tt.担架工+' '+tt.抢救员,特殊要求=tace.特殊要求,");
                sb.Append("患者姓名=tace.患者姓名,性别=tace.性别,年龄=tace.年龄,民族=tace.民族,国籍=tace.国籍,患者人数=tace.患者人数,");
                sb.Append("初步判断=tace.主诉,备注=tace.备注,");
                sb.Append(" 分站=ts.名称 ");
                sb.Append("from TTask tt ");
                sb.Append(" left join TAcceptEvent tace on tace.事件编码=tt.事件编码 and tt.受理序号=tace.受理序号");
                sb.Append(" left join TAlarmEvent tae on tae.事件编码=tt.事件编码");
                sb.Append(" left join TAmbulance ta on ta.车辆编码=tt.车辆编码 ");
                sb.Append(" left join TStation ts on ts.编码=tt.分站编码 ");
                sb.Append(" left join TPerson tp on tp.编码=tt.责任调度人编码 ");
                sb.Append(" where tt.任务编码='").Append(TaskCode).Append("'");
                using (DataSet ds = SQLHelper.ExecuteDataSet(AppConfig.ConnectionStringReport, CommandType.Text, sb.ToString(), null))
                {
                    DataRow            dr   = ds.Tables[0].Rows[0];
                    StationCommandInfo info = new StationCommandInfo();
                    info.EventCode = DBConvert.ConvertStringToString(dr["事件编码"]);
                    info.ReceiveRecordCommandTime = DBConvert.ConvertStringToString(dr["收单时刻"]);
                    info.DispatcherWorkid         = DBConvert.ConvertStringToString(dr["调度员"]);
                    info.DeskID        = DBConvert.ConvertStringToString(dr["台号"]);
                    info.LocalAddr     = DBConvert.ConvertStringToString(dr["现场地址"]);
                    info.WaitAddr      = DBConvert.ConvertStringToString(dr["等车地址"]);
                    info.SendAddr      = DBConvert.ConvertStringToString(dr["送往地址"]);
                    info.AlarmTel      = DBConvert.ConvertStringToString(dr["呼救电话"]);
                    info.LinkTel       = DBConvert.ConvertStringToString(dr["联系电话"]);
                    info.LinkPerson    = DBConvert.ConvertStringToString(dr["联系人"]);
                    info.RealSignbunch = DBConvert.ConvertStringToString(dr["车辆"]);
                    info.AmbPersons    = DBConvert.ConvertStringToString(dr["随车人员"]);
                    info.SpecialNeed   = DBConvert.ConvertStringToString(dr["特殊要求"]);

                    info.PatientName  = DBConvert.ConvertStringToString(dr["患者姓名"]);
                    info.Sex          = DBConvert.ConvertStringToString(dr["性别"]);
                    info.Age          = DBConvert.ConvertStringToString(dr["年龄"]);
                    info.Nationality  = DBConvert.ConvertStringToString(dr["国籍"]);
                    info.Folk         = DBConvert.ConvertStringToString(dr["民族"]);
                    info.PatientCount = DBConvert.ConvertStringToString(dr["患者人数"]);
                    info.Judge        = DBConvert.ConvertStringToString(dr["初步判断"]);
                    info.Remark       = DBConvert.ConvertStringToString(dr["备注"]);

                    info.StationName = DBConvert.ConvertStringToString(dr["分站"]);
                    return(info);
                }
            }
            catch (Exception ex)
            {
                Log4Net.LogError("StatisticsDAL/PrintCommand()", ex.ToString());
                return(null);
            }
        }
예제 #2
0
        /// <summary>
        /// 报表绑定数据集
        /// </summary>
        /// <param name="accCode"></param>
        protected void BindReportDataSource()
        {
            //int WorkerId = int.Parse(User.Identity.Name.Split('|')[0]);

            this.MyReportViewer.LocalReport.DataSources.Clear();
            this.MyReportViewer.LocalReport.ReportPath = @"Report\RDLC\" + ReportName;
            switch (ReportName)
            {
            case "PrintAttemper.rdlc":    //
                string AlarmCode = Request.QueryString["AlarmCode"];
                string name0     = Request.QueryString["name0"];
                string name1     = Request.QueryString["name1"];
                string name2     = Request.QueryString["name2"];
                string name3     = Request.QueryString["name3"];
                string name4     = Request.QueryString["name4"];
                string name5     = Request.QueryString["name5"];
                string name6     = Request.QueryString["name6"];
                string name7     = Request.QueryString["name7"];
                Microsoft.Reporting.WebForms.ReportParameter Name0  = new Microsoft.Reporting.WebForms.ReportParameter("name0", name0);
                Microsoft.Reporting.WebForms.ReportParameter Name1  = new Microsoft.Reporting.WebForms.ReportParameter("name1", name1);
                Microsoft.Reporting.WebForms.ReportParameter Name2  = new Microsoft.Reporting.WebForms.ReportParameter("name2", name2);
                Microsoft.Reporting.WebForms.ReportParameter Name3  = new Microsoft.Reporting.WebForms.ReportParameter("name3", name3);
                Microsoft.Reporting.WebForms.ReportParameter Name4  = new Microsoft.Reporting.WebForms.ReportParameter("name4", name4);
                Microsoft.Reporting.WebForms.ReportParameter Name5  = new Microsoft.Reporting.WebForms.ReportParameter("name5", name5);
                Microsoft.Reporting.WebForms.ReportParameter Name6  = new Microsoft.Reporting.WebForms.ReportParameter("name6", name6);
                Microsoft.Reporting.WebForms.ReportParameter Name7  = new Microsoft.Reporting.WebForms.ReportParameter("name7", name7);
                Microsoft.Reporting.WebForms.ReportParameter Header = new Microsoft.Reporting.WebForms.ReportParameter("Header", AppConfig.GetStringConfigValue("PrtAttHeaderName"));
                Microsoft.Reporting.WebForms.ReportParameter Unit   = new Microsoft.Reporting.WebForms.ReportParameter("Unit", AppConfig.GetStringConfigValue("PrtAttUnitName"));
                Microsoft.Reporting.WebForms.ReportParameter Footer = new Microsoft.Reporting.WebForms.ReportParameter("Footer", AppConfig.GetStringConfigValue("PrtAttFooterName"));
                this.MyReportViewer.LocalReport.SetParameters(new Microsoft.Reporting.WebForms.ReportParameter[] { Name0, Name1, Name2, Name3, Name4, Name5, Name6, Name7, Header, Unit, Footer });
                List <AttemperAlarmInfo> list1 = Anchor.FA.BLL.BasicInfo.StatisticsBLL.GetAlarmInfo(AlarmCode);
                this.MyReportViewer.LocalReport.DataSources.Add(new ReportDataSource("AnchorV7_FirstAidManager_SE_StatisticsInfo_AttemperAlarmInfo", list1));
                List <AttemperAcceptInfo> list2 = StatisticsBLL.GetAcceptInfo(AlarmCode);
                this.MyReportViewer.LocalReport.DataSources.Add(new ReportDataSource("AnchorV7_FirstAidManager_SE_StatisticsInfo_AttemperAcceptInfo", list2));
                List <AttemperTaskInfo> list3 = StatisticsBLL.GetTaskInfo(AlarmCode);
                this.MyReportViewer.LocalReport.DataSources.Add(new ReportDataSource("AnchorV7_FirstAidManager_SE_StatisticsInfo_AttemperTaskInfo", list3));
                List <AttemperTelInfo> list4 = StatisticsBLL.GetTelInfo(AlarmCode);
                this.MyReportViewer.LocalReport.DataSources.Add(new ReportDataSource("AnchorV7_FirstAidManager_SE_StatisticsInfo_AttemperTelInfo", list4));
                break;

            case "PrintCommand.rdlc":    //
                string TaskCode = Request.QueryString["TaskCode"];
                List <StationCommandInfo> list = new List <StationCommandInfo>();
                StationCommandInfo        info = StatisticsBLL.PrintCommand(TaskCode);
                list.Add(info);
                this.MyReportViewer.LocalReport.DataSources.Add(new ReportDataSource("AnchorV7_FirstAidManager_SE_StatisticsInfo_StationCommandInfo", list));
                break;

            default:
                break;
            }
            this.MyReportViewer.LocalReport.Refresh();
        }