Esempio n. 1
0
        /// <summary>
        /// 查询
        /// </summary>
        private void Query()
        {
            this.ucRegDayBalanceReport1.InitUC();
            if (this.treeView1.SelectedNode.Parent == null)
            {
                MessageBox.Show("请选择操作员!", "提示");
                return;
            }

            frmQueryDayReport f = new frmQueryDayReport();

            f.OperID = this.treeView1.SelectedNode.Tag.ToString();
            f.Query();
            DialogResult r = f.ShowDialog();

            if (r == DialogResult.OK)
            {
                this.objDayReport = f.SelectedDayReport;
                if (this.objDayReport != null && this.objDayReport.ID != "")
                {
                    ArrayList aldetails = this.dayReport.Query(this.objDayReport.ID);
                    foreach (Neusoft.HISFC.Object.Registration.DayDetail obj in aldetails)
                    {
                        this.objDayReport.Details.Add(obj);
                    }

                    this.SetCR();
                    this.ShowReport();
                    this.ucRegDayBalanceReport1.setFP(this.objDayReport);
                }
            }
            f.Dispose();
            this.RepeatFlag = true;
        }
Esempio n. 2
0
 /// <summary>
 /// 清屏
 /// </summary>
 private void Clear()
 {
     this.source.Tables[0].Rows.Clear();
     this.objDayReport = null;
     this.ShowReport();
 }
Esempio n. 3
0
        /// <summary>
        /// 生成日结明细实体
        /// </summary>
        /// <param name="begin"></param>
        /// <param name="end"></param>
        /// <param name="operID"></param>
        /// <param name="operName"></param>
        private void SetReportDetail(DateTime begin, DateTime end, string operID, string operName)
        {
            DateTime current = this.regMgr.GetDateTimeFromSysDateTime();

            this.objDayReport               = new Neusoft.HISFC.Object.Registration.DayReport();
            this.objDayReport.BeginDate     = begin;
            this.objDayReport.EndDate       = end;
            this.objDayReport.Oper.ID       = operID;
            this.objDayReport.Oper.Name     = operName;
            this.objDayReport.Oper.OperTime = current;

            Neusoft.HISFC.Object.Registration.DayDetail detail = new Neusoft.HISFC.Object.Registration.DayDetail();
            detail.EndRecipeNo = "-1";

            //生成日报实体,原则:连续处方、处方状态一致的合为一条日结明细
            for (int i = 0; i < this.dsRegInfo.Tables[0].Rows.Count; i++)
            {
                DataRow row = this.dsRegInfo.Tables[0].Rows[i];


                ///
                ///挂号状态为退号、日结人不是作废人、未日结,此种情况为别人退该操作员号,此号有效
                ///
                if (row[8].ToString() == "0" && operID != row[9].ToString())
                {
                    row[8] = "1";//置为有效
                }


                if (long.Parse(row[0].ToString()) - 1 != long.Parse(detail.EndRecipeNo) || //处方不连续
                    int.Parse(row[8].ToString()) != (int)detail.Status)                    //状态改变
                {
                    //生成新的日结明细
                    if (i != 0)//第一条不处理
                    {
                        this.objDayReport.Details.Add(detail);
                    }

                    //重新生成新的明细
                    detail = new Neusoft.HISFC.Object.Registration.DayDetail();
                    detail.BeginRecipeNo = row[0].ToString();    //开始号
                    detail.EndRecipeNo   = detail.BeginRecipeNo; //Convert.ToString(long.Parse(row[0].ToString()) -1) ;
                    detail.Status        = (Neusoft.HISFC.Object.Base.EnumRegisterStatus) int.Parse(row[8].ToString());
                }

                detail.EndRecipeNo = row[0].ToString();
                detail.Count++;
                detail.RegFee  += decimal.Parse(row[1].ToString());
                detail.ChkFee  += decimal.Parse(row[2].ToString());
                detail.DigFee  += decimal.Parse(row[3].ToString());
                detail.OthFee  += decimal.Parse(row[4].ToString());
                detail.OwnCost += decimal.Parse(row[5].ToString());
                detail.PayCost += decimal.Parse(row[6].ToString());
                detail.PubCost += decimal.Parse(row[7].ToString());

                if (i == this.dsRegInfo.Tables[0].Rows.Count - 1)
                {
                    this.objDayReport.Details.Add(detail);//最后一条也重新生成明细
                }
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 将信息填充到farpoint上
        /// </summary>
        /// <param name="dayreport">挂号日结实体</param>
        /// <returns></returns>
        public int setFP(Neusoft.HISFC.Object.Registration.DayReport dayreport)
        {
            int BackCount = 0; //退费张数
            int Disvalid  = 0; //作废张数

            this.lblDayDate.Text = dayreport.BeginDate.ToString() + "----" + dayreport.EndDate.ToString();
            if (dayreport.Details.Count <= 0)
            {
                return(-1);
            }
            for (int i = 0; i < dayreport.Details.Count; i++)
            {
                this.neuSpread1_Sheet1.AddRows(this.neuSpread1_Sheet1.RowCount, 1);

                this.neuSpread1_Sheet1.Cells[i, 0].Text = dayreport.Details[i].BeginRecipeNo + "--" + dayreport.Details[i].EndRecipeNo;
                this.neuSpread1_Sheet1.Cells[i, 1].Text = dayreport.Details[i].Count.ToString();
                if (dayreport.Details[i].Status == Neusoft.HISFC.Object.Base.EnumRegisterStatus.Back)
                {
                    this.neuSpread1_Sheet1.Cells[i, 2].Text = (-dayreport.Details[i].OwnCost).ToString();
                    this.neuSpread1_Sheet1.Cells[i, 3].Text = (-dayreport.Details[i].RegFee).ToString();
                    this.neuSpread1_Sheet1.Cells[i, 4].Text = (-dayreport.Details[i].DigFee - dayreport.Details[i].ChkFee).ToString();
                    this.neuSpread1_Sheet1.Cells[i, 5].Text = (-dayreport.Details[i].OthFee).ToString();
                    BackCount += dayreport.Details[i].Count;
                }
                else
                {
                    this.neuSpread1_Sheet1.Cells[i, 2].Text = dayreport.Details[i].OwnCost.ToString();
                    this.neuSpread1_Sheet1.Cells[i, 3].Text = dayreport.Details[i].RegFee.ToString();
                    this.neuSpread1_Sheet1.Cells[i, 4].Text = (dayreport.Details[i].DigFee + dayreport.Details[i].ChkFee).ToString();
                    this.neuSpread1_Sheet1.Cells[i, 5].Text = dayreport.Details[i].OthFee.ToString();
                }
                this.neuSpread1_Sheet1.Cells[i, 6].Text = getStatus(dayreport.Details[i].Status);
                if (dayreport.Details[i].Status == Neusoft.HISFC.Object.Base.EnumRegisterStatus.Cancel)
                {
                    Disvalid += dayreport.Details[i].Count;
                }
            }
            //合计
            this.neuSpread1_Sheet1.AddRows(this.neuSpread1_Sheet1.RowCount, 1);
            this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.RowCount - 1, 0].Text = "合计";
            this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.RowCount - 1, 1].Text = dayreport.SumCount.ToString();
            this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.RowCount - 1, 2].Text = dayreport.SumOwnCost.ToString();
            this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.RowCount - 1, 3].Text = dayreport.SumRegFee.ToString();
            this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.RowCount - 1, 4].Text = (dayreport.SumDigFee + dayreport.SumChkFee).ToString();
            this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.RowCount - 1, 5].Text = dayreport.SumOthFee.ToString();
            //大写金额
            this.neuSpread1_Sheet1.AddRows(this.neuSpread1_Sheet1.RowCount, 1);
            this.neuSpread1_Sheet1.Models.Span.Add(this.neuSpread1_Sheet1.RowCount - 1, 0, 1, 7);
            this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.RowCount - 1, 0].Text = "实收金额(大写): " + Neusoft.NFC.Function.NConvert.ToCapital(dayreport.SumOwnCost);


            // 操作员信息
            this.neuSpread1_Sheet1.AddRows(this.neuSpread1_Sheet1.RowCount, 1);
            this.neuSpread1_Sheet1.Models.Span.Add(this.neuSpread1_Sheet1.RowCount - 1, 0, 1, 2);
            this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.RowCount - 1, 0].Text = "缴款人: " + dayreport.Oper.Name;


            this.neuSpread1_Sheet1.Models.Span.Add(this.neuSpread1_Sheet1.RowCount - 1, 2, 1, 2);
            this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.RowCount - 1, 2].Text = "收款员: " + dayreport.Oper.ID;


            this.neuSpread1_Sheet1.Models.Span.Add(this.neuSpread1_Sheet1.RowCount - 1, 4, 1, 3);
            this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.RowCount - 1, 4].Text = "作废张数: " + Disvalid.ToString();


            //
            this.neuSpread1_Sheet1.AddRows(this.neuSpread1_Sheet1.RowCount, 1);
            this.neuSpread1_Sheet1.Models.Span.Add(this.neuSpread1_Sheet1.RowCount - 1, 0, 1, 2);
            this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.RowCount - 1, 0].Text = "填表人: ";


            this.neuSpread1_Sheet1.Models.Span.Add(this.neuSpread1_Sheet1.RowCount - 1, 2, 1, 2);
            this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.RowCount - 1, 2].Text = "出纳员: ";


            this.neuSpread1_Sheet1.Models.Span.Add(this.neuSpread1_Sheet1.RowCount - 1, 4, 1, 3);
            this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.RowCount - 1, 4].Text = "退费张数:" + BackCount.ToString();


            this.neuSpread1_Sheet1.AddRows(this.neuSpread1_Sheet1.RowCount, 1);
            this.neuSpread1_Sheet1.Models.Span.Add(this.neuSpread1_Sheet1.RowCount - 1, 0, 1, 7);
            this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.RowCount - 1, 0].Text = "统计时间: " + dayreport.BeginDate.ToString() + "---" + dayreport.EndDate.ToString();
            return(1);
        }