You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
121 lines
3.9 KiB
121 lines
3.9 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using QMAPP.Common.Web.Controllers;
|
|
using QMAPP.Entity.Sys;
|
|
using QMAPP.Web.Models.Sys;
|
|
using QMFrameWork.WebUI.Attribute;
|
|
|
|
namespace QMAPP.Web.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 工作流
|
|
/// </summary>
|
|
public class WorkFlowController : QController
|
|
{
|
|
#region 获取流程设置机构信息
|
|
/// <summary>
|
|
/// 支持交互流程设置
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HandleException]
|
|
public ActionResult SIFlowSetList()
|
|
{
|
|
FlowSetModel flowSetModel = null;
|
|
try
|
|
{
|
|
FlowSet flowSet = new FlowSet();
|
|
QMAPP.ServicesAgent.ServiceAgent agent = this.GetServiceAgent();
|
|
flowSet = agent.InvokeServiceFunction<FlowSet>("WorkFlowBLL_GetWorkFlow", flowSet);
|
|
|
|
flowSetModel = CopyToModel<FlowSetModel, FlowSet>(flowSet);
|
|
|
|
return View(flowSetModel);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 获取当前结点下的人员信息
|
|
/// <summary>
|
|
/// 获取当前结点下的人员信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HandleException]
|
|
public ActionResult GetCurrentUserFlowLevel(FlowSetModel model)
|
|
{
|
|
try
|
|
{
|
|
|
|
if (model == null)
|
|
{
|
|
model = new FlowSetModel();
|
|
}
|
|
|
|
List<Orgaization> list = null;
|
|
//获取部门列表
|
|
QMAPP.ServicesAgent.ServiceAgent agent = this.GetServiceAgent();
|
|
list = agent.InvokeServiceFunction<List<Orgaization>>("UserManageBLL_GetUserOrgaList", "");
|
|
//所有机构列表
|
|
List<OrgaizationModel> orgaizationList = new List<OrgaizationModel>();
|
|
foreach (Orgaization orga in list)
|
|
{
|
|
OrgaizationModel tm = new OrgaizationModel();
|
|
tm = CopyToModel<OrgaizationModel, Orgaization>(orga);
|
|
orgaizationList.Add(tm);
|
|
}
|
|
model.orgaizationList = orgaizationList;
|
|
//已选择的机构列表
|
|
ZPFlow zpFlow = new ZPFlow();
|
|
zpFlow.FlowLevel = Convert.ToInt32(model.FlowLevel);
|
|
List<ZPFlow> selList = agent.InvokeServiceFunction<List<ZPFlow>>("WorkFlowBLL_GetUserByFlowLevel", zpFlow);
|
|
List<ZPFlowModel> zpList = new List<ZPFlowModel>();
|
|
foreach (ZPFlow zp in selList)
|
|
{
|
|
ZPFlowModel tm = new ZPFlowModel();
|
|
tm = CopyToModel<ZPFlowModel, ZPFlow>(zp);
|
|
zpList.Add(tm);
|
|
}
|
|
model.zpFlowList = zpList;
|
|
|
|
return View("SelectOrga", model);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 保存当前选择的用户
|
|
/// <summary>
|
|
/// 保存当前选择的用户
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HandleException]
|
|
public ActionResult SaveSelectOrganization(string FlowLevel, string selectKey)
|
|
{
|
|
try
|
|
{
|
|
QMAPP.ServicesAgent.ServiceAgent agent = this.GetServiceAgent();
|
|
agent.InvokeServiceFunction<int>("WorkFlowBLL_SaveSelectOrganization", FlowLevel, selectKey);
|
|
|
|
return this.GetJsViewResult(string.Format("parent.updatePage();parent.showTitle('{0}');parent.closeAppWindow1();"
|
|
, AppResource.SaveMessge));
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
|
|
}
|
|
}
|
|
|