Esempio n. 1
0
        public string GetPaymentList4Zjbf2([FromUri] Parameter parameters)
        {
            if (parameters == null || string.IsNullOrEmpty(parameters.uid))
            {
                return(DCHelper.ErrorMessage("用户id为空!"));
            }
            if (string.IsNullOrEmpty(parameters.orgid))
            {
                return(DCHelper.ErrorMessage("组织编码为空!"));
            }
            if (string.IsNullOrEmpty(parameters.Ryear))
            {
                return(DCHelper.ErrorMessage("年度为空!"));
            }
            if (parameters.pageindex < 0 || parameters.pagesize == 0)
            {
                return(DCHelper.ErrorMessage("分页参数不正确!"));
            }

            string[] sorts = parameters.sort;
            if (sorts == null || sorts.Length < 1)
            {
                sorts = new string[] { "NgInsertDt desc" };
            }

            try
            {
                Dictionary <string, object> dicWhere = DataConverterHelper.ConvertToDic(parameters.queryfilter ?? "");

                //二次处理dic
                DCHelper.ConvertDic <GKPaymentMstModel>(dicWhere);

                BillRequestModel billRequest = new BillRequestModel();
                billRequest.Year  = parameters.Ryear;
                billRequest.Uid   = long.Parse(parameters.uid);
                billRequest.BType = "002";
                billRequest.Orgid = long.Parse(parameters.orgid);

                var result = GKPaymentMstService.GetPaymentList4Zjbf2(billRequest, parameters.pageindex, parameters.pagesize, dicWhere, sorts);
                IList <GKPayment4ZjbfModel> list = new List <GKPayment4ZjbfModel>();
                if (result != null && result.Results != null)
                {
                    list = result.Results;
                }


                return(DCHelper.ModelListToJson <GKPayment4ZjbfModel>(list, result.TotalItems, parameters.pageindex, parameters.pagesize));
            }
            catch (Exception e)
            {
                return(DCHelper.ErrorMessage(e.Message));
            }
        }
Esempio n. 2
0
        public string GetPaymentList([FromUri] Parameter parameters)
        {
            if (parameters == null || string.IsNullOrEmpty(parameters.uid))
            {
                return(DCHelper.ErrorMessage("用户id为空!"));
            }
            if (string.IsNullOrEmpty(parameters.orgid))
            {
                return(DCHelper.ErrorMessage("组织编码为空!"));
            }
            if (string.IsNullOrEmpty(parameters.Ryear))
            {
                return(DCHelper.ErrorMessage("年度为空!"));
            }
            if (parameters.pageindex < 0 || parameters.pagesize == 0)
            {
                return(DCHelper.ErrorMessage("分页参数不正确!"));
            }

            try
            {
                Dictionary <string, object> dicWhere = DataConverterHelper.ConvertToDic(parameters.queryfilter ?? "");

                //二次处理dic
                DCHelper.ConvertDic <GKPaymentMstModel>(dicWhere);

                //var result = GKPaymentMstService.Find(dicWhere);  //this.GKPaymentMstService.FindList(parameters.uid, parameters.orgid, parameters.pageindex, parameters.pagesize, dicWhere, parameters.sort);
                var result = GKPaymentMstService.LoadWithPage(parameters.pageindex, parameters.pagesize, dicWhere, new string[] { "NgInsertDt asc" });
                IList <GKPaymentMstModel> list = result.Results;



                return(DCHelper.ModelListToJson <GKPaymentMstModel>(list, result.TotalItems, parameters.pageindex, parameters.pagesize));
            }
            catch (Exception e)
            {
                return(DCHelper.ErrorMessage(e.Message));
            }
        }
Esempio n. 3
0
 public string GetAppvalPostOpersList([FromUri] PostRequestModel paramters)
 {
     //string userType = NG3.AppInfoBase.UserType;
     //return "";
     if (string.IsNullOrEmpty(paramters.Ucode))
     {
         throw new Exception("用户账号传递不正确!");
     }
     if (paramters.Orgid == 0)
     {
         throw new Exception("组织账号传递不正确!");
     }
     try
     {
         var result = this.GAppvalPostService.GetAppvalPostOpersList(paramters.PageIndex, paramters.PageSize, paramters.Orgid, paramters.Ucode, paramters.SearchOrgid, paramters.EnableMark, paramters.PostName);
         return(DCHelper.ModelListToJson(result, result.Count, paramters.PageIndex, paramters.PageSize));
         //return DataConverterHelper.SerializeObject(result);
     }
     catch (Exception ex)
     {
         return(DCHelper.ErrorMessage(ex.Message));
     }
 }