%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
<%@ page import="org.apache.commons.lang.StringUtils" %>
<%
/*
Author: undefined 2018-10-30
Content:
History Log:
*/
String userid=CurUser.getUserID();
BizObjectManager b=JBOFactory.getBizObjectManager("jbo.awe.USER_INFO");
BizObject boo = b.createQuery("userid=:userid").setParameter("userid", userid).getSingleResult(false);
String BELONGORG = boo.getAttribute("BELONGORG").toString();
System.out.println(BELONGORG);
ASObjectModel doTemp = new ASObjectModel("VI_BUSINESS_QUERYStatement");
//加权限
BizObjectManager manager = JBOFactory.getBizObjectManager("jbo.awe.USER_ROLE");
List roleListObject = manager.createQuery("userid=:userid").setParameter("userid", userid).getResultList(false);
List roleList = new ArrayList();
String roleid = "";
for(BizObject bo : roleListObject){
roleid = bo.getAttribute("roleid").toString();
roleList.add(roleid);
}
//roleid:800R00000044 北财合作方
//String roleId = "800R00000044";
//roleid:800R00000045 rolename: bccuishou
//如果登录人属于bccuishou角色,可以看到北财下的所有的合同
/* if(roleList.contains("800R00000045")){
List userObjectList = manager.createQuery("roleid=:roleid").setParameter("roleid", roleId).getResultList(false);
String userId = "";
List useridList = new ArrayList();
for(BizObject bo : userObjectList){
userId = bo.getAttribute("userid").toString();
useridList.add("'"+userId+"'");
}
String useridStr = StringUtils.join(useridList.toArray(), ",");
doTemp.appendJboWhere(" and O.project_manage in (" + useridStr + ")");
} */
//导出模板编号
String template = "";
//登录人属于经销商角色 401:经销商roleid
if(roleList.contains("401")){
doTemp.appendJboWhere(" and ui.BELONGORG='"+BELONGORG+"'");
//导出有权限
template = "20cd01d204b84726962cbdeba698f5d1";
}else{
//导出无权限
template = "06d4e377ce88426f832490898ce390ff";
}
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.ShowSummary="0"; //汇总
dwTemp.setPageSize(10);
dwTemp.genHTMLObjectWindow("");
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
String sButtons[][] = {
//{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
//{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
{"true","","Button","导出excel","导出excel","exportExcel()","","","","btn_icon_up",""},
//{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>