Пример #1
0
        /// <summary>
        /// 通过外关联的单主键值,获取数据
        /// </summary>
        /// <param name="id">外键值</param>
        /// <returns>实体</returns>
        public override FindedResults <ProjectDtlPerformTargetModel> FindByForeignKey <TValType>(TValType id, params string[] sorts)
        {
            FindedResults <ProjectDtlPerformTargetModel> findedResults = base.FindByForeignKey(id, sorts);

            #region 明细Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            //helpdac.CodeToName<ProjectDtlPerformTargetModel>(findedResults.Data, "属性名", "注册的帮助标识"
            //helpdac.CodeToName<ProjectDtlPerformTargetModel>(findedResults.Data, "Code属性名", "Name属性名", "注册的帮助标识", "");
            helpdac.CodeToName <ProjectDtlPerformTargetModel>(findedResults.Data, "FTargetClassCode", "FTargetClassCode_EXName", "GHPerformEvalTargetClass", "");
            helpdac.CodeToName <ProjectDtlPerformTargetModel>(findedResults.Data, "FTargetTypeCode", "FTargetTypeCode_EXName", "GHPerformEvalTargetType", "");
            #endregion

            return(findedResults);
        }
Пример #2
0
        /// <summary>
        /// 分页获取全部集合
        /// </summary>
        /// <param name="pageNumber">页码(从1开始)</param>
        /// <param name="pageSize">每页大小(最大为200)</param>
        /// <param name="nameSqlName">命名SQL名称</param>
        /// <param name="dic">查询条件字典(建议使用Enterprise3.Common.Base.CreateCriteria进行创建)</param>
        /// <param name="sorts">排序({属性名 desc,属性名,属性名 asc})</param>
        /// <returns>集合</returns>
        public PagedResult <QtBaseProjectModel> LoadWithPage(int pageNumber, int pageSize = 20, string nameSqlName = "", Dictionary <string, object> dic = null, params string[] sorts)
        {
            PagedResult <QtBaseProjectModel> pageResult = base.FacadeHelper.LoadWithPage(pageNumber, pageSize, nameSqlName, dic, sorts);

            #region 列表Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            //helpdac.CodeToName<QtBaseProjectModel>(pageResult.Results, "属性名", "注册的帮助标识"
            //helpdac.CodeToName<QtBaseProjectModel>(pageResult.Results, "Code属性名", "Name属性名", "注册的帮助标识", "");
            helpdac.CodeToName <QtBaseProjectModel>(pageResult.Results, "FFillDept", "FFillDept_Name", "ys_orglist", "");
            helpdac.CodeToName <QtBaseProjectModel>(pageResult.Results, "FKmdm", "Fkmmc", "GHBudgetAccounts", "");
            #endregion

            return(pageResult);
        }
Пример #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="dicWhere"></param>
        /// <param name="sorts"></param>
        /// <returns></returns>
        public override FindedResults <QTProjectMstModel> Find(Dictionary <string, object> dicWhere, params string[] sorts)
        {
            FindedResults <QTProjectMstModel> Result = base.Find(dicWhere, sorts);

            #region 列表Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            helpdac.CodeToName <QTProjectMstModel>(Result.Data, "FDeclarationDept", "FDeclarationDept_EXName", "ys_orglist2", "");
            helpdac.CodeToName <QTProjectMstModel>(Result.Data, "FBudgetDept", "FBudgetDept_EXName", "ys_orglist", "");
            helpdac.CodeToName <QTProjectMstModel>(Result.Data, "FExpenseCategory", "FExpenseCategory_EXName", "GHExpenseCategory", "");
            helpdac.CodeToName <QTProjectMstModel>(Result.Data, "FDtlstage", "FDtlstage_EXName", "gh_DtlStage", "");
            //helpdac.CodeToName<QTProjectMstModel>(Result.Data, "FAccount", "FAccount_EXName", "gh_Account", "");
            #endregion
            return(Result);
        }
Пример #4
0
        /// <summary>
        /// 根据用款计划的主键获取相关数据集合
        /// </summary>
        /// <param name="phid">主键</param>
        /// <returns></returns>
        public ExpenseAllModel GetExpenseAllModel(long phid)
        {
            ExpenseAllModel        expenseAll  = new ExpenseAllModel();
            ExpenseMstModel        expenseMst  = new ExpenseMstModel();
            List <ExpenseDtlModel> expenseDtls = new List <ExpenseDtlModel>();
            List <ExpenseHxModel>  expenseHxes = new List <ExpenseHxModel>();
            var expenses = this.ExpenseMstRule.Find(t => t.PhId == phid);

            if (expenses != null && expenses.Count > 0)
            {
                RichHelpDac helpdac = new RichHelpDac();
                helpdac.CodeToName <ExpenseMstModel>(expenses, "FDeclarationunit", "FDeclarationunit_EXName", "sb_orglist", "");
                helpdac.CodeToName <ExpenseMstModel>(expenses, "FDeclarationDept", "FDeclarationDept_EXName", "dept4ocode", "");
                helpdac.CodeToName <ExpenseMstModel>(expenses, "FBudgetDept", "FBudgetDept_EXName", "ys_orglist", "");
                helpdac.CodeToName <ExpenseMstModel>(expenses, "FExpenseCategory", "FExpenseCategory_EXName", "GHExpenseCategory", "");
                helpdac.CodeToName <ExpenseMstModel>(expenses, "FApprover", "FApprover_EXName", "fg3_user", "");
                expenseMst = expenses[0];
                if (expenseMst.FApprovestatus != "3")
                {
                    throw new Exception("已审批的单据才能进行核销!");
                }
                if (expenseMst.FIfpurchase == 1 || expenseMst.FLifeCycle != 0)
                {
                    throw new Exception("作废据不能进行核销!");
                }
                decimal returnAllAmount = 0;
                decimal payAllAmount    = 0;
                expenseDtls = this.ExpenseDtlRule.Find(t => t.MstPhid == phid).ToList(); //明细数据也就是额度返回的数据
                if (expenseDtls != null && expenseDtls.Count > 0)
                {
                    //RichHelpDac helpdac = new RichHelpDac();
                    helpdac.CodeToName <ExpenseDtlModel>(expenseDtls, "FBudgetaccounts", "FBudgetaccounts_EXName", "GHBudgetAccounts", "");
                    helpdac.CodeToName <ExpenseDtlModel>(expenseDtls, "FExpenseschannel", "FExpenseschannel_EXName", "GHExpensesChannel", "");
                    helpdac.CodeToName <ExpenseDtlModel>(expenseDtls, "FSourceoffunds", "FSourceoffunds_EXName", "GHSourceOfFunds", "");
                    foreach (var dtl in expenseDtls)
                    {
                        returnAllAmount = returnAllAmount + dtl.FAmount;
                        payAllAmount    = payAllAmount + dtl.FAmount;
                    }
                }
                expenseHxes = this.ExpenseHxRule.Find(t => t.MstPhid == phid).ToList();//核销明细数据
                if (expenseHxes != null && expenseHxes.Count > 0)
                {
                    foreach (var hx in expenseHxes)
                    {
                        returnAllAmount = returnAllAmount - hx.FAmount;
                    }
                }
                expenseAll.ExpenseMst      = expenseMst;
                expenseAll.ExpenseDtls     = expenseDtls;
                expenseAll.ExpenseHxs      = expenseHxes;
                expenseAll.ReturnAllAmount = returnAllAmount;
                expenseAll.PayAllAmount    = payAllAmount;
            }
            else
            {
                throw new Exception("此用款计划数据不存在!");
            }
            return(expenseAll);
        }
Пример #5
0
        /// <summary>
        /// 通过外关联的单主键值,获取数据
        /// </summary>
        /// <param name="id">外键值</param>
        /// <returns>实体</returns>
        public override FindedResults <ProjectDtlPurchaseDtlModel> FindByForeignKey <TValType>(TValType id, params string[] sorts)
        {
            FindedResults <ProjectDtlPurchaseDtlModel> findedResults = base.FindByForeignKey(id, sorts);

            #region 明细Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            //helpdac.CodeToName<ProjectDtlPurchaseDtlModel>(findedResults.Data, "属性名", "注册的帮助标识"
            //helpdac.CodeToName<ProjectDtlPurchaseDtlModel>(findedResults.Data, "Code属性名", "Name属性名", "注册的帮助标识", "");
            helpdac.CodeToName <ProjectDtlPurchaseDtlModel>(findedResults.Data, "FCatalogCode", "FCatalogCode_EXName", "GHProcurementCatalog", "");
            helpdac.CodeToName <ProjectDtlPurchaseDtlModel>(findedResults.Data, "FTypeCode", "FTypeCode_EXName", "GHProcurementType", "");
            helpdac.CodeToName <ProjectDtlPurchaseDtlModel>(findedResults.Data, "FProcedureCode", "FProcedureCode_EXName", "GHProcurementProcedures", "");
            #endregion

            return(findedResults);
        }
Пример #6
0
        /// <summary>
        /// 分页获取全部集合
        /// </summary>
        /// <param name="pageNumber">页码(从1开始)</param>
        /// <param name="pageSize">每页大小(最大为200)</param>
        /// <param name="dic">查询条件字典(建议使用Enterprise3.Common.Base.CreateCriteria进行创建)</param>
        /// <param name="sorts">排序({属性名 desc,属性名,属性名 asc})</param>
        /// <returns>集合</returns>
        public override PagedResult <QTIndividualInfoModel> LoadWithPage(int pageNumber, int pageSize = 20, Dictionary <string, object> dic = null, params string[] sorts)
        {
            PagedResult <QTIndividualInfoModel> pageResult = base.LoadWithPage(pageNumber, pageSize, dic, sorts);

            #region 列表Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            helpdac.CodeToName <QTIndividualInfoModel>(pageResult.Results, "IndividualinfoPhid", "IndividualinfoPhid_EXName", "GHQTindividualinfo", "");
            helpdac.CodeToName <QTIndividualInfoModel>(pageResult.Results, "YLXPhid", "YLXPhid_EXName", "GHQTindividualinfo", "");
            helpdac.CodeToName <QTIndividualInfoModel>(pageResult.Results, "XMLXPhid", "XMLXPhid_EXName", "GHQTindividualinfo", "");
            helpdac.CodeToName <QTIndividualInfoModel>(pageResult.Results, "NZTXPhid", "NZTXPhid_EXName", "GHQTindividualinfo", "");
            //helpdac.CodeToName<QTIndividualInfoModel>(pageResult.Results, "属性名", "注册的帮助标识"
            //helpdac.CodeToName<QTIndividualInfoModel>(pageResult.Results, "Code属性名", "Name属性名", "注册的帮助标识", "");
            #endregion
            return(pageResult);
        }
Пример #7
0
        /// <summary>
        /// SubjectMstBudgetDtl业务逻辑处理对象
        /// </summary>
        //ISubjectMstBudgetDtlRule SubjectMstBudgetDtlRule { get; set; }
        #endregion

        #region 重载方法
        /// <summary>
        /// 通过外关联的单主键值,获取数据
        /// </summary>
        /// <param name="id">外键值</param>
        /// <returns>实体</returns>
        public override FindedResults <SubjectMstBudgetDtlModel> FindByForeignKey <TValType>(TValType id, params string[] sorts)
        {
            FindedResults <SubjectMstBudgetDtlModel> findedResults = base.FindByForeignKey(id, sorts);

            #region 明细Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            //helpdac.CodeToName<SubjectMstBudgetDtlModel>(findedResults.Data, "属性名", "注册的帮助标识"
            //helpdac.CodeToName<SubjectMstBudgetDtlModel>(findedResults.Data, "Code属性名", "Name属性名", "注册的帮助标识", "");
            helpdac.CodeToName <SubjectMstBudgetDtlModel>(findedResults.Data, "FDeclarationUnit", "FDeclarationUnit_EXName", "sb_orglist", "");
            helpdac.CodeToName <SubjectMstBudgetDtlModel>(findedResults.Data, "FExpensesChannel", "FExpensesChannel_EXName", "GHExpensesChannel", "");
            helpdac.CodeToName <SubjectMstBudgetDtlModel>(findedResults.Data, "FBudgetDept", "FBudgetDept_EXName", "ys_orglist", "");
            #endregion

            return(findedResults);
        }
Пример #8
0
        /// <summary>
        /// 通过外关联的单主键值,获取数据
        /// </summary>
        /// <param name="id">外键值</param>
        /// <returns>实体</returns>
        public override FindedResults <ExpenseDtlModel> FindByForeignKey <TValType>(TValType id, params string[] sorts)
        {
            FindedResults <ExpenseDtlModel> findedResults = base.FindByForeignKey(id, sorts);

            #region 明细Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            //helpdac.CodeToName<ExpenseDtlModel>(findedResults.Data, "属性名", "注册的帮助标识"
            //helpdac.CodeToName<ExpenseDtlModel>(findedResults.Data, "Code属性名", "Name属性名", "注册的帮助标识", "");
            helpdac.CodeToName <ExpenseDtlModel>(findedResults.Data, "FSourceoffunds", "FSourceoffunds_EXName", "GHSourceOfFunds", "");
            helpdac.CodeToName <ExpenseDtlModel>(findedResults.Data, "FBudgetaccounts", "FBudgetaccounts_EXName", "GHBudgetAccounts", "");
            helpdac.CodeToName <ExpenseDtlModel>(findedResults.Data, "FPaymentmethod", "FPaymentmethod_EXName", "GHPaymentMethod", "");
            helpdac.CodeToName <ExpenseDtlModel>(findedResults.Data, "FExpenseschannel", "FExpenseschannel_EXName", "GHExpensesChannel", "");
            #endregion

            return(findedResults);
        }
Пример #9
0
        /// <summary>
        /// 部门代码转
        /// </summary>
        /// <param name="nameSqlName"></param>
        /// <param name="dicWhere"></param>
        /// <param name="isUseInfoRight"></param>
        /// <param name="sorts"></param>
        /// <returns></returns>
        public PagedResult <ExpenseMstModel> LoadWithPageForDept(string nameSqlName = "", Dictionary <string, object> dicWhere = null, bool isUseInfoRight = false, params string[] sorts)
        {
            PagedResult <ExpenseMstModel> pageResult = base.FacadeHelper.LoadWithPageInfinity(nameSqlName, dicWhere, false, sorts);
            RichHelpDac helpdac = new RichHelpDac();

            helpdac.CodeToName <ExpenseMstModel>(pageResult.Results, "FBudgetDept", "FBudgetDept_EXName", "ys_orglist", "");
            return(pageResult);
        }
Пример #10
0
        /// <summary>
        /// 通过外关联的单主键值,获取数据
        /// </summary>
        /// <param name="id">外键值</param>
        /// <returns>实体</returns>
        public override FindedResults<SubjectMstModel> FindByForeignKey<TValType>(TValType id, params string[] sorts)
        {
            FindedResults<SubjectMstModel> findedResults = base.FindByForeignKey(id, sorts);

            #region 明细Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            //helpdac.CodeToName<SubjectMstModel>(findedResults.Data, "属性名", "注册的帮助标识"
            //helpdac.CodeToName<SubjectMstModel>(findedResults.Data, "Code属性名", "Name属性名", "注册的帮助标识", "");
            helpdac.CodeToName<SubjectMstModel>(findedResults.Data, "FDeclarationUnit", "FDeclarationUnit_EXName", "sb_orglist", "");
            helpdac.CodeToName<SubjectMstModel>(findedResults.Data, "FBudgetDept", "FBudgetDept_EXName", "ys_orglist", "");
            helpdac.CodeToName<SubjectMstModel>(findedResults.Data, "FFillDept", "FFillDept_EXName", "ys_orglist", "");
            helpdac.CodeToName<SubjectMstModel>(findedResults.Data, "FSubjectCode", "FSubjectName", "GHBudgetAccounts", "");
            helpdac.CodeToName<SubjectMstModel>(findedResults.Data, "FProjCode", "FProjName", "GHSubjectName", "");
            #endregion

            return findedResults;
        }
Пример #11
0
        /// <summary>
        /// 通过外关联的单主键值,获取数据
        /// </summary>
        /// <param name="id">外键值</param>
        /// <returns>实体</returns>
        public override FindedResult <BudgetDtlBudgetDtlModel> Find <TValType>(TValType id)
        {
            FindedResult <BudgetDtlBudgetDtlModel> findedResults = base.Find(id);

            #region 明细Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            //helpdac.CodeToName<BudgetDtlBudgetDtlModel>(findedResults.Data, "属性名", "注册的帮助标识"
            //helpdac.CodeToName<BudgetDtlBudgetDtlModel>(findedResults.Data, "Code属性名", "Name属性名", "注册的帮助标识", "");
            helpdac.CodeToName <BudgetDtlBudgetDtlModel>(findedResults.Data, "FSourceOfFunds", "FSourceOfFunds_EXName", "GHSourceOfFunds");
            helpdac.CodeToName <BudgetDtlBudgetDtlModel>(findedResults.Data, "FPaymentMethod", "FPaymentMethod_EXName", "GHPaymentMethod");
            helpdac.CodeToName <BudgetDtlBudgetDtlModel>(findedResults.Data, "FExpensesChannel", "FExpensesChannel_EXName", "GHExpensesChannel");
            helpdac.CodeToName <BudgetDtlBudgetDtlModel>(findedResults.Data, "FBudgetAccounts", "FBudgetAccounts_EXName", "GHBudgetAccounts");
            helpdac.CodeToName <BudgetDtlBudgetDtlModel>(findedResults.Data, "FQtZcgnfl", "FQtZcgnfl_EXName", "GHQtZcgnfl");
            #endregion

            return(findedResults);
        }
Пример #12
0
        /// <summary>
        /// 分页获取全部集合
        /// </summary>
        /// <param name="pageNumber">页码(从1开始)</param>
        /// <param name="pageSize">每页大小(最大为200)</param>
        /// <param name="nameSqlName">命名SQL名称</param>
        /// <param name="dic">查询条件字典(建议使用Enterprise3.Common.Base.CreateCriteria进行创建)</param>
        /// <param name="sorts">排序({属性名 desc,属性名,属性名 asc})</param>
        /// <returns>集合</returns>
        public override PagedResult <QTProjectMstModel> LoadWithPage(int pageNumber, int pageSize = 20, string nameSqlName = "", Dictionary <string, object> dic = null, bool isUseInfoRight = false, params string[] sorts)
        {
            PagedResult <QTProjectMstModel> pageResult = base.LoadWithPage(pageNumber, pageSize, nameSqlName, dic, isUseInfoRight, sorts);

            #region 列表Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            //helpdac.CodeToName<QTProjectMstModel>(pageResult.Results, "属性名", "注册的帮助标识"
            //helpdac.CodeToName<QTProjectMstModel>(pageResult.Results, "Code属性名", "Name属性名", "注册的帮助标识", "");
            helpdac.CodeToName <QTProjectMstModel>(pageResult.Results, "FDeclarationDept", "FDeclarationDept_EXName", "ys_orglist2", "");
            helpdac.CodeToName <QTProjectMstModel>(pageResult.Results, "FBudgetDept", "FBudgetDept_EXName", "ys_orglist", "");
            helpdac.CodeToName <QTProjectMstModel>(pageResult.Results, "FDtlstage", "FDtlstage_EXName", "gh_DtlStage", "");
            helpdac.CodeToName <QTProjectMstModel>(pageResult.Results, "FExpenseCategory", "FExpenseCategory_EXName", "GHExpenseCategory", "");
            //helpdac.CodeToName<QTProjectMstModel>(pageResult.Results, "FAccount", "FAccount_EXName", "gh_Account", "");
            #endregion

            return(pageResult);
        }
Пример #13
0
        /// <summary>
        /// 分页获取全部集合
        /// </summary>
        /// <param name="pageNumber">页码(从1开始)</param>
        /// <param name="pageSize">每页大小(最大为200)</param>
        /// <param name="dic">查询条件字典(建议使用Enterprise3.Common.Base.CreateCriteria进行创建)</param>
        /// <param name="sorts">排序({属性名 desc,属性名,属性名 asc})</param>
        /// <returns>集合</returns>
        public override PagedResult <GHSubjectModel> LoadWithPage(int pageNumber, int pageSize = 20, Dictionary <string, object> dic = null, params string[] sorts)
        {
            PagedResult <GHSubjectModel> pageResult = base.LoadWithPage(pageNumber, pageSize, dic, sorts);

            pageResult = AddNextApproveName(pageResult, "GHSubject");

            #region 列表Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            //helpdac.CodeToName<GHSubjectModel>(pageResult.Results, "属性名", "注册的帮助标识"
            //helpdac.CodeToName<GHSubjectModel>(pageResult.Results, "Code属性名", "Name属性名", "注册的帮助标识", "");
            helpdac.CodeToName <GHSubjectModel>(pageResult.Results, "FDeclarationUnit", "FDeclarationUnit_EXName", "sb_orglist", "");
            helpdac.CodeToName <GHSubjectModel>(pageResult.Results, "FDeclarationDept", "FDeclarationDept_EXName", "dept4ocode", "");
            helpdac.CodeToName <GHSubjectModel>(pageResult.Results, "FBudgetDept", "FBudgetDept_EXName", "ys_orglist", "");
            helpdac.CodeToName <GHSubjectModel>(pageResult.Results, "FApprover", "FApprover_EXName", "fg3_user", "");
            #endregion

            return(pageResult);
        }
Пример #14
0
        /// <summary>
        ///
        /// </summary>
        /// <typeparam name="TValType"></typeparam>
        /// <param name="id"></param>
        /// <returns></returns>
        public override FindedResult <MethodAroundMstModel> Find <TValType>(TValType id)
        {
            var result = base.Find <TValType>(id);

            RichHelpDac helpdac = new RichHelpDac();

            helpdac.CodeToName <MethodAroundMstModel>(result.Data, "TargetServiceId", "TargetServiceName", "addinservice");

            return(result);
        }
Пример #15
0
        /// <summary>
        /// 分页获取全部集合
        /// </summary>
        /// <param name="pageNumber">页码(从1开始)</param>
        /// <param name="pageSize">每页大小(最大为200)</param>
        /// <param name="nameSqlName">命名SQL名称</param>
        /// <param name="dic">查询条件字典(建议使用Enterprise3.Common.Base.CreateCriteria进行创建)</param>
        /// <param name="sorts">排序({属性名 desc,属性名,属性名 asc})</param>
        /// <returns>集合</returns>
        public PagedResult <ExpenseMstModel> LoadWithPage(int pageNumber, int pageSize = 20, string nameSqlName = "", Dictionary <string, object> dic = null, params string[] sorts)
        {
            PagedResult <ExpenseMstModel> pageResult = base.FacadeHelper.LoadWithPage(pageNumber, pageSize, nameSqlName, dic, sorts);

            pageResult = AddNextApproveName(pageResult, "GHExpense");

            #region 列表Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            //helpdac.CodeToName<ExpenseMstModel>(pageResult.Results, "属性名", "注册的帮助标识"
            //helpdac.CodeToName<ExpenseMstModel>(pageResult.Results, "Code属性名", "Name属性名", "注册的帮助标识", "");
            helpdac.CodeToName <ExpenseMstModel>(pageResult.Results, "FDeclarationunit", "FDeclarationunit_EXName", "sb_orglist", "");
            helpdac.CodeToName <ExpenseMstModel>(pageResult.Results, "FDeclarationDept", "FDeclarationDept_EXName", "dept4ocode", "");
            helpdac.CodeToName <ExpenseMstModel>(pageResult.Results, "FBudgetDept", "FBudgetDept_EXName", "ys_orglist", "");
            helpdac.CodeToName <ExpenseMstModel>(pageResult.Results, "FExpenseCategory", "FExpenseCategory_EXName", "GHExpenseCategory", "");
            helpdac.CodeToName <ExpenseMstModel>(pageResult.Results, "FApprover", "FApprover_EXName", "fg3_user", "");
            #endregion

            return(pageResult);
        }
Пример #16
0
        /// <summary>
        /// 分页获取全部集合
        /// </summary>
        /// <param name="pageNumber">页码(从1开始)</param>
        /// <param name="pageSize">每页大小(最大为200)</param>
        /// <param name="dic">查询条件字典(建议使用Enterprise3.Common.Base.CreateCriteria进行创建)</param>
        /// <param name="sorts">排序({属性名 desc,属性名,属性名 asc})</param>
        /// <returns>集合</returns>
        public override PagedResult <MethodAroundMstModel> LoadWithPage(int pageNumber, int pageSize = 20, Dictionary <string, object> dic = null, params string[] sorts)
        {
            PagedResult <MethodAroundMstModel> pageResult = base.LoadWithPage(pageNumber, pageSize, dic, sorts);

            #region 列表Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            helpdac.CodeToName <MethodAroundMstModel>(pageResult.Results, "TargetServiceId", "TargetServiceName", "addinservice", "");
            #endregion

            return(pageResult);
        }
Пример #17
0
        /// <summary>
        /// 通过外关联的单主键值,获取数据
        /// </summary>
        /// <param name="id">外键值</param>
        /// <returns>实体</returns>
        public override FindedResults <ProjectDtlPurDtl4SOFModel> FindByForeignKey <TValType>(TValType id, params string[] sorts)
        {
            FindedResults <ProjectDtlPurDtl4SOFModel> findedResults = base.FindByForeignKey(id, sorts);

            #region 明细Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            //helpdac.CodeToName<ProjectDtlPurDtl4SOFModel>(findedResults.Data, "属性名", "注册的帮助标识"
            //helpdac.CodeToName<ProjectDtlPurDtl4SOFModel>(findedResults.Data, "Code属性名", "Name属性名", "注册的帮助标识", "");
            helpdac.CodeToName <ProjectDtlPurDtl4SOFModel>(findedResults.Data, "FSourceOfFunds", "FSourceOfFunds_EXName", "GHSourceOfFunds", "");
            #endregion

            return(findedResults);
        }
Пример #18
0
        /// <summary>
        /// 通过外关联的单主键值,获取数据
        /// </summary>
        /// <param name="id">外键值</param>
        /// <returns>实体</returns>
        public override FindedResults <QTProjectDtlBudgetDtlModel> FindByForeignKey <TValType>(TValType id, params string[] sorts)
        {
            FindedResults <QTProjectDtlBudgetDtlModel> findedResults = base.FindByForeignKey(id, sorts);

            #region 明细Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            //helpdac.CodeToName<QTProjectDtlBudgetDtlModel>(findedResults.Data, "属性名", "注册的帮助标识"
            //helpdac.CodeToName<QTProjectDtlBudgetDtlModel>(findedResults.Data, "Code属性名", "Name属性名", "注册的帮助标识", "");
            helpdac.CodeToName <QTProjectDtlBudgetDtlModel>(findedResults.Data, "FBudgetAccounts", "FBudgetAccounts_EXName", "GHBudgetAccounts", "");
            #endregion

            return(findedResults);
        }
Пример #19
0
        /// <summary>
        /// 通过外关联的单主键值,获取数据
        /// </summary>
        /// <param name="id">外键值</param>
        /// <returns>实体</returns>
        public override FindedResults <JxTrackingModel> FindByForeignKey <TValType>(TValType id, params string[] sorts)
        {
            FindedResults <JxTrackingModel> findedResults = base.FindByForeignKey(id, sorts);

            #region 明细Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            //helpdac.CodeToName<JxTrackingModel>(findedResults.Data, "属性名", "注册的帮助标识"
            //helpdac.CodeToName<JxTrackingModel>(findedResults.Data, "Code属性名", "Name属性名", "注册的帮助标识", "");
            helpdac.CodeToName <JxTrackingModel>(findedResults.Data, "FDeclarationUnit", "FDeclarationUnit_EXName", "sb_orglist", "");
            #endregion

            return(findedResults);
        }
Пример #20
0
        /// <summary>
        /// 分页获取全部集合
        /// </summary>
        /// <param name="pageNumber">页码(从1开始)</param>
        /// <param name="pageSize">每页大小(最大为200)</param>
        /// <param name="nameSqlName">命名SQL名称</param>
        /// <param name="dic">查询条件字典(建议使用Enterprise3.Common.Base.CreateCriteria进行创建)</param>
        /// <param name="sorts">排序({属性名 desc,属性名,属性名 asc})</param>
        /// <returns>集合</returns>
        public PagedResult <QtOrgDygxModel> LoadWithPage(int pageNumber, int pageSize = 20, string nameSqlName = "", Dictionary <string, object> dic = null, params string[] sorts)
        {
            PagedResult <QtOrgDygxModel> pageResult = base.FacadeHelper.LoadWithPage(pageNumber, pageSize, nameSqlName, dic, sorts);

            #region 列表Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            //helpdac.CodeToName<QtOrgDygxModel>(pageResult.Results, "属性名", "注册的帮助标识"
            //helpdac.CodeToName<QtOrgDygxModel>(pageResult.Results, "Code属性名", "Name属性名", "注册的帮助标识", "");
            helpdac.CodeToName <QtOrgDygxModel>(pageResult.Results, "Xmorg", "Xmorg_EXName", "fg_orglist", "");
            #endregion

            return(pageResult);
        }
Пример #21
0
        /// <summary>
        /// 获取字段ui设置列表
        /// </summary>
        /// <param name="bustype"></param>
        /// <returns></returns>
        public DataTable GetPropertyUIInfo(string tablename, string bustype)
        {
            string sql = "select fg_columns.c_bname,fg_columns.c_name,fg_columns.c_fullname,fg_columns.c_type,fg_col_uireg.*,'' as helpid_name  from fg_col_uireg,fg_columns"
                         + " where fg_col_uireg.columnreg_code = fg_columns.c_code "
                         + " and c_bname={0} and fg_col_uireg.bustype={1} order by fg_columns.c_bname ";

            IDataParameter[] p = new NGDataParameter[2];
            p[0]       = new NGDataParameter("tablename", DbType.AnsiString);
            p[0].Value = tablename;
            p[1]       = new NGDataParameter("bustype", DbType.AnsiString);
            p[1].Value = bustype;

            DataTable dt = DbHelper.GetDataTable(sql, p);

            //代码转名称
            RichHelpDac helpdac = new RichHelpDac();

            helpdac.CodeToName("helpid", "helpid_name", "helpid", dt);

            return(dt);
        }
Пример #22
0
        /// <summary>
        /// 分页获取全部集合
        /// </summary>
        /// <param name="pageNumber">页码(从1开始)</param>
        /// <param name="pageSize">每页大小(最大为200)</param>
        /// <param name="dic">查询条件字典(建议使用Enterprise3.Common.Base.CreateCriteria进行创建)</param>
        /// <param name="sorts">排序({属性名 desc,属性名,属性名 asc})</param>
        /// <returns>集合</returns>
        public override PagedResult <PerformanceMstModel> LoadWithPage(int pageNumber, int pageSize = 20, Dictionary <string, object> dic = null, params string[] sorts)
        {
            PagedResult <PerformanceMstModel> pageResult = base.LoadWithPage(pageNumber, pageSize, dic, sorts);

            #region 列表Grid代码转名称
            RichHelpDac helpdac = new RichHelpDac();
            //helpdac.CodeToName<PerformanceMstModel>(pageResult.Results, "属性名", "注册的帮助标识"
            //helpdac.CodeToName<PerformanceMstModel>(pageResult.Results, "Code属性名", "Name属性名", "注册的帮助标识", "");
            //helpdac.CodeToName<PerformanceMstModel>(pageResult.Results, "FProjName", "FProjName_EXName", "xm3_xmlist", "");
            helpdac.CodeToName <PerformanceMstModel>(pageResult.Results, "FDeclarationUnit", "FDeclarationUnit_EXName", "sb_orglist", "");
            helpdac.CodeToName <PerformanceMstModel>(pageResult.Results, "FBudgetDept", "FBudgetDept_EXName", "ys_orglist", "");
            helpdac.CodeToName <PerformanceMstModel>(pageResult.Results, "FDeclarationDept", "FDeclarationDept_EXName", "ys_orglist", "");
            helpdac.CodeToName <PerformanceMstModel>(pageResult.Results, "FEvaluationDept", "FEvaluationDept_EXName", "ys_orglist", "");
            helpdac.CodeToName <PerformanceMstModel>(pageResult.Results, "FInformant", "FInformantName", "fg3_user", "");
            helpdac.CodeToName <PerformanceMstModel>(pageResult.Results, "FPerformType", "FPerformType_EXName", "GHPerformEvalTargetTypeTree", "");
            #endregion

            return(pageResult);
        }
Пример #23
0
        /// <summary>
        /// 根据预算主键获取信息
        /// </summary>
        /// <param name="YsPhid"></param>
        /// <returns></returns>
        public object GetinfoByProjCode(long YsPhid)
        {
            //一些必要数据加入中文名
            RichHelpDac    helpdac   = new RichHelpDac();
            BudgetMstModel budgetMst = BudgetMstFacade.Find(YsPhid).Data;

            helpdac.CodeToName <BudgetMstModel>(budgetMst, "FExpenseCategory", "FExpenseCategory_EXName", "GHExpenseCategory");
            string  FExpenseCategory                   = budgetMst.FExpenseCategory; //项目类型
            string  FExpenseCategory_EXName            = budgetMst.FExpenseCategory_EXName;
            Decimal FProjAmount                        = budgetMst.FBudgetAmount;    //核定预算数
            IList <BudgetDtlBudgetDtlModel> budgetDtls = BudgetDtlBudgetDtlFacade.FacadeHelper.FindByForeignKey(YsPhid).Data;

            helpdac.CodeToName <BudgetDtlBudgetDtlModel>(budgetDtls, "FSourceOfFunds", "FSourceOfFunds_EXName", "GHSourceOfFunds", "");
            helpdac.CodeToName <BudgetDtlBudgetDtlModel>(budgetDtls, "FPaymentMethod", "FPaymentMethod_EXName", "GHPaymentMethod", "");
            helpdac.CodeToName <BudgetDtlBudgetDtlModel>(budgetDtls, "FExpensesChannel", "FExpensesChannel_EXName", "GHExpensesChannel", "");
            helpdac.CodeToName <BudgetDtlBudgetDtlModel>(budgetDtls, "FBudgetAccounts", "FBudgetAccounts_EXName", "GHBudgetAccounts", "");
            helpdac.CodeToName <BudgetDtlBudgetDtlModel>(budgetDtls, "FQtZcgnfl", "FQtZcgnfl_EXName", "GHQtZcgnfl", "");

            var dicWhere = new Dictionary <string, object>();

            new CreateCriteria(dicWhere).Add(ORMRestrictions <string> .Eq("FProjcode", budgetMst.FProjCode))
            .Add(ORMRestrictions <System.Int32> .Eq("FLifeCycle", 0))
            .Add(ORMRestrictions <System.Int32> .NotEq("FIfpurchase", 1));  //去除被额度返还的原单据
            var findedresultmst = base.Find(dicWhere).Data;

            Decimal FrozenSum = 0; //冻结数
            Decimal UsedSum   = 0; //已使用数

            for (var i = 0; i < findedresultmst.Count; i++)
            {
                if (findedresultmst[i].FApprovestatus == "3" || findedresultmst[i].FApprovestatus == "4")
                {
                    UsedSum += findedresultmst[i].FSurplusamount;
                    UsedSum -= findedresultmst[i].FReturnamount;
                }
                else
                {
                    FrozenSum += findedresultmst[i].FSurplusamount;
                    FrozenSum -= findedresultmst[i].FReturnamount;
                }
            }
            Decimal FPlayamount = FProjAmount - FrozenSum - UsedSum;//可编报数

            Dictionary <string, Decimal> Yskm_Amount = new Dictionary <string, Decimal>();
            List <Decimal> AmountList = new List <Decimal>();

            for (var a = 0; a < budgetDtls.Count; a++)
            {
                if (!Yskm_Amount.ContainsKey(budgetDtls[a].FBudgetAccounts))
                {
                    Yskm_Amount.Add(budgetDtls[a].FBudgetAccounts, budgetDtls[a].FBudgetAmount);
                }
                else
                {
                    Yskm_Amount[budgetDtls[a].FBudgetAccounts] += budgetDtls[a].FBudgetAmount;
                }
            }
            //去除已经做的单据
            var dicWhere2 = new Dictionary <string, object>();

            new CreateCriteria(dicWhere2).Add(ORMRestrictions <string> .Eq("FProjcode", budgetMst.FProjCode))
            .Add(ORMRestrictions <System.Int32> .Eq("FLifeCycle", 0))
            .Add(ORMRestrictions <System.Int32> .NotEq("FIfpurchase", 1));
            IList <ExpenseMstModel> ExpenseMstList = ExpenseMstFacade.Find(dicWhere2).Data;

            for (var i = 0; i < ExpenseMstList.Count; i++)
            {
                IList <ExpenseDtlModel> ExpenseDtlList = ExpenseDtlFacade.FindByForeignKey(ExpenseMstList[i].PhId).Data;
                for (var j = 0; j < ExpenseDtlList.Count; j++)
                {
                    if (!string.IsNullOrEmpty(ExpenseDtlList[j].FBudgetaccounts) && Yskm_Amount.ContainsKey(ExpenseDtlList[j].FBudgetaccounts))
                    {
                        Yskm_Amount[ExpenseDtlList[j].FBudgetaccounts] = Yskm_Amount[ExpenseDtlList[j].FBudgetaccounts] - ExpenseDtlList[j].FAmount + ExpenseDtlList[j].FReturnamount;
                    }
                }
            }

            object result = new
            {
                FExpenseCategory        = FExpenseCategory,
                FExpenseCategory_EXName = FExpenseCategory_EXName,
                FProjAmount             = FProjAmount,
                FrozenSum   = FrozenSum,
                UsedSum     = UsedSum,
                FPlayamount = FPlayamount,
                Yskm_Amount = Yskm_Amount,
                budgetDtls  = budgetDtls
            };

            return(result);
        }
Пример #24
0
        /// <summary>
        /// 根据绩效主键获取单个绩效的数据
        /// </summary>
        /// <param name="phid">绩效主键</param>
        /// <returns></returns>
        public PerformanceAllData GetPerformanceMst(long phid)
        {
            PerformanceAllData performanceAll = new PerformanceAllData();
            var result = this.PerformanceMstFacade.Find(t => t.PhId == phid).Data;

            if (result != null && result.Count > 0)
            {
                performanceAll.PerformanceMst = result[0];
            }
            else
            {
                throw new Exception("绩效查询失败!");
            }
            performanceAll.PerformanceDtlBuDtls = this.PerformanceDtlBuDtlFacade.Find(t => t.MstPhid == phid).Data;
            if (performanceAll.PerformanceDtlBuDtls != null && performanceAll.PerformanceDtlBuDtls.Count > 0)
            {
                RichHelpDac helpdac = new RichHelpDac();
                helpdac.CodeToName <PerformanceDtlBuDtlModel>(performanceAll.PerformanceDtlBuDtls, "FSourceOfFunds", "FSourceOfFunds_EXName", "GHSourceOfFunds", "");
            }
            performanceAll.PerformanceDtlTarImpls = this.PerformanceDtlTarImplFacade.Find(t => t.MstPhid == phid).Data;
            if (performanceAll.PerformanceDtlTarImpls != null && performanceAll.PerformanceDtlTarImpls.Count > 0)
            {
                //根据申报组织获取绩效基础数据,为后续数据准备
                var allTypes   = this.PerformEvalTargetTypeFacade.Find(t => t.Orgcode == result[0].FDeclarationUnit).Data;
                var allClasses = this.PerformEvalTargetClassFacade.Find(t => t.Orgcode == result[0].FDeclarationUnit).Data;
                //绩效主表的绩效数据
                performanceAll.PerformanceMst.FTargetTypeCode = performanceAll.PerformanceDtlTarImpls[0].FTargetTypeCode;
                if (allTypes != null && allTypes.Count > 0)
                {
                    var typeModel1 = allTypes.ToList().FindAll(t => t.FCode == performanceAll.PerformanceDtlTarImpls[0].FTargetTypeCode);
                    if (typeModel1 != null && typeModel1.Count > 0)
                    {
                        performanceAll.PerformanceMst.FTargetTypeCode_EXName = typeModel1[0].FName;
                    }
                }

                //绩效单据的绩效数据
                for (int i = 0; i < performanceAll.PerformanceDtlTarImpls.Count; i++)
                {
                    PerformanceDtlTarImplModel model = performanceAll.PerformanceDtlTarImpls[i];
                    string typeCode  = model.FTargetTypeCode;
                    string classCode = model.FTargetClassCode;
                    //Dictionary<string, object> dicWhere1 = new Dictionary<string, object>();
                    //Dictionary<string, object> dicWhere2 = new Dictionary<string, object>();
                    //new CreateCriteria(dicWhere1).Add(ORMRestrictions<string>.Eq("FCode", typeCode));
                    //FindedResults<PerformEvalTargetTypeModel> typeModel = PerformEvalTargetTypeFacade.Find(dicWhere1);
                    //new CreateCriteria(dicWhere2).Add(ORMRestrictions<string>.Eq("FCode", classCode));
                    //FindedResults<PerformEvalTargetClassModel> classModel = PerformEvalTargetClassFacade.Find(dicWhere2);
                    if (allTypes != null && allTypes.Count > 0)
                    {
                        var typeModel = allTypes.ToList().FindAll(t => t.FCode == typeCode);
                        if (typeModel != null && typeModel.Count > 0)
                        {
                            model.FTargetTypeName = typeModel[0].FName;
                        }
                    }
                    if (allClasses != null && allClasses.Count > 0)
                    {
                        var classModel = allClasses.ToList().FindAll(t => t.FCode == classCode);
                        if (classModel != null && classModel.Count > 0)
                        {
                            model.FTargetClassName = classModel[0].FName;
                        }
                    }
                }
            }
            IList <OrganizeModel> organizes = this.OrganizationFacade.Find(t => t.OCode == performanceAll.PerformanceMst.FDeclarationUnit).Data;

            if (organizes != null && organizes.Count > 0)
            {
                OrganizeModel organize = organizes[0];
                performanceAll.PerformanceDtlTarImpls = this.PerformanceMstFacade.GetNewProPerformTargets(performanceAll.PerformanceDtlTarImpls.ToList(), performanceAll.PerformanceMst.FPerformType, organize.PhId, organize.OCode);
            }

            //var contexts = this.PerformanceDtlTextContFacade.Find(t => t.MstPhid == phid).Data;
            //if(contexts != null && contexts.Count > 0)
            //{
            //    performanceAll.PerformanceDtlTextCont = contexts[0];
            //}
            performanceAll.PerformanceDtlTextConts = this.PerformanceDtlTextContFacade.Find(t => t.MstPhid == phid).Data;
            performanceAll.ThirdAttachmentModels   = this.ThirdAttachmentFacade.Find(t => t.MstPhid == phid).Data;
            if (performanceAll.ThirdAttachmentModels != null && performanceAll.ThirdAttachmentModels.Count > 0)
            {
                RichHelpDac helpdac = new RichHelpDac();
                helpdac.CodeToName <ThirdAttachmentModel>(performanceAll.ThirdAttachmentModels, "FDeclarationUnit", "FDeclarationUnit_EXName", "sb_orglist", "");

                var phids      = performanceAll.ThirdAttachmentModels.Select(t => t.PhId).Distinct().ToList();
                var allAttachs = this.QtAttachmentFacade.Find(t => phids.Contains(t.RelPhid) && t.BTable == "JX3_THIRDATTACHMENT").Data;
                if (allAttachs != null && allAttachs.Count > 0)
                {
                    foreach (var third in performanceAll.ThirdAttachmentModels)
                    {
                        third.ThirdQtAttachments = allAttachs.ToList().FindAll(t => t.RelPhid == third.PhId);
                    }
                }
            }
            performanceAll.QtAttachments = this.QtAttachmentFacade.Find(t => t.RelPhid == phid && t.BTable == "JX3_PERFORMANCEMST").Data;
            //performanceAll.ThirdQtAttachments = this.QtAttachmentFacade.Find(t => t.RelPhid == phid && t.BTable == "JX3_THIRDATTACHMENT").Data;
            return(performanceAll);
        }