资金实收报表导出

This commit is contained in:
liuzhao 2019-01-14 17:51:00 +08:00
parent ead6b107a1
commit 37467bfe3d

View File

@ -1,23 +1,53 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
<%@ 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();
String username = CurUser.getUserName();
BizObject useRole = JBOFactory.createBizObjectQuery("jbo.sys.USER_ROLE", "userid=:userid")
.setParameter("userid", userid).getSingleResult(false);
String roleid = useRole.getAttribute("roleid").toString();
ASObjectModel doTemp = new ASObjectModel("FundIncomeReport");
//099 超级管理员
//299 平台管理员
//399 系统管理员
//800R00000020 资管负责人
if(!("099".equals(roleid) || "299".equals(roleid) || "399".equals(roleid) || "800R00000020".equals(roleid))){
doTemp.appendJboWhere(" and ui.userid='"+userid+"'");
}
//加权限
BizObjectManager manager = JBOFactory.getBizObjectManager("jbo.awe.USER_ROLE");
List<BizObject> roleListObject = manager.createQuery("userid=:userid").setParameter("userid", userid).getResultList(false);
List<String> roleList = new ArrayList<String>();
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<BizObject> userObjectList = manager.createQuery("roleid=:roleid").setParameter("roleid", roleId).getResultList(false);
String userId = "";
List<String> useridList = new ArrayList<String>();
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 lci.project_manage='"+userid+"'");
//导出有权限
template = "2cd25a9b1c6248c8abacaeeaf7cda303";
}else{
//导出无权限
template = "a87e9bea25694013b9cc39216cac831e";
}
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
@ -41,15 +71,13 @@
var tempParam={};
var sparam="";
var roleid="<%=roleid%>";
var templa = "<%=template%>";
//param["templateNo"]="a87e9bea25694013b9cc39216cac831e";
//模板号
if(roleid=="099" || roleid=="299" || roleid=="399"){
param["templateNo"]="a87e9bea25694013b9cc39216cac831e";
}else{
param["templateNo"]="2cd25a9b1c6248c8abacaeeaf7cda303";//权限
}
//param["templateNo"]="2cd25a9b1c6248c8abacaeeaf7cda303";//权限
param["templateNo"]=templa;//权限
//生成文件关联关系
tempParam["OBJECTTYPE"]="资金实收报表导出";
tempParam["FLOW_UNID"]="<%=new java.util.Date().getTime()%>";