123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- using PMS.BusinessModels.ComplaintManage;
- using PMS.Interface.ComplaintManage;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using PMS.Interface;
- using PMS.Interface.PresonManager;
- using PMS.Interface.Channel;
- namespace PMS.WebUI.Controllers
- {
- /// <summary>
- /// 创建人:伍莲魁
- /// 创建时间:2018/12/13
- /// 模块功能:投诉管理模块控制器
- /// </summary>
- public class ComplaintManageController : BaseController
- {
- IComplaintList Complaint_List = InterfaceFactory.CreateBusinessInstance<IComplaintList>();
- IPersonModule PersonModule = InterfaceFactory.CreateBusinessInstance<IPersonModule>();
- IChannel Channel = InterfaceFactory.CreateBusinessInstance<IChannel>();
- // GET: Complaint
- public ActionResult ComplaintList()
- {
- return View();
- }
- #region 投诉列表
- /// <summary>
- /// 获取投诉列表Datagrid
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- public ActionResult GetComplaintDatagrid(SelectComplaintListModel model)
- {
- if (model.Channel== "0")
- {
- model.Channel = GetAuthDats().Channel;
- }
- model.strUserId = GetCurrentUser().PersonID;
- var json = Complaint_List.GetComplaintDatagrid(model);
- return Content(json, "application/json");
- }
- /// <summary>
- /// 获取投诉附件
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- public ActionResult GetComplaintFile(string id)
- {
- var json = Complaint_List.GetComplaintFile(id);
- return Content(json, "application/json");
- }
- /// <summary>
- /// 从FTP获取投诉图片
- /// </summary>
- /// <param name="id">投诉ID</param>
- /// <returns></returns>
- public ActionResult GetComplaintFileFromFTP(string id)
- {
- var json = Complaint_List.GetComplaintFileFromFTP(id);
- return Content(json, "application/json");
- }
- /// <summary>
- /// 获取投诉人详情信息
- /// </summary>
- /// <param name="PID">投诉人ID</param>
- /// <returns></returns>
- public ActionResult GetComplaintPerson(string PID)
- {
- var json = Complaint_List.GetComplaintPerson(PID);
- return Content(json, "application/json");
- }
- /// <summary>
- /// 获取项目投诉过程信息
- /// </summary>
- /// <param name="id">投诉ID</param>
- /// <returns></returns>
- public ActionResult GetDealProcess(string id)
- {
- var json= Complaint_List.GetDealProcess(id);
- return Content(json, "application/json");
- }
- /// <summary>
- /// 获取过程沟通
- /// </summary>
- /// <param name="id">投诉ID</param>
- /// <returns></returns>
- public ActionResult GetCommunicate(string id)
- {
- var json = Complaint_List.GetCommunicate(id);
- return Content(json, "application/json");
- }
- /// <summary>
- ///提交过程沟通内容
- /// </summary>
- /// <param name="id">投诉ID</param>
- /// <param name="Content">内容</param>
- /// <returns></returns>
- public ActionResult SubmitCmt(string id, string Content)
- {
- var UserInfo = GetCurrentUser();
- //调用业务接口进行保存
- var r = Complaint_List.SubmitCmt(id, Content, UserInfo.PersonID);
- if (r)
- {//保存成功
- return this.ResponseJson(System.Net.HttpStatusCode.OK, "提交成功");
- }
- else
- {//保存失败
- return this.ResponseJson(System.Net.HttpStatusCode.InternalServerError, "提交失败");
- }
- }
- /// <summary>
- /// 打开处理窗口
- /// </summary>
- /// <param name="id">投诉ID</param>
- /// <param name="Event">投诉标题</param>
- /// <returns></returns>
- public ActionResult ComplaintDeal(string id,string Event)
- {
- ViewBag.id = id;
- ViewBag.Event = Event;
- var User = GetCurrentUser().PersonID;
- ViewBag.CurrentUser = User;
- return View();
- }
- /// <summary>
- /// 投诉受理
- /// </summary>
- /// <param name="model">受理表单模型</param>
- /// <returns></returns>
- public ActionResult ComplaintAccept(FormAcceptComplaint model)
- {
- var r = Complaint_List.ComplaintAccept(model);
- if (r)
- {//保存成功
- return this.ResponseJson(System.Net.HttpStatusCode.OK, "受理成功");
- }
- else
- {//保存失败
- return this.ResponseJson(System.Net.HttpStatusCode.InternalServerError, "受理失败");
- }
- }
- /// <summary>
- /// 打开投诉分配窗口
- /// </summary>
- /// <returns></returns>
- public ActionResult ComplaintDistribute(string id, string Event)
- {
- ViewBag.id = id;
- ViewBag.Event = Event;
- return View();
- }
- /// <summary>
- /// 投诉分配
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- public ActionResult ComplaintDistributeSub(FormAcceptComplaint model)
- {
- var UserInfo = GetCurrentUser();
- model.CurrentDealPerID = UserInfo.PersonID;
- var r = Complaint_List.ComplaintDistributeSub(model);
- if (r)
- {//保存成功
- return this.ResponseJson(System.Net.HttpStatusCode.OK, "分配成功");
- }
- else
- {//保存失败
- return this.ResponseJson(System.Net.HttpStatusCode.InternalServerError, "分配失败");
- }
- }
- /// <summary>
- /// 获取渠道下的公司人员(combobox有权限)
- /// </summary>
- /// <returns></returns>
- public ActionResult GetPerson()
- {
- var UserInfo = GetCurrentUser();
- var t = UserInfo.AuthDats;
- string json = PersonModule.GetPerson(t);
- return Content(json, "application/json");
- }
- /// <summary>
- /// 获取渠道下的公司人员(combobox无权限)
- /// </summary>
- /// <param name="id">渠道ID</param>
- /// <returns></returns>
- public ActionResult GetPersonByChannel(string id)
- {
-
- string json = PersonModule.GetPersonByChannel(id);
- return Content(json, "application/json");
- }
- /// <summary>
- /// 获取渠道项目combotree :valueField: 'id', textField: '名称'
- /// </summary>
- /// <returns></returns>
- public ActionResult GetChannelProjectTree()
- {
- string json = Channel.GetChannelProjectTree();
- return Content(json, "application/json");
- }
- /// <summary>
- /// 获取渠道项目Combotree(含权限)
- /// </summary>
- /// <returns></returns>
- public ActionResult GetChannelComboTree()
- {
- var UserInfo = GetCurrentUser();
- var t = UserInfo.AuthDats;
- string json = Channel.GetChannelComboTree(t);
- return Content(json, "application/json");
- }
- #endregion
- }
- }
|