/// <summary> /// 打印门诊发药单据 /// </summary> /// <param name="billMaster">单据表头</param> /// <param name="billOrder">单据明细</param> /// <param name="path">报表文件路径</param> /// <param name="Printer">打印人员</param> public override void PrintBill(HIS.Model.BillMaster billMaster, System.Data.DataTable billOrder, string path, int Printer) { try { if (billMaster == null) { return; } HIS.Model.YP_DRMaster printMaster = (HIS.Model.YP_DRMaster)billMaster; billOrder = HIS.YP_BLL.BillFactory.GetQuery(ConfigManager.OP_YF_DISPENSE).LoadOrder(billMaster); if (billOrder.Rows.Count > 0) { _printOrder = billOrder; report = new grproLib.GridppReport(); report.LoadFromFile(path); report.FetchRecord += new grproLib._IGridppReportEvents_FetchRecordEventHandler(report_FetchRecord); report.ParameterByName("InvoiceNum").AsString = printMaster.InvoiceNum.ToString(); report.ParameterByName("UserName").AsString = BaseData.GetUserName(printMaster.OPPeopleID); report.ParameterByName("ExeTime").AsDateTime = printMaster.OPTime; report.ParameterByName("PatientName").AsString = printMaster.PatientName; report.ParameterByName("HospitalName").AsString = BaseData.WorkName; report.ParameterByName("DocName").AsString = BaseData.GetUserName(printMaster.DocID.ToString()); report.ParameterByName("DeptName").AsString = BaseData.GetDeptName(printMaster.DeptID.ToString()); report.ParameterByName("RecipeNum").AsString = printMaster.RecipeNum.ToString(); report.ParameterByName("RecipeNo").AsString = printMaster.RecipeID.ToString(); report.ParameterByName("Printer").AsString = BaseData.GetUserName(Printer); report.ParameterByName("PrintTime").AsDateTime = HIS.SYSTEM.PubicBaseClasses.XcDate.ServerDateTime; report.PrintPreview(false); } } catch (Exception error) { throw error; } }
/// <summary> /// 打印住院统领单据 /// </summary> /// <param name="billMaster">单据表头</param> /// <param name="billOrder">单据明细</param> /// <param name="path">报表文件路径</param> /// <param name="Printer">打印人员</param> public override void PrintBill(HIS.Model.BillMaster billMaster, System.Data.DataTable billOrder, string path, int Printer) { if (billMaster == null || billOrder == null) { return; } HIS.Model.YP_DispDeptHis printMaster = (HIS.Model.YP_DispDeptHis)billMaster; if (billOrder.Rows.Count > 0) { _printOrder = billOrder; report = new grproLib.GridppReport(); report.LoadFromFile(path); report.FetchRecord += new grproLib._IGridppReportEvents_FetchRecordEventHandler(report_FetchRecord); report.ParameterByName("DeptName").AsString = BaseData.GetDeptName(printMaster.DeptId.ToString()); report.ParameterByName("UserName").AsString = BaseData.GetUserName(printMaster.OpMan); report.ParameterByName("ExeTime").AsDateTime = printMaster.OpTime; report.ParameterByName("DispDept").AsString = BaseData.GetDeptName(printMaster.DispDept.ToString()); report.ParameterByName("PrintTime").AsDateTime = HIS.SYSTEM.PubicBaseClasses.XcDate.ServerDateTime; report.ParameterByName("HospitalName").AsString = HIS.SYSTEM.BussinessLogicLayer.Classes.BaseData.WorkName + printMaster.BillType + "统领发药单"; report.ParameterByName("Printer").AsString = BaseData.GetUserName(Printer); report.ParameterByName("PrintTime").AsDateTime = HIS.SYSTEM.PubicBaseClasses.XcDate.ServerDateTime; report.ParameterByName("PatientNames").AsString = printMaster.PatientNames; report.PrintPreview(false); } }
/// <summary> /// 打印采购计划单 /// </summary> /// <param name="billMaster">单据表头</param> /// <param name="billOrder">单据明细</param> /// <param name="path">报表文件路径</param> /// <param name="Printer">打印人员</param> public override void PrintBill(HIS.Model.BillMaster billMaster, System.Data.DataTable billOrder, string path, int Printer) { try { HIS.Model.YP_PlanMaster printMaster = (HIS.Model.YP_PlanMaster)billMaster; _printOrder = BillFactory.GetQuery(ConfigManager.OP_YK_STOCKPLAN).LoadOrder(printMaster); if (printMaster != null && _printOrder.Rows.Count > 0) { report = new grproLib.GridppReport(); report.LoadFromFile(path); report.FetchRecord += new grproLib._IGridppReportEvents_FetchRecordEventHandler(report_FetchRecord); report.ParameterByName("RegTime").AsDateTime = printMaster.RegTime; report.ParameterByName("RegPeopleName").AsString = printMaster.RegPeopleName; report.ParameterByName("TotalRetailFee").AsString = printMaster.RetailFee.ToString(); report.ParameterByName("TotalTradeFee").AsString = printMaster.TradeFee.ToString(); report.ParameterByName("HospitalName").AsString = HIS.SYSTEM.BussinessLogicLayer.Classes.BaseData.WorkName; report.ParameterByName("Printer").AsString = BaseData.GetUserName(Printer); report.ParameterByName("PrintTime").AsDateTime = HIS.SYSTEM.PubicBaseClasses.XcDate.ServerDateTime; report.ParameterByName("DiffFee").AsString = (printMaster.RetailFee - printMaster.TradeFee).ToString(); report.PrintPreview(false); } } catch (Exception error) { throw error; } }
/// <summary> /// 打印调价单 /// </summary> /// <param name="billMaster">单据表头</param> /// <param name="billOrder">单据明细</param> /// <param name="path">报表文件路径</param> /// <param name="Printer">打印人员</param> public override void PrintBill(HIS.Model.BillMaster billMaster, System.Data.DataTable billOrder, string path, int Printer) { if (billMaster == null || billOrder == null) { return; } HIS.Model.YP_AdjMaster printMaster = (HIS.Model.YP_AdjMaster)billMaster; if (billOrder.Rows.Count > 0) { _printOrder = billOrder; report = new grproLib.GridppReport(); report.LoadFromFile(path); report.FetchRecord += new grproLib._IGridppReportEvents_FetchRecordEventHandler(report_FetchRecord); report.ParameterByName("BillNo").AsString = printMaster.BillNum.ToString(); report.ParameterByName("AdjCode").AsString = printMaster.AdjCode; report.ParameterByName("BillDate").AsDateTime = printMaster.RegTime; report.ParameterByName("Remark").AsString = printMaster.Remark; report.ParameterByName("RegPeople").AsString = BaseData.GetUserName(printMaster.RegPeople); report.ParameterByName("RegDept").AsString = BaseData.GetDeptName(printMaster.DeptID.ToString()); report.ParameterByName("HospitalName").AsString = BaseData.WorkName; report.ParameterByName("Printer").AsString = BaseData.GetUserName(Printer); report.ParameterByName("PrintTime").AsDateTime = HIS.SYSTEM.PubicBaseClasses.XcDate.ServerDateTime; report.PrintPreview(false); } }
/// <summary> /// 打印住院退药单据 /// </summary> /// <param name="billMaster">单据表头</param> /// <param name="billOrder">单据明细</param> /// <param name="path">报表文件路径</param> /// <param name="Printer">打印人员</param> public override void PrintBill(HIS.Model.BillMaster billMaster, System.Data.DataTable billOrder, string path, int Printer) { if (billMaster == null) { return; } _printOrder = BillFactory.GetQuery(ConfigManager.OP_YF_REFUND).LoadOrder(billMaster); if (_printOrder.Rows.Count > 0) { HIS.Model.YP_DRMaster printMaster = (HIS.Model.YP_DRMaster)billMaster; report = new grproLib.GridppReport(); report.LoadFromFile(path); report.FetchRecord += new grproLib._IGridppReportEvents_FetchRecordEventHandler(report_FetchRecord); report.ParameterByName("InpatientNo").AsString = printMaster.InpatientID; report.ParameterByName("UserName").AsString = BaseData.GetUserName(printMaster.OPPeopleID); report.ParameterByName("ExeTime").AsDateTime = printMaster.OPTime; report.ParameterByName("PatientName").AsString = printMaster.PatientName; report.ParameterByName("HospitalName").AsString = BaseData.WorkName; report.ParameterByName("Printer").AsString = BaseData.GetUserName(Printer); report.ParameterByName("PrintTime").AsDateTime = HIS.SYSTEM.PubicBaseClasses.XcDate.ServerDateTime; report.PrintPreview(false); } }
/// <summary> /// 打印入库单据 /// </summary> /// <param name="billMaster">单据表头</param> /// <param name="billOrder">单据明细</param> /// <param name="path">报表文件路径</param> /// <param name="Printer">打印人员</param> public override void PrintBill(HIS.Model.BillMaster billMaster, System.Data.DataTable billOrder, string path, int Printer) { try { string billType = ""; HIS.Model.YP_InMaster printMaster = (HIS.Model.YP_InMaster)billMaster; DataTable dtt = billOrder.Clone(); DataRow[] datarows; datarows = billOrder.Select(""); foreach (DataRow dr in datarows) { dtt.Rows.Add(dr.ItemArray); } DataColumn dc = null; dc = dtt.Columns.Add("OVERNUM", Type.GetType("System.String")); // 增加结余数 zhangyunhui 5.8 for (int i = 0; i < dtt.Rows.Count; i++) { dtt.Rows[i]["OVERNUM"] = Getovernumber(Convert.ToInt32(dtt.Rows[i]["INSTORAGEID"].ToString())); } _printOrder = dtt; if (printMaster != null && billOrder.Rows.Count > 0) { report = new grproLib.GridppReport(); report.LoadFromFile(path); report.FetchRecord += new grproLib._IGridppReportEvents_FetchRecordEventHandler(report_FetchRecord); report.ParameterByName("Supporter").AsString = printMaster.SupportDic.Name; report.ParameterByName("InvoiceNo").AsString = printMaster.InvoiceNum; report.ParameterByName("BillNo").AsString = printMaster.BillNum.ToString(); if (printMaster.Audit_Flag == 0) { report.ParameterByName("ExeTime").AsString = printMaster.RegTime.ToString(); report.ParameterByName("AuditPeople").AsString = BaseData.GetUserName(printMaster.RegPeopleID); } else { report.ParameterByName("ExeTime").AsString = printMaster.AuditTime.ToString(); report.ParameterByName("AuditPeople").AsString = BaseData.GetUserName(printMaster.AuditPeopleID); } report.ParameterByName("TotalFee").AsString = printMaster.RetailFee.ToString(); report.ParameterByName("CurrentUser").AsString = BaseData.GetUserName(printMaster.RegPeopleID); if (printMaster.OpType == ConfigManager.OP_YK_BACKSTORE) { billType = DrugBaseDataBll.FindDrugDept(printMaster.DeptID).DeptType1 == "物资" ? "物资退库单" : "药品退库单"; } else { billType = DrugBaseDataBll.FindDrugDept(printMaster.DeptID).DeptType1 == "物资" ? "物资入库单" : "药品入库单"; } report.ParameterByName("CurrentDept").AsString = BaseData.GetDeptName(printMaster.DeptID.ToString()); report.ParameterByName("HospitalName").AsString = HIS.SYSTEM.BussinessLogicLayer.Classes.BaseData.WorkName + billType; report.ParameterByName("Printer").AsString = BaseData.GetUserName(Printer); report.ParameterByName("PrintTime").AsDateTime = HIS.SYSTEM.PubicBaseClasses.XcDate.ServerDateTime; report.ParameterByName("InstoreFee").AsString = printMaster.StockFee.ToString(); report.ParameterByName("DiffFee").AsString = (printMaster.RetailFee - printMaster.StockFee).ToString(); report.ParameterByName("ReMark").AsString = printMaster.ReMark.ToString(); report.PrintPreview(false); } } catch (Exception error) { throw error; } }
/// <summary> /// 打印住院摆药单据 /// </summary> /// <param name="billMaster">单据表头</param> /// <param name="billOrder">单据明细</param> /// <param name="path">报表文件路径</param> /// <param name="Printer">打印人员</param> public override void PrintBill(HIS.Model.BillMaster billMaster, System.Data.DataTable billOrder, string path, int Printer) { //if (billMaster == null) //{ // return; //} //HIS.Model.YP_DRMaster printMaster = (HIS.Model.YP_DRMaster)billMaster; //billOrder = BillFactory.GetQuery(ConfigManager.OP_YF_DISPENSE).LoadOrder(billMaster); //HIS.Interface.IZY_Data zyInterFace = new HIS.Interface.ZY_Data(); //billOrder=zyInterFace //if (billOrder.Rows.Count > 0) //{ // _printOrder = billOrder; // report = new grproLib.GridppReport(); // report.LoadFromFile(path); // report.FetchRecord += new grproLib._IGridppReportEvents_FetchRecordEventHandler(report_FetchRecord); // report.ParameterByName("CureNo").AsString = printMaster.InpatientID.ToString(); // report.ParameterByName("UserName").AsString = BaseData.GetUserName(printMaster.OPPeopleID); // report.ParameterByName("ExeTime").AsDateTime = printMaster.OPTime; // report.ParameterByName("PatientName").AsString = printMaster.PatientName; // report.ParameterByName("HospitalName").AsString = HIS.SYSTEM.BussinessLogicLayer.Classes.BaseData.WorkName; // report.ParameterByName("PrintTime").AsDateTime = HIS.SYSTEM.PubicBaseClasses.XcDate.ServerDateTime; // report.ParameterByName("Printer").AsString = BaseData.GetUserName(Printer); // report.PrintPreview(false); //} if (billMaster == null) { if (billOrder == null) { return; } if (billOrder.Rows.Count > 0) { HIS.Model.ZY_PatList patlist = HIS.SYSTEM.Core.BindEntity <HIS.Model.ZY_PatList> .CreateInstanceDAL(oleDb).GetModel(Convert.ToInt32(billOrder.Rows[0]["patlistid"])); _printOrder = billOrder; //for (int i = 0; i < _printOrder.Rows.Count; i++) //{ // decimal presamount =( _printOrder.Rows[i]["presamount"] == null || _printOrder.Rows[i]["presamount"].ToString() == "0" ? 1 : Convert.ToDecimal(_printOrder.Rows[i]["presamount"].ToString())); // _printOrder.Rows[i]["amount"] = Convert.ToDecimal(_printOrder.Rows[i]["amount"].ToString()) / presamount; //} report = new grproLib.GridppReport(); report.LoadFromFile(path); report.FetchRecord += new grproLib._IGridppReportEvents_FetchRecordEventHandler(report_FetchRecord); report.ParameterByName("CureNo").AsString = patlist.CureNo; report.ParameterByName("UserName").AsString = BaseData.GetUserName(Printer); //report.ParameterByName("ExeTime").AsDateTime = printMaster.OPTime; report.ParameterByName("PatientName").AsString = patlist.PatientInfo.PatName; report.ParameterByName("HospitalName").AsString = HIS.SYSTEM.BussinessLogicLayer.Classes.BaseData.WorkName; report.ParameterByName("PrintTime").AsDateTime = HIS.SYSTEM.PubicBaseClasses.XcDate.ServerDateTime; report.ParameterByName("Printer").AsString = BaseData.GetUserName(Printer); report.ParameterByName("总金额").AsString = Convert.ToDecimal(_printOrder.Compute("sum(tolal_fee)", "")).ToString("0.00") + " 元"; report.ParameterByName("病人科室").AsString = BaseData.GetDeptName(patlist.CurrDeptCode); report.ParameterByName("开方医生").AsString = billOrder.Rows[0]["presdocname"].ToString(); report.PrintPreview(false); } } else { HIS.Model.YP_DRMaster printMaster = (HIS.Model.YP_DRMaster)billMaster; billOrder = BillFactory.GetQuery(ConfigManager.OP_YF_DISPENSE).LoadOrder(billMaster); if (billOrder.Rows.Count > 0) { _printOrder = billOrder; for (int i = 0; i < _printOrder.Rows.Count; i++) { decimal presamount = (_printOrder.Rows[i]["recipenum"] == null || _printOrder.Rows[i]["recipenum"].ToString() == "0" ? 1 : Convert.ToDecimal(_printOrder.Rows[i]["recipenum"].ToString())); _printOrder.Rows[i]["drugocnum"] = Convert.ToDecimal(_printOrder.Rows[i]["drugocnum"].ToString()) / presamount; } report = new grproLib.GridppReport(); report.LoadFromFile(path); report.FetchRecord += new grproLib._IGridppReportEvents_FetchRecordEventHandler(report_FetchRecord); report.ParameterByName("CureNo").AsString = printMaster.InpatientID.ToString(); report.ParameterByName("UserName").AsString = BaseData.GetUserName(printMaster.OPPeopleID); report.ParameterByName("ExeTime").AsDateTime = printMaster.OPTime; report.ParameterByName("PatientName").AsString = printMaster.PatientName; report.ParameterByName("HospitalName").AsString = HIS.SYSTEM.BussinessLogicLayer.Classes.BaseData.WorkName; report.ParameterByName("PrintTime").AsDateTime = HIS.SYSTEM.PubicBaseClasses.XcDate.ServerDateTime; report.ParameterByName("Printer").AsString = BaseData.GetUserName(Printer); report.ParameterByName("总金额").AsString = Convert.ToDecimal(_printOrder.Compute("sum(retailfee)", "")).ToString("0.00") + " 元"; report.PrintPreview(false); } } }
/// <summary> /// 打印出库单据 /// </summary> /// <param name="billMaster">单据表头</param> /// <param name="billOrder">单据明细</param> /// <param name="path">报表文件路径</param> /// <param name="Printer">打印人员</param> public override void PrintBill(HIS.Model.BillMaster billMaster, System.Data.DataTable billOrder, string path, int Printer) { HIS.Model.YP_OutMaster printMaster = (HIS.Model.YP_OutMaster)billMaster; if (printMaster != null && billOrder != null) { if (billOrder.Rows.Count > 0) { DataTable dtt = billOrder.Copy(); bool isShowTradePrice = ConfigManager.ManageTradepriceByYF(); if (!isShowTradePrice) { _printOrder.Columns.Remove("TRADEPRICE"); _printOrder.Columns.Remove("TRADEFEE"); _printOrder.Columns.Remove("DIFFFEE"); } DataColumn dc = null; dc = dtt.Columns.Add("OVERNUM", Type.GetType("System.String"));//增加结余数 zhangyunhui 5.8 for (int i = 0; i < dtt.Rows.Count; i++) { dtt.Rows[i]["OVERNUM"] = Getovernumber(Convert.ToInt32(dtt.Rows[i]["OUTSTORAGEID"].ToString())); } _printOrder = dtt; if (printMaster.OpType == ConfigManager.OP_YK_REPORTLOSS) { report = new grproLib.GridppReport(); string startPath = path + "\\report\\药品报损出库单据.grf"; report.LoadFromFile(startPath); report.FetchRecord += new grproLib._IGridppReportEvents_FetchRecordEventHandler(report_FetchRecord); } else { report = new grproLib.GridppReport(); string startPath = path + "\\report\\科室领药出库单据.grf"; report.LoadFromFile(startPath); report.FetchRecord += new grproLib._IGridppReportEvents_FetchRecordEventHandler(report_FetchRecord); report.ParameterByName("OutDept").AsString = BaseData.GetDeptName(printMaster.OutDeptId.ToString()); } report.ParameterByName("BillNo").AsString = printMaster.BillNum.ToString(); if (printMaster.Audit_Flag == 0) { report.ParameterByName("ExeTime").AsString = printMaster.RegTime.ToString(); report.ParameterByName("RegPeople").AsString = BaseData.GetUserName(printMaster.RegPeopleID); } else { report.ParameterByName("ExeTime").AsString = printMaster.AuditTime.ToString(); report.ParameterByName("RegPeople").AsString = BaseData.GetUserName(printMaster.AuditPeopleID); } report.ParameterByName("RegDept").AsString = BaseData.GetDeptName(printMaster.DeptID.ToString()); report.ParameterByName("Remark").AsString = printMaster.ReMark; report.ParameterByName("TotalRetailFee").AsString = printMaster.RetailFee.ToString(); string billType = DrugBaseDataBll.FindDrugDept(printMaster.DeptID).DeptType1 == "物资" ? "物资出库单" : "药品出库单"; report.ParameterByName("HospitalName").AsString = HIS.SYSTEM.BussinessLogicLayer.Classes.BaseData.WorkName + billType; report.ParameterByName("Printer").AsString = BaseData.GetUserName(Printer); if (isShowTradePrice) { report.ParameterByName("TotalTradeFee").AsString = printMaster.TradeFee.ToString(); report.ParameterByName("TotalDiffFee").AsString = (printMaster.RetailFee - printMaster.TradeFee).ToString(); } else { report.ParameterByName("TotalTradeFee").AsString = "受管制无法显示"; report.ParameterByName("TotalDiffFee").AsString = "受管制无法显示"; } report.ParameterByName("Auditer").AsString = BaseData.GetUserName(printMaster.AuditPeopleID); report.ParameterByName("PrintTime").AsDateTime = HIS.SYSTEM.PubicBaseClasses.XcDate.ServerDateTime; //report.ParameterByName("BillDate").AsDateTime = (printMaster.BillDate); report.PrintPreview(false); } } }
/// <summary> /// 打印单据(未实现该方法) /// </summary> /// <param name="billMaster">单据表头</param> /// <param name="billOrder">单据明细</param> /// <param name="path">报表文件路径</param> /// <param name="Printer">打印人员</param> public override void PrintBill(HIS.Model.BillMaster billMaster, System.Data.DataTable billOrder, string path, int Printer) { throw new NotImplementedException(); }