Commit 020dce43863461a308770dc6f2f06531bcf51f70
1 parent
b1a376cd9c
Exists in
master
and in
6 other branches
登录url地址添加
Showing 3 changed files with 59 additions and 45 deletions
platform-biz-service/src/main/java/com/lyms/platform/permission/model/Users.java
View file @
020dce4
| ... | ... | @@ -30,6 +30,17 @@ |
| 30 | 30 | //当前方式 |
| 31 | 31 | private Integer bType; |
| 32 | 32 | |
| 33 | + //默认页面 | |
| 34 | + private String defaultPage; | |
| 35 | + | |
| 36 | + public String getDefaultPage() { | |
| 37 | + return defaultPage; | |
| 38 | + } | |
| 39 | + | |
| 40 | + public void setDefaultPage(String defaultPage) { | |
| 41 | + this.defaultPage = defaultPage; | |
| 42 | + } | |
| 43 | + | |
| 33 | 44 | public Integer getbType() { |
| 34 | 45 | return bType; |
| 35 | 46 | } |
| ... | ... | @@ -157,7 +168,6 @@ |
| 157 | 168 | public void setRoles(List<Roles> roles) { |
| 158 | 169 | this.roles = roles; |
| 159 | 170 | } |
| 160 | - | |
| 161 | 171 | |
| 162 | 172 | |
| 163 | 173 | public Integer getId() { |
platform-biz-service/src/main/resources/mainOrm/master/MasterUsers.xml
View file @
020dce4
| ... | ... | @@ -25,19 +25,20 @@ |
| 25 | 25 | <result column="employee_id" property="employeeId" jdbcType="VARCHAR"/> |
| 26 | 26 | <result column="other_account" property="otherAccount" jdbcType="INTEGER"/> |
| 27 | 27 | <result column="zhiChenId" property="zhiChenId" jdbcType="INTEGER"/> |
| 28 | + <result column="defaultpage" property="defaultPage" jdbcType="INTEGER"/> | |
| 28 | 29 | </resultMap> |
| 29 | 30 | |
| 30 | 31 | <insert id="addUsers" parameterType="com.lyms.platform.permission.model.Users"> |
| 31 | 32 | <selectKey order="AFTER" keyProperty="id" resultType="java.lang.Integer">SELECT LAST_INSERT_ID()</selectKey> |
| 32 | 33 | insert into users |
| 33 | - (foreign_id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time,ks_id,zhiChenId | |
| 34 | + (foreign_id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time,ks_id,zhiChenId,defaultpage | |
| 34 | 35 | |
| 35 | 36 | <if test="id != null and id >= 0"> |
| 36 | 37 | ,id |
| 37 | 38 | </if> |
| 38 | 39 | ) |
| 39 | 40 | values |
| 40 | - (#{foreignId},#{logincenterId},#{type},#{orgId},#{deptId},#{name},#{account},#{pwd},#{phone},#{publishId},#{publishName},#{yn},#{enable},#{modified},#{created},#{remarks},#{lastLoginTime},#{ksId},#{zhiChenId} | |
| 41 | + (#{foreignId},#{logincenterId},#{type},#{orgId},#{deptId},#{name},#{account},#{pwd},#{phone},#{publishId},#{publishName},#{yn},#{enable},#{modified},#{created},#{remarks},#{lastLoginTime},#{ksId},#{zhiChenId},#{defaultPage} | |
| 41 | 42 | <if test="id != null and id >= 0"> |
| 42 | 43 | ,#{id} |
| 43 | 44 | </if> |
| ... | ... | @@ -108,6 +109,10 @@ |
| 108 | 109 | <if test="zhiChenId !=null"> |
| 109 | 110 | zhiChenId =#{zhiChenId,jdbcType=VARCHAR}, |
| 110 | 111 | </if> |
| 112 | + <if test="defaultPage !=null"> | |
| 113 | + defaultpage=#{defaultPage,jdbcType=VARCHAR} | |
| 114 | + </if> | |
| 115 | + | |
| 111 | 116 | </set> |
| 112 | 117 | where id = #{id,jdbcType=INTEGER} |
| 113 | 118 | </update> |
| 114 | 119 | |
| ... | ... | @@ -119,12 +124,12 @@ |
| 119 | 124 | |
| 120 | 125 | |
| 121 | 126 | <select id="getUsers" resultMap="UsersResultMap" parameterType="java.lang.Integer"> |
| 122 | -select id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time, ks_id,foreign_id,other_account,zhiChenId | |
| 127 | +select id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time, ks_id,foreign_id,other_account,zhiChenId,defaultpage | |
| 123 | 128 | from users where id = #{id,jdbcType=INTEGER} |
| 124 | 129 | </select> |
| 125 | 130 | |
| 126 | 131 | <select id="getUsersByLoginCenterId" resultMap="UsersResultMap" parameterType="java.lang.Integer"> |
| 127 | - select id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time, ks_id,foreign_id,other_account,zhiChenId | |
| 132 | + select id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time, ks_id,foreign_id,other_account,zhiChenId,defaultpage | |
| 128 | 133 | from users where logincenter_id = #{id,jdbcType=INTEGER} and enable =1 order by last_login_time desc |
| 129 | 134 | </select> |
| 130 | 135 | |
| ... | ... | @@ -230,7 +235,7 @@ |
| 230 | 235 | <select id="queryUsers" resultMap="UsersResultMap" parameterType="com.lyms.platform.permission.model.UsersQuery"> |
| 231 | 236 | select |
| 232 | 237 | id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time, |
| 233 | - ks_id,foreign_id,other_account,zhiChenId | |
| 238 | + ks_id,foreign_id,other_account,zhiChenId,defaultpage | |
| 234 | 239 | from users |
| 235 | 240 | <include refid="UsersCondition"/> |
| 236 | 241 | <include refid="orderAndLimit"/> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
020dce4
| ... | ... | @@ -207,23 +207,22 @@ |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | |
| 210 | - | |
| 211 | 210 | @RequestMapping(value = "/usersbyorg", method = RequestMethod.GET) |
| 212 | 211 | @TokenRequired |
| 213 | 212 | @ResponseBody |
| 214 | - public BaseListResponse getUsers(@RequestParam(value = "orgId", required = false) String orgId){ | |
| 213 | + public BaseListResponse getUsers(@RequestParam(value = "orgId", required = false) String orgId) { | |
| 215 | 214 | UsersQuery usersQuery = new UsersQuery(); |
| 216 | 215 | List data = new ArrayList(); |
| 217 | - if(NumberUtils.isNumber(orgId)){ | |
| 216 | + if (NumberUtils.isNumber(orgId)) { | |
| 218 | 217 | usersQuery.setYn(YnEnums.YES.getId()); |
| 219 | 218 | usersQuery.setType(1); |
| 220 | 219 | usersQuery.setOrgId(Integer.valueOf(orgId)); |
| 221 | 220 | List<Users> usersList = usersService.queryUsers(usersQuery); |
| 222 | 221 | |
| 223 | - for(Users users1:usersList){ | |
| 222 | + for (Users users1 : usersList) { | |
| 224 | 223 | Map map = new HashMap(); |
| 225 | - map.put("id",users1.getId()); | |
| 226 | - map.put("name",users1.getName()); | |
| 224 | + map.put("id", users1.getId()); | |
| 225 | + map.put("name", users1.getName()); | |
| 227 | 226 | data.add(map); |
| 228 | 227 | } |
| 229 | 228 | } |
| ... | ... | @@ -291,8 +290,7 @@ |
| 291 | 290 | try { |
| 292 | 291 | ids = new ArrayList<>(); |
| 293 | 292 | ids.add(Integer.parseInt(orgId)); |
| 294 | - }catch (Exception e) | |
| 295 | - { | |
| 293 | + } catch (Exception e) { | |
| 296 | 294 | FrontEndResult frontEndResult = new FrontEndResult(); |
| 297 | 295 | frontEndResult.setData(null); |
| 298 | 296 | frontEndResult.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 299 | 297 | |
| 300 | 298 | |
| ... | ... | @@ -553,32 +551,32 @@ |
| 553 | 551 | organizations = organizationService.queryOrganization(organizationQuery); |
| 554 | 552 | } else { |
| 555 | 553 | Organization organization = organizationService.getOrganization(users.getOrgId()); |
| 556 | - if(null!=organization&&StringUtils.isNotEmpty(organization.getCityId())){ | |
| 557 | - BasicConfig bg= basicConfigService.getOneBasicConfigById(organization.getCityId()); | |
| 558 | - Map<String,String> map = new HashMap<>(); | |
| 559 | - map.put("id",organization.getCityId()); | |
| 560 | - if(null!=bg){ | |
| 561 | - map.put("name",bg.getName()); | |
| 554 | + if (null != organization && StringUtils.isNotEmpty(organization.getCityId())) { | |
| 555 | + BasicConfig bg = basicConfigService.getOneBasicConfigById(organization.getCityId()); | |
| 556 | + Map<String, String> map = new HashMap<>(); | |
| 557 | + map.put("id", organization.getCityId()); | |
| 558 | + if (null != bg) { | |
| 559 | + map.put("name", bg.getName()); | |
| 562 | 560 | } |
| 563 | 561 | organization.setCity(map); |
| 564 | 562 | } |
| 565 | 563 | |
| 566 | - if(null!=organization&&StringUtils.isNotEmpty(organization.getProvinceId())){ | |
| 567 | - BasicConfig bg= basicConfigService.getOneBasicConfigById(organization.getProvinceId()); | |
| 568 | - Map<String,String> map = new HashMap<>(); | |
| 569 | - map.put("id",organization.getProvinceId()); | |
| 570 | - if(null!=bg){ | |
| 571 | - map.put("name",bg.getName()); | |
| 564 | + if (null != organization && StringUtils.isNotEmpty(organization.getProvinceId())) { | |
| 565 | + BasicConfig bg = basicConfigService.getOneBasicConfigById(organization.getProvinceId()); | |
| 566 | + Map<String, String> map = new HashMap<>(); | |
| 567 | + map.put("id", organization.getProvinceId()); | |
| 568 | + if (null != bg) { | |
| 569 | + map.put("name", bg.getName()); | |
| 572 | 570 | } |
| 573 | 571 | organization.setProvince(map); |
| 574 | 572 | } |
| 575 | 573 | |
| 576 | - if(null!=organization&&StringUtils.isNotEmpty(organization.getAreaId())){ | |
| 577 | - BasicConfig bg= basicConfigService.getOneBasicConfigById(organization.getAreaId()); | |
| 578 | - Map<String,String> map = new HashMap<>(); | |
| 579 | - map.put("id",organization.getAreaId()); | |
| 580 | - if(null!=bg){ | |
| 581 | - map.put("name",bg.getName()); | |
| 574 | + if (null != organization && StringUtils.isNotEmpty(organization.getAreaId())) { | |
| 575 | + BasicConfig bg = basicConfigService.getOneBasicConfigById(organization.getAreaId()); | |
| 576 | + Map<String, String> map = new HashMap<>(); | |
| 577 | + map.put("id", organization.getAreaId()); | |
| 578 | + if (null != bg) { | |
| 579 | + map.put("name", bg.getName()); | |
| 582 | 580 | } |
| 583 | 581 | organization.setArea(map); |
| 584 | 582 | } |
| ... | ... | @@ -623,8 +621,7 @@ |
| 623 | 621 | diagnoseConfigQuery.setHospitalId(hospitalId); |
| 624 | 622 | //医院配置 |
| 625 | 623 | List<ModularFunctionConfigModel> configModels = modularFunctionConfigServcie.queryDiagnoseConfigs(diagnoseConfigQuery); |
| 626 | - if (CollectionUtils.isNotEmpty(configModels)) | |
| 627 | - { | |
| 624 | + if (CollectionUtils.isNotEmpty(configModels)) { | |
| 628 | 625 | ModularFunctionConfigModel configModel = configModels.get(0); |
| 629 | 626 | map.put("modularFunction", configModel.getConfigs()); |
| 630 | 627 | } |
| ... | ... | @@ -854,7 +851,8 @@ |
| 854 | 851 | @RequestParam(value = "enable", required = false) Integer enable, |
| 855 | 852 | @RequestParam(value = "remarks", required = false) String remarks, |
| 856 | 853 | @RequestParam(value = "roleIds") String roleIds, |
| 857 | - @RequestParam(value = "zhiCId") Integer zhiCId) { | |
| 854 | + @RequestParam(value = "zhiCId") Integer zhiCId, | |
| 855 | + @RequestParam(value = "defaultPage", required = false) String defaultPage) { | |
| 858 | 856 | |
| 859 | 857 | |
| 860 | 858 | //获取登录用户 |
| ... | ... | @@ -935,6 +933,7 @@ |
| 935 | 933 | users.setModified(new Date()); |
| 936 | 934 | users.setCreated(new Date()); |
| 937 | 935 | users.setZhiChen(ZhiChenEnums.getById(zhiCId)); |
| 936 | + user.setDefaultPage(defaultPage); | |
| 938 | 937 | // users.setLastLoginTime(new Date()); |
| 939 | 938 | // users.setPwd(LoginUtil.md5(NumberUtils.getRandomString(6))); |
| 940 | 939 | |
| ... | ... | @@ -943,7 +942,7 @@ |
| 943 | 942 | loginContext.setErrormsg("系统错误"); |
| 944 | 943 | //关联登录中心ID |
| 945 | 944 | if (StringUtils.isNotBlank(phone) || StringUtils.isNotBlank(account)) { |
| 946 | - /**/ | |
| 945 | + /**/ | |
| 947 | 946 | String pwd = null; |
| 948 | 947 | if (StringUtils.isNotBlank(password)) { |
| 949 | 948 | pwd = MD5Utils.md5(password).toUpperCase(); |
| ... | ... | @@ -1003,7 +1002,8 @@ |
| 1003 | 1002 | @RequestParam(value = "roleIds", required = false) String roleIds, |
| 1004 | 1003 | @RequestParam(value = "orgId", required = false) Integer orgId, |
| 1005 | 1004 | @RequestParam(value = "deptId", required = false) Integer deptId, |
| 1006 | - @RequestParam(value = "zhiCId") Integer zhiCId) { | |
| 1005 | + @RequestParam(value = "zhiCId") Integer zhiCId, | |
| 1006 | + @RequestParam(value = "defaultPage") String defaultPage) { | |
| 1007 | 1007 | |
| 1008 | 1008 | if (StringUtils.isBlank(phone) && StringUtils.isBlank(account)) { |
| 1009 | 1009 | ResultUtils.buildParameterErrorResultAndWrite(response, "帐号和手机号不能同时为空"); |
| 1010 | 1010 | |
| ... | ... | @@ -1109,12 +1109,13 @@ |
| 1109 | 1109 | users.setDeptId(deptId); |
| 1110 | 1110 | users.setOrgId(orgId); |
| 1111 | 1111 | users.setZhiChenId(zhiCId); |
| 1112 | + users.setDefaultPage(defaultPage); | |
| 1112 | 1113 | // users.setPwd(LoginUtil.md5(NumberUtils.getRandomString(6))); |
| 1113 | 1114 | usersService.updateUsers(users); |
| 1114 | 1115 | |
| 1115 | 1116 | |
| 1116 | 1117 | operateLogFacade.addModifyOptLog(user.getId(), |
| 1117 | - user.getOrgId(), berfore,users, OptActionEnums.UPDATE.getId(), "修改用户"); | |
| 1118 | + user.getOrgId(), berfore, users, OptActionEnums.UPDATE.getId(), "修改用户"); | |
| 1118 | 1119 | |
| 1119 | 1120 | //如有角色,则对用户角色中间表先删除后新增 |
| 1120 | 1121 | if (StringUtils.isNotBlank(roleIds)) { |
| 1121 | 1122 | |
| 1122 | 1123 | |
| 1123 | 1124 | |
| ... | ... | @@ -1318,16 +1319,15 @@ |
| 1318 | 1319 | if (StringUtils.isNotEmpty(token)) { |
| 1319 | 1320 | String hospitalId = autoMatchFacade.getHospitalId(getUserId(request)); |
| 1320 | 1321 | iSessionProvider.removeSession(token); |
| 1321 | - Map<String,String> param = new HashMap<>(); | |
| 1322 | + Map<String, String> param = new HashMap<>(); | |
| 1322 | 1323 | param.put("token", token); |
| 1323 | - if(StringUtils.isNotEmpty(hospitalId)){ | |
| 1324 | + if (StringUtils.isNotEmpty(hospitalId)) { | |
| 1324 | 1325 | operateLogFacade.addAddOptLog(getUserId(request), |
| 1325 | 1326 | Integer.parseInt(hospitalId), param, OptActionEnums.ADD.getId(), "用户登出"); |
| 1326 | 1327 | } |
| 1327 | - if ("2100001635".equals(hospitalId)) | |
| 1328 | - { | |
| 1328 | + if ("2100001635".equals(hospitalId)) { | |
| 1329 | 1329 | System.out.println("威海医生登出,登出虚拟叫号!"); |
| 1330 | - virtualCallService.callLoginOut(request,getUserId(request)); | |
| 1330 | + virtualCallService.callLoginOut(request, getUserId(request)); | |
| 1331 | 1331 | } |
| 1332 | 1332 | } |
| 1333 | 1333 | Map<String, Object> result = new HashMap<>(); |
| ... | ... | @@ -1359,7 +1359,6 @@ |
| 1359 | 1359 | } |
| 1360 | 1360 | |
| 1361 | 1361 | |
| 1362 | - | |
| 1363 | 1362 | @RequestMapping(value = "/getSysDoctorInfo/{userId}", method = RequestMethod.GET) |
| 1364 | 1363 | @ResponseBody |
| 1365 | 1364 | public BaseResponse getSysDoctorInfo(@PathVariable("userId") String userId) { |
| ... | ... | @@ -1375,7 +1374,7 @@ |
| 1375 | 1374 | } |
| 1376 | 1375 | if (null != departments) { |
| 1377 | 1376 | result.put("zhiCheng", ZhiChenEnums.getById(users.getZhiChenId())); |
| 1378 | - result.put("deptPhone",users.getPhone()); | |
| 1377 | + result.put("deptPhone", users.getPhone()); | |
| 1379 | 1378 | result.put("deptName", departments.getName()); |
| 1380 | 1379 | } |
| 1381 | 1380 | objectResponse.setData(result); |