mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-16 16:50:54 +08:00
修复驳回的BUG
This commit is contained in:
parent
a3b923f429
commit
fbe107789a
BIN
DOC/核心设计.EAP
BIN
DOC/核心设计.EAP
Binary file not shown.
@ -27,9 +27,20 @@
|
|||||||
|
|
||||||
public class Setinfo
|
public class Setinfo
|
||||||
{
|
{
|
||||||
|
public const string SPECIAL_USER = "SPECIAL_USER"; //指定用户
|
||||||
|
public const string ALL_USER = "ALL_USER"; //所有用户
|
||||||
|
/// <summary>
|
||||||
|
/// 节点执行权限类型
|
||||||
|
/// </summary>
|
||||||
|
public string NodeDesignate { get; set; }
|
||||||
public Nodedesignatedata NodeDesignateData { get; set; }
|
public Nodedesignatedata NodeDesignateData { get; set; }
|
||||||
public string NodeCode { get; set; }
|
public string NodeCode { get; set; }
|
||||||
public string NodeName { get; set; }
|
public string NodeName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 驳回节点0"前一步"1"第一步"2"某一步" 3"不处理"
|
||||||
|
/// </summary>
|
||||||
|
public string NodeRejectType { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -43,6 +54,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 节点执行结果标签
|
||||||
|
/// </summary>
|
||||||
public class Tag
|
public class Tag
|
||||||
{
|
{
|
||||||
public int Taged { get; set; }
|
public int Taged { get; set; }
|
||||||
|
@ -23,14 +23,15 @@ namespace OpenAuth.App.Flow
|
|||||||
dynamic schemeContentJson = instance.SchemeContent.ToJson();//获取工作流模板内容的json对象;
|
dynamic schemeContentJson = instance.SchemeContent.ToJson();//获取工作流模板内容的json对象;
|
||||||
_runtimeModel.frmData = instance.FrmData;
|
_runtimeModel.frmData = instance.FrmData;
|
||||||
_runtimeModel.schemeContentJson = schemeContentJson;//模板流程json对象
|
_runtimeModel.schemeContentJson = schemeContentJson;//模板流程json对象
|
||||||
_runtimeModel.nodes = GetNodeDictionary(schemeContentJson);//节点集合
|
_runtimeModel.nodes = GetNodes(schemeContentJson);//节点集合
|
||||||
_runtimeModel.lines = GetLineDictionary(schemeContentJson);//线条集合
|
_runtimeModel.lines = GetLineDictionary(schemeContentJson);//线条集合
|
||||||
_runtimeModel.currentNodeId = (instance.ActivityId == "" ? _runtimeModel.startNodeId : instance.ActivityId);
|
_runtimeModel.currentNodeId = (instance.ActivityId == "" ? _runtimeModel.startNodeId : instance.ActivityId);
|
||||||
_runtimeModel.currentNodeType = GetNodeType(_runtimeModel.currentNodeId);
|
_runtimeModel.currentNodeType = GetNodeType(_runtimeModel.currentNodeId);
|
||||||
|
|
||||||
|
//会签开始节点和流程结束节点没有下一步
|
||||||
if (_runtimeModel.currentNodeType == 0 || _runtimeModel.currentNodeType == 4)
|
if (_runtimeModel.currentNodeType == 0 || _runtimeModel.currentNodeType == 4)
|
||||||
{
|
{
|
||||||
_runtimeModel.nextNodeId = "-1";//下一个节点
|
_runtimeModel.nextNodeId = "-1";
|
||||||
_runtimeModel.nextNodeType = -1;
|
_runtimeModel.nextNodeType = -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -50,22 +51,22 @@ namespace OpenAuth.App.Flow
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="schemeContentJson"></param>
|
/// <param name="schemeContentJson"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private Dictionary<string, FlowNode> GetNodeDictionary(dynamic schemeContentJson)
|
private Dictionary<string, FlowNode> GetNodes(dynamic schemeContentJson)
|
||||||
{
|
{
|
||||||
Dictionary<string, FlowNode> nodeDictionary = new Dictionary<string, FlowNode>();
|
Dictionary<string, FlowNode> nodes = new Dictionary<string, FlowNode>();
|
||||||
foreach (JObject item in schemeContentJson.nodes)
|
foreach (JObject item in schemeContentJson.nodes)
|
||||||
{
|
{
|
||||||
var node = item.ToObject<FlowNode>();
|
var node = item.ToObject<FlowNode>();
|
||||||
if (!nodeDictionary.ContainsKey(node.id))
|
if (!nodes.ContainsKey(node.id))
|
||||||
{
|
{
|
||||||
nodeDictionary.Add(node.id, node);
|
nodes.Add(node.id, node);
|
||||||
}
|
}
|
||||||
if (node.type == FlowNode.START)
|
if (node.type == FlowNode.START)
|
||||||
{
|
{
|
||||||
this._runtimeModel.startNodeId = node.id;
|
this._runtimeModel.startNodeId = node.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nodeDictionary;
|
return nodes;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取工作流线段的字典列表:key开始节点id,value线条实体列表
|
/// 获取工作流线段的字典列表:key开始节点id,value线条实体列表
|
||||||
@ -379,45 +380,27 @@ namespace OpenAuth.App.Flow
|
|||||||
{
|
{
|
||||||
return RejectNode(_runtimeModel.currentNodeId);
|
return RejectNode(_runtimeModel.currentNodeId);
|
||||||
}
|
}
|
||||||
/// <summary>
|
|
||||||
/// 驳回节点0"前一步"1"第一步"2"某一步" 3"不处理"
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="nodeId"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public string RejectNode(string nodeId)
|
public string RejectNode(string nodeId)
|
||||||
{
|
{
|
||||||
try
|
dynamic _node = _runtimeModel.nodes[nodeId];
|
||||||
|
if (_node.setInfo != null)
|
||||||
{
|
{
|
||||||
dynamic _node = _runtimeModel.nodes[nodeId];
|
if (_node.setInfo.NodeRejectType.Value == "0")
|
||||||
if (_node.setInfo != null)
|
|
||||||
{
|
|
||||||
if (_node.setInfo.NodeRejectType.Value == "0")
|
|
||||||
{
|
|
||||||
return _runtimeModel.previousId;
|
|
||||||
}
|
|
||||||
else if (_node.setInfo.NodeRejectType.Value == "1")
|
|
||||||
{
|
|
||||||
return GetNextNodeByNodeId(_runtimeModel.startNodeId);
|
|
||||||
}
|
|
||||||
else if (_node.setInfo.NodeRejectType.Value == "2")
|
|
||||||
{
|
|
||||||
return _node.setInfo.NodeRejectStep.Value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else//前一步
|
|
||||||
{
|
{
|
||||||
return _runtimeModel.previousId;
|
return _runtimeModel.previousId;
|
||||||
}
|
}
|
||||||
|
if (_node.setInfo.NodeRejectType.Value == "1")
|
||||||
|
{
|
||||||
|
return GetNextNodeByNodeId(_runtimeModel.startNodeId);
|
||||||
|
}
|
||||||
|
if (_node.setInfo.NodeRejectType.Value == "2")
|
||||||
|
{
|
||||||
|
return _node.setInfo.NodeRejectStep.Value;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
catch
|
return _runtimeModel.previousId;
|
||||||
{
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
///<summary>
|
///<summary>
|
||||||
/// 标记节点1通过,-1不通过,0驳回
|
/// 标记节点1通过,-1不通过,0驳回
|
||||||
|
@ -16,7 +16,7 @@ namespace OpenAuth.App
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class FlowInstanceApp : BaseApp<FlowInstance>
|
public class FlowInstanceApp : BaseApp<FlowInstance>
|
||||||
{
|
{
|
||||||
|
|
||||||
#region 流程处理API
|
#region 流程处理API
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建一个实例
|
/// 创建一个实例
|
||||||
@ -146,7 +146,7 @@ namespace OpenAuth.App
|
|||||||
|
|
||||||
|
|
||||||
string confluenceres = wfruntime.NodeConfluence(_VerificationNodeId, tag);
|
string confluenceres = wfruntime.NodeConfluence(_VerificationNodeId, tag);
|
||||||
|
|
||||||
switch (confluenceres)
|
switch (confluenceres)
|
||||||
{
|
{
|
||||||
case "-1"://不通过
|
case "-1"://不通过
|
||||||
@ -176,7 +176,7 @@ namespace OpenAuth.App
|
|||||||
};
|
};
|
||||||
processTransitionHistoryEntity.IsFinish = (processTransitionHistoryEntity.ToNodeType == 4 ? 1 : 0);
|
processTransitionHistoryEntity.IsFinish = (processTransitionHistoryEntity.ToNodeType == 4 ? 1 : 0);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -215,14 +215,14 @@ namespace OpenAuth.App
|
|||||||
processTransitionHistoryEntity.IsFinish = (processTransitionHistoryEntity.ToNodeType == 4 ? 1 : 0);
|
processTransitionHistoryEntity.IsFinish = (processTransitionHistoryEntity.ToNodeType == 4 ? 1 : 0);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
flowInstanceOperationHistory.Content = "【" + "todo name" + "】【" + wfruntime.runtimeModel.currentNode.name + "】【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "】同意,备注:" + description;
|
flowInstanceOperationHistory.Content = "【" + "todo name" + "】【" + wfruntime.runtimeModel.currentNode.name + "】【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "】同意,备注:" + description;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
flowInstance.IsFinish = 3; //表示该节点不同意
|
flowInstance.IsFinish = 3; //表示该节点不同意
|
||||||
tag.Taged = -1;
|
tag.Taged = -1;
|
||||||
wfruntime.MakeTagNode(wfruntime.runtimeModel.currentNodeId,tag);
|
wfruntime.MakeTagNode(wfruntime.runtimeModel.currentNodeId, tag);
|
||||||
|
|
||||||
flowInstanceOperationHistory.Content = "【" + "todo name" + "】【" + wfruntime.runtimeModel.currentNode.name + "】【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "】不同意,备注:" + description;
|
flowInstanceOperationHistory.Content = "【" + "todo name" + "】【" + wfruntime.runtimeModel.currentNode.name + "】【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "】不同意,备注:" + description;
|
||||||
}
|
}
|
||||||
@ -240,13 +240,10 @@ namespace OpenAuth.App
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 驳回
|
/// 驳回
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="processId"></param>
|
|
||||||
/// <param name="nodeId"></param>
|
|
||||||
/// <param name="description"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool NodeReject(string processId, string nodeId, string description = "")
|
public bool NodeReject(VerificationReq reqest)
|
||||||
{
|
{
|
||||||
FlowInstance flowInstance = Get(processId);
|
FlowInstance flowInstance = Get(reqest.FlowInstanceId);
|
||||||
FlowInstanceOperationHistory flowInstanceOperationHistory = new FlowInstanceOperationHistory();
|
FlowInstanceOperationHistory flowInstanceOperationHistory = new FlowInstanceOperationHistory();
|
||||||
FlowInstanceTransitionHistory processTransitionHistoryEntity = null;
|
FlowInstanceTransitionHistory processTransitionHistoryEntity = null;
|
||||||
|
|
||||||
@ -254,19 +251,19 @@ namespace OpenAuth.App
|
|||||||
|
|
||||||
|
|
||||||
string resnode = "";
|
string resnode = "";
|
||||||
if (nodeId == "")
|
if (string.IsNullOrEmpty(reqest.NodeRejectStep))
|
||||||
{
|
{
|
||||||
resnode = wfruntime.RejectNode();
|
resnode = wfruntime.RejectNode();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
resnode = nodeId;
|
resnode = reqest.NodeRejectStep;
|
||||||
}
|
}
|
||||||
|
|
||||||
var user = AuthUtil.GetCurrentUser().User;
|
var user = AuthUtil.GetCurrentUser().User;
|
||||||
var tag = new Tag
|
var tag = new Tag
|
||||||
{
|
{
|
||||||
Description = description,
|
Description = reqest.VerificationOpinion,
|
||||||
Taged = 0,
|
Taged = 0,
|
||||||
UserId = user.Id,
|
UserId = user.Id,
|
||||||
UserName = user.Name
|
UserName = user.Name
|
||||||
@ -278,29 +275,32 @@ namespace OpenAuth.App
|
|||||||
{
|
{
|
||||||
flowInstance.PreviousId = flowInstance.ActivityId;
|
flowInstance.PreviousId = flowInstance.ActivityId;
|
||||||
flowInstance.ActivityId = resnode;
|
flowInstance.ActivityId = resnode;
|
||||||
flowInstance.ActivityType = wfruntime.GetNodeType(resnode);//-1无法运行,0会签开始,1会签结束,2一般节点,4流程运行结束
|
flowInstance.ActivityType = wfruntime.GetNodeType(resnode);
|
||||||
flowInstance.ActivityName = wfruntime.runtimeModel.nodes[resnode].name;
|
flowInstance.ActivityName = wfruntime.runtimeModel.nodes[resnode].name;
|
||||||
flowInstance.MakerList = GetMakerList(wfruntime.runtimeModel.nodes[resnode], flowInstance.PreviousId);//当前节点可执行的人信息
|
flowInstance.MakerList = GetMakerList(wfruntime.runtimeModel.nodes[resnode], flowInstance.PreviousId);//当前节点可执行的人信息
|
||||||
#region 流转记录
|
#region 流转记录
|
||||||
processTransitionHistoryEntity = new FlowInstanceTransitionHistory();
|
|
||||||
processTransitionHistoryEntity.FromNodeId = wfruntime.runtimeModel.currentNodeId;
|
processTransitionHistoryEntity = new FlowInstanceTransitionHistory
|
||||||
processTransitionHistoryEntity.FromNodeName = wfruntime.runtimeModel.currentNode.name;
|
{
|
||||||
processTransitionHistoryEntity.FromNodeType = wfruntime.runtimeModel.currentNodeType;
|
FromNodeId = wfruntime.runtimeModel.currentNodeId,
|
||||||
processTransitionHistoryEntity.ToNodeId = wfruntime.runtimeModel.nextNodeId;
|
FromNodeName = wfruntime.runtimeModel.currentNode.name,
|
||||||
processTransitionHistoryEntity.ToNodeName = wfruntime.runtimeModel.nextNode.name;
|
FromNodeType = wfruntime.runtimeModel.currentNodeType,
|
||||||
processTransitionHistoryEntity.ToNodeType = wfruntime.runtimeModel.nextNodeType;
|
ToNodeId = wfruntime.runtimeModel.nextNodeId,
|
||||||
processTransitionHistoryEntity.TransitionSate = 1;//
|
ToNodeName = wfruntime.runtimeModel.nextNode.name,
|
||||||
|
ToNodeType = wfruntime.runtimeModel.nextNodeType,
|
||||||
|
TransitionSate = 1
|
||||||
|
};
|
||||||
|
//
|
||||||
processTransitionHistoryEntity.IsFinish = (processTransitionHistoryEntity.ToNodeType == 4 ? 1 : 0);
|
processTransitionHistoryEntity.IsFinish = (processTransitionHistoryEntity.ToNodeType == 4 ? 1 : 0);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
var data = new
|
|
||||||
{
|
|
||||||
SchemeContent = wfruntime.runtimeModel.schemeContentJson.ToString(),
|
|
||||||
frmData = (flowInstance.FrmType == 0 ? wfruntime.runtimeModel.frmData : null)
|
|
||||||
};
|
|
||||||
flowInstanceOperationHistory.Content = "【" + "todo name" + "】【" + wfruntime.runtimeModel.currentNode.name + "】【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "】驳回,备注:" + description;
|
|
||||||
|
|
||||||
UnitWork.Add(flowInstance);
|
|
||||||
|
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(flowInstanceOperationHistory);
|
||||||
UnitWork.Add(processTransitionHistoryEntity);
|
UnitWork.Add(processTransitionHistoryEntity);
|
||||||
UnitWork.Save();
|
UnitWork.Save();
|
||||||
@ -361,23 +361,21 @@ namespace OpenAuth.App
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private string GetMakerList(FlowNode node, string processId)
|
private string GetMakerList(FlowNode node, string processId)
|
||||||
{
|
{
|
||||||
try
|
string makerlsit = "";
|
||||||
{
|
|
||||||
string makerlsit = "";
|
|
||||||
|
|
||||||
if (node.setInfo == null)
|
if (node.setInfo == null)
|
||||||
|
{
|
||||||
|
makerlsit = "-1";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (node.setInfo.NodeDesignate == Setinfo.ALL_USER)//所有成员
|
||||||
{
|
{
|
||||||
makerlsit = "-1";
|
makerlsit = "1";
|
||||||
}
|
}
|
||||||
else
|
else if (node.setInfo.NodeDesignate == Setinfo.SPECIAL_USER)//指定成员
|
||||||
{
|
{
|
||||||
//if (node.setInfo.NodeDesignate.Value == "NodeDesignateType1")//所有成员
|
// makerlsit = GenericHelpers.ArrayToString(node.setInfo.NodeDesignateData.role, makerlsit);
|
||||||
//{
|
|
||||||
// makerlsit = "1";
|
|
||||||
//}
|
|
||||||
//else if (node.setInfo.NodeDesignate.Value == "NodeDesignateType2")//指定成员
|
|
||||||
//{
|
|
||||||
makerlsit = GenericHelpers.ArrayToString(node.setInfo.NodeDesignateData.role, makerlsit);
|
|
||||||
// makerlsit = ArrwyToString(node.setInfo.NodeDesignateData.post, makerlsit);
|
// makerlsit = ArrwyToString(node.setInfo.NodeDesignateData.post, makerlsit);
|
||||||
// makerlsit = ArrwyToString(node.setInfo.NodeDesignateData.usergroup, makerlsit);
|
// makerlsit = ArrwyToString(node.setInfo.NodeDesignateData.usergroup, makerlsit);
|
||||||
makerlsit = GenericHelpers.ArrayToString(node.setInfo.NodeDesignateData.users, makerlsit);
|
makerlsit = GenericHelpers.ArrayToString(node.setInfo.NodeDesignateData.users, makerlsit);
|
||||||
@ -386,75 +384,11 @@ namespace OpenAuth.App
|
|||||||
{
|
{
|
||||||
makerlsit = "-1";
|
makerlsit = "-1";
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
//else if (node.setInfo.NodeDesignate.Value == "NodeDesignateType3")//发起者领导
|
|
||||||
//{
|
|
||||||
// UserEntity userEntity = userService.GetEntity(OperatorProvider.Provider.Current().UserId);
|
|
||||||
// if (string.IsNullOrEmpty(userEntity.ManagerId))
|
|
||||||
// {
|
|
||||||
// makerlsit = "-1";
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// makerlsit = userEntity.ManagerId;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//else if (node.setInfo.NodeDesignate.Value == "NodeDesignateType4")//前一步骤领导
|
|
||||||
//{
|
|
||||||
// FlowInstanceTransitionHistory transitionHistoryEntity = FlowInstanceTransitionHistoryService.GetEntity(flowInstanceId, node.id.Value);
|
|
||||||
// UserEntity userEntity = userService.GetEntity(transitionHistoryEntity.CreateUserId);
|
|
||||||
// if (string.IsNullOrEmpty(userEntity.ManagerId))
|
|
||||||
// {
|
|
||||||
// makerlsit = "-1";
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// makerlsit = userEntity.ManagerId;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//else if (node.setInfo.NodeDesignate.Value == "NodeDesignateType5")//发起者部门领导
|
|
||||||
//{
|
|
||||||
// UserEntity userEntity = userService.GetEntity(OperatorProvider.Provider.Current().UserId);
|
|
||||||
// DepartmentEntity departmentEntity = departmentService.GetEntity(userEntity.DepartmentId);
|
|
||||||
|
|
||||||
// if (string.IsNullOrEmpty(departmentEntity.ManagerId))
|
|
||||||
// {
|
|
||||||
// makerlsit = "-1";
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// makerlsit = departmentEntity.ManagerId;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//else if (node.setInfo.NodeDesignate.Value == "NodeDesignateType6")//发起者公司领导
|
|
||||||
//{
|
|
||||||
// UserEntity userEntity = userService.GetEntity(OperatorProvider.Provider.Current().UserId);
|
|
||||||
// OrganizeEntity organizeEntity = organizeService.GetEntity(userEntity.OrganizeId);
|
|
||||||
|
|
||||||
// if (string.IsNullOrEmpty(organizeEntity.ManagerId))
|
|
||||||
// {
|
|
||||||
// makerlsit = "-1";
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// makerlsit = organizeEntity.ManagerId;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
return makerlsit;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
throw;
|
|
||||||
}
|
}
|
||||||
|
return makerlsit;
|
||||||
}
|
}
|
||||||
/// <summary>
|
|
||||||
/// 将数组转化成逗号相隔的字串
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <param name="Str"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 审核流程
|
/// 审核流程
|
||||||
/// <para>李玉宝于2017-01-20 15:44:45</para>
|
/// <para>李玉宝于2017-01-20 15:44:45</para>
|
||||||
@ -464,12 +398,7 @@ namespace OpenAuth.App
|
|||||||
//驳回
|
//驳回
|
||||||
if (request.VerificationFinally == "3")
|
if (request.VerificationFinally == "3")
|
||||||
{
|
{
|
||||||
string _nodeId = "";
|
NodeReject(request);
|
||||||
if (!string.IsNullOrEmpty(request.NodeRejectStep))
|
|
||||||
{
|
|
||||||
_nodeId = request.NodeRejectStep;
|
|
||||||
}
|
|
||||||
NodeReject(request.FlowInstanceId, _nodeId, request.VerificationOpinion);
|
|
||||||
}
|
}
|
||||||
else if (request.VerificationFinally == "2")//表示不同意
|
else if (request.VerificationFinally == "2")//表示不同意
|
||||||
{
|
{
|
||||||
@ -511,3 +440,4 @@ namespace OpenAuth.App
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
public string VerificationOpinion { get; set; }
|
public string VerificationOpinion { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 驳回的步骤
|
/// 驳回的步骤,即驳回到的节点ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string NodeRejectStep { get; set; }
|
public string NodeRejectStep { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,18 @@
|
|||||||
placeholder="节点名称" autocomplete="off" class="layui-input">
|
placeholder="节点名称" autocomplete="off" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">驳回类型</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<select name="NodeRejectType" v-model="NodeRejectType" required lay-verify="required">
|
||||||
|
<option value="0">上一步</option>
|
||||||
|
<option value="1">第一步</option>
|
||||||
|
<option value="2">指定步骤</option>
|
||||||
|
<option value="3">不处理</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">备注</label>
|
<label class="layui-form-label">备注</label>
|
||||||
@ -37,9 +49,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-tab-item">
|
<div class="layui-tab-item">
|
||||||
<ul id="tree" class="ztree" style="display: inline-block; width: 180px; padding: 10px; border: 1px solid #ddd; overflow: auto;"></ul>
|
<div class="layui-row">
|
||||||
<ul id="menutree" class="ztree" style="display: inline-block; width: 180px; padding: 10px; border: 1px solid #ddd; overflow: auto;"></ul>
|
<div class="layui-input-block">
|
||||||
</div>
|
<input type="radio" name="NodeDesignate" v-model="NodeDesignate" value="SPECIAL_USER" title="指定用户" checked>
|
||||||
|
<input type="radio" name="NodeDesignate" v-model="NodeDesignate" value="ALL_USER" title="所有用户">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-row">
|
||||||
|
<ul id="tree" class="ztree" style="display: inline-block; width: 180px; padding: 10px; border: 1px solid #ddd; overflow: auto;"></ul>
|
||||||
|
<ul id="menutree" class="ztree" style="display: inline-block; width: 180px; padding: 10px; border: 1px solid #ddd; overflow: auto;"></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,7 +20,7 @@ layui.config({
|
|||||||
vm.$set('$data', node.setInfo);
|
vm.$set('$data', node.setInfo);
|
||||||
users = node.setInfo.NodeDesignateData.users;
|
users = node.setInfo.NodeDesignateData.users;
|
||||||
}
|
}
|
||||||
|
|
||||||
//菜单列表
|
//菜单列表
|
||||||
var menucon = {}; //table的参数,如搜索key,点击tree的id
|
var menucon = {}; //table的参数,如搜索key,点击tree的id
|
||||||
//副树状结构,等lay table没问题了,可以换成table
|
//副树状结构,等lay table没问题了,可以换成table
|
||||||
@ -119,7 +119,7 @@ layui.config({
|
|||||||
//提供给上父页面调用
|
//提供给上父页面调用
|
||||||
getVal = function () {
|
getVal = function () {
|
||||||
var result = {
|
var result = {
|
||||||
NodeDesignateData: { //节点指定操作人
|
NodeDesignateData: { //节点指定操作人
|
||||||
users: users,
|
users: users,
|
||||||
role: [],
|
role: [],
|
||||||
org: []
|
org: []
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
using Infrastructure;
|
using Infrastructure;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using OpenAuth.App;
|
using OpenAuth.App;
|
||||||
|
using OpenAuth.App.Request;
|
||||||
using OpenAuth.Repository.Domain;
|
using OpenAuth.Repository.Domain;
|
||||||
|
|
||||||
namespace OpenAuth.UnitTest
|
namespace OpenAuth.UnitTest
|
||||||
@ -23,9 +24,13 @@ namespace OpenAuth.UnitTest
|
|||||||
/// <para>李玉宝于2017-01-20 9:59:11</para>
|
/// <para>李玉宝于2017-01-20 9:59:11</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void AddProcessInstance()
|
public void Verify()
|
||||||
{
|
{
|
||||||
|
_runApp.Verification(new VerificationReq
|
||||||
|
{
|
||||||
|
FlowInstanceId = "c4aa73f2-d5ea-43c3-8b7e-903e31ba5828",
|
||||||
|
VerificationFinally = "3"
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user