diff --git a/WebContent/Tenwa/Lease/Flow/Contract/ContractCancle/ContractCancelApplyList.jsp b/WebContent/Tenwa/Lease/Flow/Contract/ContractCancle/ContractCancelApplyList.jsp index 6cf8a9144..68f09eff6 100644 --- a/WebContent/Tenwa/Lease/Flow/Contract/ContractCancle/ContractCancelApplyList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Contract/ContractCancle/ContractCancelApplyList.jsp @@ -19,6 +19,7 @@ } if(flowno=="BContractCancelApply"){ selname="SelectContract_Car"; + parm="userid,"+userid; }else{ selname="SelectContract"; parm="businessType,"+businessType+",userid,"+userid; diff --git a/WebContent/Tenwa/Lease/Flow/RentNotify/LetterApprovalList.jsp b/WebContent/Tenwa/Lease/Flow/RentNotify/LetterApprovalList.jsp index 7f33b5cb0..c6d7b97ef 100644 --- a/WebContent/Tenwa/Lease/Flow/RentNotify/LetterApprovalList.jsp +++ b/WebContent/Tenwa/Lease/Flow/RentNotify/LetterApprovalList.jsp @@ -5,13 +5,14 @@ <%@ page import="com.tenwa.doc.action.DocListInitAction" %> <%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %> <%@ page import="com.amarsoft.app.util.*" %> +<%@ page import="org.apache.commons.lang.StringUtils" %> <% /* Author: undefined 2016-09-01 Content: History Log: */ - + String userid1=CurUser.getUserID(); String userId = CurUser.getUserID(); String orgId =CurUser.getOrgID(); System.out.print(orgId); @@ -24,6 +25,39 @@ /* if(userId.indexOf("8006")>-1){ doTemp.appendJboWhere(" O.orgid="+CurUser.getOrgID()+""); } */ + + //合同信息查询加权限 + 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 userId2 = ""; + List useridList = new ArrayList(); + for(BizObject bo : userObjectList){ + userId2 = bo.getAttribute("userid").toString(); + useridList.add("'"+userId2+"'"); + } + 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";