/// <summary> /// 目标单位信息填充 /// </summary> /// <param name="targetNO">目标单位编码</param> private int FillTargetInfo(string targetNO) { if (this.isPIDept) //药库 { Neusoft.HISFC.BizLogic.Pharmacy.Constant phaConsManager = new Neusoft.HISFC.BizLogic.Pharmacy.Constant(); Neusoft.HISFC.Models.Pharmacy.Company company = phaConsManager.QueryCompanyByCompanyID(targetNO); if (company == null) { MessageBox.Show(Language.Msg("无法获取该条供货单位信息")); return(-1); } this.phaInManager.TargetDept = company; this.phaInManager.TargetDept.Memo = "1"; } else { Neusoft.HISFC.BizLogic.Manager.Department deptManager = new Neusoft.HISFC.BizLogic.Manager.Department(); Neusoft.HISFC.Models.Base.Department dept = deptManager.GetDeptmentById(targetNO); if (dept == null) { MessageBox.Show(Language.Msg("无法获取该条记录申请科室信息!")); return(-1); } this.phaInManager.TargetDept = dept; this.phaInManager.TargetDept.Memo = "0"; } return(1); }
/// <summary> /// 入库单据查询 /// </summary> protected override void QueryIn() { Neusoft.HISFC.BizLogic.Pharmacy.Item itemManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item(); ArrayList alList = itemManager.QueryInputList(this.DeptInfo.ID, "AAAA", this.State, this.BeginDate, this.EndDate); if (alList == null) { MessageBox.Show(Language.Msg("查询单据列表发生错误" + itemManager.Err)); } this.neuSpread1_Sheet1.Rows.Count = 0; foreach (Neusoft.HISFC.Models.Pharmacy.Input info in alList) { if (this.MarkPrivType != null) { if (this.MarkPrivType.ContainsKey(info.PrivType)) //对于过滤的权限不显示 { continue; } } this.neuSpread1_Sheet1.Rows.Add(0, 1); this.neuSpread1_Sheet1.Cells[0, 0].Text = info.InListNO; this.neuSpread1_Sheet1.Cells[0, 1].Text = info.DeliveryNO; this.neuSpread1_Sheet1.Cells[0, 2].Text = this.inTypeHelper.GetName(info.PrivType); Neusoft.HISFC.Models.Pharmacy.Company company = new Neusoft.HISFC.Models.Pharmacy.Company(); if (info.Company.ID != "None") { Neusoft.HISFC.BizLogic.Pharmacy.Constant constant = new Neusoft.HISFC.BizLogic.Pharmacy.Constant(); company = constant.QueryCompanyByCompanyID(info.Company.ID); if (company == null) { MessageBox.Show(Language.Msg(constant.Err)); return; } } else { company.ID = "None"; company.Name = "无供货公司"; } this.neuSpread1_Sheet1.Cells[0, 3].Text = company.Name; this.neuSpread1_Sheet1.Cells[0, (int)ColumnSet.ColTargetID].Text = company.ID; } }
/// <summary> /// 增加申请数据 /// </summary> /// <param name="listCode">申请单号</param> /// <param name="state">状态</param> /// <returns>成功返回1 </失败返回-1returns> protected virtual int AddApplyData(string listCode, string state) { Neusoft.HISFC.BizLogic.Pharmacy.Item itemManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item(); ArrayList al = itemManager.QueryApplyIn(this.phaInManager.DeptInfo.ID, listCode, "0"); if (al == null) { System.Windows.Forms.MessageBox.Show(Language.Msg("未正确获取外部入库申请信息" + itemManager.Err)); return(-1); } this.Clear(); Neusoft.FrameWork.Models.NeuObject applyCompany = new Neusoft.FrameWork.Models.NeuObject(); foreach (Neusoft.HISFC.Models.Pharmacy.Input input in al) { Neusoft.HISFC.Models.Pharmacy.Item tempItem = itemManager.GetItem(input.Item.ID); input.Item = tempItem; //药品实体信息 input.Quantity = input.Operation.ApplyQty; if (this.AddDataToTable(input) == 1) { this.hsInputData.Add(input.Item.ID + input.BatchNO, input); } applyCompany = input.Company; } Neusoft.HISFC.BizLogic.Pharmacy.Constant consManager = new Neusoft.HISFC.BizLogic.Pharmacy.Constant(); Neusoft.HISFC.Models.Pharmacy.Company compay = consManager.QueryCompanyByCompanyID(applyCompany.ID); applyCompany.Name = compay.Name; applyCompany.Memo = "1"; this.phaInManager.TargetDept = applyCompany; this.CompuateSum(); this.SetFormat(); return(1); }
/// <summary> /// 出库单据查询 /// </summary> protected override void QueryOut() { Neusoft.HISFC.BizLogic.Pharmacy.Item itemManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item(); ArrayList alList = new ArrayList(); if (this.PrivType != null && this.PrivType.ID != "") { #region 根据不同权限进行不同处理 switch (this.PrivType.Memo) { case "16": //核准入库 alList = itemManager.QueryOutputListForApproveInput(this.DeptInfo.ID, this.BeginDate, this.EndDate); break; } #endregion } else { alList = itemManager.QueryOutputList(this.DeptInfo.ID, "A", this.State, this.BeginDate, this.EndDate); } if (alList == null) { MessageBox.Show(Language.Msg("查询单据列表发生错误" + itemManager.Err)); } this.neuSpread1_Sheet1.Rows.Count = 0; foreach (Neusoft.FrameWork.Models.NeuObject info in alList) { if (this.MarkPrivType != null) { if (this.MarkPrivType.ContainsKey(info.User01)) //对于过滤的权限不显示 { continue; } } this.neuSpread1_Sheet1.Rows.Add(0, 1); this.neuSpread1_Sheet1.Cells[0, 0].Text = info.ID; this.neuSpread1_Sheet1.Cells[0, 2].Text = this.outTypeHelper.GetName(info.User01); Neusoft.HISFC.Models.Pharmacy.Company company = new Neusoft.HISFC.Models.Pharmacy.Company(); if (this.deptHelper.GetObjectFromID(info.Memo) == null) { Neusoft.HISFC.BizLogic.Pharmacy.Constant constant = new Neusoft.HISFC.BizLogic.Pharmacy.Constant(); company = constant.QueryCompanyByCompanyID(info.Memo); if (company == null) { MessageBox.Show(constant.Err); return; } } else { company.ID = info.Memo; company.Name = this.deptHelper.GetName(info.Memo); } this.neuSpread1_Sheet1.Cells[0, 3].Text = company.Name; this.neuSpread1_Sheet1.Cells[0, (int)ColumnSet.ColTargetID].Text = company.ID; } }