/// <summary> /// 获取统计大类ID /// </summary> /// <param name="statID">中心统计大类ID</param> /// <returns>本院统计大类ID</returns> private int getsubitemId(int statID) { Basic_StatItem subitem = Listitem.Find(x => x.StatID == statID); if (subitem == null) { return(0); } return(subitem.ID); }
/// <summary> /// 获取分类明细ID /// </summary> /// <param name="subtype">类型</param> /// <param name="statID">统计大类ID</param> /// <returns>分类明细ID</returns> private int getsubclassId(int subtype, int statID) { Basic_StatItem subitem = Listitem.Find(x => x.StatID == statID); if (subitem == null) { return(0); } Basic_StatItemSubclass subclass = null; switch (subtype) { case 1: subclass = Listsubclass.Find(x => x.SubID == subitem.AccItemID); break; case 2: subclass = Listsubclass.Find(x => x.SubID == subitem.CostItemID); break; case 3: subclass = Listsubclass.Find(x => x.SubID == subitem.BaItemID); break; case 4: subclass = Listsubclass.Find(x => x.SubID == subitem.PoItemID); break; case 5: subclass = Listsubclass.Find(x => x.SubID == subitem.OutFpItemID); break; case 6: subclass = Listsubclass.Find(x => x.SubID == subitem.InFpItemID); break; } if (subclass == null) { return(0); } return(subclass.SubID); }