Commit e32d1a11d4435a5f96a21e5101368e37b293f662

Authored by jiangjiazhi
1 parent 676b4b9b8b

增加是否通知

Showing 3 changed files with 75 additions and 2 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/model/Users.java View file @ e32d1a1
... ... @@ -22,7 +22,26 @@
22 22 private Date created;
23 23 private String remarks;
24 24 private Date lastLoginTime;
  25 + private Integer zhiChenId;
  26 + private String zhiChen;
  27 +
  28 + public String getZhiChen() {
  29 + return zhiChen;
  30 + }
  31 +
  32 + public void setZhiChen(String zhiChen) {
  33 + this.zhiChen = zhiChen;
  34 + }
  35 +
25 36 private Integer otherAccount; //第三方帐号, 1医院帐号
  37 +
  38 + public Integer getZhiChenId() {
  39 + return zhiChenId;
  40 + }
  41 +
  42 + public void setZhiChenId(Integer zhiChenId) {
  43 + this.zhiChenId = zhiChenId;
  44 + }
26 45  
27 46 public Integer getOtherAccount() {
28 47 return otherAccount;
platform-common/src/main/java/com/lyms/platform/common/enums/ZhiChenEnums.java View file @ e32d1a1
  1 +package com.lyms.platform.common.enums;
  2 +
  3 +/**
  4 + * 医院职称
  5 + *
  6 + * Created by Administrator on 2016/7/27 0027.
  7 + */
  8 +public enum ZhiChenEnums {
  9 +
  10 + DOCTOR("医生",1),HUSHI("护士",2),ZHIGONG("职工",3),QITA("其他",4);
  11 +
  12 + private ZhiChenEnums(String name,Integer id){
  13 + this.id=id;
  14 + this.name=name;
  15 + }
  16 + public static String getById(Integer id){
  17 + for(ZhiChenEnums enums:values()){
  18 + if(enums.id==id){
  19 + return enums.getName();
  20 + }
  21 + }
  22 + return "";
  23 + }
  24 + private Integer id;
  25 + private String name;
  26 +
  27 + public Integer getId() {
  28 + return id;
  29 + }
  30 +
  31 + public void setId(Integer id) {
  32 + this.id = id;
  33 + }
  34 +
  35 + public String getName() {
  36 + return name;
  37 + }
  38 +
  39 + public void setName(String name) {
  40 + this.name = name;
  41 + }
  42 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java View file @ e32d1a1
... ... @@ -9,6 +9,7 @@
9 9 import com.lyms.platform.common.constants.ErrorCodeConstants;
10 10 import com.lyms.platform.common.enums.UserTypeEnum;
11 11 import com.lyms.platform.common.enums.YnEnums;
  12 +import com.lyms.platform.common.enums.ZhiChenEnums;
12 13 import com.lyms.platform.common.utils.*;
13 14 import com.lyms.platform.operate.web.facade.AccessPermissionFacade;
14 15 import com.lyms.platform.operate.web.result.FrontEndResult;
15 16  
... ... @@ -113,8 +114,16 @@
113 114 return frontEndResult;
114 115 }
115 116  
  117 + @RequestMapping(value = "/users/enums",method = RequestMethod.GET)
  118 + @ResponseBody
  119 + public Map getEnums(){
  120 + Map<Integer,Object> map=new HashMap();
  121 + for(ZhiChenEnums zhiChenEnums:ZhiChenEnums.values()){
  122 + map.put(zhiChenEnums.getId(),zhiChenEnums.getName());
  123 + }
  124 + return map;
  125 + }
116 126  
117   -
118 127 /**
119 128 * 获取用户列表
120 129 */
... ... @@ -634,7 +643,8 @@
634 643 @RequestParam(value = "phone", required = false) String phone,
635 644 @RequestParam(value = "enable", required = false) Integer enable,
636 645 @RequestParam(value = "remarks", required = false) String remarks,
637   - @RequestParam(value = "roleIds") String roleIds) {
  646 + @RequestParam(value = "roleIds") String roleIds,
  647 + @RequestParam(value = "zhiCId")Integer zhiCId) {
638 648  
639 649  
640 650 //获取登录用户
... ... @@ -705,6 +715,7 @@
705 715 users.setAccount(account);
706 716 users.setPhone(phone);
707 717 users.setEnable(enable);
  718 + users.setZhiChenId(zhiCId);
708 719 users.setPwd(MD5Utils.md5(password).toUpperCase());
709 720 users.setRemarks(remarks);
710 721 users.setKsId(ksId);
... ... @@ -713,6 +724,7 @@
713 724 users.setYn(YnEnums.YES.getId());
714 725 users.setModified(new Date());
715 726 users.setCreated(new Date());
  727 + users.setZhiChen(ZhiChenEnums.getById(zhiCId));
716 728 users.setLastLoginTime(new Date());
717 729 // users.setPwd(LoginUtil.md5(NumberUtils.getRandomString(6)));
718 730