diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBContractEnd/rightsFileList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBContractEnd/rightsFileList.jsp index 0fe2419c0..e6de0385f 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBContractEnd/rightsFileList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBContractEnd/rightsFileList.jsp @@ -1,178 +1,190 @@ -<%@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"%> -<%@ page import="org.apache.commons.lang.StringUtils" %> -<% -String userid=CurUser.getUserID().substring(0,5); -String userid1=CurUser.getUserID(); -String Jurisdiction="true"; - - /* - Author: undefined 2018-07-16 - Content: - History Log: - */ - ASObjectModel doTemp = new ASObjectModel("rightsFileList"); - - //合同信息查询加权限 - 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")){ - Jurisdiction="false"; - 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+"'"); - } - if(roleList.contains(roleId)){ - Jurisdiction="false"; - } - - - ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); - dwTemp.Style="1"; //--设置为Grid风格-- - dwTemp.ReadOnly = "1"; //只读模式 - dwTemp.MultiSelect=true; - dwTemp.setPageSize(10); - dwTemp.genHTMLObjectWindow(""); - String userId = CurUser.getUserID(); - - //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 - String sButtons[][] = { - {Jurisdiction,"All","Button","结清证明","结清证明","saveRecord()","","","","btn_icon_save"}, - {"true","","Button","批量下载","批量下载","lotdown()","","","","btn_icon_transfer",""}, - {Jurisdiction,"All","Button","公司盖章","公司盖章","stamp()","","","",""}, - }; - sButtonPosition = "north"; -%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> - +<%@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"%> +<%@ page import="org.apache.commons.lang.StringUtils" %> +<% +String userid=CurUser.getUserID().substring(0,5); +String userid1=CurUser.getUserID(); +String Jurisdiction="true"; + + /* + Author: undefined 2018-07-16 + Content: + History Log: + */ + ASObjectModel doTemp = new ASObjectModel("rightsFileList"); + + //合同信息查询加权限 + 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")){ + Jurisdiction="false"; + 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+"'"); + } + if(roleList.contains(roleId)){ + Jurisdiction="false"; + } + + + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.ReadOnly = "1"; //只读模式 + dwTemp.MultiSelect=true; + dwTemp.setPageSize(10); + dwTemp.genHTMLObjectWindow(""); + String userId = CurUser.getUserID(); + + //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 + String sButtons[][] = { + {Jurisdiction,"All","Button","结清证明","结清证明","saveRecord()","","","","btn_icon_save"}, + {"true","","Button","批量下载","批量下载","lotdown()","","","","btn_icon_transfer",""}, + {Jurisdiction,"All","Button","公司盖章","公司盖章","stamp()","","","",""}, + }; + sButtonPosition = "north"; +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file