mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-11-08 02:14:44 +08:00
调整结构
This commit is contained in:
@@ -90,7 +90,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="keyValue">主键</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ActionResult GetFormJson(Guid keyValue)
|
||||
public ActionResult GetFormJson(string keyValue)
|
||||
{
|
||||
var schemeinfo = WfFlowInfoBll.GetEntity(keyValue);
|
||||
var schemecontent = WfFlowInfoBll.GetSchemeEntity(schemeinfo.Id, schemeinfo.SchemeVersion);
|
||||
@@ -108,7 +108,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="SchemeVersion"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ActionResult GetSchemeContentJson(Guid keyValue, string SchemeVersion)
|
||||
public ActionResult GetSchemeContentJson(string keyValue, string SchemeVersion)
|
||||
{
|
||||
var schemecontent = WfFlowInfoBll.GetSchemeEntity(keyValue, SchemeVersion);
|
||||
return Content(schemecontent.ToJson());
|
||||
@@ -122,7 +122,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="keyValue">主键值</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public string RemoveForm(Guid[] ids)
|
||||
public string RemoveForm(string[] ids)
|
||||
{
|
||||
WfFlowInfoBll.RemoveForm(ids);
|
||||
return Result.ToJson();
|
||||
|
||||
@@ -105,12 +105,12 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="type">0发起,3草稿</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public string CreateProcess(Guid wfSchemeInfoId, string wfProcessInstanceJson, string frmData)
|
||||
public string CreateProcess(string wfSchemeInfoId, string wfProcessInstanceJson, string frmData)
|
||||
{
|
||||
WFProcessInstance wfProcessInstanceEntity = wfProcessInstanceJson.ToObject<WFProcessInstance>();
|
||||
wfProcessInstanceEntity.Id = Guid.Empty;
|
||||
wfProcessInstanceEntity.Id = string.Empty;
|
||||
|
||||
App.CreateInstance(Guid.NewGuid(), wfSchemeInfoId, wfProcessInstanceEntity, frmData);
|
||||
App.CreateInstance(Guid.NewGuid().ToString(), wfSchemeInfoId, wfProcessInstanceEntity, frmData);
|
||||
|
||||
return Result.ToJson();
|
||||
}
|
||||
@@ -122,7 +122,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="verificationData">审核数据</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public string VerificationProcess(Guid processId, string verificationData)
|
||||
public string VerificationProcess(string processId, string verificationData)
|
||||
{
|
||||
App.VerificationProcess(processId, verificationData);
|
||||
return Result.ToJson();
|
||||
@@ -131,7 +131,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <summary>
|
||||
/// 删除申请
|
||||
/// </summary>
|
||||
public string Delete(Guid[] ids)
|
||||
public string Delete(string[] ids)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -159,7 +159,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="keyValue"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ActionResult GetProcessSchemeJson(Guid keyValue)
|
||||
public ActionResult GetProcessSchemeJson(string keyValue)
|
||||
{
|
||||
var data = App.GetProcessSchemeEntity(keyValue);
|
||||
return Content(data.ToJson());
|
||||
@@ -171,7 +171,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="keyValue"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ActionResult GetProcessSchemeEntityByUserId(Guid keyValue)
|
||||
public ActionResult GetProcessSchemeEntityByUserId(string keyValue)
|
||||
{
|
||||
var data = App.GetProcessSchemeByUserId(keyValue);
|
||||
return Content(data.ToJson());
|
||||
@@ -184,7 +184,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="isPermission"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ActionResult GetProcessSchemeEntityByNodeId(Guid keyValue, string nodeId)
|
||||
public ActionResult GetProcessSchemeEntityByNodeId(string keyValue, string nodeId)
|
||||
{
|
||||
var data = App.GetProcessSchemeEntityByNodeId(keyValue, nodeId);
|
||||
return Content(data.ToJson());
|
||||
@@ -196,7 +196,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="keyValue"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ActionResult GetProcessInfoJson(Guid keyValue)
|
||||
public ActionResult GetProcessInfoJson(string keyValue)
|
||||
{
|
||||
var processInstance = App.GetProcessInstanceEntity(keyValue);
|
||||
var processScheme = App.GetProcessSchemeEntity(processInstance.ProcessSchemeId);
|
||||
@@ -214,7 +214,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="keyValue"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ActionResult GetProcessInstanceJson(Guid keyValue)
|
||||
public ActionResult GetProcessInstanceJson(string keyValue)
|
||||
{
|
||||
var processInstance = App.GetProcessInstanceEntity(keyValue);
|
||||
return Content(processInstance.ToJson());
|
||||
|
||||
@@ -42,11 +42,11 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
public ActionResult FrmBuider()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 获取数据
|
||||
|
||||
|
||||
public string Load(int pageCurrent = 1, int pageSize = 30)
|
||||
{
|
||||
return JsonHelper.Instance.Serialize(WfFrmMainBll.Load(pageCurrent, pageSize));
|
||||
@@ -58,7 +58,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="keyValue">主键</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ActionResult GetFormJson(Guid keyValue)
|
||||
public ActionResult GetFormJson(string keyValue)
|
||||
{
|
||||
var data = WfFrmMainBll.GetForm(keyValue);
|
||||
return Content(data.ToJson());
|
||||
@@ -75,14 +75,14 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
|
||||
var result = data.Select(u => new
|
||||
{
|
||||
id = u.Id.ToString(),
|
||||
text = u.FrmName,
|
||||
value = u.Id.ToString(),
|
||||
isexpand = true,
|
||||
complete = true,
|
||||
hasChildren = false,
|
||||
parentId = "0",
|
||||
Attribute = "Sort",
|
||||
id = u.Id.ToString(),
|
||||
text = u.FrmName,
|
||||
value = u.Id.ToString(),
|
||||
isexpand = true,
|
||||
complete = true,
|
||||
hasChildren = false,
|
||||
parentId = "0",
|
||||
Attribute = "Sort",
|
||||
AttributeValue = "Frm"
|
||||
});
|
||||
return Content(result.ToJson());
|
||||
@@ -96,7 +96,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="ids">主键值</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public string RemoveForm(Guid[] ids)
|
||||
public string RemoveForm(string[] ids)
|
||||
{
|
||||
WfFrmMainBll.RemoveForm(ids);
|
||||
return Result.ToJson();
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// <summary>
|
||||
/// 加载分类下面的所有分类
|
||||
/// </summary>
|
||||
public string Load(Guid parentId, int page = 1, int rows = 30)
|
||||
public string Load(string parentId, int page = 1, int rows = 30)
|
||||
{
|
||||
return JsonHelper.Instance.Serialize(App.Load(parentId, page, rows));
|
||||
}
|
||||
@@ -50,7 +50,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
return JsonHelper.Instance.Serialize(Result);
|
||||
}
|
||||
[HttpPost]
|
||||
public string Delete(Guid[] ids)
|
||||
public string Delete(string[] ids)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -26,12 +26,12 @@ namespace OpenAuth.Mvc.Controllers
|
||||
{
|
||||
public ModuleElementManagerApp App { get; set; }
|
||||
|
||||
public ActionResult Index(Guid id)
|
||||
public ActionResult Index(string id)
|
||||
{
|
||||
ViewBag.ModuleId = id;
|
||||
return View();
|
||||
}
|
||||
public ActionResult Get(Guid moduleId)
|
||||
public ActionResult Get(string moduleId)
|
||||
{
|
||||
return Json(App.LoadByModuleId(moduleId), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
@@ -50,7 +50,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
}
|
||||
return JsonHelper.Instance.Serialize( Result);
|
||||
}
|
||||
public string Del(Guid[] ids)
|
||||
public string Del(string[] ids)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -71,13 +71,13 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// <param name="firstId">The first identifier.</param>
|
||||
/// <param name="key">The key.</param>
|
||||
/// <returns>ActionResult.</returns>
|
||||
public ActionResult AssignModuleElement(Guid firstId, string key)
|
||||
public ActionResult AssignModuleElement(string firstId, string key)
|
||||
{
|
||||
ViewBag.FirstId = firstId;
|
||||
ViewBag.ModuleType = key;
|
||||
return View();
|
||||
}
|
||||
public string LoadWithAccess(Guid tId, Guid firstId, string key)
|
||||
public string LoadWithAccess(string tId, string firstId, string key)
|
||||
{
|
||||
return JsonHelper.Instance.Serialize(App.LoadWithAccess(key, firstId, tId));
|
||||
}
|
||||
|
||||
@@ -23,12 +23,13 @@ namespace OpenAuth.Mvc.Controllers
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult Assign(Guid firstId, string key)
|
||||
public ActionResult Assign(string firstId, string key)
|
||||
{
|
||||
ViewBag.FirstId = firstId;
|
||||
ViewBag.ModuleType = key;
|
||||
|
||||
var moduleWithChildren = AuthUtil.GetCurrentUser().Modules.GenerateTree(u =>u.Id, u =>u.ParentId);
|
||||
var moduleWithChildren = AuthUtil.GetCurrentUser().Modules
|
||||
.GenerateTree(u =>u.Id, u =>u.ParentId);
|
||||
var modules = key == "UserModule" ? App.LoadForUser(firstId) : App.LoadForRole(firstId);
|
||||
|
||||
CheckModule(moduleWithChildren, modules);
|
||||
@@ -99,7 +100,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// <summary>
|
||||
/// 加载模块下面的所有模块
|
||||
/// </summary>
|
||||
public string Load(Guid orgId, int page = 1, int rows = 30)
|
||||
public string Load(string orgId, int page = 1, int rows = 30)
|
||||
{
|
||||
return JsonHelper.Instance.Serialize(App.Load(orgId, page, rows));
|
||||
}
|
||||
@@ -109,7 +110,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// </summary>
|
||||
/// <param name="firstId">The user identifier.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
public string LoadForUser(Guid firstId)
|
||||
public string LoadForUser(string firstId)
|
||||
{
|
||||
var orgs = App.LoadForUser(firstId);
|
||||
return JsonHelper.Instance.Serialize(orgs);
|
||||
@@ -120,7 +121,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// </summary>
|
||||
/// <param name="firstId">The role identifier.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
public string LoadForRole(Guid firstId)
|
||||
public string LoadForRole(string firstId)
|
||||
{
|
||||
var orgs = App.LoadForRole(firstId);
|
||||
return JsonHelper.Instance.Serialize(orgs);
|
||||
@@ -151,7 +152,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public string Delete(Guid[] ids)
|
||||
public string Delete(string[] ids)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -18,20 +18,20 @@ namespace OpenAuth.Mvc.Controllers
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public ActionResult Assign(Guid firstId, string key)
|
||||
public ActionResult Assign(string firstId, string key)
|
||||
{
|
||||
ViewBag.FirstId = firstId;
|
||||
ViewBag.ModuleType = key;
|
||||
return View();
|
||||
}
|
||||
|
||||
public string LoadForUser(Guid firstId)
|
||||
public string LoadForUser(string firstId)
|
||||
{
|
||||
var orgs = OrgApp.LoadForUser(firstId);
|
||||
return JsonHelper.Instance.Serialize(orgs);
|
||||
}
|
||||
|
||||
public string LoadForRole(Guid firstId)
|
||||
public string LoadForRole(string firstId)
|
||||
{
|
||||
var orgs = OrgApp.LoadForRole(firstId);
|
||||
return JsonHelper.Instance.Serialize(orgs);
|
||||
@@ -54,7 +54,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
return JsonHelper.Instance.Serialize(Result);
|
||||
}
|
||||
|
||||
public string LoadChildren(Guid id)
|
||||
public string LoadChildren(string id)
|
||||
{
|
||||
return JsonHelper.Instance.Serialize(OrgApp.LoadAllChildren(id));
|
||||
}
|
||||
@@ -65,7 +65,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// </summary>
|
||||
/// <returns>System.String.</returns>
|
||||
[HttpPost]
|
||||
public string DelOrg(Guid[] ids)
|
||||
public string DelOrg(string[] ids)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
public RevelanceManagerApp App { get; set; }
|
||||
|
||||
[HttpPost]
|
||||
public string Assign(string type, Guid firstId, Guid[] secIds)
|
||||
public string Assign(string type, string firstId, string[] secIds)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -29,7 +29,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
return JsonHelper.Instance.Serialize(Result);
|
||||
}
|
||||
[HttpPost]
|
||||
public string UnAssign(string type, Guid firstId, Guid[] secIds)
|
||||
public string UnAssign(string type, string firstId, string[] secIds)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// <summary>
|
||||
/// 加载某分类的所有Resources
|
||||
/// </summary>
|
||||
public string Load(Guid categoryId, int page = 1, int rows = 30)
|
||||
public string Load(string categoryId, int page = 1, int rows = 30)
|
||||
{
|
||||
return JsonHelper.Instance.Serialize(App.Load(AuthUtil.GetUserName(), categoryId, page, rows));
|
||||
}
|
||||
@@ -52,7 +52,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public string Delete(Guid[] ids)
|
||||
public string Delete(string[] ids)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -75,7 +75,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// <para>如:UserResource/RoleResource</para>
|
||||
/// </param>
|
||||
/// <returns>ActionResult.</returns>
|
||||
public ActionResult AssignRes(Guid firstId, string key)
|
||||
public ActionResult AssignRes(string firstId, string key)
|
||||
{
|
||||
ViewBag.FirstId = firstId;
|
||||
ViewBag.ModuleType = key;
|
||||
@@ -89,7 +89,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// <param name="firstId">关联表中的firstId</param>
|
||||
/// <param name="key">关联表中的key</param>
|
||||
/// <returns>System.String.</returns>
|
||||
public string LoadWithAccess(Guid cId, Guid firstId, string key)
|
||||
public string LoadWithAccess(string cId, string firstId, string key)
|
||||
{
|
||||
return JsonHelper.Instance.Serialize(App.LoadWithAccess(AuthUtil.GetUserName(),key,firstId, cId));
|
||||
}
|
||||
|
||||
@@ -39,13 +39,13 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// <summary>
|
||||
/// 加载角色下面的所有用户
|
||||
/// </summary>
|
||||
public string Load(Guid orgId, int pageCurrent = 1, int pageSize = 30)
|
||||
public string Load(string orgId, int pageCurrent = 1, int pageSize = 30)
|
||||
{
|
||||
return JsonHelper.Instance.Serialize(App.Load(orgId, pageCurrent, pageSize));
|
||||
}
|
||||
|
||||
[System.Web.Mvc.HttpPost]
|
||||
public string Delete(Guid[] ids)
|
||||
public string Delete(string[] ids)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -64,14 +64,14 @@ namespace OpenAuth.Mvc.Controllers
|
||||
}
|
||||
|
||||
#region 为用户设置角色界面
|
||||
public ActionResult LookupMulti(Guid firstId, string key)
|
||||
public ActionResult LookupMulti(string firstId, string key)
|
||||
{
|
||||
ViewBag.FirstId = firstId;
|
||||
ViewBag.ModuleType = key;
|
||||
return View();
|
||||
}
|
||||
|
||||
public string LoadForOrgAndUser(Guid orgId, Guid userId)
|
||||
public string LoadForOrgAndUser(string orgId, string userId)
|
||||
{
|
||||
return JsonHelper.Instance.Serialize(App.LoadForOrgAndUser(orgId, userId));
|
||||
}
|
||||
|
||||
@@ -45,12 +45,12 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// <summary>
|
||||
/// 加载节点下面的所有Stocks
|
||||
/// </summary>
|
||||
public string Load(Guid parentId, int page = 1, int rows = 30)
|
||||
public string Load(string parentId, int page = 1, int rows = 30)
|
||||
{
|
||||
return JsonHelper.Instance.Serialize(App.Load(AuthUtil.GetUserName(), parentId, page, rows));
|
||||
}
|
||||
|
||||
public string Delete(Guid[] ids)
|
||||
public string Delete(string[] ids)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -40,13 +40,13 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// <summary>
|
||||
/// 加载组织下面的所有用户
|
||||
/// </summary>
|
||||
public string Load(Guid orgId, int page = 1, int limit = 30)
|
||||
public string Load(string orgId, int page = 1, int limit = 30)
|
||||
{
|
||||
return JsonHelper.Instance.Serialize(App.Load(orgId, page, limit));
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public string Delete(Guid[] ids)
|
||||
public string Delete(string[] ids)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -69,7 +69,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// </summary>
|
||||
public string GetAccessedUsers()
|
||||
{
|
||||
IEnumerable<UserView> users = App.Load(Guid.Empty, 1, 10).data;
|
||||
IEnumerable<UserView> users = App.Load(string.Empty, 1, 10).data;
|
||||
var result = new Dictionary<string , object>();
|
||||
foreach (var user in users)
|
||||
{
|
||||
|
||||
@@ -17,8 +17,8 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// </summary>
|
||||
public string GetModulesTree()
|
||||
{
|
||||
|
||||
return JsonHelper.Instance.Serialize(user.Modules.GenerateTree(u => u.Id, u => u.ParentId));
|
||||
var moduleTree = user.Modules.GenerateTree(u => u.Id, u => u.ParentId);
|
||||
return JsonHelper.Instance.Serialize(moduleTree);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user