@Action("getQS") public String getQueryScheme() throws BizException { QueryScheme qs = functionViewAssignService.getQuerySchemeByViewId(functionViewId); JsonResult jr = new JsonResult(qs); setJsonString(jr.toJSONString()); return SUCCESS; }
@Action("queryFunViewAssign") public String queryFunViewAssign() { List<FunctionViewAssign> list = functionViewAssignService.getFunctionsViewAssigns(functionViewId, bizTypeId); List<String> userIds = new ArrayList<String>(); List<String> postIds = new ArrayList<String>(); List<String> orgroleIds = new ArrayList<String>(); for (FunctionViewAssign functionViewAssign : list) { if (functionViewAssign.getUser() != null) { userIds.add(functionViewAssign.getUser().getId()); } else if (functionViewAssign.getPost() != null) { postIds.add(functionViewAssign.getPost().getId()); } else if (functionViewAssign.getOrgrole() != null) { orgroleIds.add(functionViewAssign.getOrgrole().getId()); } } String userJson = FastJsonUtils.toJson(userIds); String postJson = FastJsonUtils.toJson(postIds); String orgroleJson = FastJsonUtils.toJson(orgroleIds); setJsonString( "{userJson : " + userJson + ",postJson : " + postJson + ",orgroleJson : " + orgroleJson + "}"); return SUCCESS; }
@Action("updateFunViewAssign") public String updateFunViewAssign() throws BizException { functionViewAssignService.updateFunViewAssign( functionViewId, bizTypeId, userIds, postIds, orgRoleIds); setJsonString("{success : true,msg : '保存成功'}"); return SUCCESS; }
@Action("getAssigns") public String getAssigns() throws BizException { Function fun = bcFunctionService.getFunctionByCode(functionCode); List<FunctionView> list = functionViewAssignService.getFunctionViews( getOnlineUser().getUser().getId(), fun.getId(), getOnlineUser().getLoginedOrg().getId(), bizTypeId); String json = FastJsonUtils.toJson(list, new String[] {"id", "viewcode", "viewname"}); setJsonString(json); return SUCCESS; }
@Action("saveFuncViewQS") public String saveQuerySchemeSetting() throws BizException { functionViewAssignService.setFunctionViewQueryScheme(functionViewId, querySchemeId); setJsonString("{success : true,msg : '保存成功'}"); return SUCCESS; }