示例#1
0
 /// <summary>
 /// Resets the URL to its root, including the scheme, any user info, host, and port (if specified).
 /// </summary>
 /// <returns>The Url object trimmed to its root.</returns>
 public Url ResetToRoot()
 {
     Path = GetRoot(Path);
     QueryParams.Clear();
     Fragment = "";
     return(this);
 }
示例#2
0
        /// <summary>
        /// 药品调剂查询的SQL
        /// </summary>
//        string sqlDrugTJ = @"SELECT (SELECT bb.dept_name FROM com_department bb WHERE bb.dept_code = aa.DRUG_STORAGE_CODE)   AS dept,
//                                    (SELECT cc.name FROM com_dictionary  cc where cc.type = 'ITEMTYPE'  AND cc.code =   aa.Drug_Type) AS  DRUGTYPE,
//                                     SUM(aa.retail_price * aa.out_num/aa.pack_qty) AS retail_cost,
//                                     SUM(aa.wholesale_price * aa.out_num/aa.pack_qty) AS wholesale_cost,
//                                    (SUM(aa.retail_price * aa.out_num/aa.pack_qty)  - SUM(aa.wholesale_price * aa.out_num/aa.pack_qty)) ce_cost
//                            FROM pha_com_output aa
//                            WHERE aa.Out_Type = '{2}'
//                             AND  aa.drug_dept_code ='{3}'
//                             AND  aa.oper_date BETWEEN to_date('{0}','yyyy-mm-dd hh24:mi:ss') AND to_date('{1}','yyyy-mm-dd hh24:mi:ss')
//                             AND  aa.out_state = '2'
//                             GROUP BY aa.DRUG_STORAGE_CODE,aa.Drug_Type";

        #endregion



        #region 查询
        protected override int OnQuery(object sender, object neuObject)
        {
            //List<string> alType = new List<string>();

            //alType.Add("Z1");
            //alType.Add("Z2");


            //string[] inpatient = alType.ToArray();

            Neusoft.HISFC.Models.Base.Employee employee = new Neusoft.HISFC.Models.Base.Employee();

            employee = (Neusoft.HISFC.Models.Base.Employee) this.dataBaseManager.Operator;

            //设置报表参数
            this.QuerySqlTypeValue = QuerySqlType.id;
            //this.QuerySql = this.sqlDrugTJ;
            this.QuerySql         = "Neusoft.WinForms.Report.Logistics.Pharmacy.ucPhadrugtj";
            this.DataCrossValues  = "3";
            this.DataCrossColumns = "1|2";
            this.DataCrossRows    = "0";


            QueryParams.Clear();
            QueryParams.Add(new Neusoft.FrameWork.Models.NeuObject("", this.dtpBeginTime.Value.ToString(), ""));
            QueryParams.Add(new Neusoft.FrameWork.Models.NeuObject("", this.dtpEndTime.Value.ToString(), ""));
            QueryParams.Add(new Neusoft.FrameWork.Models.NeuObject("", outType, ""));
            QueryParams.Add(new Neusoft.FrameWork.Models.NeuObject("", employee.Dept.ID, ""));

            string deptName = employee.Dept.Name;

            this.neuSpread1_Sheet1.SetText(1, 0, "科室:" + deptName);
            return(base.OnQuery(sender, neuObject));
        }
        protected override int OnQuery(object sender, object neuObject)
        {
            this.QuerySqlTypeValue = QuerySqlType.id;
            this.QuerySql          = "WinForms.Report.Finance.FinOpb.ucFinOpbPactStat";
            this.DataCrossValues   = "2";
            this.DataCrossColumns  = "1";
            this.DataCrossRows     = "0";


            QueryParams.Clear();
            QueryParams.Add(new Neusoft.FrameWork.Models.NeuObject("", this.dtpBeginTime.Value.ToString(), ""));
            QueryParams.Add(new Neusoft.FrameWork.Models.NeuObject("", this.dtpEndTime.Value.ToString(), ""));
            QueryParams.Add(new Neusoft.FrameWork.Models.NeuObject("", reportCode, ""));

            Neusoft.HISFC.Models.Base.Employee employee = new Neusoft.HISFC.Models.Base.Employee();

            employee = (Neusoft.HISFC.Models.Base.Employee) this.dataBaseManager.Operator;

            this.neuSpread1_Sheet1.SetText(1, 0, "统计科别:" + employee.Dept.Name);

            return(base.OnQuery(sender, neuObject));
        }
示例#4
0
        protected override int OnQuery(object sender, object neuObject)
        {
            string[] feeStatStr = this.feeStatList.ToArray();
            if (string.IsNullOrEmpty(reportCode))
            {
                MessageBox.Show("请选择统计大类!");
                return(-1);
            }

            if (comDept.Text == "按患者所在科室查询")
            {
                this.QuerySqlTypeValue = QuerySqlType.id;
                this.QuerySql          = "WinForms.Report.Finance.FinIpb.ucFinIpbStatFeeInhosDept";
                //this.DataCrossValues = "2";
                //this.DataCrossColumns = "1";
                //this.DataCrossRows = "0";
            }
            if (comDept.Text == "按医生所在科室查询")
            {
                this.QuerySqlTypeValue = QuerySqlType.id;
                this.QuerySql          = "WinForms.Report.Finance.FinIpb.ucFinIpbStatFeeDOCDept";
                //this.DataCrossValues = "2";
                //this.DataCrossColumns = "1";
                //this.DataCrossRows = "0";
            }
            if (comDept.Text == "按执行科室查询")
            {
                this.QuerySqlTypeValue = QuerySqlType.id;
                this.QuerySql          = "WinForms.Report.Finance.FinIpb.ucFinIpbStatFeeEXEDept";
                //this.DataCrossValues = "2";
                //this.DataCrossColumns = "1";
                //this.DataCrossRows = "0";
            }

            //this.QuerySqlTypeValue = QuerySqlType.id;
            //this.QuerySql = "WinForms.Report.Finance.FinOpb.ucFinOpbStatFeeDoct";
            this.DataCrossValues   = "2";
            this.DataCrossRows     = "0";
            this.DataCrossColumns  = "1";
            this.DataBeginRowIndex = 5;
            QueryParams.Clear();
            QueryParams.Add(new Neusoft.FrameWork.Models.NeuObject("", this.dtpBeginTime.Value.ToShortDateString() + " 00:00:00", ""));
            QueryParams.Add(new Neusoft.FrameWork.Models.NeuObject("", this.dtpEndTime.Value.ToShortDateString() + " 23:59:59", ""));
            QueryParams.Add(new Neusoft.FrameWork.Models.NeuObject("", reportCode, ""));
            string feeStr = string.Empty;

            if (this.feeStatList != null)
            {
                if (this.feeStatList.Count != 0)
                {
                    foreach (string str in feeStatList)
                    {
                        feeStr = feeStr + "'" + str + "',";
                    }
                    feeStr = feeStr.Substring(0, feeStr.Length - 1);
                }
            }
            QueryParams.Add(new Neusoft.FrameWork.Models.NeuObject("", feeStr, ""));



            Neusoft.HISFC.Models.Base.Employee employee = new Neusoft.HISFC.Models.Base.Employee();

            employee     = (Neusoft.HISFC.Models.Base.Employee) this.dataBaseManager.Operator;
            hospitalName = this.conManager.GetHospitalName();

            this.neuSpread1_Sheet1.SetText(3, 0, "统计日期:" + this.dtpBeginTime.Value.ToShortDateString() + " 00:00:00" + "---" + this.dtpEndTime.Value.ToShortDateString() + " 23:59:59");
            this.neuSpread1_Sheet1.Cells[3, 0].ColumnSpan = 10;
            this.neuSpread1_Sheet1.SetText(4, 0, "制表人:" + employee.Name);
            this.neuSpread1_Sheet1.Cells[4, 0].ColumnSpan = 6;
            this.neuSpread1_Sheet1.SetText(4, 6, "打印日期:" + System.DateTime.Now.ToString());
            this.neuSpread1_Sheet1.Cells.Get(4, 6).ColumnSpan = 6;
            this.neuSpread1_Sheet1.SetText(0, 0, hospitalName);
            this.neuSpread1_Sheet1.Cells.Get(0, 0).Font = new System.Drawing.Font("SimSun", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.neuSpread1_Sheet1.Cells.Get(0, 0).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
            this.neuSpread1_Sheet1.Cells[0, 0].ColumnSpan = 10;
            this.neuSpread1_Sheet1.SetText(1, 0, "住院收入统计汇总表(在院+出院)");
            this.neuSpread1_Sheet1.Cells[1, 0].ColumnSpan = 10;
            this.neuSpread1_Sheet1.Cells.Get(1, 0).Font   = new System.Drawing.Font("SimSun", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.neuSpread1_Sheet1.Cells.Get(1, 0).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
            neuSpread1.Sheets[0].FrozenRowCount = 6;
            return(base.OnQuery(sender, neuObject));
        }
示例#5
0
        protected override int OnQuery(object sender, object neuObject)
        {
            if (comDept.Items[comDept.SelectedIndex] == "按挂号科室查询")
            {
                this.QuerySqlTypeValue = QuerySqlType.id;
                this.QuerySql          = "WinForms.Report.Finance.FinOpb.ucDeptFeeNumREGDept";
                //this.DataCrossValues = "2";
                //this.DataCrossColumns = "1";
                //this.DataCrossRows = "0";
            }
            if (comDept.Items[comDept.SelectedIndex] == "按医生所在科室查询")
            {
                this.QuerySqlTypeValue = QuerySqlType.id;
                this.QuerySql          = "WinForms.Report.Finance.FinOpb.ucDeptFeeNumDOCDept";
                //this.DataCrossValues = "2";
                //this.DataCrossColumns = "1";
                //this.DataCrossRows = "0";
            }
            if (comDept.Items[comDept.SelectedIndex] == "按执行科室查询")
            {
                this.QuerySqlTypeValue = QuerySqlType.id;
                this.QuerySql          = "WinForms.Report.Finance.FinOpb.ucDeptFeeNumEXEDept";
                //this.DataCrossValues = "2";
                //this.DataCrossColumns = "1";
                //this.DataCrossRows = "0";
            }
            QueryParams.Clear();
            QueryParams.Add(new Neusoft.FrameWork.Models.NeuObject("", this.dtpBeginTime.Value.ToString(), ""));
            QueryParams.Add(new Neusoft.FrameWork.Models.NeuObject("", this.dtpEndTime.Value.ToString(), ""));
            QueryParams.Add(new Neusoft.FrameWork.Models.NeuObject("", reportCode, ""));
            QueryParams.Add(new Neusoft.FrameWork.Models.NeuObject("", pactCode, ""));

            Neusoft.HISFC.Models.Base.Employee employee = new Neusoft.HISFC.Models.Base.Employee();

            employee = (Neusoft.HISFC.Models.Base.Employee) this.dataBaseManager.Operator;

            //  this.neuSpread1_Sheet1.SetText(1, 0, "统计科别:" + employee.Dept.Name);

            base.OnQuery(sender, neuObject);

            //加合计
            int rowCount = 0;

            //rowCount = this.neuSpread1_Sheet1.RowCount;
            for (int i = this.DataBeginRowIndex; i < neuSpread1_Sheet1.Rows.Count; i++)
            {
                if (string.IsNullOrEmpty(neuSpread1_Sheet1.Cells[i, this.DataBeginColumnIndex].Text) == true)
                {
                    rowCount = i;
                    break;
                }
            }
            decimal sumNum5 = 0;
            decimal sumNum4 = 0;
            decimal sumNum3 = 0;
            decimal sumNum2 = 0;
            decimal sumNum1 = 0;

            for (int i = this.DataBeginRowIndex; i < rowCount; i++)
            {
                sumNum1 = sumNum1 + NConvert.ToDecimal(this.neuSpread1_Sheet1.Cells[i, 1].Text);
                sumNum2 = sumNum2 + NConvert.ToDecimal(this.neuSpread1_Sheet1.Cells[i, 2].Text);
                sumNum3 = sumNum3 + NConvert.ToDecimal(this.neuSpread1_Sheet1.Cells[i, 3].Text);
                sumNum4 = sumNum4 + NConvert.ToDecimal(this.neuSpread1_Sheet1.Cells[i, 4].Text);
                sumNum5 = sumNum5 + NConvert.ToDecimal(this.neuSpread1_Sheet1.Cells[i, 5].Text);
            }

            this.neuSpread1_Sheet1.Rows.Add(rowCount, 1);
            this.neuSpread1_Sheet1.Cells[rowCount, 0].Text = "合计:";
            this.neuSpread1_Sheet1.Cells[rowCount, 1].Text = sumNum1.ToString();
            this.neuSpread1_Sheet1.Cells[rowCount, 2].Text = sumNum2.ToString();
            this.neuSpread1_Sheet1.Cells[rowCount, 3].Text = sumNum3.ToString();
            this.neuSpread1_Sheet1.Cells[rowCount, 4].Text = sumNum4.ToString();
            this.neuSpread1_Sheet1.Cells[rowCount, 5].Text = sumNum5.ToString();



            return(1);
        }