123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- using LeaRun.Application.Busines.DMAManage;
- using LeaRun.Application.Code;
- using LeaRun.Util.WebControl;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- namespace LeaRun.Application.Web.Areas.DMAManage.Controllers
- {
- public class PartitionSettingController : MvcControllerBase
- {
- PartitionSettingBLL partitionSettingBLL = new PartitionSettingBLL();
- // 分区设置
- // GET: /DMAManage/PartitionDraw/
- #region 视图区域
- public ActionResult Index()
- {
- return View();
- }
- #endregion
- #region 获取考核表数据
- /// <summary>
- /// 获取考核表数据
- /// </summary>
- /// <param name="pagination"></param>
- /// <param name="keyType"></param>
- /// <param name="keyWord"></param>
- /// <returns></returns>
- [HttpGet]
- public ActionResult GetMeterAssessments(Pagination pagination, string keyType, string keyWord, string DMAID)
- {
- return Content(partitionSettingBLL.GetMeterAssessments(pagination, keyType, keyWord, DMAID));
- }
- #endregion
- #region 获取关系表数据
- /// <summary>
- /// 获取关系表数据
- /// </summary>
- /// <param name="pagination"></param>
- /// <param name="keyType"></param>
- /// <param name="keyWord"></param>
- /// <param name="DMAID"></param>
- /// <param name="FlowType"></param>
- /// <returns></returns>
- public ActionResult GetDMAMeterRelations(Pagination pagination, string keyType, string keyWord, string DMAID, string FlowType)
- {
- return Content(partitionSettingBLL.GetDMAMeterRelations(pagination, keyType, keyWord, DMAID, FlowType));
- }
-
- #endregion
- #region 考核表ID插入到关系表中
- /// <summary>
- /// 考核表ID插入到关系表中
- /// </summary>
- /// <param name="meterIds"></param>
- /// <param name="DMAID"></param>
- /// <param name="FlowType"></param>
- /// <returns></returns>
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult SettingInMeterToRelation(string meterIds, string DMAID, string FlowType)
- {
- string userId = OperatorProvider.Provider.Current().UserId;
- string companyId = OperatorProvider.Provider.Current().CompanyId;
- string result = partitionSettingBLL.SettingInMeterToRelation(meterIds, DMAID, userId, companyId, FlowType);
- if ("".Equals(result))
- {
- return Success("操作成功!");
- }
- else
- {
- return Error(result);
- }
- }
- #endregion
- #region 入口水表挂接关系表插入到考核表中 关系表 -> 考核表
- /// <summary>
- /// 入口水表挂接关系表插入到考核表中 关系表 -> 考核表
- /// </summary>
- /// <param name="meterIds"></param>
- /// <param name="DMAID"></param>
- /// <returns></returns>
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult SettingInRelationToMeter(string meterIds, string DMAID)
- {
- string result = partitionSettingBLL.SettingInRelationToMeter(meterIds, DMAID);
- if ("".Equals(result))
- {
- return Success("操作成功!");
- }
- else
- {
- return Error(result);
- }
- }
- #endregion
- #region 获取户表挂接数据
- /// <summary>
- /// 获取户表挂接数据
- /// </summary>
- /// <param name="pagination"></param>
- /// <param name="keyType"></param>
- /// <param name="keyWord"></param>
- /// <param name="DMAID"></param>
- /// <returns></returns>
- public ActionResult GetDMAMeterUsers(Pagination pagination, string keyType, string keyWord, string DMAID)
- {
- return Content(partitionSettingBLL.GetDMAMeterUsers(pagination, keyType, keyWord, DMAID));
- }
- #endregion
- #region 获取户表挂接可以挂接的数据
- /// <summary>
- /// 获取户表挂接可以挂接的数据
- /// </summary>
- /// <param name="pagination"></param>
- /// <param name="keyType"></param>
- /// <param name="keyWord"></param>
- /// <returns></returns>
- public ActionResult GetMeterUsers(Pagination pagination, string keyType, string keyWord)
- {
- return Content(partitionSettingBLL.GetMeterUsers(pagination, keyType, keyWord));
- }
- #endregion
- #region 户表插入
- /// <summary>
- /// 户表插入
- /// </summary>
- /// <param name="meterIds"></param>
- /// <param name="DMAID"></param>
- /// <returns></returns>
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult SettingMeterUserIn(string meterIds, string DMAID)
- {
- string result = partitionSettingBLL.SettingMeterUserIn(meterIds, DMAID);
- if ("".Equals(result))
- {
- return Success("操作成功!");
- }
- else
- {
- return Error(result);
- }
- }
- #endregion
- #region 户表删除
- /// <summary>
- /// 户表删除
- /// </summary>
- /// <param name="meterIds"></param>
- /// <returns></returns>
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult SettingMeterUserOut(string meterIds)
- {
- string result = partitionSettingBLL.SettingMeterUserOut(meterIds);
- if ("".Equals(result))
- {
- return Success("操作成功!");
- }
- else
- {
- return Error(result);
- }
- }
- #endregion
- }
- }
|