| | |
| | | * ssoGoServiceSubtaskList |
| | | */ |
| | | @PostMapping("ssoGoServiceSubtaskList") |
| | | public RedirectView ssoGoServiceSubtaskList(@RequestBody SysUser sysUserVo) { |
| | | public RedirectView ssoGoServiceSubtaskList(@RequestBody SSOUserInfo ssoUserInfo) { |
| | | // 重定向地址对象(重定向地址 |
| | | RedirectView redirectView = new RedirectView(); |
| | | String path = sysConfigService.selectConfigByKey("sys.qddz"); |
| | | String userName = sysUserVo.getUserName(); |
| | | String orgid = sysUserVo.getOrgid(); |
| | | String campusid = sysUserVo.getCampusid(); |
| | | Long deptId = sysUserVo.getDeptId(); |
| | | List<String> deptCodes = sysUserVo.getDeptCodes(); |
| | | List<String> wardCodes = sysUserVo.getWardCodes(); |
| | | String userName = ssoUserInfo.getUsername(); |
| | | String orgid = ssoUserInfo.getOrgid(); |
| | | String campusid = ssoUserInfo.getCampusid(); |
| | | String searchCondition = ""; |
| | | String deptCode = ssoUserInfo.getDeptCode(); |
| | | String wardCode = ssoUserInfo.getWardCode(); |
| | | try { |
| | | if (StringUtils.isEmpty(path)) { |
| | | throw new BaseException("请配置前端地址"); |
| | | } |
| | | if(ObjectUtils.isEmpty(deptId)){ |
| | | SysDept sysDeptVo = new SysDept(); |
| | | sysDeptVo.setOrgid(orgid); |
| | | sysDeptVo.setCampusid(campusid); |
| | | if(CollectionUtils.isNotEmpty(deptCodes)){ |
| | | sysDeptVo.setDeptType("1"); |
| | | sysDeptVo.setDeptCodes(deptCodes); |
| | | }else { |
| | | sysDeptVo.setDeptType("2"); |
| | | sysDeptVo.setDeptCodes(wardCodes); |
| | | } |
| | | List<SysDept> sysDepts = sysDeptService.selectSysDeptList(sysDeptVo); |
| | | if(CollectionUtils.isNotEmpty(sysDepts)){ |
| | | deptId = sysDepts.get(0).getDeptId(); |
| | | } |
| | | if(StringUtils.isNotEmpty(deptCode)){ |
| | | searchCondition = "&followUpDeptCode=" + deptCode; |
| | | }else if(StringUtils.isNotEmpty(wardCode)){ |
| | | searchCondition = "&followUpWardCode=" + deptCode; |
| | | } |
| | | String loginToken = loginService.loginByUserName(userName + "&" + orgid + "&null" + "&" + campusid); |
| | | String redirectUrl = path + "/loginSSO?token=" + loginToken + |
| | | "&orgid=" + orgid + "&campusid=" + campusid + |
| | | "&deptId=" + deptId + "&orgname=null&ZuHuID=null&deptCode=null"; |
| | | searchCondition + "&orgname=null&ZuHuID=null&deptCode=null"; |
| | | log.info("【SSO登录】重定向地址:{}", redirectUrl); |
| | | return buildRedirect(redirectUrl); |
| | | |