示例#1
0
        /// <summary>
        /// /初始化
        /// </summary>
        protected virtual void Init()
        {
            //获取控制参数判断是否需要核准
            Neusoft.FrameWork.Management.ControlParam ctrlManager = new Neusoft.FrameWork.Management.ControlParam();

            //打开窗口日期
            this.sysTime = ctrlManager.GetDateTimeFromSysDateTime().Date;
        }
示例#2
0
 /// <summary>
 /// 读取控制类信息
 /// </summary>
 private int ReadControlInfo()
 {
     Neusoft.FrameWork.Management.ControlParam controlParm = new Neusoft.FrameWork.Management.ControlParam();
     try
     {
         this.IsPrintReturn      = Neusoft.FrameWork.Function.NConvert.ToBoolean(controlParm.QueryControlerInfo("100015"));
         this.IsReturnNewInvoice = Neusoft.FrameWork.Function.NConvert.ToBoolean(controlParm.QueryControlerInfo("100016"));
     }
     catch
     {
         Neusoft.FrameWork.WinForms.Classes.Function.Msg("读取控制类信息出错!", 211);
         return(-1);
     }
     return(1);
 }
示例#3
0
        /// <summary>
        /// 预交金补打
        /// </summary>
        protected virtual void ReprintPrepay()
        {
            if (this.fpPrepay_Sheet1.ActiveRowIndex < 0)
            {
                return;
            }
            if (this.fpPrepay_Sheet1.Rows.Count <= 0)
            {
                return;
            }
            if (this.patientInfo == null)
            {
                return;
            }
            else
            {
                if (this.patientInfo.ID == null || this.patientInfo.ID.Trim() == "")
                {
                    return;
                }
            }



            Neusoft.HISFC.Models.Fee.Inpatient.Prepay prepay = new Neusoft.HISFC.Models.Fee.Inpatient.Prepay();
            prepay = (Neusoft.HISFC.Models.Fee.Inpatient.Prepay) this.fpPrepay_Sheet1.ActiveRow.Tag;

            if (prepay == null)
            {
                Neusoft.FrameWork.WinForms.Classes.Function.Msg("请选择一条预交金记录", 111);
                return;
            }

            if (prepay.PrepayState == "1")
            {
                Neusoft.FrameWork.WinForms.Classes.Function.Msg("该预交金已经返还!不能进行补打操作!", 111);
                return;
            }
            if (prepay.PrepayState == "2")
            {
                Neusoft.FrameWork.WinForms.Classes.Function.Msg("该预交金已经进行过补打操作,已经成为作废发票,不能再补打!", 111);
                return;
            }
            if (prepay.BalanceState == "1")
            {
                Neusoft.FrameWork.WinForms.Classes.Function.Msg("该票据已经结算过不能补打!!", 111);
                return;
            }
            if (prepay.TransferPrepayState == "1")
            {
                Neusoft.FrameWork.WinForms.Classes.Function.Msg("该预交金为结算的转押金还没有进行正常打印操作,不能补打!", 111);
                return;
            }
            //if (!isCanDealBefore)
            //{
            //    if (prepay.PrepayOper.OperTime < feeInpatient.GetDateTimeFromSysDateTime().Date)
            //    {
            //        Neusoft.FrameWork.WinForms.Classes.Function.Msg("不能作废当天前的预交金!",111);
            //        return;
            //    }
            //}
            //取控制参数限制补打天数


            string limitDays = "";

            Neusoft.FrameWork.Management.ControlParam controlParm = new Neusoft.FrameWork.Management.ControlParam();
            limitDays = controlParm.QueryControlerInfo("100022");
            if (limitDays == null || limitDays == "")
            {
                limitDays = "";
            }
            if (limitDays.Trim() != "")
            {
                if ((this.feeInpatient.GetDateTimeFromSysDateTime().Date - prepay.PrepayOper.OperTime.Date).Days > Neusoft.FrameWork.Function.NConvert.ToInt32(limitDays))
                {
                    Neusoft.FrameWork.WinForms.Classes.Function.Msg("预交金发生间隔超过" + limitDays + "天,不能进行补打操作!", 111);
                    return;
                }
            }

            DialogResult r = Neusoft.FrameWork.WinForms.Classes.Function.Msg("是否补打发票号为" + prepay.RecipeNO + "的预交金?", 422);

            if (r == DialogResult.No)
            {
                return;
            }
            //判断封帐
            if ((this.feeInpatient.GetStopAccount(this.patientInfo.ID)) == "1")
            {
                Neusoft.FrameWork.WinForms.Classes.Function.Msg("该患者处于封帐状态,可能正在结算,请稍后再做此操作!", 111);
                return;
            }
            //事务连接
            //Transaction t = new Transaction(this.feeInpatient.Connection);
            Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();
            this.feeInpatient.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);
            this.feeIntegrate.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);

            //提取发票号码
            //发票类型-预交金


            string returnInvoice = "";

            if (this.IsReturnNewInvoice)
            {
                //returnInvoice = this.feeIntegrate.GetNewInvoiceNO(Neusoft.HISFC.Models.Fee.EnumInvoiceType.P);
                returnInvoice = this.feeIntegrate.GetNewInvoiceNO("P");
                if (returnInvoice == null || returnInvoice == "")
                {
                    Neusoft.FrameWork.Management.PublicTrans.RollBack();
                    Neusoft.FrameWork.WinForms.Classes.Function.Msg("提取发票出错!", 211);
                    return;
                }
            }

            string invoiceNo = "";

            //invoiceNo = this.feeIntegrate.GetNewInvoiceNO(Neusoft.HISFC.Models.Fee.EnumInvoiceType.P);
            invoiceNo = this.feeIntegrate.GetNewInvoiceNO("P");
            if (invoiceNo == null || invoiceNo == "")
            {
                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                Neusoft.FrameWork.WinForms.Classes.Function.Msg("提取发票出错!", 211);
                return;
            }
            //调用组合业务处理正负记录
            Neusoft.HISFC.Models.Fee.Inpatient.Prepay returnPrepay = new Neusoft.HISFC.Models.Fee.Inpatient.Prepay();
            if (this.feeInpatient.PrepaySignOperation(prepay, this.patientInfo, invoiceNo, returnInvoice, ref returnPrepay) == -1)
            {
                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                Neusoft.FrameWork.WinForms.Classes.Function.Msg(this.feeInpatient.Err + "补打失败!", 211);
                return;
            }

            Neusoft.FrameWork.Management.PublicTrans.Commit();

            //打印预交金发票


            if (this.IsPrintReturn)
            {
                this.PrintPrepayInvoice(this.patientInfo, returnPrepay, true);
            }
            this.PrintPrepayInvoice(this.patientInfo, prepay, false);
            //重新检索预交金记录
            this.QueryPatientPrepay(this.patientInfo);
            Neusoft.FrameWork.WinForms.Classes.Function.Msg("补打完毕!", 111);
        }