2017-01-20 16:51:30 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Web.Mvc;
|
|
|
|
|
using Infrastructure;
|
|
|
|
|
using OpenAuth.App;
|
|
|
|
|
using OpenAuth.App.SSO;
|
|
|
|
|
using OpenAuth.Mvc.Controllers;
|
|
|
|
|
|
|
|
|
|
namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 通用申请流程处理
|
|
|
|
|
/// <para>李玉宝新增于2016-09-08 19:21:59</para>
|
|
|
|
|
/// </summary>
|
2017-01-24 16:04:17 +08:00
|
|
|
|
public class FlowInstancesController : BaseController
|
2017-01-20 16:51:30 +08:00
|
|
|
|
{
|
|
|
|
|
private WFProcessInstanceService _app;
|
2017-01-24 16:04:17 +08:00
|
|
|
|
public FlowInstancesController()
|
2017-01-20 16:51:30 +08:00
|
|
|
|
{
|
|
|
|
|
_app = AutofacExt.GetFromFac<WFProcessInstanceService>();
|
|
|
|
|
}
|
|
|
|
|
|
2017-01-23 13:47:37 +08:00
|
|
|
|
#region 视图
|
|
|
|
|
|
|
|
|
|
public ActionResult Add()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
2017-01-20 16:51:30 +08:00
|
|
|
|
public ActionResult Index()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
|
2017-01-23 13:47:37 +08:00
|
|
|
|
#endregion
|
|
|
|
|
|
2017-01-20 16:51:30 +08:00
|
|
|
|
public string Load(string type, int pageCurrent = 1, int pageSize = 30)
|
|
|
|
|
{
|
|
|
|
|
return JsonHelper.Instance.Serialize(_app.Load(AuthUtil.GetCurrentUser().User.Id.ToString(), type, pageCurrent, pageSize));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 进度查看
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
public ActionResult ProcessLookForm()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 删除申请
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Delete(Guid[] ids)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
foreach (var id in ids)
|
|
|
|
|
{
|
2017-01-24 16:04:17 +08:00
|
|
|
|
_app.DeleteProcess(id);
|
2017-01-20 16:51:30 +08:00
|
|
|
|
|
|
|
|
|
}
|
2017-01-24 16:04:17 +08:00
|
|
|
|
return Result.ToJson();
|
2017-01-20 16:51:30 +08:00
|
|
|
|
}
|
2017-01-24 16:04:17 +08:00
|
|
|
|
catch (Exception e)
|
2017-01-20 16:51:30 +08:00
|
|
|
|
{
|
2017-01-24 16:04:17 +08:00
|
|
|
|
Result.Status = false;
|
|
|
|
|
Result.Message = e.Message;
|
|
|
|
|
return Result.ToJson();
|
2017-01-20 16:51:30 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|