diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBContractEnd/rightsFileList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBContractEnd/rightsFileList.jsp index 6da8861ae..089d18efc 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBContractEnd/rightsFileList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBContractEnd/rightsFileList.jsp @@ -1,13 +1,49 @@ <%@page import="jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT"%> <%@ 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" %> +<% +String userid=CurUser.getUserID().substring(0,5); +String userid1=CurUser.getUserID(); /* Author: undefined 2018-07-16 Content: History Log: */ ASObjectModel doTemp = new ASObjectModel("rightsFileList"); - ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + + //合同信息查询加权限 + BizObjectManager manager = JBOFactory.getBizObjectManager("jbo.awe.USER_ROLE"); + List roleListObject = manager.createQuery("userid=:userid").setParameter("userid", userid1).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 + ")"); + } + //登录人属于经销商角色 401:经销商roleid + if(roleList.contains("401")){ + doTemp.appendJboWhere(" and O.project_manage='"+userid1+"'"); + } + + + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.Style="1"; //--设置为Grid风格-- dwTemp.ReadOnly = "1"; //只读模式 dwTemp.MultiSelect=true;