Map<String,Object> map = new HashMap<String,Object>();
Context ctx = WafContext.getInstance().getContext();
UserInfo userInfo = ContextUtil.getCurrentUserInfo(ctx);
CompanyOrgUnitInfo companyInfo = ContextUtil.getCurrentFIUnit(ctx);
try{
boolean permission = PermissionFactory.getRemoteInstance().hasFunctionPermission(new ObjectUuidPK(userInfo.getId()), new ObjectUuidPK(companyInfo.getId()), permissionNum);
if(permission == true){
map.put("flag", 1);
} else {
map.put("flag", 0);
}
} catch(EASBizException e){
map.put("flag", 0);
e.getMessage();
}