diff --git a/WebContent/Tenwa/Lease/Flow/RentCollection/rentcollection/rentCollectionList.jsp b/WebContent/Tenwa/Lease/Flow/RentCollection/rentcollection/rentCollectionList.jsp index fa56f0fec..87d5d9cd7 100644 --- a/WebContent/Tenwa/Lease/Flow/RentCollection/rentcollection/rentCollectionList.jsp +++ b/WebContent/Tenwa/Lease/Flow/RentCollection/rentcollection/rentCollectionList.jsp @@ -11,7 +11,7 @@ */ String userid=CurUser.getUserID(); ASObjectModel doTemp = new ASObjectModel("RentCollectionList"); - + //加权限 BizObjectManager manager = JBOFactory.getBizObjectManager("jbo.awe.USER_ROLE"); List roleListObject = manager.createQuery("userid=:userid").setParameter("userid", userid).getResultList(false); @@ -21,43 +21,20 @@ roleid = bo.getAttribute("roleid").toString(); roleList.add(roleid); } - //roleid:800R00000045 rolename: bccuishou - //如果登录人属于bccuishou角色,可以看到北财下的所有的合同 -/* if (roleList.contains("800R00000045")) { - //roleid:800R00000044 北财合作方 - String roleId = "800R00000044"; - 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 + ")"); - } else if (roleList.contains("401") && !roleList.contains("800R00000051")) { //登录人属于经销商角色 401:经销商roleid - doTemp.appendJboWhere(" and O.project_manage='" + userid + "'"); - } else if (roleList.contains("800R00000051")) { - String belongorg = Sqlca.getString("select belongorg from user_info where userid='" + userid + "'"); - String distributor_no = Sqlca.getString("select distributor_no from distributor_info where orgid='" + belongorg + "'"); - doTemp.appendJboWhere(" and O.distributor_id='" + distributor_no + "'"); - } else { - doTemp.appendJboWhere(" and O.project_manage='" + userid + "'"); - } */ + String distributorIds = Sqlca.getString("select concat(distributor_no,'\\',\\'') from distributor_info where orgid = '" + CurUser.getOrgID() + "'"); + String querySql = " and o.distributor_id in ('"+distributorIds+"')"; String roleidq = Sqlca.getString("select ROLEID from USER_ROLE where USERID='"+CurUser.getUserID()+"'"); - if(!"800R00000043".equals(roleidq)){//重催组用户可以看到全部的 - doTemp.appendJboWhere(" and odi.part_dept='" + userid + "'"); + if(!"800R00000043".equals(roleidq)){//重催组用户可以看到全部的 + querySql += " or odi.part_dept='" + userid + "'"; } - -// String sCondtion=DataRightManager.getRightCondition(CurUser,"O", "contract"); -// doTemp.appendJboWhere(sCondtion); + doTemp.appendJboWhere(querySql); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.Style="1"; //--设置为Grid风格-- dwTemp.ReadOnly = "1"; //只读模式 dwTemp.setPageSize(pageSize==null?10:Integer.parseInt(pageSize)); dwTemp.genHTMLObjectWindow(""); - //userid //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 String sButtons[][] = { };