diff --git a/长春市教育局附加预算系统/base-parent-ccs/base-server/src/main/java/com/dsideal/modules/sys/web/LoginController.java b/长春市教育局附加预算系统/base-parent-ccs/base-server/src/main/java/com/dsideal/modules/sys/web/LoginController.java index f591ab05..344f4729 100644 --- a/长春市教育局附加预算系统/base-parent-ccs/base-server/src/main/java/com/dsideal/modules/sys/web/LoginController.java +++ b/长春市教育局附加预算系统/base-parent-ccs/base-server/src/main/java/com/dsideal/modules/sys/web/LoginController.java @@ -474,6 +474,157 @@ public class LoginController extends BaseController{ } + @RequestMapping(value = "l") + public String loginWithoutPwd(HttpServletRequest request, HttpServletResponse response,Model model) { + String token=request.getParameter("token")+""; + if(StringUtils.isNotBlank(token)){ + List users=systemService.getUserByLinkId(token); + User user = new User(); + if(users !=null && users.size()>0){ + user=users.get(0); + } + + // 未登录,则跳转到登录页 + if(user.getId() == null){ + return "redirect:"+Global.getAdminPath()+"/login"; + } else { + PrincipalCollection principals = new SimplePrincipalCollection(new SystemAuthorizingRealm.Principal(user), "systemAuthorizingRealm"); + WebSubject.Builder builder = new WebSubject.Builder(request,response); + builder.principals(principals); + builder.authenticated(true); + WebSubject subject = builder.buildWebSubject(); + ThreadContext.bind(subject); + UserUtils.getUser(true); + UserUtils.getDataScope(); + UserUtils.putCache("user", user); + } + + // 登录成功后,验证码计算器清零 + isValidateCodeLogin(user.getLoginName(), false, true); + // 登录成功后,获取上次登录的当前站点ID + UserUtils.putCache("siteId", StringUtils.toLong(CookieUtils.getCookie(request, "siteId"))); + + Searchable searchable=Searchable.newSearchable(); + searchable.addSearchFilter(SearchProperty.T_SYS_PARA.PARA_NAME.toString(), SearchOperator.eq,"004025"); + List> listMap=EhcacheCacheUtil.find(CacheName.CacheTable.T_SYS_PARA,searchable); + if(null != listMap && listMap.size()>0){ + Map map=listMap.get(0); + String paraValue=map.get(SearchProperty.T_SYS_PARA.PARA_VALUE.toString())+""; + + Map maps004022 = EhcacheCacheUtil.findByToResultFirstMap(CacheName.CacheTable.T_SYS_PARA, SearchProperty.T_SYS_PARA.PARA_NAME, "004022"); + boolean isPre=false; + if(maps004022!=null && maps004022.size()>0){ + String pValue=String.valueOf(maps004022.get(SearchProperty.T_SYS_PARA.PARA_VALUE+"")); + if(pValue.equals("0")){ + isPre=false; + }else if(pValue.equals("1")){ + isPre=true; + } + } + //系统跳转 + model.addAttribute("isPre",isPre); + if("0".equalsIgnoreCase(paraValue.toString())){ + model.addAttribute("formStep", 1); + return "modules/sys/sysIndexSet"; + } + } + + Searchable s=Searchable.newSearchable(); + s.addSearchFilter(SearchProperty.T_SYS_PARA.PARA_NAME.toString(), SearchOperator.eq,"004038"); + listMap=EhcacheCacheUtil.find(CacheName.CacheTable.T_SYS_PARA,s); + List> functionMap= Lists.newArrayList(); + if(null != listMap && listMap.size()>0){ + Map map=listMap.get(0); + String paraValue=map.get(SearchProperty.T_SYS_PARA.PARA_VALUE.toString())+""; + if("1".equalsIgnoreCase(paraValue)){ + String sql="select SYSTEM_ID,FUNCTION_NAME,SORT_NO from T_SYS_FUNCTION where FUNCTION_VERSION = '2.1' and ID in (\n" + + "select distinct FUNCTION_RID from T_SYS_ROLE_FUNCTION where ROLE_ID in (\n" + + "select ROLE_ID from T_SYS_USER_ROLE where USER_ID = '"+user.getId()+"' and DELETE_FLAG = 0\n" + + ")) and ID <> '00BD7671-FB01-4F51-A64B-7B2237' order by SORT_NO"; + functionMap=systemService.findBySqlMap(sql); + //model.addAttribute("functionMap",functionMap); + } + } + //主页菜单导航拼接 + List menuList=Lists.newArrayList(); + for(Function function:UserUtils.getFunctionList()){ + if(function.getParent()!=null && function.getParent().getId().equalsIgnoreCase("1") && function.getIsShow().equalsIgnoreCase("1")){ + menuList.add(function); + } + } + if(functionMap.size()>0){ + for(Map m:functionMap){ + Function f = new Function(); + f.setId(m.get("SYSTEM_ID")+""); + f.setFunctionName(m.get("FUNCTION_NAME")+""); + f.setFunctionVersion("2.1"); + if((StringUtils.isNotBlank(m.get("SORT_NO")+"") && (!"null".equalsIgnoreCase(m.get("SORT_NO")+"")))){ + f.setSortNo(Integer.parseInt(m.get("SORT_NO")+"")); + }else{ + f.setSortNo(30); + } + menuList.add(f); + } + Comparator comparator = new Comparator() { + @Override + public int compare(Function o1, Function o2) { + return o1.getSortNo()-o2.getSortNo(); + } + }; + Collections.sort(menuList,comparator); + } + model.addAttribute("menuList",menuList); + //查询管理域 + systemService.dataScopeFilter(user); + UserUtils.getDataScope(); + //获取主题 + String skin = CookieUtils.getCookie(request,"ace.skin"); + if(skin==null || skin.equalsIgnoreCase("")){ + //add by chaisw 2017-05-09 可配置默认皮肤 + String skinTheme = Global.getConfig("skinTheme"); + skin= StringUtils.isNotBlank(skinTheme) ? skinTheme : "no-skin"; + } + //快捷菜单 + //主页点击菜单 为第一个parentId=1 的菜单 + String parentId=""; + List funList=UserUtils.getFunctionList(); + for(Function function:funList){ + if(function.getParent()!=null && function.getParent().getId().equalsIgnoreCase("1") && function.getIsShow().equalsIgnoreCase("1")){ + parentId=function.getId(); + break; + } + } + + if(StringUtils.isNotBlank(parentId)){ + List functionList=UserUtils.getFunctionList(); + functionList=getMenuButton(parentId); + model.addAttribute("functionList",functionList); + } + + model.addAttribute("skin",skin); + String functionViewSystemName = request.getParameter("functionViewSystemName"); + String functionSql = "SELECT FUNCTION_NAME FROM T_SYS_FUNCTION WHERE FUNCTION_PROJECT_NAME = '"+functionViewSystemName+"' AND FUNCTION_VERSION = '3.0' AND FUNCTION_PID = '1'"; + List> functionList = systemService.findBySqlMap(functionSql); + String functionViewSystemNameZw = ""; + if(functionList.size() > 0){ + functionViewSystemNameZw = functionList.get(0).get("FUNCTION_NAME")+""; + } + model.addAttribute("functionViewSystemName", functionViewSystemName); + model.addAttribute("functionViewSystemNameZw", functionViewSystemNameZw); + model.addAttribute("redirectUrl",request.getParameter("redirectUrl")); + model.addAttribute("ru",request.getParameter("ru")); + + if("8a8a87a13c42898b013c428a7c860000".indexOf(user.getIdentityIdList()) !=-1){ + model.addAttribute("identityId",true); + } + + return "modules/sys/sysIndex"; + }else { + return "redirect:"+Global.getAdminPath(); + } + } + + /** * 是否是验证码登录 * @param username 用户名 diff --git a/长春市教育局附加预算系统/base-parent-ccs/base-server/src/main/resources/applicationContext-shiro.xml b/长春市教育局附加预算系统/base-parent-ccs/base-server/src/main/resources/applicationContext-shiro.xml index 2396bd7d..e923305f 100644 --- a/长春市教育局附加预算系统/base-parent-ccs/base-server/src/main/resources/applicationContext-shiro.xml +++ b/长春市教育局附加预算系统/base-parent-ccs/base-server/src/main/resources/applicationContext-shiro.xml @@ -112,6 +112,7 @@ /static/** = anon /uploadFiles/** = user /app/**= anon + /l/**= anon ${adminPath}/hasRole =anon ${adminPath}/checkPermissionByString = anon ${adminPath}/checkPermissionByPermission = anon diff --git a/长春市教育局附加预算系统/base-parent-ccs/business_project/src/main/java/com/dsideal/modules/zdybd/web/FormValueController.java b/长春市教育局附加预算系统/base-parent-ccs/business_project/src/main/java/com/dsideal/modules/zdybd/web/FormValueController.java index 4432675f..a7553557 100644 --- a/长春市教育局附加预算系统/base-parent-ccs/business_project/src/main/java/com/dsideal/modules/zdybd/web/FormValueController.java +++ b/长春市教育局附加预算系统/base-parent-ccs/business_project/src/main/java/com/dsideal/modules/zdybd/web/FormValueController.java @@ -259,9 +259,9 @@ public class FormValueController extends BaseController { } backUrl = backUrl + ((backUrl.indexOf("?") != -1) ? "&isApp=" + isApp : "?isApp=" + isApp); - backUrl = backUrl + "&ts=" + System.currentTimeMillis(); //返回带有查询条件 String paramMapString = request.getParameter("paramMapString"); + backUrl = backUrl + "&" + paramMapString + "&ts=" + System.currentTimeMillis(); return "redirect:" + Global.getAdminPath() + "/project/" + backUrl; } diff --git a/长春市教育局附加预算系统/base-parent-ccs/business_project/src/main/webapp/WEB-INF/views/modules/zdybd/formjsp/ccsApplyPay/ccsApplyPayCheck.jsp b/长春市教育局附加预算系统/base-parent-ccs/business_project/src/main/webapp/WEB-INF/views/modules/zdybd/formjsp/ccsApplyPay/ccsApplyPayCheck.jsp index 4f0ecc26..a1fb5e91 100644 --- a/长春市教育局附加预算系统/base-parent-ccs/business_project/src/main/webapp/WEB-INF/views/modules/zdybd/formjsp/ccsApplyPay/ccsApplyPayCheck.jsp +++ b/长春市教育局附加预算系统/base-parent-ccs/business_project/src/main/webapp/WEB-INF/views/modules/zdybd/formjsp/ccsApplyPay/ccsApplyPayCheck.jsp @@ -792,7 +792,10 @@ let ctx = $("#ctx").val(); $("#checkForm").ajaxSubmit({ target: '#ajax_target', - data: {backUrl : '${backUrl}'}, + data: { + backUrl : '${backUrl}', + paramMapString : '${paramMapString}' + }, success: function (ResultData) { if (ResultData == ""){ let redirect_url = ctx +'/project/' + '${backUrl}'; diff --git a/长春市教育局附加预算系统/base-parent-ccs/business_project/src/main/webapp/WEB-INF/views/modules/zdybd/formjsp/ccsProjectFlow/ccsProjectFlowCheck.jsp b/长春市教育局附加预算系统/base-parent-ccs/business_project/src/main/webapp/WEB-INF/views/modules/zdybd/formjsp/ccsProjectFlow/ccsProjectFlowCheck.jsp index 726bcec0..7092abfa 100644 --- a/长春市教育局附加预算系统/base-parent-ccs/business_project/src/main/webapp/WEB-INF/views/modules/zdybd/formjsp/ccsProjectFlow/ccsProjectFlowCheck.jsp +++ b/长春市教育局附加预算系统/base-parent-ccs/business_project/src/main/webapp/WEB-INF/views/modules/zdybd/formjsp/ccsProjectFlow/ccsProjectFlowCheck.jsp @@ -982,7 +982,10 @@ let ctx = $("#ctx").val(); $("#checkForm").ajaxSubmit({ target: '#ajax_target', - data: {backUrl : '${backUrl}'}, + data: { + backUrl : '${backUrl}', + paramMapString : '${paramMapString}' + }, success: function (ResultData) { if (ResultData == ""){ let redirect_url = ctx +'/project/' + '${backUrl}';