| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- 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 AreaController : BaseController
- {
- /// <summary>
- /// 获取区域列表
- /// </summary>
- /// <returns></returns>
- public ActionResult GetAreaListById(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("查询失败");
- }
- }
- }
- }
|