diff --git a/DOC/核心设计.EAP b/DOC/核心设计.EAP index 0e50a4aa..21b6be34 100644 Binary files a/DOC/核心设计.EAP and b/DOC/核心设计.EAP differ diff --git a/OpenAuth.App/AuthoriseService.cs b/OpenAuth.App/AuthoriseService.cs index 0fdb1bc4..64918228 100644 --- a/OpenAuth.App/AuthoriseService.cs +++ b/OpenAuth.App/AuthoriseService.cs @@ -105,7 +105,7 @@ namespace OpenAuth.App { var elementIds = UnitWork.Find( u => - (u.FirstId == _user.Id && u.Key == Define.ROLERESOURCE) || + (u.FirstId == _user.Id && u.Key == Define.USERELEMENT) || (u.Key == Define.ROLEELEMENT && _userRoleIds.Contains(u.FirstId))).Select(u => u.SecondId); return UnitWork.Find(u => elementIds.Contains(u.Id)); } diff --git a/OpenAuth.App/Flow/FlowRuntime.cs b/OpenAuth.App/Flow/FlowRuntime.cs index 158ff364..3e1c4d70 100644 --- a/OpenAuth.App/Flow/FlowRuntime.cs +++ b/OpenAuth.App/Flow/FlowRuntime.cs @@ -243,28 +243,28 @@ namespace OpenAuth.App.Flow public string NodeConfluence(string nodeId, Tag tag) { string res = "-1"; - string _nextNodeId = GetNextNodeByNodeId(nodeId);//获取下一个节点 - if (_nextNodeId != "-1") + string nextNodeId = GetNextNodeByNodeId(nodeId);//获取下一个节点 + if (nextNodeId != "-1") { Dictionary> toLines = GetToLineDictionary(_runtimeModel.schemeContentJson); - int allnum = toLines[_nextNodeId].Count; + int allnum = toLines[nextNodeId].Count; int i = 0; - foreach (var item in _runtimeModel.schemeContentJson.Flow.nodes) + foreach (var item in _runtimeModel.schemeContentJson.nodes) { - if (item.id.Value == _nextNodeId) + if (item.id == nextNodeId) { - if (item.setInfo.NodeConfluenceType.Value == "")//0所有步骤通过 todo:先用空格 + if (string.IsNullOrEmpty(item.setInfo.NodeConfluenceType))//0所有步骤通过 todo:先用空格 { if (tag.Taged == 1) { if (item.setInfo.ConfluenceOk == null) { - _runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceOk = 1; + _runtimeModel.schemeContentJson.nodes[i].setInfo.ConfluenceOk = 1; res = "1"; } - else if (item.setInfo.ConfluenceOk.Value == (allnum - 1)) + else if (item.setInfo.ConfluenceOk == (allnum - 1)) { - res = GetNextNodeByNodeId(_nextNodeId); + res = GetNextNodeByNodeId(nextNodeId); if (res == "-1") { throw (new Exception("会签成功寻找不到下一个节点")); @@ -272,16 +272,16 @@ namespace OpenAuth.App.Flow } else { - _runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceOk++; + _runtimeModel.schemeContentJson.nodes[i].setInfo.ConfluenceOk++; res = "1"; } } } - else if (item.setInfo.NodeConfluenceType.Value == "1")//1一个步骤通过即可 + else if (item.setInfo.NodeConfluenceType == "1")//1一个步骤通过即可 { if (tag.Taged ==1) { - res = GetNextNodeByNodeId(_nextNodeId); + res = GetNextNodeByNodeId(nextNodeId); if (res == "-1") { throw (new Exception("会签成功寻找不到下一个节点")); @@ -291,16 +291,16 @@ namespace OpenAuth.App.Flow { if (item.setInfo.ConfluenceNo == null) { - _runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceNo = 1; + _runtimeModel.schemeContentJson.nodes[i].setInfo.ConfluenceNo = 1; res = "1"; } - else if (item.setInfo.ConfluenceNo.Value == (allnum - 1)) + else if (item.setInfo.ConfluenceNo == (allnum - 1)) { res = "-1"; } else { - _runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceNo++; + _runtimeModel.schemeContentJson.nodes[i].setInfo.ConfluenceNo++; res = "1"; } } @@ -311,33 +311,33 @@ namespace OpenAuth.App.Flow { if (item.setInfo.ConfluenceOk == null) { - _runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceOk = 1; + _runtimeModel.schemeContentJson.nodes[i].setInfo.ConfluenceOk = 1; } else { - _runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceOk++; + _runtimeModel.schemeContentJson.nodes[i].setInfo.ConfluenceOk++; } } else { if (item.setInfo.ConfluenceNo == null) { - _runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceNo = 1; + _runtimeModel.schemeContentJson.nodes[i].setInfo.ConfluenceNo = 1; } else { - _runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceNo++; + _runtimeModel.schemeContentJson.nodes[i].setInfo.ConfluenceNo++; } } - if ((item.setInfo.ConfluenceNo.Value + item.setInfo.ConfluenceOk.Value) / allnum * 100 > int.Parse(item.setInfo.NodeConfluenceRate.Value)) + if ((item.setInfo.ConfluenceNo + item.setInfo.ConfluenceOk) / allnum * 100 > int.Parse(item.setInfo.NodeConfluenceRate)) { - res = GetNextNodeByNodeId(_nextNodeId); + res = GetNextNodeByNodeId(nextNodeId); if (res == "-1") { throw (new Exception("会签成功寻找不到下一个节点")); } } - else if ((item.setInfo.ConfluenceNo.Value + item.setInfo.ConfluenceOk.Value) == allnum) + else if ((item.setInfo.ConfluenceNo + item.setInfo.ConfluenceOk) == allnum) { res = "-1"; } @@ -353,19 +353,19 @@ namespace OpenAuth.App.Flow if (res == "-1") { tag.Taged = -1; - MakeTagNode(_nextNodeId, tag); + MakeTagNode(nextNodeId, tag); } else if (res != "1") //则时res是会签结束节点的ID { tag.Taged = 1; - MakeTagNode(_nextNodeId,tag); + MakeTagNode(nextNodeId,tag); _runtimeModel.nextNodeId = res; _runtimeModel.nextNodeType = GetNodeType(res); } else { - _runtimeModel.nextNodeId = _nextNodeId; - _runtimeModel.nextNodeType = GetNodeType(_nextNodeId); + _runtimeModel.nextNodeId = nextNodeId; + _runtimeModel.nextNodeType = GetNodeType(nextNodeId); } return res; } @@ -411,7 +411,7 @@ namespace OpenAuth.App.Flow int i = 0; foreach (var item in _runtimeModel.schemeContentJson.nodes) { - if (item.id.Value.ToString() == nodeId) + if (item.id == nodeId) { _runtimeModel.schemeContentJson.nodes[i].setInfo.Taged = tag.Taged; _runtimeModel.schemeContentJson.nodes[i].setInfo.UserId = tag.UserId; diff --git a/OpenAuth.App/FlowInstanceApp.cs b/OpenAuth.App/FlowInstanceApp.cs index 44fcf8cf..e1e0be55 100644 --- a/OpenAuth.App/FlowInstanceApp.cs +++ b/OpenAuth.App/FlowInstanceApp.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using Infrastructure; @@ -12,21 +12,21 @@ using OpenAuth.Repository.Domain; namespace OpenAuth.App { /// - /// ʵ + /// 工作流实例表操作 /// public class FlowInstanceApp : BaseApp { - #region ̴API + #region 流程处理API /// - /// һʵ + /// 创建一个实例 /// /// public bool CreateInstance(JObject obj) { var flowInstance = obj.ToObject(); - //ȡύı + //获取提交的表单数据 var frmdata = new JObject(); foreach (var property in obj.Properties().Where(U => U.Name.Contains("data_"))) { @@ -34,37 +34,40 @@ namespace OpenAuth.App } flowInstance.FrmData = JsonHelper.Instance.Serialize(frmdata); - //ʵ + //创建运行实例 var wfruntime = new FlowRuntime(flowInstance); var user = AuthUtil.GetCurrentUser(); - #region ʵı䵱ǰڵ״̬ + #region 根据运行实例改变当前节点状态 flowInstance.ActivityId = wfruntime.runtimeModel.nextNodeId; - flowInstance.ActivityType = wfruntime.GetNextNodeType();//-1޷,0ǩʼ,1ǩ,2һڵ,4н + flowInstance.ActivityType = wfruntime.GetNextNodeType();//-1无法运行,0会签开始,1会签结束,2一般节点,4流程运行结束 flowInstance.ActivityName = wfruntime.runtimeModel.nextNode.name; flowInstance.PreviousId = wfruntime.runtimeModel.currentNodeId; flowInstance.CreateUserId = user.User.Id; flowInstance.CreateUserName = user.User.Account; - flowInstance.MakerList = (wfruntime.GetNextNodeType() != 4 ? GetMakerList(wfruntime) : "");//ǰڵִеϢ + flowInstance.MakerList = (wfruntime.GetNextNodeType() != 4 ? GetMakerList(wfruntime) : "");//当前节点可执行的人信息 flowInstance.IsFinish = (wfruntime.GetNextNodeType() == 4 ? 1 : 0); + + UnitWork.Add(flowInstance); #endregion - #region ̲¼ + #region 流程操作记录 FlowInstanceOperationHistory processOperationHistoryEntity = new FlowInstanceOperationHistory { InstanceId = flowInstance.Id, CreateUserId = user.User.Id, CreateUserName = user.User.Name, - Content = "" + CreateDate = DateTime.Now, + Content = "【创建】" + user.User.Name - + "һ̡̽" + + "创建了一个流程进程【" + flowInstance.Code + "/" - + flowInstance.CustomName + "" + + flowInstance.CustomName + "】" }; - + UnitWork.Add(processOperationHistoryEntity); #endregion - #region ת¼ + #region 流转记录 FlowInstanceTransitionHistory processTransitionHistoryEntity = new FlowInstanceTransitionHistory { @@ -82,96 +85,91 @@ namespace OpenAuth.App }; #endregion - UnitWork.Add(flowInstance); - UnitWork.Add(processOperationHistoryEntity); UnitWork.Add(processTransitionHistoryEntity); UnitWork.Save(); return true; } /// - /// ڵ + /// 节点审核 /// /// /// public bool NodeVerification(string instanceId, bool flag, string description = "") { + var user = AuthUtil.GetCurrentUser().User; FlowInstance flowInstance = Get(instanceId); FlowInstanceOperationHistory flowInstanceOperationHistory = new FlowInstanceOperationHistory { - InstanceId = instanceId - };//¼ - FlowInstanceTransitionHistory processTransitionHistoryEntity = null;//ת¼ - + InstanceId = instanceId, + CreateUserId = user.Id, + CreateUserName = user.Name, + CreateDate = DateTime.Now + };//操作记录 FlowRuntime wfruntime = new FlowRuntime(flowInstance); - var user = AuthUtil.GetCurrentUser().User; var tag = new Tag { UserName = user.Name, UserId = user.Id, Description = description }; - #region ǩ - if (flowInstance.ActivityType == 0)//ǩ + #region 会签 + if (flowInstance.ActivityType == 0)//会签 { tag.Taged = 1; - wfruntime.MakeTagNode(wfruntime.runtimeModel.currentNodeId, tag);//ǵǰڵͨ - ///ѰҪ˵ĽڵId - string _VerificationNodeId = ""; - List _nodelist = wfruntime.GetCountersigningNodeIdList(wfruntime.runtimeModel.currentNodeId); - string _makerList = ""; - foreach (string item in _nodelist) + wfruntime.MakeTagNode(wfruntime.runtimeModel.currentNodeId, tag);//标记当前节点通过 + + string verificationNodeId = ""; //寻找需要审核的节点Id + List nodelist = wfruntime.GetCountersigningNodeIdList(wfruntime.runtimeModel.currentNodeId); + foreach (string item in nodelist) { - _makerList = GetMakerList(wfruntime.runtimeModel.nodes[item], wfruntime.runtimeModel.flowInstanceId); - if (_makerList != "-1") + var makerList = GetMakerList(wfruntime.runtimeModel.nodes[item] + , wfruntime.runtimeModel.flowInstanceId); + if (makerList != "-1") { - var id = AuthUtil.GetCurrentUser().User.Id; - foreach (string one in _makerList.Split(',')) + foreach (string one in makerList.Split(',')) { - if (id == one || id.IndexOf(one) != -1) + if (user.Id == one || user.Id.IndexOf(one) != -1) { - _VerificationNodeId = item; + verificationNodeId = item; break; } } } } - if (_VerificationNodeId != "") + if (verificationNodeId != "") { if (flag) { tag.Taged = 1; - flowInstanceOperationHistory.Content = "" + "todo name" + "" + wfruntime.runtimeModel.nodes[_VerificationNodeId].name + "" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "ͬ,ע" + description; + flowInstanceOperationHistory.Content = "【" + wfruntime.runtimeModel.nodes[verificationNodeId].name + "】【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "】同意,备注:" + description; } else { tag.Taged = -1; - flowInstanceOperationHistory.Content = "" + "todo name" + "" + wfruntime.runtimeModel.nodes[_VerificationNodeId].name + "" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "ͬ,ע" + description; + flowInstanceOperationHistory.Content = "【" + wfruntime.runtimeModel.nodes[verificationNodeId].name + "】【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "】不同意,备注:" + description; } - - string confluenceres = wfruntime.NodeConfluence(_VerificationNodeId, tag); - + string confluenceres = wfruntime.NodeConfluence(verificationNodeId, tag); switch (confluenceres) { - case "-1"://ͨ + case "-1"://不通过 flowInstance.IsFinish = 3; break; - case "1"://ȴ + case "1"://等待 break; - default://ͨ + default://通过 flowInstance.PreviousId = flowInstance.ActivityId; flowInstance.ActivityId = wfruntime.runtimeModel.nextNodeId; - flowInstance.ActivityType = wfruntime.runtimeModel.nextNodeType;//-1޷,0ǩʼ,1ǩ,2һڵ,4н + flowInstance.ActivityType = wfruntime.runtimeModel.nextNodeType;//-1无法运行,0会签开始,1会签结束,2一般节点,4流程运行结束 flowInstance.ActivityName = wfruntime.runtimeModel.nextNode.name; flowInstance.IsFinish = (wfruntime.runtimeModel.nextNodeType == 4 ? 1 : 0); - flowInstance.MakerList = (wfruntime.runtimeModel.nextNodeType == 4 ? "" : GetMakerList(wfruntime));//ǰڵִеϢ + flowInstance.MakerList = (wfruntime.runtimeModel.nextNodeType == 4 ? "" : GetMakerList(wfruntime));//当前节点可执行的人信息 - #region ת¼ - - processTransitionHistoryEntity = new FlowInstanceTransitionHistory + #region 流转记录 + UnitWork.Add(new FlowInstanceTransitionHistory { InstanceId = flowInstance.Id, CreateUserId = user.Id, @@ -184,7 +182,7 @@ namespace OpenAuth.App ToNodeType = wfruntime.runtimeModel.nextNodeType, IsFinish = wfruntime.runtimeModel.nextNodeType ==4?1:0, TransitionSate = 0 - }; + }); #endregion break; @@ -192,13 +190,13 @@ namespace OpenAuth.App } else { - throw (new Exception("쳣,Ҳ˽ڵ")); + throw (new Exception("审核异常,找不到审核节点")); } } #endregion - #region һ - else//һ + #region 一般审核 + else//一般审核 { if (flag) { @@ -208,11 +206,11 @@ namespace OpenAuth.App flowInstance.ActivityId = wfruntime.runtimeModel.nextNodeId; flowInstance.ActivityType = wfruntime.runtimeModel.nextNodeType; flowInstance.ActivityName = wfruntime.runtimeModel.nextNode.name; - flowInstance.MakerList = wfruntime.runtimeModel.nextNodeType == 4 ? "" : GetMakerList(wfruntime);//ǰڵִеϢ + flowInstance.MakerList = wfruntime.runtimeModel.nextNodeType == 4 ? "" : GetMakerList(wfruntime);//当前节点可执行的人信息 flowInstance.IsFinish = (wfruntime.runtimeModel.nextNodeType == 4 ? 1 : 0); - #region ת¼ + #region 流转记录 - processTransitionHistoryEntity = new FlowInstanceTransitionHistory + UnitWork.Add(new FlowInstanceTransitionHistory { InstanceId = flowInstance.Id, CreateUserId = user.Id, @@ -225,21 +223,21 @@ namespace OpenAuth.App ToNodeType = wfruntime.runtimeModel.nextNodeType, IsFinish = wfruntime.runtimeModel.nextNodeType == 4 ? 1 : 0, TransitionSate = 0 - }; + }); #endregion - - flowInstanceOperationHistory.Content = "" + "todo name" + "" + wfruntime.runtimeModel.currentNode.name - + "" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "ͬ,ע" + description; + flowInstanceOperationHistory.Content = "【" + wfruntime.runtimeModel.currentNode.name + + "】【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "】同意,备注:" + description; } else { - flowInstance.IsFinish = 3; //ʾýڵ㲻ͬ + flowInstance.IsFinish = 3; //表示该节点不同意 tag.Taged = -1; wfruntime.MakeTagNode(wfruntime.runtimeModel.currentNodeId, tag); - flowInstanceOperationHistory.Content = "" + "todo name" + "" - + wfruntime.runtimeModel.currentNode.name + "" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "ͬ,ע" + flowInstanceOperationHistory.Content = "【" + + wfruntime.runtimeModel.currentNode.name + "】【" + + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "】不同意,备注:" + description; } } @@ -249,12 +247,11 @@ namespace OpenAuth.App UnitWork.Update(flowInstance); UnitWork.Add(flowInstanceOperationHistory); - UnitWork.Add(processTransitionHistoryEntity); UnitWork.Save(); return true; } /// - /// + /// 驳回 /// /// public bool NodeReject(VerificationReq reqest) @@ -262,16 +259,9 @@ namespace OpenAuth.App var user = AuthUtil.GetCurrentUser().User; FlowInstance flowInstance = Get(reqest.FlowInstanceId); - FlowInstanceOperationHistory flowInstanceOperationHistory = new FlowInstanceOperationHistory - { - InstanceId = reqest.FlowInstanceId, - CreateUserId = user.Id, - CreateUserName = user.Name - }; - + FlowRuntime wfruntime = new FlowRuntime(flowInstance); - string resnode = ""; if (string.IsNullOrEmpty(reqest.NodeRejectStep)) { @@ -291,17 +281,17 @@ namespace OpenAuth.App }; wfruntime.MakeTagNode(wfruntime.runtimeModel.currentNodeId, tag); - flowInstance.IsFinish = 4;//4ʾأҪύ + flowInstance.IsFinish = 4;//4表示驳回(需要申请者重新提交表单) if (resnode != "") { flowInstance.PreviousId = flowInstance.ActivityId; flowInstance.ActivityId = resnode; flowInstance.ActivityType = wfruntime.GetNodeType(resnode); flowInstance.ActivityName = wfruntime.runtimeModel.nodes[resnode].name; - flowInstance.MakerList = GetMakerList(wfruntime.runtimeModel.nodes[resnode], flowInstance.PreviousId);//ǰڵִеϢ - #region ת¼ + flowInstance.MakerList = GetMakerList(wfruntime.runtimeModel.nodes[resnode], flowInstance.PreviousId);//当前节点可执行的人信息 + #region 流转记录 - var processTransitionHistoryEntity = new FlowInstanceTransitionHistory + UnitWork.Add(new FlowInstanceTransitionHistory { InstanceId = flowInstance.Id, CreateUserId = user.Id, @@ -312,21 +302,27 @@ namespace OpenAuth.App ToNodeId = wfruntime.runtimeModel.nextNodeId, ToNodeName = wfruntime.runtimeModel.nextNode.name, ToNodeType = wfruntime.runtimeModel.nextNodeType, - IsFinish = wfruntime.runtimeModel.nextNodeType ==4?1:0, + IsFinish = wfruntime.runtimeModel.nextNodeType == 4 ? 1 : 0, TransitionSate = 1 - }; - - UnitWork.Add(processTransitionHistoryEntity); - + }); #endregion } - flowInstanceOperationHistory.Content = "" + "todo name" + "" - + wfruntime.runtimeModel.currentNode.name - + "" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + ",ע" + reqest.VerificationOpinion; - UnitWork.Update(flowInstance); - UnitWork.Add(flowInstanceOperationHistory); + + UnitWork.Add(new FlowInstanceOperationHistory + { + InstanceId = reqest.FlowInstanceId + ,CreateUserId = user.Id + ,CreateUserName = user.Name + ,CreateDate = DateTime.Now + ,Content = "【" + + wfruntime.runtimeModel.currentNode.name + + "】【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "】驳回,备注:" + + reqest.VerificationOpinion + + }); + UnitWork.Save(); return true; @@ -334,7 +330,7 @@ namespace OpenAuth.App #endregion /// - /// ѰҸýڵִ + /// 寻找该节点执行人 /// /// /// @@ -343,9 +339,9 @@ namespace OpenAuth.App string makerList = ""; if (wfruntime.runtimeModel.nextNodeId == "-1") { - throw (new Exception("޷Ѱҵһڵ")); + throw (new Exception("无法寻找到下一个节点")); } - if (wfruntime.runtimeModel.nextNodeType == 0)//ǻǩڵ + if (wfruntime.runtimeModel.nextNodeType == 0)//如果是会签节点 { List _nodelist = wfruntime.GetCountersigningNodeIdList(wfruntime.runtimeModel.nextNodeId); string _makerList = ""; @@ -354,11 +350,11 @@ namespace OpenAuth.App _makerList = GetMakerList(wfruntime.runtimeModel.nodes[item], wfruntime.runtimeModel.flowInstanceId); if (_makerList == "-1") { - throw (new Exception("޷Ѱҵǩڵ,鿴Ƿ!")); + throw (new Exception("无法寻找到会签节点的审核者,请查看流程设计是否有问题!")); } if (_makerList == "1") { - throw (new Exception("ǩڵ߲Ϊ,鿴Ƿ!")); + throw (new Exception("会签节点的审核者不能为所有人,请查看流程设计是否有问题!")); } if (makerList != "") { @@ -372,14 +368,14 @@ namespace OpenAuth.App makerList = GetMakerList(wfruntime.runtimeModel.nextNode, wfruntime.runtimeModel.flowInstanceId); if (makerList == "-1") { - throw (new Exception("޷Ѱҵڵ,鿴Ƿ!")); + throw (new Exception("无法寻找到节点的审核者,请查看流程设计是否有问题!")); } } return makerList; } /// - /// ѰҸýڵִ + /// 寻找该节点执行人 /// /// /// @@ -393,11 +389,11 @@ namespace OpenAuth.App } else { - if (node.setInfo.NodeDesignate == Setinfo.ALL_USER)//гԱ + if (node.setInfo.NodeDesignate == Setinfo.ALL_USER)//所有成员 { makerList = "1"; } - else if (node.setInfo.NodeDesignate == Setinfo.SPECIAL_USER)//ָԱ + else if (node.setInfo.NodeDesignate == Setinfo.SPECIAL_USER)//指定成员 { makerList = GenericHelpers.ArrayToString(node.setInfo.NodeDesignateData.users, makerList); @@ -420,21 +416,21 @@ namespace OpenAuth.App } /// - /// - /// 2017-01-20 15:44:45 + /// 审核流程 + /// 李玉宝于2017-01-20 15:44:45 /// public void Verification(VerificationReq request) { - // + //驳回 if (request.VerificationFinally == "3") { NodeReject(request); } - else if (request.VerificationFinally == "2")//ʾͬ + else if (request.VerificationFinally == "2")//表示不同意 { NodeVerification(request.FlowInstanceId, false, request.VerificationOpinion); } - else if (request.VerificationFinally == "1")//ʾͬ + else if (request.VerificationFinally == "1")//表示同意 { NodeVerification(request.FlowInstanceId, true, request.VerificationOpinion); } @@ -447,11 +443,11 @@ namespace OpenAuth.App public TableData Load(QueryFlowInstanceListReq request) { - //todo:/Ѱ/ҵ + //todo:待办/已办/我的 var result = new TableData(); var user = AuthUtil.GetCurrentUser(); - if (request.type == "wait") // + if (request.type == "wait") //待办事项 { result.count = UnitWork.Find(u => u.MakerList =="1" || u.MakerList.Contains(user.User.Id)).Count(); @@ -459,11 +455,22 @@ namespace OpenAuth.App u => u.MakerList == "1" || u.MakerList.Contains(user.User.Id)).ToList(); } - else if (request.type == "disposed") //Ѱ + else if (request.type == "disposed") //已办事项(即我参与过的流程) { - result.data = UnitWork.Find(request.page, request.limit, "CreateDate descending", null).ToList(); + var instances = UnitWork.Find(u => u.CreateUserId == user.User.Id) + .Select(u => u.InstanceId).Distinct(); + var query = from ti in instances + join ct in UnitWork.Find(null) on ti equals ct.Id + into tmp + from ct in tmp.DefaultIfEmpty() + select ct; + + result.data = query.OrderByDescending(u => u.CreateDate) + .Skip((request.page - 1) * request.limit) + .Take(request.limit).ToList(); + result.count = instances.Count(); } - else //ҵ + else //我的流程 { result.count = UnitWork.Find(u => u.CreateUserId == user.User.Id).Count(); result.data = UnitWork.Find(request.page, request.limit, diff --git a/OpenAuth.App/SSO/AuthUtil.cs b/OpenAuth.App/SSO/AuthUtil.cs index da8c9fe0..82657dd8 100644 --- a/OpenAuth.App/SSO/AuthUtil.cs +++ b/OpenAuth.App/SSO/AuthUtil.cs @@ -143,7 +143,7 @@ namespace OpenAuth.App.SSO var value = _helper.Post(new { AppKey = appKey, - UserName = username, + Account = username, Password = pwd }, requestUri); diff --git a/OpenAuth.App/SSO/PassportLoginRequest.cs b/OpenAuth.App/SSO/PassportLoginRequest.cs index 4f2e0e7c..bda83447 100644 --- a/OpenAuth.App/SSO/PassportLoginRequest.cs +++ b/OpenAuth.App/SSO/PassportLoginRequest.cs @@ -5,7 +5,7 @@ namespace OpenAuth.App.SSO public class PassportLoginRequest { - public string UserName { get; set; } + public string Account { get; set; } public string Password { get; set; } @@ -13,7 +13,7 @@ namespace OpenAuth.App.SSO public void Trim() { - if (string.IsNullOrEmpty(UserName)) + if (string.IsNullOrEmpty(Account)) { throw new Exception("用户名不能为空"); } @@ -22,7 +22,7 @@ namespace OpenAuth.App.SSO { throw new Exception("密码不能为空"); } - UserName = UserName.Trim(); + Account = Account.Trim(); Password = Password.Trim(); if(!string.IsNullOrEmpty(AppKey)) AppKey = AppKey.Trim(); } diff --git a/OpenAuth.App/SSO/SSOAuthUtil.cs b/OpenAuth.App/SSO/SSOAuthUtil.cs index 749a602a..2e18cc07 100644 --- a/OpenAuth.App/SSO/SSOAuthUtil.cs +++ b/OpenAuth.App/SSO/SSOAuthUtil.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Web; using System.Web.Mvc; using Infrastructure.Cache; @@ -15,49 +15,50 @@ namespace OpenAuth.App.SSO try { model.Trim(); - //ȡӦϢ + //获取应用信息 var appInfo = new AppInfoService().Get(model.AppKey); if (appInfo == null) { - throw new Exception("Ӧò"); + throw new Exception("应用不存在"); } - //ȡûϢ + //获取用户信息 User userInfo = null; - if (model.UserName == "System") + if (model.Account == "System") { userInfo = new User { - Id = string.Empty, + Id = Guid.Empty.ToString(), //TODO:可以根据需要调整 Account = "System", - Name ="Ա", + Name ="超级管理员", Password = "123456" }; } else { var usermanager = (UserManagerApp)DependencyResolver.Current.GetService(typeof(UserManagerApp)); - userInfo = usermanager.Get(model.UserName); + userInfo = usermanager.Get(model.Account); } if (userInfo == null) { - throw new Exception("û"); + throw new Exception("用户不存在"); } if (userInfo.Password != model.Password) { - throw new Exception(""); + throw new Exception("密码错误"); } var currentSession = new UserAuthSession { - UserName = model.UserName, + Account = model.Account, + Name = userInfo.Name, Token = Guid.NewGuid().ToString().GetHashCode().ToString("x"), AppKey = model.AppKey, CreateTime = DateTime.Now, IpAddress = HttpContext.Current.Request.UserHostAddress }; - //Session + //创建Session new ObjCacheProvider().Create(currentSession.Token, currentSession, DateTime.Now.AddDays(10)); result.Code = 200; diff --git a/OpenAuth.App/SSO/UserAuthSession.cs b/OpenAuth.App/SSO/UserAuthSession.cs index 914e176b..0b96e482 100644 --- a/OpenAuth.App/SSO/UserAuthSession.cs +++ b/OpenAuth.App/SSO/UserAuthSession.cs @@ -9,7 +9,15 @@ namespace OpenAuth.App.SSO public string AppKey { get; set; } - public string UserName { get; set; } + /// + /// 用户账号 + /// + public string Account { get; set; } + + /// + /// 用户名 + /// + public string Name { get; set; } public string IpAddress { get; set; } diff --git a/OpenAuth.App/SystemAuthService.cs b/OpenAuth.App/SystemAuthService.cs index cc2bb381..3a712ee4 100644 --- a/OpenAuth.App/SystemAuthService.cs +++ b/OpenAuth.App/SystemAuthService.cs @@ -9,6 +9,7 @@ // File: AuthenService.cs // *********************************************************************** +using System; using System.Linq; using OpenAuth.Repository.Domain; @@ -17,15 +18,21 @@ namespace OpenAuth.App /// /// 领域服务 /// 超级管理员权限 + /// todo:超级管理员使用guid.empty为ID,可以根据需要修改 /// public class SystemAuthService : AuthoriseService { public SystemAuthService() { - _user = new User { Account = "System", Id = string.Empty }; + _user = new User + { + Account = "System", + Name = "超级管理员", + Id = Guid.Empty.ToString() + }; } - + public override IQueryable GetOrgsQuery() { diff --git a/OpenAuth.Mvc/Controllers/LoginController.cs b/OpenAuth.Mvc/Controllers/LoginController.cs index ae281c5b..b7ea3324 100644 --- a/OpenAuth.Mvc/Controllers/LoginController.cs +++ b/OpenAuth.Mvc/Controllers/LoginController.cs @@ -48,15 +48,12 @@ namespace OpenAuth.Mvc.Controllers return JsonHelper.Instance.Serialize(resp); } - /// - /// 开发者登录 - /// - public string LoginByDev() + public string Login(string username, string password) { var resp = new Response(); try { - var result = AuthUtil.Login(_appKey, "System", "123456"); + var result = AuthUtil.Login(_appKey, username, password); if (result.Code == 200) { var cookie = new HttpCookie("Token", result.Token) diff --git a/OpenAuth.Mvc/OpenAuth.Mvc.csproj b/OpenAuth.Mvc/OpenAuth.Mvc.csproj index 138712d3..4084efb7 100644 --- a/OpenAuth.Mvc/OpenAuth.Mvc.csproj +++ b/OpenAuth.Mvc/OpenAuth.Mvc.csproj @@ -196,7 +196,7 @@ - + diff --git a/OpenAuth.Mvc/Views/FlowInstances/Verification.cshtml b/OpenAuth.Mvc/Views/FlowInstances/Verification.cshtml index 90f51a74..19781de7 100644 --- a/OpenAuth.Mvc/Views/FlowInstances/Verification.cshtml +++ b/OpenAuth.Mvc/Views/FlowInstances/Verification.cshtml @@ -6,47 +6,52 @@ } -
-
-
-
    -
  • 表单信息
  • -
  • 流程信息
  • -
+ +
+
+
+
    +
  • 流程信息
  • +
  • 表单信息
  • +
+ +
+
+
+
+ +
+
+
-
-
-
+
-
-
+
+
+ + +
+ +
+ + +
+
+
+ +
+ +
- - -
- -
- - - -
- -
- -
- -
-
-
- + diff --git a/OpenAuth.Mvc/Views/Login/Index.cshtml b/OpenAuth.Mvc/Views/Login/Index.cshtml index 410baf4b..fc2779d5 100644 --- a/OpenAuth.Mvc/Views/Login/Index.cshtml +++ b/OpenAuth.Mvc/Views/Login/Index.cshtml @@ -43,11 +43,11 @@
  • -
  • -
  • diff --git a/OpenAuth.Mvc/userJs/flowInstanceDisposed.js b/OpenAuth.Mvc/userJs/flowInstanceDisposed.js index dfd8b319..8d09abb6 100644 --- a/OpenAuth.Mvc/userJs/flowInstanceDisposed.js +++ b/OpenAuth.Mvc/userJs/flowInstanceDisposed.js @@ -65,48 +65,7 @@ }(); $("#tree").height($("div.layui-table-view").height()); - //添加(编辑)对话框 - var editDlg = function () { - - var update = false; //是否为更新 - var show = function (data) { - var title = update ? "编辑信息" : "添加"; - - layer.open({ - type: 2, - area: ['800px', '700px'], //宽高 - maxmin: true, //开启最大化最小化按钮 - title: title, - content: '/flowInstances/edit?id=' + data.Id, - btn: ['保存', '关闭'], - yes: function (index, layero) { - var iframeWin = thiswin[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method(); - iframeWin.submit(); - }, - btn2: function (index) { - layer.close(index); - mainList(); - }, - cancel: function (index) { - layer.close(index); - mainList(); - } - }); - } - return { - add: function () { //弹出添加 - update = false; - show({ - Id: '' - }); - }, - update: function (data) { //弹出编辑框 - update = true; - show(data); - } - }; - }(); - + //监听表格内部按钮 table.on('tool(list)', function (obj) { var data = obj.data; @@ -117,27 +76,7 @@ //监听页面主按钮操作 var active = { - btnDel: function () { //批量删除 - var checkStatus = table.checkStatus('mainList') - , data = checkStatus.data; - openauth.del("/FlowInstances/Delete", - data.map(function (e) { return e.Id; }), - mainList); - } - , btnAdd: function () { //添加 - editDlg.add(); - } - , btnEdit: function () { //编辑 - var checkStatus = table.checkStatus('mainList') - , data = checkStatus.data; - if (data.length != 1) { - layer.msg("请选择编辑的行,且同时只能编辑一行"); - return; - } - editDlg.update(data[0]); - } - - , btnVerification: function () { //处理 + btnDetail: function () { //处理 var checkStatus = table.checkStatus('mainList') , data = checkStatus.data; if (data.length != 1) { @@ -147,16 +86,12 @@ layer.open({ type: 2, - area: ['750px', '550px'], //宽高 + area: ['800px', '600px'], //宽高 maxmin: true, //开启最大化最小化按钮 title: '处理流程', - content: '/flowInstances/Verification?id=' + data[0].Id, - btn: ['保存', '关闭'], - yes: function (index, layero) { - var iframeWin = thiswin[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method(); - iframeWin.submit(); - }, - btn2: function (index) { + content: ['/flowInstances/Verification?id=' + data[0].Id, 'no'], + btn: ['关闭'], + yes: function (index) { layer.close(index); mainList(); }, @@ -166,13 +101,6 @@ } }); } - - , search: function () { //搜索 - mainList({ key: $('#key').val() }); - } - , btnRefresh: function() { - mainList(); - } }; $('.toolList .layui-btn').on('click', function () { diff --git a/OpenAuth.Mvc/userJs/flowInstanceWait.js b/OpenAuth.Mvc/userJs/flowInstanceWait.js index c20e926d..22c69e86 100644 --- a/OpenAuth.Mvc/userJs/flowInstanceWait.js +++ b/OpenAuth.Mvc/userJs/flowInstanceWait.js @@ -65,48 +65,7 @@ }(); $("#tree").height($("div.layui-table-view").height()); - //添加(编辑)对话框 - var editDlg = function () { - - var update = false; //是否为更新 - var show = function (data) { - var title = update ? "编辑信息" : "添加"; - - layer.open({ - type: 2, - area: ['800px', '700px'], //宽高 - maxmin: true, //开启最大化最小化按钮 - title: title, - content: '/flowInstances/edit?id=' + data.Id, - btn: ['保存', '关闭'], - yes: function (index, layero) { - var iframeWin = thiswin[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method(); - iframeWin.submit(); - }, - btn2: function (index) { - layer.close(index); - mainList(); - }, - cancel: function (index) { - layer.close(index); - mainList(); - } - }); - } - return { - add: function () { //弹出添加 - update = false; - show({ - Id: '' - }); - }, - update: function (data) { //弹出编辑框 - update = true; - show(data); - } - }; - }(); - + //监听表格内部按钮 table.on('tool(list)', function (obj) { var data = obj.data; @@ -117,27 +76,7 @@ //监听页面主按钮操作 var active = { - btnDel: function () { //批量删除 - var checkStatus = table.checkStatus('mainList') - , data = checkStatus.data; - openauth.del("/FlowInstances/Delete", - data.map(function (e) { return e.Id; }), - mainList); - } - , btnAdd: function () { //添加 - editDlg.add(); - } - , btnEdit: function () { //编辑 - var checkStatus = table.checkStatus('mainList') - , data = checkStatus.data; - if (data.length != 1) { - layer.msg("请选择编辑的行,且同时只能编辑一行"); - return; - } - editDlg.update(data[0]); - } - - , btnVerification: function () { //处理 + btnVerification: function () { //处理 var checkStatus = table.checkStatus('mainList') , data = checkStatus.data; if (data.length != 1) { @@ -147,10 +86,10 @@ layer.open({ type: 2, - area: ['750px', '550px'], //宽高 + area: ['800px', '600px'], //宽高 maxmin: true, //开启最大化最小化按钮 title: '处理流程', - content: '/flowInstances/Verification?id=' + data[0].Id, + content: ['/flowInstances/Verification?id=' + data[0].Id,'no'], btn: ['保存', '关闭'], yes: function (index, layero) { var iframeWin = thiswin[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method(); @@ -167,6 +106,31 @@ }); } + , btnDetail: function () { //处理 + var checkStatus = table.checkStatus('mainList') + , data = checkStatus.data; + if (data.length != 1) { + layer.msg("请选择要处理的流程,且同时只能选择一条"); + return; + } + + layer.open({ + type: 2, + area: ['800px', '600px'], //宽高 + maxmin: true, //开启最大化最小化按钮 + title: '处理流程', + content: ['/flowInstances/Verification?id=' + data[0].Id, 'no'], + btn: ['关闭'], + yes: function (index) { + layer.close(index); + mainList(); + }, + cancel: function (index) { + layer.close(index); + mainList(); + } + }); + } , search: function () { //搜索 mainList({ key: $('#key').val() }); } diff --git a/OpenAuth.Mvc/userJs/flowInstances.js b/OpenAuth.Mvc/userJs/flowInstances.js index 5fdaaf9b..8f8ac68a 100644 --- a/OpenAuth.Mvc/userJs/flowInstances.js +++ b/OpenAuth.Mvc/userJs/flowInstances.js @@ -135,7 +135,7 @@ editDlg.update(data[0]); } - , btnVerification: function () { //处理 + , btnDetail: function () { //处理 var checkStatus = table.checkStatus('mainList') , data = checkStatus.data; if (data.length != 1) { @@ -145,16 +145,12 @@ layer.open({ type: 2, - area: ['750px', '550px'], //宽高 + area: ['800px', '600px'], //宽高 maxmin: true, //开启最大化最小化按钮 title: '处理流程', - content: '/flowInstances/Verification?id=' + data[0].Id, - btn: ['保存', '关闭'], - yes: function (index, layero) { - var iframeWin = thiswin[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method(); - iframeWin.submit(); - }, - btn2: function (index) { + content: ['/flowInstances/Verification?id=' + data[0].Id, 'no'], + btn: ['关闭'], + yes: function (index) { layer.close(index); mainList(); }, diff --git a/OpenAuth.Mvc/userJs/flowSchemeDesign.js b/OpenAuth.Mvc/userJs/flowSchemeDesign.js index 0dcfaf64..2650432b 100644 --- a/OpenAuth.Mvc/userJs/flowSchemeDesign.js +++ b/OpenAuth.Mvc/userJs/flowSchemeDesign.js @@ -5,7 +5,6 @@ layui.config({ var form = layui.form, element = layui.element, layer = layui.layer, $ = layui.jquery; - var thiswin = (top == undefined) ? window : top.window; var table = layui.table; var openauth = layui.openauth; @@ -108,7 +107,7 @@ layui.config({ btn: ['确定', '取消'], yes: function (index, layero) { var body = layer.getChildFrame('body', index); - var iframeWin = thiswin[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method(); + var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method(); var nodedata = iframeWin.getVal(); flowDesignPanel.SetNodeEx(object.id, nodedata); layer.close(index); diff --git a/OpenAuth.Mvc/userJs/formEdit.js b/OpenAuth.Mvc/userJs/formEdit.js index 8ca9b626..e312c562 100644 --- a/OpenAuth.Mvc/userJs/formEdit.js +++ b/OpenAuth.Mvc/userJs/formEdit.js @@ -3,9 +3,8 @@ }).use(['form', 'vue', 'ztree', 'layer', 'utils', 'jquery', 'table', 'droptree', 'openauth', 'element'], function () { var form = layui.form, element = layui.element, - layer = (top == undefined || top.layer === undefined )? layui.layer : top.layer, + layer = layui.layer , $ = layui.jquery; - var thiswin = (top == undefined) ? window : top.window; var table = layui.table; var openauth = layui.openauth; diff --git a/OpenAuth.Mvc/userJs/login.js b/OpenAuth.Mvc/userJs/login.js index 77c51024..1ad1d58a 100644 --- a/OpenAuth.Mvc/userJs/login.js +++ b/OpenAuth.Mvc/userJs/login.js @@ -92,8 +92,9 @@ layui.config({ //登录按钮事件 form.on("submit(login)", function (data) { - $.getJSON("/Login/LoginByDev", - function(data) { + $.getJSON("/Login/Login" + , data.field + ,function(data) { if (data.Code == 200) { window.location.href = "/Home/Index"; } else { diff --git a/OpenAuth.Mvc/userJs/flowInstanceOp.js b/OpenAuth.Mvc/userJs/verification.js similarity index 87% rename from OpenAuth.Mvc/userJs/flowInstanceOp.js rename to OpenAuth.Mvc/userJs/verification.js index 038536f2..2cf85cb7 100644 --- a/OpenAuth.Mvc/userJs/flowInstanceOp.js +++ b/OpenAuth.Mvc/userJs/verification.js @@ -10,18 +10,12 @@ var id = $.getUrlParam("id"); //ID $("#FlowInstanceId").val(id); - //标签切换 - element.on('tab(tab)', function (data) { - layer.iframeAuto(index); - }); - + $.getJSON('/FlowInstances/get?id=' + id, function (data) { var obj = data.Result; var schemeContent = JSON.parse(obj.SchemeContent); var flowDesignPanel = $('#flowPanel').flowdesign({ - height: 300, - widht: 300, haveTool: false , isprocessing: true , activityId: obj.ActivityId @@ -56,5 +50,5 @@ } //让层自适应iframe - layer.iframeAuto(index); + layer.iframeAuto(index); }) \ No newline at end of file diff --git a/OpenAuth.UnitTest/App.config b/OpenAuth.UnitTest/App.config index bd995966..240f35e8 100644 --- a/OpenAuth.UnitTest/App.config +++ b/OpenAuth.UnitTest/App.config @@ -29,6 +29,16 @@ + + + + + + + + + + diff --git a/OpenAuth.UnitTest/TestAuthen.cs b/OpenAuth.UnitTest/TestAuthen.cs index d7e7c845..a22b9a52 100644 --- a/OpenAuth.UnitTest/TestAuthen.cs +++ b/OpenAuth.UnitTest/TestAuthen.cs @@ -22,7 +22,7 @@ namespace OpenAuth.UnitTest [TestMethod] public void TestMethod1() { - var service= app.Create("System"); + var service= app.Create("admin"); var modules = service.Modules; diff --git a/OpenAuth.UnitTest/TestWorkflow.cs b/OpenAuth.UnitTest/TestWorkflow.cs index 145b0e7c..6eaa3d18 100644 --- a/OpenAuth.UnitTest/TestWorkflow.cs +++ b/OpenAuth.UnitTest/TestWorkflow.cs @@ -12,11 +12,13 @@ namespace OpenAuth.UnitTest { private FlowSchemeApp _app; private FlowInstanceApp _runApp; + private AuthorizeApp authenApp; public TestWorkflow() { _app = AutofacExt.GetFromFac(); _runApp = AutofacExt.GetFromFac(); + authenApp = AutofacExt.GetFromFac(); } /// @@ -26,9 +28,10 @@ namespace OpenAuth.UnitTest [TestMethod] public void Verify() { + authenApp.Create("System"); _runApp.Verification(new VerificationReq { - FlowInstanceId = "132333fe-d8db-4373-b101-b0ac574d3b1a", + FlowInstanceId = "7335d82f-5c3d-43e5-a53b-7d51a7cb1f59", VerificationFinally = "3" }); } diff --git a/OpenAuth.WebApi/Areas/SSO/Controllers/CheckController.cs b/OpenAuth.WebApi/Areas/SSO/Controllers/CheckController.cs index cebae637..e0d161f4 100644 --- a/OpenAuth.WebApi/Areas/SSO/Controllers/CheckController.cs +++ b/OpenAuth.WebApi/Areas/SSO/Controllers/CheckController.cs @@ -65,7 +65,7 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers var user = _objCacheProvider.GetCache(token); if (user != null) { - result.Result = _app.GetAccessedControls(user.UserName); + result.Result = _app.GetAccessedControls(user.Account); } } catch (Exception ex) @@ -92,7 +92,7 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers var user = _objCacheProvider.GetCache(token); if (user != null) { - result.Result = user.UserName; + result.Result = user.Account; } } catch (Exception ex) diff --git a/OpenAuth.WebApi/Areas/SSO/Controllers/LoginController.cs b/OpenAuth.WebApi/Areas/SSO/Controllers/LoginController.cs index 67feda0e..002bb855 100644 --- a/OpenAuth.WebApi/Areas/SSO/Controllers/LoginController.cs +++ b/OpenAuth.WebApi/Areas/SSO/Controllers/LoginController.cs @@ -23,7 +23,7 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers var viewModel = new PassportLoginRequest { AppKey = appKey, - UserName = username, + Account = username, }; return View(viewModel); @@ -37,7 +37,7 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers if (result.Code ==200) { - var redirectUrl = string.Format("{0}?token={1}&sessionusername={2}", result.ReturnUrl, result.Token, model.UserName); + var redirectUrl = string.Format("{0}?token={1}&sessionusername={2}", result.ReturnUrl, result.Token, model.Account); //跳转默认回调页面 return Redirect(redirectUrl); diff --git a/OpenAuth.WebApi/Areas/SSO/Views/Login/Index.cshtml b/OpenAuth.WebApi/Areas/SSO/Views/Login/Index.cshtml index 04927765..c3cebf49 100644 --- a/OpenAuth.WebApi/Areas/SSO/Views/Login/Index.cshtml +++ b/OpenAuth.WebApi/Areas/SSO/Views/Login/Index.cshtml @@ -36,7 +36,7 @@
    - @Html.TextBoxFor(model => model.UserName, new { @class = "form-control input-lg", style = "width: 280px" }) + @Html.TextBoxFor(model => model.Account, new { @class = "form-control input-lg", style = "width: 280px" }) @Html.HiddenFor(model => model.AppKey)
    diff --git a/建表&初始化数据.sql b/建表&初始化数据.sql index 6787346c..1c377637 100644 Binary files a/建表&初始化数据.sql and b/建表&初始化数据.sql differ