Ejemplo n.º 1
0
		/// <summary>
        /// 根据主键获取数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetQTModifyInfo()
        {
			long id = Convert.ToInt64(System.Web.HttpContext.Current.Request.Params["id"]);  //主表主键
			string tabtype = System.Web.HttpContext.Current.Request.Params["tabtype"]; //Tab类型
			var findedresult = QTModifyService.Find(id);
			return DataConverterHelper.ResponseResultToJson(findedresult);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 根据主键获取数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetPerformEvalTargetTypeInfo()
        {
            long   id           = Convert.ToInt64(System.Web.HttpContext.Current.Request.Params["id"]); //主表主键
            string tabtype      = System.Web.HttpContext.Current.Request.Params["tabtype"];             //Tab类型
            var    findedresult = PerformEvalTargetTypeService.Find(id);

            return(DataConverterHelper.ResponseResultToJson(findedresult));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 获取产品用户通过产品标识和G6账号
        /// </summary>
        /// <returns></returns>
        public string getUserByProduct()
        {
            string             ProductBZ     = System.Web.HttpContext.Current.Request.Params["ProductBZ"];
            string             UserNo        = System.Web.HttpContext.Current.Request.Params["UserNo"];
            QTProductUserModel qTProductUser = QTProductUserService.getUserByProduct(ProductBZ, UserNo);

            return(DataConverterHelper.ResponseResultToJson(qTProductUser));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 根据标志获取产品详细
        /// </summary>
        /// <returns></returns>
        public string GetQTProductByBZ()
        {
            string ProductBZ = System.Web.HttpContext.Current.Request.Params["ProductBZ"];
            Dictionary <string, object> dic = new Dictionary <string, object>();

            new CreateCriteria(dic).Add(ORMRestrictions <string> .Eq("ProductBZ", ProductBZ));
            var findedresult = QTProductService.Find(dic).Data[0];

            return(DataConverterHelper.ResponseResultToJson(findedresult));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 根据主键获取数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetMethodAroundMstInfo()
        {
            long   id      = Convert.ToInt64(System.Web.HttpContext.Current.Request.Params["id"]); //主表主键
            string tabtype = System.Web.HttpContext.Current.Request.Params["tabtype"];             //Tab类型


            //var findedresult = MethodAroundMstService.Find<Int64>(id);

            var findedresult = MethodAroundMstService.GetMethodAroundMst(id);

            return(DataConverterHelper.ResponseResultToJson(findedresult));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 根据主键获取数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetProjectThresholdInfoToOrgcode()
        {
            string orgcode = System.Web.HttpContext.Current.Request.Params["orgcode"];  //组织号
            Dictionary <string, object> dicWhere = new Dictionary <string, object>();

            new CreateCriteria(dicWhere)
            .Add(ORMRestrictions <string> .Eq("Orgcode", orgcode));


            var findedresult = ProjectThresholdService.Find(dicWhere);

            return(DataConverterHelper.ResponseResultToJson(findedresult));
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 根据主键获取数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetQTProjectMstInfo()
        {
            long   id      = Convert.ToInt64(System.Web.HttpContext.Current.Request.Params["id"]); //主表主键
            string tabtype = System.Web.HttpContext.Current.Request.Params["tabtype"];             //Tab类型

            switch (tabtype)
            {
            case "qtprojectmst":
                var findedresultqtprojectmst = QTProjectMstService.Find(id);
                return(DataConverterHelper.ResponseResultToJson(findedresultqtprojectmst));

            case "qtprojectdtlbudgetdtl":
                var findedresultqtprojectdtlbudgetdtl = QTProjectMstService.FindQTProjectDtlBudgetDtlByForeignKey(id);
                return(DataConverterHelper.EntityListToJson(findedresultqtprojectdtlbudgetdtl.Data, findedresultqtprojectdtlbudgetdtl.Data.Count));

            case "qtprojectdtlfundappl":
                var findedresultqtprojectdtlfundappl = QTProjectMstService.FindQTProjectDtlFundApplByForeignKey(id);
                return(DataConverterHelper.EntityListToJson(findedresultqtprojectdtlfundappl.Data, findedresultqtprojectdtlfundappl.Data.Count));

            case "qtprojectdtlimplplan":
                var findedresultqtprojectdtlimplplan = QTProjectMstService.FindQTProjectDtlImplPlanByForeignKey(id);
                return(DataConverterHelper.EntityListToJson(findedresultqtprojectdtlimplplan.Data, findedresultqtprojectdtlimplplan.Data.Count));

            case "qtprojectdtlperformtarget":
                var findedresultqtprojectdtlperformtarget = QTProjectMstService.FindQTProjectDtlPerformTargetByForeignKey(id);
                return(DataConverterHelper.EntityListToJson(findedresultqtprojectdtlperformtarget.Data, findedresultqtprojectdtlperformtarget.Data.Count));

            case "qtprojectdtlpurchasedtl":
                var findedresultqtprojectdtlpurchasedtl = QTProjectMstService.FindQTProjectDtlPurchaseDtlByForeignKey(id);
                return(DataConverterHelper.EntityListToJson(findedresultqtprojectdtlpurchasedtl.Data, findedresultqtprojectdtlpurchasedtl.Data.Count));

            case "qtprojectdtlpurdtl4sof":
                var findedresultqtprojectdtlpurdtl4sof = QTProjectMstService.FindQTProjectDtlPurDtl4SOFByForeignKey(id);
                return(DataConverterHelper.EntityListToJson(findedresultqtprojectdtlpurdtl4sof.Data, findedresultqtprojectdtlpurdtl4sof.Data.Count));

            case "qtprojectdtltextcontent":
                var findedresultqtprojectdtltextcontent = QTProjectMstService.FindQTProjectDtlTextContentByForeignKey(id);
                return(DataConverterHelper.EntityListToJson(findedresultqtprojectdtltextcontent.Data, findedresultqtprojectdtltextcontent.Data.Count));

            default:
                FindedResult findedresultother = new FindedResult();
                return(DataConverterHelper.ResponseResultToJson(findedresultother));
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 根据主键获取数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetPerformanceMstInfo()
        {
            long   id      = Convert.ToInt64(System.Web.HttpContext.Current.Request.Params["id"]); //主表主键
            string tabtype = System.Web.HttpContext.Current.Request.Params["tabtype"];             //Tab类型

            switch (tabtype)
            {
            case "performancemst":
                var findedresultperformancemst = PerformanceMstService.Find2(id);
                return(DataConverterHelper.ResponseResultToJson(findedresultperformancemst));

            case "performancedtleval":
                var findedresultsperformancedtleval = PerformanceMstService.FindPerformanceDtlEvalByForeignKey(id);
                return(DataConverterHelper.EntityListToJson(findedresultsperformancedtleval.Data, findedresultsperformancedtleval.Data.Count));

            case "performancedtltextcont":
                var findedresultsperformancedtltextcont = PerformanceMstService.FindPerformanceDtlTextContByForeignKey(id);
                PerformanceDtlTextContModel textModel   = new PerformanceDtlTextContModel();

                if (findedresultsperformancedtltextcont.Data.Count > 0)
                {
                    textModel = findedresultsperformancedtltextcont.Data[0];
                }

                return(DataConverterHelper.ResponseResultToJson(textModel));

            case "performancedtlbudtl":
                var findedresultperformancedtlbudtl = PerformanceMstService.FindPerformanceDtlBuDtlByForeignKey(id);
                return(DataConverterHelper.EntityListToJson(findedresultperformancedtlbudtl.Data, findedresultperformancedtlbudtl.Data.Count));

            case "performancedtltarimpl":
                var findedresultperformancedtltarimpl = PerformanceMstService.FindPerformanceDtlTarImplByForeignKey(id);
                return(DataConverterHelper.EntityListToJson(findedresultperformancedtltarimpl.Data, findedresultperformancedtltarimpl.Data.Count));

            case "thirdattachment":
                var findedresultthirdattachment = PerformanceMstService.FindThirdAttachmentByForeignKey(id);
                return(DataConverterHelper.EntityListToJson(findedresultthirdattachment.Data, findedresultthirdattachment.Data.Count));

            default:
                FindedResult findedresultother = new FindedResult();
                return(DataConverterHelper.ResponseResultToJson(findedresultother));
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 根据主键获取数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetGKPaymentMstInfo()
        {
            long   id      = Convert.ToInt64(System.Web.HttpContext.Current.Request.Params["id"]); //主表主键
            string tabtype = System.Web.HttpContext.Current.Request.Params["tabtype"];             //Tab类型

            switch (tabtype)
            {
            case "gkpaymentmst":
                var findedresultgkpaymentmst = GKPaymentMstService.Find(id);
                return(DataConverterHelper.ResponseResultToJson(findedresultgkpaymentmst));

            case "gkpaymentdtl":
                var findedresultgkpaymentdtl = GKPaymentMstService.FindGKPaymentDtlByForeignKey(id);
                return(DataConverterHelper.EntityListToJson(findedresultgkpaymentdtl.Data, findedresultgkpaymentdtl.Data.Count));

            default:
                FindedResult findedresultother = new FindedResult();
                return(DataConverterHelper.ResponseResultToJson(findedresultother));
            }
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 根据组织和项目类型取阈值
        /// </summary>
        /// <returns></returns>
        public string GetProjectThresholdByOrgAndZCLB()
        {
            string Orgcode = System.Web.HttpContext.Current.Request.Params["Orgcode"];
            string FExpenseCategoryCode          = System.Web.HttpContext.Current.Request.Params["FExpenseCategoryCode"];
            Dictionary <string, object> dicWhere = new Dictionary <string, object>();

            new CreateCriteria(dicWhere).Add(ORMRestrictions <string> .Eq("Orgcode", Orgcode));
            IList <ProjectThresholdModel> projectThresholds = ProjectThresholdService.Find(dicWhere).Data;

            if (projectThresholds.Count > 0)
            {
                foreach (var projectThreshold in projectThresholds)
                {
                    IList <String> useCodeList = (projectThreshold.ProjTypeId ?? "").Split(',').ToList <String>();
                    if (useCodeList.Contains(FExpenseCategoryCode))
                    {
                        return(DataConverterHelper.ResponseResultToJson(projectThreshold));
                    }
                }
            }
            return(DataConverterHelper.ResponseResultToJson(new ProjectThresholdModel()));
        }
Ejemplo n.º 11
0
        /// <summary>
        /// 根据主键  预算数据数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetBudgetMstInfo()
        {
            long   id      = Convert.ToInt64(System.Web.HttpContext.Current.Request.Params["id"]); //主表主键
            string tabtype = System.Web.HttpContext.Current.Request.Params["tabtype"];             //Tab类型

            switch (tabtype)
            {
            case "budgetmst":
                var findedresultmst = BudgetMstService.Find(id);

                FindedResult <PerformanceMstModel> resultmst = new FindedResult <PerformanceMstModel>();
                PerformanceMstModel modelmst = new PerformanceMstModel();
                if (findedresultmst.Data != null)
                {
                    modelmst.YSMstPhId               = findedresultmst.Data.PhId;
                    modelmst.FProjCode               = findedresultmst.Data.FProjCode;
                    modelmst.FProjName               = findedresultmst.Data.FProjName;
                    modelmst.FDeclarationUnit        = findedresultmst.Data.FDeclarationUnit;
                    modelmst.FDeclarationUnit_EXName = findedresultmst.Data.FDeclarationUnit_EXName;
                    modelmst.FDeclarationDept        = findedresultmst.Data.FDeclarationDept;
                    modelmst.FBudgetDept             = findedresultmst.Data.FBudgetDept;
                    modelmst.FBudgetDept_EXName      = findedresultmst.Data.FBudgetDept_EXName;
                    modelmst.FProjAttr               = findedresultmst.Data.FProjAttr;
                    modelmst.FDuration               = findedresultmst.Data.FDuration;
                    modelmst.FStartDate              = findedresultmst.Data.FStartDate;
                    modelmst.FEndDate                = findedresultmst.Data.FEndDate;
                    modelmst.FProjAmount             = findedresultmst.Data.FBudgetAmount;
                    modelmst.FIfPerformanceAppraisal = (int)findedresultmst.Data.FIfPerformanceAppraisal;
                    modelmst.FIfKeyEvaluation        = (int)findedresultmst.Data.FIfKeyEvaluation;
                    modelmst.FMeetingTime            = findedresultmst.Data.FMeetingTime;
                    modelmst.FMeetiingSummaryNo      = findedresultmst.Data.FMeetiingSummaryNo;
                    modelmst.FExpenseCategory        = findedresultmst.Data.FExpenseCategory;
                    modelmst.FPerformType            = findedresultmst.Data.FPerformType;
                }
                ;
                if (string.IsNullOrEmpty(findedresultmst.Data.FAccount))
                {
                    modelmst.FActualAmount = decimal.Round(0, 2);;
                }
                else
                {
                    modelmst.FActualAmount = decimal.Round(decimal.Parse(BudgetMstService.GetSJFSSbyXMCode(findedresultmst.Data.FAccount, modelmst.FProjCode)), 2);
                }
                //modelmst.FActualAmount = decimal.Round(decimal.Parse(BudgetMstService.GetSJFSSbyXMCode(findedresultmst.Data.FAccount, modelmst.FProjCode)),2);
                modelmst.FBalanceAmount = decimal.Round(modelmst.FProjAmount - modelmst.FActualAmount, 2);
                modelmst.FImplRate      = decimal.Round(modelmst.FActualAmount * 100 / modelmst.FProjAmount, 2);

                resultmst.Data   = modelmst;
                resultmst.Status = findedresultmst.Status;
                resultmst.Msg    = findedresultmst.Msg;


                return(DataConverterHelper.ResponseResultToJson(resultmst));

            case "budgetdtlbudgetdtl":
                var mst = BudgetMstService.Find(id);
                var findedresultbudgetdtlbudgetdtl = BudgetMstService.FindBudgetDtlBudgetDtlByForeignKey(id);
                var listDtl = findedresultbudgetdtlbudgetdtl.Data;

                //组装model
                List <PerformanceDtlBuDtlModel> dtlList = new List <PerformanceDtlBuDtlModel>();

                if (findedresultbudgetdtlbudgetdtl.Data.Count > 0)
                {
                    foreach (var item in listDtl)
                    {
                        var index = dtlList.FindIndex(t => t.FDtlCode == item.FDtlCode);

                        if (index != -1)
                        {
                            dtlList[index].FBudgetAmount += item.FAmount;
                        }
                        else
                        {
                            decimal FActualAmount = 0;
                            if (string.IsNullOrEmpty(mst.Data.FAccount))
                            {
                                FActualAmount = decimal.Round(0, 2);;
                            }
                            else
                            {
                                FActualAmount = decimal.Round(decimal.Parse(BudgetMstService.GetSJFSSbyMXCode(mst.Data.FAccount, item.FDtlCode)), 2);
                            }
                            //var FActualAmount = decimal.Round(decimal.Parse(BudgetMstService.GetSJFSSbyMXCode(mst.Data.FAccount, item.FDtlCode)),2);
                            //((parseFloat(upDate.FActualAmount) / parseFloat(upDate.FBudgetAmount)) * 100).toFixed(2)
                            var FImplRate = decimal.Round(FActualAmount * 100 / item.FBudgetAmount, 2);
                            PerformanceDtlBuDtlModel model = new PerformanceDtlBuDtlModel()
                            {
                                DelPhid                 = item.PhId,
                                FDtlCode                = item.FDtlCode,
                                FName                   = item.FName,
                                FSourceOfFunds          = item.FSourceOfFunds,
                                FSourceOfFunds_EXName   = item.FSourceOfFunds_EXName,
                                FExpensesChannel_EXName = item.FExpensesChannel_EXName,
                                FBudgetAmount           = item.FBudgetAmount,
                                FActualAmount           = FActualAmount,
                                FBalanceAmount          = decimal.Round(item.FBudgetAmount - FActualAmount, 2),
                                FImplRate               = FImplRate
                            };

                            dtlList.Add(model);
                        }
                    }
                }

                return(DataConverterHelper.EntityListToJson((IList <PerformanceDtlBuDtlModel>)dtlList, dtlList.Count));

            case "performancedtltarimpl":
                var results = BudgetMstService.FindBudgetDtlPerformTargetByForeignKey(id);
                IList <PerformanceDtlTarImplModel> tarImplList = PerformanceMstService.ConvertData(results.Data);
                return(DataConverterHelper.EntityListToJson(tarImplList, tarImplList.Count));

            default:
                FindedResult findedresultother = new FindedResult();
                return(DataConverterHelper.ResponseResultToJson(findedresultother));
            }
        }