提交 f2367874 编写于 作者: tangyaolong's avatar tangyaolong

push

上级 e8479c03
...@@ -16,6 +16,7 @@ import cn.ibizlab.util.service.RemoteService; ...@@ -16,6 +16,7 @@ import cn.ibizlab.util.service.RemoteService;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.node.ObjectNode; import com.fasterxml.jackson.databind.node.ObjectNode;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.ArrayUtils;
import org.flowable.bpmn.BpmnAutoLayout; import org.flowable.bpmn.BpmnAutoLayout;
import org.flowable.bpmn.converter.BpmnXMLConverter; import org.flowable.bpmn.converter.BpmnXMLConverter;
import org.flowable.bpmn.model.*; import org.flowable.bpmn.model.*;
...@@ -520,6 +521,7 @@ public class WFCoreService ...@@ -520,6 +521,7 @@ public class WFCoreService
if(list.size()==0) if(list.size()==0)
return taskWays; return taskWays;
Task task=list.get(0); Task task=list.get(0);
LinkedHashMap activeData = (LinkedHashMap)runtimeService.getVariable(task.getExecutionId(),"activedata");
if((!StringUtils.isEmpty(task.getProcessDefinitionId()))&&(!StringUtils.isEmpty(task.getTaskDefinitionKey()))) { if((!StringUtils.isEmpty(task.getProcessDefinitionId()))&&(!StringUtils.isEmpty(task.getTaskDefinitionKey()))) {
UserTask userTask = wfModelService.getModelStepById(task.getProcessDefinitionId()).get(task.getTaskDefinitionKey()); UserTask userTask = wfModelService.getModelStepById(task.getProcessDefinitionId()).get(task.getTaskDefinitionKey());
//设置流程表单 //设置流程表单
...@@ -537,10 +539,45 @@ public class WFCoreService ...@@ -537,10 +539,45 @@ public class WFCoreService
way.setProcessinstancebusinesskey(processInstanceBusinessKey); way.setProcessinstancebusinesskey(processInstanceBusinessKey);
//设置流程交互表单 //设置流程交互表单
setTaskWayForm(sequenceFlow,way); setTaskWayForm(sequenceFlow,way);
String userIds = "";
String activeIds = "";
//过滤权限不足的用户
// String roles = (String) way.get("roles");
// String activeForm = (String) way.get("activeData");
String roles = null;
String activeForm = null;
String[] both = new String[]{};
if(activeForm != null){
String[] temp = activeForm.split(",");
int iMax = temp.length - 1;
for(int i = 0;i < temp.length ;i++){
if (iMax == -1){
break;
}
Object key = activeData.get(temp[i]);
if(!ObjectUtils.isEmpty(key)) {
activeIds += key;
if (i == iMax) {
break;
}
activeIds += ",";
}
}
if(activeIds.endsWith(",")){
activeIds = activeIds.substring(0,activeIds.lastIndexOf(","));
}
}
both = (String[]) ArrayUtils.addAll(both, activeIds.split(","));
userIds = getGroupUsers(roles,null);
both = (String[]) ArrayUtils.addAll(both, userIds.split(","));
if(Arrays.asList(both).contains(userId) || (roles == null && activeForm == null)){
taskWays.add(way); taskWays.add(way);
} }
} }
} }
}
return taskWays; return taskWays;
} }
...@@ -1235,6 +1272,9 @@ public class WFCoreService ...@@ -1235,6 +1272,9 @@ public class WFCoreService
} }
else else
{ {
if (delegateExecution == null) {
userData2="";
} else {
Object activedata=delegateExecution.getVariable("activedata"); Object activedata=delegateExecution.getVariable("activedata");
if(activedata!=null&&activedata instanceof Map) { if(activedata!=null&&activedata instanceof Map) {
Map entity = (Map) activedata; Map entity = (Map) activedata;
...@@ -1246,6 +1286,8 @@ public class WFCoreService ...@@ -1246,6 +1286,8 @@ public class WFCoreService
else else
userData2=""; userData2="";
} }
}
if(!StringUtils.isEmpty(userData2)) if(!StringUtils.isEmpty(userData2))
{ {
if(userData.indexOf("dept")>=0||userData.indexOf("orgsec")>=0) if(userData.indexOf("dept")>=0||userData.indexOf("orgsec")>=0)
...@@ -1254,10 +1296,6 @@ public class WFCoreService ...@@ -1254,10 +1296,6 @@ public class WFCoreService
orgid=userData2; orgid=userData2;
} }
} }
WFGroup group=iwfGroupService.get(groupId); WFGroup group=iwfGroupService.get(groupId);
List<WFMember> list=group.getWfmember(); List<WFMember> list=group.getWfmember();
if (list!=null) if (list!=null)
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册