批准函权限错误

合同撤销新增权限错误
This commit is contained in:
G 2019-01-14 17:16:28 +08:00
parent 0e9aaf97fb
commit 18323f2bee
2 changed files with 36 additions and 1 deletions

View File

@ -19,6 +19,7 @@
}
if(flowno=="BContractCancelApply"){
selname="SelectContract_Car";
parm="userid,"+userid;
}else{
selname="SelectContract";
parm="businessType,"+businessType+",userid,"+userid;

View File

@ -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<BizObject> roleListObject = manager.createQuery("userid=:userid").setParameter("userid", userid1).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 userId2 = "";
List<String> useridList = new ArrayList<String>();
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";