123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using PMS.Interface;
- using PMS.Interface.Problems;
- using PMS.BusinessModels.Problem;
- using QWPlatform.SystemLibrary.Utils;
- using System.Data;
- using PMS.Interface.WorkFlow;
- using System.IO;
- using PMS.Interface.Product;
- using PMS.Interface.ProManager;
- using PMS.Interface.Support;
- namespace PMS.WebUI.Controllers
- {
- /// <summary>
- /// 创 建 人:王海洋
- /// 创建日期:2019-01-04
- /// 功能描述:问题技术支持管理
- /// </summary>
- public class SupportController : BaseController
- {
- //项目问题管理
- IProjectProblems projectProblems = InterfaceFactory.CreateBusinessInstance<IProjectProblems>();
- IWorkFlow WorkFlowModule = InterfaceFactory.CreateBusinessInstance<IWorkFlow>();
- ICPWTJLModel CPWTJL_obj = InterfaceFactory.CreateBusinessInstance<ICPWTJLModel>();
- IProModule ProModule = InterfaceFactory.CreateBusinessInstance<IProModule>();
- ISupport support = InterfaceFactory.CreateBusinessInstance<ISupport>();
- IProduct product = InterfaceFactory.CreateBusinessInstance<IProduct>();
- // GET: 支持管理主页
- public ActionResult Index()
- {
- var UserInfo = GetCurrentUser();
- ViewBag.DJRId = UserInfo.PersonID;
- ViewBag.RYXZ = UserInfo.PersonProperty;
- ViewBag.ProductId = base.GetMyConfigInfo()?.ProductID;
- ViewBag.ModuleID = base.GetMyConfigInfo()?.ModuleID;
- return View();
- }
- //获取需要处理的问题列表(1:技术支持,2:研发显示)
- public ActionResult GetNeedProcessList(int page = 1, int rows = 20, int type = 1, string productid = "",string productModuleId="")
- {
- var json = projectProblems.GetNeedProccessProjectListJson(type, productid,productModuleId, page, rows);
- return Content(json, "text/json");
- }
- //接收处理该问题
- public ActionResult ReceiveProblem(string id)
- {
- if (!string.IsNullOrEmpty(id))
- {//问题ID
- //获取当前人员ID
- var userInfo = GetCurrentUser();
- var uid = userInfo.PersonID;
- var name = userInfo.Name;
- var r = projectProblems.IsReceive(id, uid);
- var msg = (r == 0 || r == 2) ? "受理成功." : "问题已被他人受理";
- if (r == 0)
- {
- //获取进入流程ID
- var WorkId = WorkFlowModule.GetDealWorkId(id, userInfo.PersonProperty, userInfo.JobCode);
- //受理问题
- var DealModel = new ProblemDealModel();
- DealModel.ProblemId = id;
- DealModel.NextWorkId = WorkId;
- DealModel.DealPeronName = userInfo.Name;
- DealModel.DealPeronId = userInfo.PersonID;
- var re = WorkFlowModule.ProblemAccept(DealModel);
- msg = re ? "受理成功" : "受理发生错误,请检查职务!";
- }
- return Content(new PmsJsonResoult((r == 0 || r == 2), msg, null).ToString(), "text/json");
- }
- else
- {//没有问题id
- return Content(new PmsJsonResoult(false, "没有问题相关的ID", null).ToString(), "text/json");
- }
- }
- //GET:产品问题首页
- public ActionResult ProductIndex()
- {
- var UserInfo = GetCurrentUser();
- ViewBag.DJRId = UserInfo.PersonID;
- ViewBag.RYXZ = UserInfo.PersonProperty;
- ViewBag.ProductId = base.GetMyConfigInfo()?.ProductID;
- ViewBag.ModuleID = base.GetMyConfigInfo()?.ModuleID;
- return View();
- }
- //GET : 产生一个新的技术支持登记的页面
- public ActionResult NewSuport()
- {
- return View();
- }
- //受理问题处理
- public ActionResult AcceptProblem()
- {
- return View();
- }
- }
- }
|