/// <summary>
        /// 取对应关系列表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetCorrespondenceSettingsListbyRelation(string Dylx, string Dwdm, string DefStr1)
        {
            //string clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];//查询条件
            //Dictionary<string, object> dicWhere = DataConverterHelper.ConvertToDic(clientJsonQuery);//查询条件转Dictionary
            var dicWhere = new Dictionary <string, object>();

            if (Dylx != null)
            {
                new CreateCriteria(dicWhere).
                Add(ORMRestrictions <string> .Eq("Dylx", Dylx));
            }
            if (Dwdm != null)
            {
                new CreateCriteria(dicWhere).
                Add(ORMRestrictions <string> .Eq("Dwdm", Dwdm));
            }
            if (DefStr1 != null)
            {
                new CreateCriteria(dicWhere).
                Add(ORMRestrictions <string> .Eq("DefStr1", DefStr1));
            }
            DataStoreParam storeparam = this.GetDataStoreParam();
            //var result = CorrespondenceSettingsService.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, dicWhere);
            //var result = CorrespondenceSettingsService.LoadWithPage(storeparam.PageIndex, 100, dicWhere);
            var result = CorrespondenceSettingsService.ServiceHelper.LoadWithPageInfinity("GQT3.QT.DYGX_All", dicWhere);

            return(DataConverterHelper.EntityListToJson <CorrespondenceSettingsModel>(result.Results, (Int32)result.TotalItems));
        }
Example #2
0
        /// <summary>
        /// 取列表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetLogPerfList()
        {
            string clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];    //查询条件
            Dictionary <string, object> dicWhere = DataConverterHelper.ConvertToDic(clientJsonQuery); //查询条件转Dictionary

            DataStoreParam storeparam = this.GetDataStoreParam();

            string sortbyparm = System.Web.HttpContext.Current.Request.Params["sortby"];

            if (string.IsNullOrEmpty(sortbyparm))
            {
                sortbyparm = "2";
            }
            string[] sortby = null;
            if (sortbyparm == "0")
            {
                sortby = new string[] { "Duration Asc" };
            }
            else if (sortbyparm == "1")
            {
                sortby = new string[] { "Duration Desc" };
            }
            else if (sortbyparm == "2")
            {
                sortby = new string[] { "Phid Asc" };
            }
            else if (sortbyparm == "3")
            {
                sortby = new string[] { "Phid Desc" };
            }

            var result = LogPerfService.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, dicWhere, sortby);

            return(DataConverterHelper.EntityListToJson <LogPerfModel>(result.Results, (Int32)result.TotalItems));
        }
Example #3
0
        public List <OrganizeModel> GetOrg()
        {
            DataStoreParam dataStoreParam = this.GetDataStoreParam();
            var            result         = CorrespondenceSettingsService.LoadWithPageOrg(dataStoreParam);

            return(result.Results as List <OrganizeModel>);
        }
        public ActionResult SaveOrUpdate(String data)
        {
            DataStoreParam dataStoreParam = this.GetDataStoreParam();
            var            result         = CorrespondenceSettingsService.LoadWithPageOrg(dataStoreParam);
            //Dictionary<string, object> dicWhere = DataConverterHelper.ConvertToDic("");
            IList <OrganizeModel> organizes = result.Results as List <OrganizeModel>;

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

            new CreateCriteria(dicWhere).Add(ORMRestrictions <Int64> .NotEq("PhId", 0));
            IList <CorrespondenceSettings2Model> correspondenceSettings2s = CorrespondenceSettings2Service.Find(dicWhere).Data as List <CorrespondenceSettings2Model>;

            //IList<CorrespondenceSettings2Model> correspondenceSettings2s = CorrespondenceSettings2Service.LoadWithPage(dataStoreParam.PageIndex, dataStoreParam.PageSize, dicWhere).Results as List<CorrespondenceSettings2Model>;
            organizes = ProjectThresholdService.GetSBOrganizes(organizes, correspondenceSettings2s);
            //IList<ProjectThresholdModel> projectThresholds = (ProjectThresholdService.LoadWithPage(dataStoreParam.PageIndex, dataStoreParam.PageSize, dicWhere)).Results as List<ProjectThresholdModel>;
            IList <ProjectThresholdModel> projectThresholds = ProjectThresholdService.Find(dicWhere).Data as List <ProjectThresholdModel>;

            if (this.ProjectThresholdService.SaveOrUpdate(data, organizes, projectThresholds, dataStoreParam))
            {
                return(Content("{\"result\":\"success\"}"));
            }
            else
            {
                return(Content("{\"result\":\"fail\"}"));
            }
        }
        /// <summary>
        /// 取对应关系列表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetCorrespondenceSettings2ListbyRelation(string Dylx, string Dwdm, string DefStr1)
        {
            var dicWhere = new Dictionary <string, object>();

            if (Dylx != null)
            {
                new CreateCriteria(dicWhere).
                Add(ORMRestrictions <string> .Eq("Dylx", Dylx));
            }
            if (Dwdm != null)
            {
                new CreateCriteria(dicWhere).
                Add(ORMRestrictions <string> .Eq("Dwdm", Dwdm));
            }
            if (DefStr1 != null)
            {
                new CreateCriteria(dicWhere).
                Add(ORMRestrictions <string> .Eq("DefStr1", DefStr1));
            }

            DataStoreParam storeparam = this.GetDataStoreParam();
            //var result = CorrespondenceSettings2Service.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, dicWhere);
            var result = CorrespondenceSettings2Service.ServiceHelper.LoadWithPageInfinity("GQT3.QT.DYGX2_All", dicWhere);

            return(DataConverterHelper.EntityListToJson <CorrespondenceSettings2Model>(result.Results, (Int32)result.TotalItems));
        }
Example #6
0
        /// <summary>
        /// 取列表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetQtBaseProjectList()
        {
            //string clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];//查询条件
            //Dictionary<string, object> dicWhere = DataConverterHelper.ConvertToDic(clientJsonQuery);//查询条件转Dictionary
            long   Fphid = Convert.ToInt64(System.Web.HttpContext.Current.Request.Params["Fphid"]);
            string FKMLB = System.Web.HttpContext.Current.Request.Params["FKMLB"];
            string FYear = System.Web.HttpContext.Current.Request.Params["FYear"];
            Dictionary <string, object> dicWhere = new Dictionary <string, object>();

            new CreateCriteria(dicWhere).
            Add(ORMRestrictions <System.Int64> .Eq("Fphid", Fphid))
            .Add(ORMRestrictions <string> .Eq("FKMLB", FKMLB));
            if (!string.IsNullOrEmpty(FYear))//取科目及当前年度的子科目
            {
                Dictionary <string, object> dicWhere2 = new Dictionary <string, object>();
                Dictionary <string, object> dicWhere3 = new Dictionary <string, object>();
                new CreateCriteria(dicWhere2).
                Add(ORMRestrictions <string> .Eq("FYear", FYear));
                new CreateCriteria(dicWhere3).
                Add(ORMRestrictions <string> .Eq("FProjCode", ""));
                new CreateCriteria(dicWhere).Add(ORMRestrictions.Or(dicWhere2, dicWhere3));
            }

            DataStoreParam storeparam = this.GetDataStoreParam();
            var            result     = QtBaseProjectService.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, dicWhere, new string[] { "FKmdm", "NgInsertDt" });

            return(DataConverterHelper.EntityListToJson <QtBaseProjectModel>(result.Results, (Int32)result.TotalItems));
        }
Example #7
0
        /// <summary>
        /// 取列表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetExpenseMstList()
        {
            string clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];    //查询条件
            Dictionary <string, object> dicWhere = DataConverterHelper.ConvertToDic(clientJsonQuery); //查询条件转Dictionary

            var userId       = System.Web.HttpContext.Current.Request.Params["userId"];
            var dicWhereDept = new Dictionary <string, object>();

            new CreateCriteria(dicWhereDept)
            .Add(ORMRestrictions <string> .Eq("Dwdm", userId)).Add(ORMRestrictions <string> .Eq("Dylx", "97")); //闭区间
            var           deptList = CorrespondenceSettingsService.Find(dicWhereDept);
            List <string> deptL    = new List <string>();

            for (var i = 0; i < deptList.Data.Count; i++)
            {
                deptL.Add(deptList.Data[i].Dydm);
            }
            new CreateCriteria(dicWhere)
            .Add(ORMRestrictions <IList <String> > .In("FBudgetDept", deptL));

            DataStoreParam storeparam = this.GetDataStoreParam();
            var            result     = ExpenseMstService.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, dicWhere, new string[] { "FPerformevaltype Desc" });

            return(DataConverterHelper.EntityListToJson <ExpenseMstModel>(result.Results, (Int32)result.TotalItems));
        }
Example #8
0
        /// <summary>
        /// 申报部门项目汇总表
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetQTProjectMstHZ()
        {
            /*string FDeclarationDept = System.Web.HttpContext.Current.Request.Params["FDeclarationDept"];
             * string FBudgetDept = System.Web.HttpContext.Current.Request.Params["FBudgetDept"];
             * string FAccount = System.Web.HttpContext.Current.Request.Params["FAccount"];
             * Dictionary<string, object> dicWhere = new Dictionary<string, object>();
             * if (!string.IsNullOrEmpty(FDeclarationDept))
             * {
             *  new CreateCriteria(dicWhere).Add(ORMRestrictions<string>.Eq("FDeclarationDept", FDeclarationDept));
             * }
             * if (!string.IsNullOrEmpty(FBudgetDept))
             * {
             *  new CreateCriteria(dicWhere).Add(ORMRestrictions<string>.Eq("FBudgetDept", FBudgetDept));
             * }
             * if (!string.IsNullOrEmpty(FAccount))
             * {
             *  new CreateCriteria(dicWhere).Add(ORMRestrictions<string>.Eq("FAccount", FAccount));
             * }*/
            string clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];    //查询条件
            Dictionary <string, object> dicWhere = DataConverterHelper.ConvertToDic(clientJsonQuery); //查询条件转Dictionary
            DataStoreParam storeparam            = this.GetDataStoreParam();
            var            result = QTProjectMstService.GetQTProjectMstHZ(dicWhere, storeparam.PageIndex, storeparam.PageSize, out int TotalItems);

            return(DataConverterHelper.EntityListToJson <QTProjectMstHZModel>(result, TotalItems));
        }
        /// <summary>
        /// 取对应关系列表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetRelationYSBMList()
        {
            DataStoreParam storeparam = this.GetDataStoreParam();
            var            result     = CorrespondenceSettingsService.LoadWithPageYSBM(storeparam);

            return(DataConverterHelper.EntityListToJson <User2Model>(result.Results, (Int32)result.TotalItems));
        }
        /// <summary>
        /// 取对应关系列表数据  取所有org(包括部门)
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetAllOrg()
        {
            DataStoreParam dataStoreParam = this.GetDataStoreParam();
            var            result         = CorrespondenceSettingsService.LoadWithPageAllOrg(dataStoreParam);

            return(DataConverterHelper.EntityListToJson <OrganizeModel>(result.Results, (Int32)result.TotalItems));
        }
        /// <summary>
        /// 取对应关系列表数据  根据组织id取部门
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetBM()
        {
            string         OrgId          = System.Web.HttpContext.Current.Request.Params["OrgId"];//查询条件
            DataStoreParam dataStoreParam = this.GetDataStoreParam();
            var            result         = CorrespondenceSettingsService.LoadWithPageBM(dataStoreParam, OrgId);

            return(DataConverterHelper.EntityListToJson <OrganizeModel>(result.Results, (Int32)result.TotalItems));
        }
        /// <summary>
        /// 取对应关系列表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetRelationYSBMLeftList()
        {
            string         userCode       = System.Web.HttpContext.Current.Request.Params["userCode"];//查询条件
            DataStoreParam dataStoreParam = this.GetDataStoreParam();
            var            result         = CorrespondenceSettingsService.GetRelationYSBMLeftList(dataStoreParam, userCode);

            return(DataConverterHelper.EntityListToJson <OrganizeModel>(result.Results, (Int32)result.TotalItems));
        }
        /// <summary>
        /// 取列表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetBudgetProcessCtrlDistinctList()
        {
            DataStoreParam storeparam = this.GetDataStoreParam();
            string         query      = System.Web.HttpContext.Current.Request.Params["FOcode"];//查询条件
            string         userId     = System.Web.HttpContext.Current.Request.Params["userId"];
            var            result     = BudgetProcessCtrlService.GetBudgetProcessCtrlDistinctList(storeparam, query, userId);

            return(DataConverterHelper.EntityListToJson <BudgetProcessCtrlModel>(result.Results, (Int32)result.TotalItems));
        }
        /// <summary>
        /// 取操作员能操作的org
        /// </summary>
        /// <returns></returns>
        public string OrgByUser()
        {
            string         userid     = System.Web.HttpContext.Current.Request.Params["userid"];
            DataStoreParam storeparam = this.GetDataStoreParam();
            var            result     = CorrespondenceSettingsService.LoadWithPageOrgByUser(storeparam, userid);

            //return DataConverterHelper.ResponseResultToJson(result);
            return(DataConverterHelper.EntityListToJson <OrganizeModel>(result.Results, (Int32)result.TotalItems));
        }
Example #15
0
        /// <summary>
        /// 取列表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetExamplesList()
        {
            string clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];    //查询条件
            Dictionary <string, object> dicWhere = DataConverterHelper.ConvertToDic(clientJsonQuery); //查询条件转Dictionary

            DataStoreParam storeparam = this.GetDataStoreParam();
            var            result     = ExamplesService.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, dicWhere);

            return(DataConverterHelper.EntityListToJson <ExamplesModel>(result.Results.ToList(), (Int32)result.TotalItems));
        }
        /// <summary>
        /// 取列表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetLogSortingSlowPerfList()
        {
            string clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];    //查询条件
            Dictionary <string, object> dicWhere = DataConverterHelper.ConvertToDic(clientJsonQuery); //查询条件转Dictionary

            DataStoreParam storeparam = this.GetDataStoreParam();
            var            result     = LogSortingSlowPerfService.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, dicWhere, new string[] { "Duration desc" });

            return(DataConverterHelper.EntityListToJson <LogSortingSlowPerfModel>(result.Results, (Int32)result.TotalItems));
        }
Example #17
0
        /// <summary>
        /// 取预算执行情况表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetBuImplementReportList()
        {
            string clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];    //查询条件
            Dictionary <string, object> dicWhere = DataConverterHelper.ConvertToDic(clientJsonQuery); //查询条件转Dictionary

            DataStoreParam storeparam = this.GetDataStoreParam();
            var            result     = BuDeptReportService.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, "GHBudgetImplement", dicWhere, false);

            return(DataConverterHelper.EntityListToJson <BuDeptReportModel>(result.Results, (Int32)result.TotalItems));
        }
Example #18
0
        /// <summary>
        /// 取列表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public PagedResult <PerformEvalTypeModel> GetList()
        {
            string clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];    //查询条件
            Dictionary <string, object> dicWhere = DataConverterHelper.ConvertToDic(clientJsonQuery); //查询条件转Dictionary

            DataStoreParam storeparam = this.GetDataStoreParam();
            var            result     = PerformEvalTypeService.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, dicWhere);

            return(result);
        }
Example #19
0
        public string GetBusTypeList()
        {
            DataStoreParam storeparam      = this.GetDataStoreParam();
            string         clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];//查询条件
            int            totalRecord     = 0;

            DataTable dt   = proxy.GetBusTypeList(clientJsonQuery, storeparam.PageSize, storeparam.PageIndex, ref totalRecord);
            string    json = DataConverterHelper.ToJson(dt, totalRecord);

            return(json);
        }
Example #20
0
        public IList <VCorrespondenceSetting2Model> GetVc2mList(String dwdm)
        {
            string clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];
            Dictionary <string, object> dicWhere = DataConverterHelper.ConvertToDic(clientJsonQuery);//查询条件转Dictionary
            CreateCriteria createCriteria        = new CreateCriteria(dicWhere);

            createCriteria.Add(ORMRestrictions <string> .Eq("Dylx", "ZC"));
            createCriteria.Add(ORMRestrictions <string> .NotEq("Dydm", "NULL"));
            if (dwdm != null)
            {
                createCriteria.Add(ORMRestrictions <string> .Eq("Dwdm", dwdm));
            }

            DataStoreParam storeparam = this.GetDataStoreParam();
            var            cr2s       = this.CorrespondenceSettings2Service.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, dicWhere).Results as List <CorrespondenceSettings2Model>;
            var            ors        = this.GetOrg();
            IList <VCorrespondenceSetting2Model> vcr2s = new List <VCorrespondenceSetting2Model>();

            foreach (CorrespondenceSettings2Model cr2 in cr2s)
            {
                VCorrespondenceSetting2Model vc2 = new VCorrespondenceSetting2Model();
                vc2.PhId = cr2.PhId;
                vc2.DWDM = cr2.Dwdm;
                vc2.DYDM = cr2.Dydm;
                vc2.DYLX = cr2.Dylx;

                var or = from or1 in ors
                         where or1.OCode.Equals(cr2.Dydm)
                         select or1;
                if (or.Count() == 1)
                {
                    vc2.Dymc = or.ToList()[0].OName;
                }
                else
                {
                    vc2.Dymc = "未设置";
                }
                or = from or1 in ors
                     where or1.OCode.Equals(cr2.Dwdm)
                     select or1;
                if (or.Count() == 1)
                {
                    vc2.Dwmc = or.ToList()[0].OName;
                }
                else
                {
                    vc2.Dymc = "未设置";
                }

                vcr2s.Add(vc2);
            }
            return(vcr2s);
        }
Example #21
0
        public string GetRichQueryList()
        {
            DataStoreParam storeparam = this.GetDataStoreParam();

            bool   ormMode                = System.Web.HttpContext.Current.Request.Params["ORMMode"] == "true" ? true : false;
            string helpid                 = System.Web.HttpContext.Current.Request.Params["helpid"];
            string outJsonQuery           = System.Web.HttpContext.Current.Request.Params["outqueryfilter"];  //外部json查询条件
            string leftLikeJsonQuery      = System.Web.HttpContext.Current.Request.Params["leftLikefilter"];  //查询条件,like value%
            string clientSqlFilter        = System.Web.HttpContext.Current.Request.Params["clientSqlFilter"]; //客户端传入的sql查询条件,有些情况无法参数化
            string infoRightUIContainerID = System.Web.HttpContext.Current.Request.Params["UIContainerID"];   //信息权限注册的容器ID

            string clientJsonQuery = Pub.Request("query");                                                    //客户端的查询条件,json格式的
            string clientQuery     = string.Empty;

            if (!string.IsNullOrEmpty(clientJsonQuery))
            {
                clientQuery = clientJsonQuery; //DataConverterHelper.BuildQuery(clientJsonQuery);
            }

            int totalRecord = 0;
            RichHelpListArgEntity entity = new RichHelpListArgEntity();

            entity.InfoRightUIContainerID = infoRightUIContainerID;
            entity.Helpid    = helpid;
            entity.PageSize  = storeparam.PageSize;
            entity.PageIndex = storeparam.PageIndex;
            //entity.Keys = keys;
            //entity.Treerefkey = treerefkey;
            //entity.Treesearchkey = treesearchkey;
            entity.OutJsonQuery    = outJsonQuery;
            entity.ClientQuery     = clientQuery;
            entity.ClientSqlFilter = clientSqlFilter;
            //entity.QueryPropertyID = queryPropertyID;
            //entity.QueryPropertyCode = queryPropertyCode;
            //entity.IsAutoComplete = isAutoComplete;

            //object obj = proxy.GetRichQueryList(helpid, storeparam.PageSize, storeparam.PageIndex, ref totalRecord, clientQuery, outJsonQuery, leftLikeJsonQuery, clientSqlFilter, ormMode);
            object obj = proxy.GetRichQueryList(entity, ref totalRecord, ormMode);

            if (obj is DataTable)
            {
                DataTable dt  = obj as DataTable;
                string    str = DataConverterHelper.ToJson(dt, totalRecord);

                return(str);
            }
            else
            {
                System.Collections.IList list = obj as System.Collections.IList;
                string str = DataConverterHelper.EntityListToJson(list, totalRecord);
                return(str);
            }
        }
        /// <summary>
        /// 根据组织取绩效得分对应绩效结论设置列表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetJXJLset()
        {
            string Dwdm = System.Web.HttpContext.Current.Request.Params["Dwdm"];
            Dictionary <string, object> dicWhere = new Dictionary <string, object>();//查询条件转Dictionary

            new CreateCriteria(dicWhere).Add(ORMRestrictions <string> .Eq("Dwdm", Dwdm))
            .Add(ORMRestrictions <string> .Eq("Dylx", "JXJL"));
            DataStoreParam storeparam = this.GetDataStoreParam();
            var            result     = CorrespondenceSettings2Service.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, dicWhere, new string[] { "DefStr1" });

            return(DataConverterHelper.EntityListToJson <CorrespondenceSettings2Model>(result.Results, (Int32)result.TotalItems));
        }
        /// <summary>
        /// 取列表数据
        /// </summary>
        /// <returns>返回对象集合</returns>
        public IList <ProjectThresholdModel> GetPTMList()
        {
            string clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];    //查询条件
            Dictionary <string, object> dicWhere = DataConverterHelper.ConvertToDic(clientJsonQuery); //查询条件转Dictionary

            new CreateCriteria(dicWhere).Add(ORMRestrictions <Int64> .NotEq("PhId", 0));
            DataStoreParam storeparam = this.GetDataStoreParam();
            var            result     = ProjectThresholdService.Find(dicWhere).Data;

            //ProjectThresholdService.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, dicWhere);

            return(result);
        }
Example #24
0
        /// <summary>
        /// 取列表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetQTEditMemoList()
        {
            string clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];    //查询条件
            Dictionary <string, object> dicWhere = DataConverterHelper.ConvertToDic(clientJsonQuery); //查询条件转Dictionary
            var Memophid = Convert.ToInt64(System.Web.HttpContext.Current.Request.Params["Memophid"]);

            new CreateCriteria(dicWhere)
            .Add(ORMRestrictions <Int64> .Eq("Memophid", Memophid));

            DataStoreParam storeparam = this.GetDataStoreParam();
            var            result     = QTEditMemoService.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, dicWhere, new string[] { "NgInsertDt Desc", "NgUpdateDt Desc" });

            return(DataConverterHelper.EntityListToJson <QTEditMemoModel>(result.Results, (Int32)result.TotalItems));
        }
Example #25
0
        /// <summary>
        /// 取列表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetQTMemoList()
        {
            string clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];//查询条件
            long   userId          = Convert.ToInt64(System.Web.HttpContext.Current.Request.Params["userId"]);

            Dictionary <string, object> dicWhere = DataConverterHelper.ConvertToDic(clientJsonQuery);//查询条件转Dictionary

            new CreateCriteria(dicWhere)
            .Add(ORMRestrictions <System.Int64> .Eq("Creator", userId));
            DataStoreParam storeparam = this.GetDataStoreParam();
            var            result     = QTMemoService.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, dicWhere);

            return(DataConverterHelper.EntityListToJson <QTMemoModel>(result.Results, (Int32)result.TotalItems));
        }
Example #26
0
        /// <summary>
        /// 取列表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetQtBaseProjectSelect()
        {
            //long Fphid = Convert.ToInt64(System.Web.HttpContext.Current.Request.Params["Fphid"]);
            string userCode = System.Web.HttpContext.Current.Request.Params["userCode"];
            string FKMLB    = System.Web.HttpContext.Current.Request.Params["FKMLB"];
            string FType    = System.Web.HttpContext.Current.Request.Params["FType"];
            string FYear    = System.Web.HttpContext.Current.Request.Params["FYear"];
            Dictionary <string, object> dicWhere = new Dictionary <string, object>();
            var DeptList = CorrespondenceSettingsService.GetRelationYSBMRightList(userCode).Results.ToList().Select(x => x.OCode).Distinct().ToList();

            new CreateCriteria(dicWhere)
            .Add(ORMRestrictions <string> .Eq("FKMLB", FKMLB))
            .Add(ORMRestrictions <string> .NotEq("FProjCode", ""))
            .Add(ORMRestrictions <List <string> > .In("FFillDept", DeptList));
            if (!string.IsNullOrEmpty(FYear))
            {
                new CreateCriteria(dicWhere)
                .Add(ORMRestrictions <string> .Eq("FYear", FYear));
            }
            DataStoreParam storeparam = this.GetDataStoreParam();
            //var result = QtBaseProjectService.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, dicWhere, new string[] { "FKmdm", "NgInsertDt" });
            var result = new PagedResult <QtBaseProjectModel>();

            if (FType == "c")
            {
                result = QtBaseProjectService.ServiceHelper.LoadWithPageInfinity("GQT.QT.TBJD.c", dicWhere);
            }
            else
            {
                result = QtBaseProjectService.ServiceHelper.LoadWithPageInfinity("GQT.QT.TBJD.z", dicWhere);
                foreach (QtBaseProjectModel a in result.Results)
                {
                    if (a.FType == "c")
                    {
                        a.FProjName = a.FProjName + "(年初新增)";
                    }
                    if (a.FType == "z")
                    {
                        a.FProjName = a.FProjName + "(年中新增)";
                    }
                    if (a.FType == "tz")
                    {
                        a.FProjName = a.FProjName + "(年中调整)";
                    }
                }
            }
            //var result = QtBaseProjectService.ServiceHelper.LoadWithPageInfinity("GQT.QT.TBJD", dicWhere);
            return(DataConverterHelper.EntityListToJson <QtBaseProjectModel>(result.Results, (Int32)result.TotalItems));
        }
        /// <summary>
        /// 根据申报单位组装数据发送给前台
        /// </summary>
        /// <returns>返回Json串</returns>

        /**
         * 需要借用orange组件
         *
         *
         * */
        public string GetProjectThresholdListByUserPower()
        {
            DataStoreParam        dataStoreParam = this.GetDataStoreParam();
            var                   result         = CorrespondenceSettingsService.LoadWithPageOrg(dataStoreParam);
            IList <OrganizeModel> organizes      = result.Results as List <OrganizeModel>;
            //Dictionary<string, object> dicWhere = DataConverterHelper.ConvertToDic("");//查询条件转Dictionary
            Dictionary <string, object> dicWhere = new Dictionary <string, object>();

            new CreateCriteria(dicWhere).Add(ORMRestrictions <Int64> .NotEq("PhId", 0));
            IList <CorrespondenceSettings2Model> correspondenceSettings2s = CorrespondenceSettings2Service.Find(dicWhere).Data as List <CorrespondenceSettings2Model>;

            organizes = ProjectThresholdService.GetSBOrganizes(organizes, correspondenceSettings2s);
            IList <ProjectThresholdModel> projectThresholds = ProjectThresholdService.Find(dicWhere).Data as List <ProjectThresholdModel>;

            IList <VProjectThresholdModel> vprojectThresholds = new List <VProjectThresholdModel>();

            foreach (OrganizeModel organize in organizes)
            {
                var q1 = from dt1 in projectThresholds
                         where dt1.Orgid == organize.PhId
                         select dt1;
                VProjectThresholdModel pt1 = new VProjectThresholdModel();
                if (q1.Count() == 0)
                {
                    pt1.Orgcode    = organize.OCode;
                    pt1.Orgid      = organize.PhId;
                    pt1.FThreshold = "未设置";
                }
                if (q1.Count() == 1)
                {
                    var pm = q1.ToList()[0];
                    pt1.PhId         = pm.PhId;
                    pt1.Orgid        = pm.Orgid;
                    pt1.Orgcode      = pm.Orgcode;
                    pt1.FThreshold   = pm.FThreshold;
                    pt1.ProjTypeId   = pm.ProjTypeId;
                    pt1.ProjTypeName = pm.ProjTypeName;
                }


                pt1.Orgname = organize.OName;
                vprojectThresholds.Add(pt1);
            }

            return(DataConverterHelper.EntityListToJson <VProjectThresholdModel>(vprojectThresholds, (Int32)vprojectThresholds.Count()));


            //return DataConverterHelper.EntityListToJson<ProjectThresholdModel>(result.Results, (Int32)result.TotalItems);
        }
        /// <summary>
        /// 取列表数据根据绩效项目评价指标类型
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetPerformEvalTargetListByClassCode()
        {
            string TypeCode = System.Web.HttpContext.Current.Request.Params["TypeCode"];//查询条件
            var    dicWhere = new Dictionary <string, object>();

            new CreateCriteria(dicWhere).
            Add(ORMRestrictions <string> .Eq("FTargetTypeCode", TypeCode));

            DataStoreParam storeparam = this.GetDataStoreParam();
            var            result     = PerformEvalTargetService.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, dicWhere, new string[] { "FTargetCode" });

            result = PerformEvalTargetService.CodeToName(result);

            return(DataConverterHelper.EntityListToJson <PerformEvalTargetModel>(result.Results, (Int32)result.TotalItems));
        }
        /// <summary>
        /// 取列表数据
        /// </summary>
        /// <returns>返回Json串</returns>
        public string GetQTProductUserDygxList()
        {
            /*string clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];//查询条件
             *          Dictionary<string, object> dicWhere = DataConverterHelper.ConvertToDic(clientJsonQuery);//查询条件转Dictionary
             */
            long Fg3userPhid = Convert.ToInt64(System.Web.HttpContext.Current.Request.Params["Fg3userPhid"]);//查询条件
            Dictionary <string, object> dicWhere = new Dictionary <string, object>();

            new CreateCriteria(dicWhere).Add(ORMRestrictions <System.Int64> .Eq("Fg3userPhid", Fg3userPhid));

            DataStoreParam storeparam = this.GetDataStoreParam();
            var            result     = QTProductUserDygxService.LoadWithPage(storeparam.PageIndex, storeparam.PageSize, dicWhere);

            return(DataConverterHelper.EntityListToJson <QTProductUserDygxModel>(result.Results, (Int32)result.TotalItems));
        }
Example #30
0
        public string GetList()
        {
            DataStoreParam storeparam      = this.GetDataStoreParam();
            string         clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];//查询条件
            //string clientQuery = string.Empty;
            //if (!string.IsNullOrEmpty(clientJsonQuery))
            //{
            //    clientQuery = DataConverterHelper.BuildQuery(clientJsonQuery);
            //}
            int totalRecord = 0;

            DataTable dt   = proxy.GetList(clientJsonQuery, storeparam.PageSize, storeparam.PageIndex, ref totalRecord);
            string    json = DataConverterHelper.ToJson(dt, totalRecord);

            return(json);
        }