}
flowList.addAll(allFlows);
}else if(type.equals("t")){
Template template = TemplateCache.getInstance().get(id);
if(template == null){
continue;
}
Flow flow = FlowCache.getInstance().get(template.getFlowId());
if (flow == null) {
continue;
}
flowList.add(flow);
}
for(Flow flow : flowList){
if(flow == null){
continue;
}
if(fieldValue.equals("[逻辑开始]") && flow.getBeginStats() != null){
for(Stat stat : flow.getBeginStats()){
if(statusIdStrb.length() > 0){
statusIdStrb.append(",");
}
statusIdStrb.append(stat.getId());
}
}
else if(fieldValue.equals("[逻辑关闭]") && flow.getEndStats() != null){
for(Stat stat : flow.getEndStats()){
if(statusIdStrb.length() > 0){
statusIdStrb.append(",");
}
statusIdStrb.append(stat.getId());
}
}
}
if(statusIdStrb.length() == 0){
continue;
}
if(fieldMethod.equals("=")){
XMLUtil.setAttribute(whereFieldNode, "method", "in");
}
else if(fieldMethod.equals("!=")){
XMLUtil.setAttribute(whereFieldNode, "method", "not in");
}
whereFieldNode.setTextContent(statusIdStrb.toString());
}
//创建人 指派人可以指派给角色
if((fieldId.equals("create_user") || fieldId.equals("assign_user") || fieldId.equals("log_create_user")) && (fieldValue.startsWith("role_"))){
String roleIdStr = fieldValue.substring(5);
if (!CommonUtil.isPosNum(roleIdStr))
continue;
StringBuffer roleUsers = new StringBuffer();
if (type.equals("t")) {
Template template = TemplateCache.getInstance().get(id);
if(template == null){
continue;
}
Flow flow = FlowCache.getInstance().get(template.getFlowId());
if (flow == null) {
continue;
}
UUID roleId = DataAccessFactory.getInstance().createUUID(roleIdStr);
Set<Right> allRoleRight = flow.queryRightsByRole(roleId);