using CallCenterApi.Common; using CallCenterApi.Interface.Controllers.Base; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace CallCenterApi.Interface.Controllers { public class DictionaryController : BaseController { /// /// 获取字典值列表 /// /// public ActionResult GetDicValueListById(string branchcode,int id=0) { string sqlwhere = " F_IsDelete=0 "; if (!string.IsNullOrEmpty(branchcode)) { sqlwhere += " and F_Code='" + branchcode + "'"; } else { return Error("请选择区县"); } var list = new BLL.T_Branch_List().GetModelList(sqlwhere); if (list.Count == 0) { return Error("查询失败"); } if (id < 0) { return Error("查询失败"); } string controllername = RouteData.Values["controller"].ToString(); string actionname = RouteData.Values["action"].ToString(); if (!string.IsNullOrEmpty(list[0].F_Url)) { string signcode = CommonHelper.getsigncode(controllername, actionname, list[0].F_Sign); string strparams = "?id=" + id + "&signcode=" + signcode; string result = HttpMethods.HttpGet(list[0].F_Url + "/" + controllername + "/" + actionname + strparams); return Content(result); } else { return Error("查询失败"); } } } }