فهرست منبع

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

liuwenbin 7 سال پیش
والد
کامیت
a5ff5ab833
14فایلهای تغییر یافته به همراه620 افزوده شده و 28 حذف شده
  1. 457 0
      common/common-entity/src/main/java/com/yihu/wlyy/entity/manage/User.java
  2. 25 16
      patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisScheduledController.java
  3. 17 4
      patient-co-manage/redis-cache/src/main/resources/application.yml
  4. 1 1
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/message/MessageService.java
  5. 1 1
      patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/service/MessageService.java
  6. 1 1
      patient-co/patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/service/MessageService.java
  7. 1 1
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java
  8. 15 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/manage/UserDao.java
  9. 14 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/DoctorInfoService.java
  10. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java
  11. 42 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandingService.java
  12. 14 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandlingController.java
  13. 30 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/account/DoctorController.java
  14. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/consult/ConsultController.java

+ 457 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/manage/User.java

@ -0,0 +1,457 @@
package com.yihu.wlyy.entity.manage;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.collect.ImmutableList;
import com.yihu.wlyy.entity.IdEntity;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;
/**
 * 用户表
 * @author George
 *
 */
@Entity
@Table(name = "wlyy_user")
public class User extends IdEntity {
    private static final long serialVersionUID = 5397123441067268436L;
	// 用户标识
	private String code;
    // 姓名
    private String name;
    // 手机号
    private String mobile;
    // 登录密码
    private String password;
    // 密码加密密钥
    private String salt;
    // 用户类型:1超级管理员,2医生   3客服管理员   4普通客服
    private int type;
    //用户类型名称
    private String typeName;
    //用户拥有的权限标识,以逗号分隔
    private String roles;
    // 用户找拥有的权限以逗号分隔
    private String roleName;
	// 添加日期
	private Date czrq;
	// 所属机构
	private long organizationId;
    // 所属机构名称
    private String organizationName;
    //客服工号
    private String jobNo;
    //客服坐席号
    private String seat;
    //客服电话
    private String phone;
    //是否在线 0不在线   1离开  2在线
    private String online;
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public String getSalt() {
        return salt;
    }
    public void setSalt(String salt) {
        this.salt = salt;
    }
    public int getType() {
        return type;
    }
    public void setType(int type) {
        this.type = type;
    }
    @Transient
    public String getTypeName() {
        return typeName;
    }
    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }
    public String getRoles() {
        return roles;
    }
    public void setRoles(String roles) {
        this.roles = roles;
    }
    @Transient
    @JsonIgnore
    public String getRoleName() {
        return roleName;
    }
    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getCzrq() {
        return czrq;
    }
    public void setCzrq(Date czrq) {
        this.czrq = czrq;
    }
    @Column(name = "organization_id")
    public long getOrganizationId() {
        return organizationId;
    }
    public void setOrganizationId(long organizationId) {
        this.organizationId = organizationId;
    }
    @Transient
    public String getOrganizationName() {
        return organizationName;
    }
    public void setOrganizationName(String organizationName) {
        this.organizationName = organizationName;
    }
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
    @Transient
    @JsonIgnore
    public List<String> getRoleList() {
        // 角色列表在数据库中实际以逗号分隔字符串存储,因此返回不能修改的List.
        return ImmutableList.copyOf(StringUtils.split("", ","));
    }
    public String getJobNo() {
        return jobNo;
    }
    public void setJobNo(String jobNo) {
        this.jobNo = jobNo;
    }
    public String getSeat() {
        return seat;
    }
    public void setSeat(String seat) {
        this.seat = seat;
    }
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
    public String getOnline() {
        return online;
    }
    public void setOnline(String online) {
        this.online = online;
    }
    /**
	 * 
	 */
//	private static final long serialVersionUID = 5397123441067268436L;
//
//	// 用户标识
//	private String code;
//	// 添加日期
//	private Date czrq;
//	//科室code
//	private String hospitalDept;
//	//是否签约 1是 0否
//	private String isSign;
//	//职务code
//	private String mbjob;
//	// 手机号
//	private String mobile;
//	// 姓名
//	private String name;
//	//部门code
//	private String organizationDept;
//	// 所属机构
//	private long organizationId;
//	// 登录密码
//	private String password;
//	//简介
//	private String  remark;
//	// 密码加密密钥
//	private String salt;
//	//性别
//	private String  sex;
//	//专场
//	private String speciality;
//	// 用户类型:1超级管理员,2医生
//	private int type;
//
//	// 用户找拥有的权限以逗号分隔
//	private String roles;
//	// 用户找拥有的权限以逗号分隔
//	private String roleName;
//	private String photo;
//	//职务code
//	private String mbjobName;;
//	//科室code
//	private String hospitalDeptName;
//
//	private String organizationDeptName;
//
//	public String getCode() {
//		return code;
//	}
//
//	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
//	public Date getCzrq() {
//		return czrq;
//	}
//
//	@Column(name = "hospital_dept")
//	public String getHospitalDept() {
//		return hospitalDept;
//	}
//
//	@Column(name = "is_sign")
//	public String getIsSign() {
//		return isSign;
//	}
//
//	@Column(name = "mbjob")
//	public String getMbjob() {
//		return mbjob;
//	}
//
//	public String getMobile() {
//		return mobile;
//	}
//
//	public String getName() {
//		return name;
//	}
//
//	@Column(name = "organization_dept")
//	public String getOrganizationDept() {
//		return organizationDept;
//	}
//
//	@Column(name = "organization_id")
//	public long getOrganizationId() {
//		return organizationId;
//	}
//
//	public String getPassword() {
//		return password;
//	}
//
//	@Column(name = "remark")
//	public String getRemark() {
//		return remark;
//	}
//
//	@Transient
//	@JsonIgnore
//	public List<String> getRoleList() {
//		// 角色列表在数据库中实际以逗号分隔字符串存储,因此返回不能修改的List.
//		return ImmutableList.copyOf(StringUtils.split("", ","));
//	}
//
//	public String getRoles() {
//		return roles;
//	}
//
//	public String getSalt() {
//		return salt;
//	}
//
//	public String getSex() {
//		return sex;
//	}
//
//
//
//	public String getPhoto() {
//		return photo;
//	}
//
//	public void setPhoto(String photo) {
//		this.photo = photo;
//	}
//
//	@Column(name = "speciality")
//	public String getSpeciality() {
//		return speciality;
//	}
//
//	public int getType() {
//		return type;
//	}
//
//	public void setCode(String code) {
//		this.code = code;
//	}
//
//	public void setCzrq(Date czrq) {
//		this.czrq = czrq;
//	}
//
//	public void setHospitalDept(String hospitalDept) {
//		this.hospitalDept = hospitalDept;
//	}
//
//	public void setIsSign(String isSign) {
//		this.isSign = isSign;
//	}
//
//	public void setMbjob(String mbjob) {
//		this.mbjob = mbjob;
//	}
//
//	public void setMobile(String mobile) {
//		this.mobile = mobile;
//	}
//
//	public void setName(String name) {
//		this.name = name;
//	}
//
//	public void setOrganizationDept(String organizationDept) {
//		this.organizationDept = organizationDept;
//	}
//
//	public void setOrganizationId(long organizationId) {
//		this.organizationId = organizationId;
//	}
//
//	public void setPassword(String password) {
//		this.password = password;
//	}
//
//	public void setRemark(String remark) {
//		this.remark = remark;
//	}
//
//	public void setRoles(String roles) {
//		this.roles = roles;
//	}
//
//	public void setSalt(String salt) {
//		this.salt = salt;
//	}
//
//	public void setSex(String sex) {
//		this.sex = sex;
//	}
//
//	public void setSpeciality(String speciality) {
//		this.speciality = speciality;
//	}
//
//	public void setType(int type) {
//		this.type = type;
//	}
//
//	@Override
//	public String toString() {
//		return ToStringBuilder.reflectionToString(this);
//	}
//
//	@Transient
//	public String getRoleName() {
//		return roleName;
//	}
//
//	public void setRoleName(String roleName) {
//		this.roleName = roleName;
//	}
//
//	@Transient
//	public String getMbjobName() {
//		return mbjobName;
//	}
//
//	public void setMbjobName(String mbjobName) {
//		this.mbjobName = mbjobName;
//	}
//
//	@Transient
//	public String getHospitalDeptName() {
//		return hospitalDeptName;
//	}
//
//	public void setHospitalDeptName(String hospitalDeptName) {
//		this.hospitalDeptName = hospitalDeptName;
//	}
//
//	@Transient
//	public String getOrganizationDeptName() {
//		return organizationDeptName;
//	}
//
//	public void setOrganizationDeptName(String organizationDeptName) {
//		this.organizationDeptName = organizationDeptName;
//	}
	
}

+ 25 - 16
patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisScheduledController.java

@ -27,10 +27,12 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.io.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
@ -50,18 +52,16 @@ public class RedisScheduledController {
    private String rdbFilePath;
    @Value("${ehr-redis.cache.memory.outFilePath}")
    private String outFilePath;
//    @Value("${ehr-redis.server.host}")
//    private String redisServerHost;
//    @Value("${ehr-redis.server.username}")
//    private String redisServerUsername;
//    @Value("${ehr-redis.server.password}")
//    private String redisServerPwd;
//    @Value("${ehr-redis.server.ssh-port}")
//    private int redisServerSshPort;
    private String redisServerHost = "";
    private String redisServerUsername = "";
    private String redisServerPwd = "";
    private int redisServerSshPort = 22;
    @Value("${ehr-redis.cache.memory.filename}")
    private String filename;
    @Value("${ehr-redis.server.host}")
    private String redisServerHost;
    @Value("${ehr-redis.server.username}")
    private String redisServerUsername;
    @Value("${ehr-redis.server.password}")
    private String redisServerPwd;
    @Value("${ehr-redis.server.ssh-port}")
    private int redisServerSshPort;
    @Autowired
    private RedisCacheKeyMemoryService redisCacheKeyMemoryService;
@ -84,20 +84,21 @@ public class RedisScheduledController {
    @RequestMapping(value = "/redis/cache/statistics/exportAndImportRedisMemoryData", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("导出 redis 内存分析报告,并导入到数据库")
    public void exportAndImportRedisMemoryData() {
    public String exportAndImportRedisMemoryData() {
        long start = System.currentTimeMillis();
        try {
            // 导出内存分析报告CSV文件(得到的内存值是近似值,比实际略小)
            // 生产环境服务器不允许代码直接通过SSH访问服务器,故暂时注释,另寻方法。
            exportRedisMemoryReport();
//            exportRedisMemoryReport();
            long export = System.currentTimeMillis();
            logger.info("成功导出Redis内存分析报告,耗时:" + (export - start) + " 毫秒");
            // 导入CSV格式的内存分析数据
            FlatFileItemReader<RedisCacheKeyMemory> itemReader = new FlatFileItemReader<>();
            itemReader.setResource(new FileSystemResource(outFilePath));
            itemReader.setResource(new FileSystemResource(outFilePath+filename));
            itemReader.setLinesToSkip(1);
            DefaultLineMapper<RedisCacheKeyMemory> lineMapper = new DefaultLineMapper<>();
            lineMapper.setLineTokenizer(new DelimitedLineTokenizer());
@ -114,6 +115,8 @@ public class RedisScheduledController {
            int i = 0;
            while ((redisCacheKeyMemory = itemReader.read()) != null) {
                redisCacheKeyMemory.setId(UuidUtil.randomUUID());
                redisCacheKeyMemory.setModifyDate(new Date());
                redisCacheKeyMemory.setCreateDate(new Date());
                redisCacheKeyMemoryList.add(redisCacheKeyMemory);
                if (redisCacheKeyMemoryList.size() == 1000) {
                    redisCacheKeyMemoryService.save(redisCacheKeyMemoryList);
@ -131,6 +134,7 @@ public class RedisScheduledController {
            e.printStackTrace();
            logger.error("发生异常:" + e.getMessage());
        }
        return "导出成功";
    }
    /**
@ -160,7 +164,11 @@ public class RedisScheduledController {
            InputStream in = channel.getInputStream();
            channel.connect();
            File outFile = new File(outFilePath);
            File file = new File(outFilePath);
            if(!file.exists()){
                file.mkdirs();
            }
            File outFile = new File(file,filename);
            if (!outFile.exists()){
                outFile.createNewFile();
            }
@ -179,6 +187,7 @@ public class RedisScheduledController {
            channel.disconnect();
            session.disconnect();
        } catch (Exception e) {
            e.printStackTrace();
            logger.error("生成Redis内存分析报告发生异常:" + e.getMessage());
            throw new Exception();
        } finally {

+ 17 - 4
patient-co-manage/redis-cache/src/main/resources/application.yml

@ -58,8 +58,13 @@ ehr-redis:
  cache:
    memory:
      rdbFilePath: /usr/local/bin/dump.rdb
      outFilePath: /usr/local/ehr/redisReport/memory.csv
      outFilePath: /usr/local/ehr/redisReport/
      filename: memory.csv
  server:
    host: 172.19.103.47
    username: root
    password: jkzl
    ssh-port: 22
---
spring:
  profiles: test
@ -73,7 +78,11 @@ spring:
    host: 172.19.103.88 # Redis server host.
    port: 6379 # Redis server port.
#    password: jkzl_ehr
  server:
    host: 172.19.103.47
    username: root
    password: jkzl
    ssh-port: 22
---
spring:
@ -88,4 +97,8 @@ spring:
    host: 27.155.101.77 # Redis server host.
    port: 6380 # Redis server port.
    password: jkzl_ehr
  server:
    host: 172.19.103.47
    username: root
    password: jkzl
    ssh-port: 22

+ 1 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/message/MessageService.java

@ -45,7 +45,7 @@ public class MessageService extends BaseService {
            if(messageNoticeSetting == null){
                messageNoticeSetting = new MessageNoticeSetting();
                messageNoticeSetting.setCreateTime(new Date());
                messageNoticeSetting.setFamilyTopicSwitch(1);
                messageNoticeSetting.setFamilyTopicSwitch(0);
                messageNoticeSetting.setCoordinationSwitch(1);
                messageNoticeSetting.setHealthSignSwitch(1);
                messageNoticeSetting.setImSwitch(1);

+ 1 - 1
patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/service/MessageService.java

@ -43,7 +43,7 @@ public class MessageService {
            if(messageNoticeSetting == null){
                messageNoticeSetting = new MessageNoticeSetting();
                messageNoticeSetting.setCreateTime(new Date());
                messageNoticeSetting.setFamilyTopicSwitch(1);
                messageNoticeSetting.setFamilyTopicSwitch(0);
                messageNoticeSetting.setCoordinationSwitch(1);
                messageNoticeSetting.setHealthSignSwitch(1);
                messageNoticeSetting.setImSwitch(1);

+ 1 - 1
patient-co/patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/service/MessageService.java

@ -42,7 +42,7 @@ public class MessageService {
            if(messageNoticeSetting == null){
                messageNoticeSetting = new MessageNoticeSetting();
                messageNoticeSetting.setCreateTime(new Date());
                messageNoticeSetting.setFamilyTopicSwitch(1);
                messageNoticeSetting.setFamilyTopicSwitch(0);
                messageNoticeSetting.setCoordinationSwitch(1);
                messageNoticeSetting.setHealthSignSwitch(1);
                messageNoticeSetting.setImSwitch(1);

+ 1 - 1
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java

@ -483,7 +483,7 @@ public class MessageService extends BaseService {
            if(messageNoticeSetting == null){
                messageNoticeSetting = new MessageNoticeSetting();
                messageNoticeSetting.setCreateTime(new Date());
                messageNoticeSetting.setFamilyTopicSwitch(1);
                messageNoticeSetting.setFamilyTopicSwitch(0);
                messageNoticeSetting.setCoordinationSwitch(1);
                messageNoticeSetting.setHealthSignSwitch(1);
                messageNoticeSetting.setImSwitch(1);

+ 15 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/manage/UserDao.java

@ -0,0 +1,15 @@
package com.yihu.wlyy.repository.manage;
import com.yihu.wlyy.entity.job.QuartzJobConfig;
import com.yihu.wlyy.entity.manage.User;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by chenweida on 2017/12/26.
 */
public interface UserDao  extends PagingAndSortingRepository<User, Integer>,JpaSpecificationExecutor<User> {
    @Query("from User where code=?1")
    User findByCode(String code);
}

+ 14 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/DoctorInfoService.java

@ -1551,4 +1551,18 @@ public class DoctorInfoService extends BaseService {
    }
    public List<Map<String,Object>>  getDoctorManagerRole(String code) {
        //获取医生在后台管理系统的权限  wlly_user的code是wlyy_doctor的code
        String sql=" select f.url url,f.code code from " +
                " wlyy_user u," +
                " manage_role_user ru," +
                " manage_role_feature rf," +
                " manage_feature f" +
                " WHERE" +
                " u.`code`=ru.user_code and" +
                " ru.role_id=rf.role_id and" +
                " rf.feature_id=f.id and" +
                " u.`code`='"+code+"'";
        return jdbcTemplate.queryForList(sql);
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java

@ -519,7 +519,7 @@ public class MessageService extends BaseService {
            if(messageNoticeSetting == null){
                messageNoticeSetting = new MessageNoticeSetting();
                messageNoticeSetting.setCreateTime(new Date());
                messageNoticeSetting.setFamilyTopicSwitch(1);
                messageNoticeSetting.setFamilyTopicSwitch(0);
                messageNoticeSetting.setCoordinationSwitch(1);
                messageNoticeSetting.setHealthSignSwitch(1);
                messageNoticeSetting.setImSwitch(1);

+ 42 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandingService.java

@ -1,15 +1,20 @@
package com.yihu.wlyy.web.data;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.manage.User;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.manage.UserDao;
import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.util.MD5;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
@ -22,6 +27,8 @@ public class DataHandingService {
    private PatientDao patientDao;
    @Autowired
    private DoctorDao doctorDao;
    @Autowired
    private UserDao userDao;
    @Transactional
    public String producePatientAndDoctorPassword() {
@ -59,5 +66,39 @@ public class DataHandingService {
        doctorDao.save(doctors);
        return "更新患者(默认身份证后六位):"+patientCount+",有身份证异常的患者:"+patientErrorCount+",更新医生(默认电话后六位):"+doctorCount+",有电话号码异常的医生:"+doctorErrorCount;
    }
    @Transactional
    public String initWLyyDoctorTable2WLyyUserTable() {
        JSONObject returnjo = new JSONObject();
        List<Doctor> doctors = doctorDao.findAllDoctors();
        List<String> errorCodes = new ArrayList<>();
        Integer success = 0;
        Integer error = 0;
        Integer exsit = 0;
        for (Doctor doctor : doctors) {
            try {
                //判断医生是否已经在wlyy_user表有值 有的话不在重新插入
                User user = userDao.findByCode(doctor.getCode());
                if (user != null) {
                    exsit++;
                    continue;
                }
                User userTemp = new User();
                user.setCode(doctor.getCode());
                user.setMobile(doctor.getMobile());
                user.setName(doctor.getName());
                user.setCzrq(new Date());
                user.setType(2); //医生
                userDao.save(userTemp);
                success++;
            } catch (Exception e) {
                error++;
                errorCodes.add(doctor.getCode());
            }
        }
        returnjo.put("success", success);//成功转移的医生
        returnjo.put("exsit", exsit); //已经存在的医生
        returnjo.put("error", error);//转移失败的医生
        returnjo.put("errorCode", errorCodes);//转移失败的医生code
        return returnjo.toString();
    }
}

+ 14 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandlingController.java

@ -72,5 +72,18 @@ public class DataHandlingController extends BaseController {
            return error(-1, e.getMessage());
        }
    }
    /**
     * 初始化wlyy_doctor的数据到wlyy_user
     * @return
     */
    @RequestMapping(value = "initWLyyDoctorTable2WLyyUserTable",method = RequestMethod.GET)
    @ResponseBody
    public String initWLyyDoctorTable2WLyyUserTable() {
        try {
            return write(200, dataHandingService.initWLyyDoctorTable2WLyyUserTable());
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
    }
}

+ 30 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/account/DoctorController.java

@ -2039,5 +2039,35 @@ public class DoctorController extends BaseController {
            return error(-1, "取消认证失败!");
        }
    }
    /**
     * 每日推送需要授权角色的功能 用后台管理系统的功能
     * 获取医生在后台管理系统的角色
     * {
     *     data:[
     *          {
     *          "url":"",
     *          "code":""
     *          }
     *     ]
     * }
     *
     * @return
     */
    @ResponseBody
    @RequestMapping(value = "/getDoctorManagerRole", method = RequestMethod.GET)
    public String getDoctorManagerRole(
            @ApiParam(required = false, name = "code", value = "医生code") @RequestParam(value = "code", required = false) String code
    ) {
        try {
            if (org.springframework.util.StringUtils.isEmpty(code)) {
                code = super.getUID();
            }
            List<Map<String, Object>> returnData = doctorInfoService.getDoctorManagerRole(code);
            return write(200, "获取成功", "data", returnData);
        } catch (Exception e) {
            error(e);
            return error(-1, "获取失败!");
        }
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/consult/ConsultController.java

@ -421,7 +421,7 @@ public class ConsultController extends WeixinBaseController {
                        flag = messageService.getMessageNoticeSettingByMessageType(doctorCode,"1", MessageNoticeSetting.MessageTypeEnum.imSwitch.getValue());
                    }else {
                        //全科
                        flag = messageService.getMessageNoticeSettingByMessageType(doctorCode,"1", MessageNoticeSetting.MessageTypeEnum.familyTopicSwitch.getValue());
                        flag = !messageService.getMessageNoticeSettingByMessageType(doctorCode,"1", MessageNoticeSetting.MessageTypeEnum.familyTopicSwitch.getValue());
                    }
                    if(flag){
                        pushMsgTask.put(doctorCode, MessageType.MESSAGE_TYPE_DOCTOR_NEW_CONSULT_TEAM.D_CT_01.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_CONSULT_TEAM.指定咨询.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_CONSULT_TEAM.您有新的指定咨询.name(), consult.getConsult());