Ver código fonte

咨询日志记录修改,随访增加返回字段

wujunjie 7 anos atrás
pai
commit
855d94bddf

+ 91 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/template/DoctorTeamGuidanceDetail.java

@ -0,0 +1,91 @@
package com.yihu.wlyy.entity.template;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by Reece on 2017/6/8.
 */
@Entity
@Table(name = "wlyy_team_guidance_detail")
public class DoctorTeamGuidanceDetail extends IdEntity {
    //    指导模板编码
    private String code;
    //    所属医生
    private String creater;
    //    模板名称(前端限10 后端限50)
    private String title;
    //    指导内容
    private String content;
    //    健康指导图片URL,多图以逗号分隔(至多9图)
    private String imagesUrl;
    //            创建时间
    private Date createTime;
    //    操作时间
    private Date czrq;
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getCreater() {
        return creater;
    }
    public void setCreater(String creater) {
        this.creater = creater;
    }
    @Column(name = "title", length = 50)
    public String getTitle() {
        return title;
    }
    @Column(name = "title", length = 50)
    public void setTitle(String title) {
        this.title = title;
    }
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    public String getImagesUrl() {
        return imagesUrl;
    }
    public void setImagesUrl(String imagesUrl) {
        this.imagesUrl = imagesUrl;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @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;
    }
}

+ 102 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/template/DoctorTeamGuidanceTemplate.java

@ -0,0 +1,102 @@
package com.yihu.wlyy.entity.template;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by Reece on 2017/6/8.
 * 医生端团队健康指导模板 团队与模板对应关系
 */
@Entity
@Table(name = "wlyy_team_guidance_template")
public class DoctorTeamGuidanceTemplate extends IdEntity {
    //    团队ID
    private long teamId;
    //    团队指导模板code
    private String teamTemplateCode;
    //    团队模板创建者
    private String creater;
    //     团队模板的标题
    private String title;
    //        团队内该模板被使用次数
    private int useTimes;
    //  模板创建时间
    private Date createTime;
    //        操作时间
    private Date czrq;
    //        团队内的团队模板状态  0删除  1正常
    private int del;
    public long getTeamId() {
        return teamId;
    }
    public void setTeamId(long teamId) {
        this.teamId = teamId;
    }
    public String getTeamTemplateCode() {
        return teamTemplateCode;
    }
    public void setTeamTemplateCode(String teamTemplateCode) {
        this.teamTemplateCode = teamTemplateCode;
    }
    public String getCreater() {
        return creater;
    }
    public void setCreater(String creater) {
        this.creater = creater;
    }
    @Column(name = "title", length = 50)
    public String getTitle() {
        return title;
    }
    @Column(name = "title", length = 50)
    public void setTitle(String title) {
        this.title = title;
    }
    public int getUseTimes() {
        return useTimes;
    }
    public void setUseTimes(int useTimes) {
        this.useTimes = useTimes;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @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;
    }
    public int getDel() {
        return del;
    }
    public void setDel(int del) {
        this.del = del;
    }
}

+ 7 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/template/DoctorTeamGuidanceDetailDao.java

@ -0,0 +1,7 @@
package com.yihu.wlyy.repository.template;
/**
 * Created by Reece on 2017/6/8.
 */
public interface DoctorTeamGuidanceDetailDao {
}

+ 7 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/template/DoctorTeamGuidanceTemplateDao.java

@ -0,0 +1,7 @@
package com.yihu.wlyy.repository.template;
/**
 * Created by Reece on 2017/6/8.
 */
public interface DoctorTeamGuidanceTemplateDao {
}

+ 115 - 23
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -13,6 +13,7 @@ import com.yihu.wlyy.entity.discussion.WlyyTalkGroup;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.doctor.team.sign.DoctorTeam;
import com.yihu.wlyy.entity.doctor.team.sign.DoctorTeamMember;
import com.yihu.wlyy.entity.education.HealthEduArticle;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.repository.consult.ConsultTeamDao;
@ -54,6 +55,7 @@ import java.util.*;
/**
 * 網絡諮詢类.
 * test
 *
 * @author George
 */
// Spring Service Bean的标识.
@ -686,7 +688,7 @@ public class ConsultTeamService extends ConsultService {
            } else {
                users.put(doctorTeamMemberHealthy.getMemberCode(), 0);
                if (doctorTeamMember != null) {
                    if(users.isNull(doctorTeamMember.getMemberCode())){
                    if (users.isNull(doctorTeamMember.getMemberCode())) {
                        users.put(doctorTeamMember.getMemberCode(), 1);
                    }
                }
@ -717,7 +719,7 @@ public class ConsultTeamService extends ConsultService {
                users.put(doctorTeamMemberHealthy.getMemberCode(), 0);
                if (doctorTeamMember != null) {
                    //全健同一个人导致会话成员状态问题处理
                    if(users.isNull(doctorTeamMember.getMemberCode())){
                    if (users.isNull(doctorTeamMember.getMemberCode())) {
                        users.put(doctorTeamMember.getMemberCode(), 1);
                    }
                }
@ -755,7 +757,7 @@ public class ConsultTeamService extends ConsultService {
//        JSONObject messages = ImUtill.getCreateTopicMessage(patient, tempPatient.getName(), consult.getTitle(), "咨询问题:"+consult.getSymptoms(), consult.getImages());
        JSONObject messages = ImUtill.getCreateTopicMessage(patient, tempPatient.getName(), consult.getTitle(), consult.getSymptoms(), consult.getImages());
        users.put(patient, 0);//+ " "+(tempPatient.getSex()==1?"(男 ":"(女 ") + IdCardUtil.getAgeForIdcard(tempPatient.getIdcard())+")"
        JSONObject obj = ImUtill.createTopics(patient +"_"+ct.getTeam()+"_" + ct.getType(), consult.getCode(), tempPatient.getName(), users, messages, ImUtill.SESSION_TYPE_MUC);
        JSONObject obj = ImUtill.createTopics(patient + "_" + ct.getTeam() + "_" + ct.getType(), consult.getCode(), tempPatient.getName(), users, messages, ImUtill.SESSION_TYPE_MUC);
        if (obj == null) {
            throw new RuntimeException("IM消息发送异常!");
        }
@ -837,14 +839,16 @@ public class ConsultTeamService extends ConsultService {
            //先判断从健康指导转咨询是否存在指导。
            JSONObject json = guidanceService.findById(ct.getGuidance());
            if (json == null) {
                //再判断从健康教育文章转咨询是否存在文章 20170602
                Object article = healthEduArticleService.findArticleById(ct.getGuidance());
                if(article == null) {
                    throw new Exception("guidance not exist");
                HealthEduArticle article = healthEduArticleService.findArticleById(ct.getGuidance());
                if (article != null) {
                    String result = verdictAddLogs(ct);
                    return result;
                }
            }else{
                throw new Exception("guidance not exist");
            } else {
                //  健康指导转咨询的指导内容
                content += "医生" + (json.get("doctorName") != null ? json.get("doctorName").toString() : "")
                        + "发出的指导:" + (json.getString("content") != null ? json.getString("content").toString() : "") + "<br/>";
            }
@ -909,6 +913,94 @@ public class ConsultTeamService extends ConsultService {
        return content;
    }
    /**
     * 添加三师咨询日志(增加咨询来源是否存在判断)
     *
     * @param ct
     * @throws Exception
     */
    private String verdictAddLogs(ConsultTeam ct) throws Exception {
        List<ConsultTeamLog> logs = new ArrayList<ConsultTeamLog>();
        // 添加问题咨询日志
        String content = "";
        if (ct.getGuidance() != null && ct.getGuidance() > 0) {
            //再判断从健康教育文章转咨询是否存在文章 20170602
            HealthEduArticle article = healthEduArticleService.findArticleById(ct.getGuidance());
            if (article == null) {
                throw new Exception("guidance not exist");
            } else {
                //  健康指导转咨询的指导内容
                JSONObject jsonArticle = new JSONObject();
                jsonArticle.put("doctorName", ct.getDoctorName()!=null?ct.getDoctorName():"");
                jsonArticle.put("content", article.getSummary());
                jsonArticle.put("czrq", article.getCzrq() != null ? DateUtil.dateToStr(article.getCzrq(), DateUtil.YYYY_MM_DD_HH_MM) : "");
                content += "医生" + (jsonArticle.get("doctorName") != null ? jsonArticle.get("doctorName").toString() : "")
                        + "发出的文章:" + (jsonArticle.getString("content") != null ? jsonArticle.getString("content").toString() : "") + "<br/>";
            }
        }
        content += "咨询问题:" + (StringUtils.isEmpty(ct.getSymptoms()) ? "无" : ct.getSymptoms());
        // 生成提问日志,并推送相关消息
        ConsultTeamLog infoLog = new ConsultTeamLog();
        infoLog.setConsult(ct.getConsult());
        infoLog.setContent(content);
        infoLog.setDel("1");
        infoLog.setType(0);
        infoLog.setChatType(1);
        infoLog.setCzrq(new Date());
        logs.add(infoLog);
        // 图片日志
        if (StringUtils.isNotEmpty(ct.getImages())) {
            String[] images = ct.getImages().split(",");
            for (String image : images) {
                if (StringUtils.isNoneEmpty(image)) {
                    ConsultTeamLog imgLog = new ConsultTeamLog();
                    // 设置咨询标识
                    imgLog.setConsult(ct.getConsult());
                    // 设置图片URL
                    imgLog.setContent(image);
                    imgLog.setDel("1");
                    infoLog.setType(0);
                    imgLog.setCzrq(new Date());
                    // 图片类型
                    imgLog.setChatType(2);
                    // 添加到待保存队列
                    logs.add(imgLog);
                }
            }
        }
        // 语音日志
        if (StringUtils.isNotEmpty(ct.getVoice())) {
            ConsultTeamLog voiceLog = new ConsultTeamLog();
            // 设置咨询标识
            voiceLog.setConsult(ct.getConsult());
            // 设置语音URL
            voiceLog.setContent(ct.getVoice());
            voiceLog.setDel("1");
            infoLog.setType(0);
            // 语音类型
            voiceLog.setChatType(3);
            voiceLog.setCzrq(new Date());
            // 添加到待保存队列
            logs.add(voiceLog);
        }
        if (!logs.isEmpty()) {
            Iterable<ConsultTeamLog> iterable = consultTeamLogDao.save(logs);
            if (iterable == null || iterable.iterator() == null || !iterable.iterator().hasNext()) {
                // 日志保存失败
                throw new Exception("consult team log save failed!");
            }
        }
        // 患者提问或追问,给医生发消息
        // sendMessage(ct.getDoctor(), ct.getPatient(), "三师咨询", "您有新的三师咨询消息", ct.getConsult(), 116, 1, 0, 0);
        return content;
    }
    /**
     * 查询咨询列表
     *
@ -1584,7 +1676,7 @@ public class ConsultTeamService extends ConsultService {
            ConsultTeam consultTeam = consultTeamDao.findByConsult(oldConsultCode);
            ct.setTeam(oldConsultCode);
            if (oldConsult != null && isSend == 1) {
                JSONObject messages = ImUtill.getCreateTopicMessage(doctorTemp.getCode(), doctorTemp.getName(), consult.getTitle(), "居民问题:"+oldConsult.getSymptoms(), oldConsult.getImages());
                JSONObject messages = ImUtill.getCreateTopicMessage(doctorTemp.getCode(), doctorTemp.getName(), consult.getTitle(), "居民问题:" + oldConsult.getSymptoms(), oldConsult.getImages());
                JSONObject jsonObject = new JSONObject();
                jsonObject.put(ct.getPatient(), 0);
                jsonObject.put(ct.getDoctor(), 0);
@ -1600,7 +1692,7 @@ public class ConsultTeamService extends ConsultService {
                    for (String url : imgs)
                        ImUtill.sendTopicIM(doctorTemp.getCode(), doctorTemp.getName(), consult.getCode(), "2", url);
                }
            }else if(oldConsult != null && isSend == 0){
            } else if (oldConsult != null && isSend == 0) {
                JSONObject messages = ImUtill.getCreateTopicMessage(doctorTemp.getCode(), doctorTemp.getName(), consult.getTitle(), content, oldConsult.getImages());
                JSONObject jsonObject = new JSONObject();
                jsonObject.put(ct.getPatient(), 0);
@ -1641,12 +1733,12 @@ public class ConsultTeamService extends ConsultService {
            String openId = p.getOpenid();
            JSONObject json = new JSONObject();
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            json.put("keyword1","满意度评价");
            json.put("keyword2",sdf.format(new Date()));
            json.put("keyword1", "满意度评价");
            json.put("keyword2", sdf.format(new Date()));
            json.put("toUser", p.getCode());
            json.put("remark", "");
            json.put("consult",consult);
            json.put("first", endName +",您好!您有1条咨询已结束,请及时对咨询医生进行满意度评价。");
            json.put("consult", consult);
            json.put("first", endName + ",您好!您有1条咨询已结束,请及时对咨询医生进行满意度评价。");
            PushMsgTask.getInstance().putWxMsg(accessTokenUtils.getAccessToken(), 17, openId, p.getName(), json);
        } else {
            if (endOperator.equals("admin")) {
@ -1657,18 +1749,18 @@ public class ConsultTeamService extends ConsultService {
                endId = d.getCode();
                endName = d.getName();
            }
            if(consultTeam.getType()==2){
            if (consultTeam.getType() == 2) {
                Patient p = patientDao.findByCode(consultTeam.getPatient());
                String name = p.getName();
                String openId = p.getOpenid();
                JSONObject json = new JSONObject();
                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                json.put("keyword1","满意度评价");
                json.put("keyword2",sdf.format(new Date()));
                json.put("keyword1", "满意度评价");
                json.put("keyword2", sdf.format(new Date()));
                json.put("toUser", p.getCode());
                json.put("remark", "");
                json.put("consult",consult);
                json.put("first", name +",您好!您有1条咨询已结束,请及时对咨询医生进行满意度评价。");
                json.put("consult", consult);
                json.put("first", name + ",您好!您有1条咨询已结束,请及时对咨询医生进行满意度评价。");
                PushMsgTask.getInstance().putWxMsg(accessTokenUtils.getAccessToken(), 17, openId, p.getName(), json);
            }
        }
@ -1774,13 +1866,13 @@ public class ConsultTeamService extends ConsultService {
        consultTeamDao.save(ct);  // 保存医生咨询信息
        consultTeamDoctorDao.save(cd);
        consultDao.save(consult);
        if(array==null||array.length()==0){
        if (array == null || array.length() == 0) {
            //由于IM是异步操作,会话生成后,可能还未生成到数据库导致无法
            //获取会话ID。休眠1秒后继续获取相应信息
            // PS:可以通过前端请求两次去解决,由于离职,就不挖坑了,后来者可以改善、
             Thread.sleep(1000);
             object = ImUtill.getTopic(ct.getConsult());
             array = new JSONArray(object.get("data").toString());
            Thread.sleep(1000);
            object = ImUtill.getTopic(ct.getConsult());
            array = new JSONArray(object.get("data").toString());
        }
        return array.getJSONObject(0);
    }

+ 10 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowUpService.java

@ -81,6 +81,7 @@ public class FollowUpService extends BaseService {
    @Autowired
    private PatientService patientService;
    /**
     * 转译随访信息
     */
@ -214,6 +215,13 @@ public class FollowUpService extends BaseService {
            for (Object obj : result) {
                JSONObject followup = new JSONObject();
                Object[] objArr = (Object[]) obj;
//              返回值增加居民信息
                Patient patientDetail = patientDao.findByCode(patient);
                followup.put("patientName", patientDetail.getName()!=null?patientDetail.getName():"");
                followup.put("photo", patientDetail.getPhoto()!=null?patientDetail.getPhoto():"");
                followup.put("sex", patientDetail.getSex()!=null?patientDetail.getSex():"");
                followup.put("birthday", patientDetail.getBirthday()!=null?patientDetail.getBirthday():"");
                followup.put("id", objArr[15]);
                followup.put("followupNo", objArr[16]);
                followup.put("doctorCode", objArr[0]);
@ -227,8 +235,8 @@ public class FollowUpService extends BaseService {
                followup.put("statusName", objArr[5] == null ? "" : (statusMap.get(objArr[5].toString()) != null ? statusMap.get(objArr[5].toString()) : ""));
                followup.put("createTime", objArr[6] != null ? DateUtil.dateToStrLong((Date)objArr[6]) : "");
                followup.put("updateTime", objArr[7] != null ? DateUtil.dateToStrLong((Date)objArr[7]) : "");
                followup.put("managerStatus", objArr[8] == null ? "" : objArr[8]);
                followup.put("managerStatusName", objArr[8] == null ? "" : (mngStatusMap.get(objArr[8].toString()) != null ? mngStatusMap.get(objArr[8].toString()) : ""));
                followup.put("followupManagerStatus", objArr[8] == null ? "" : objArr[8]);
                followup.put("followupManagerStatusName", objArr[8] == null ? "" : (mngStatusMap.get(objArr[8].toString()) != null ? mngStatusMap.get(objArr[8].toString()) : ""));
                followup.put("creatorCode", objArr[9]);
                followup.put("creatorName", objArr[10]);
                followup.put("creatorPhoto", objArr[11]);

+ 168 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorTeamGuidanceController.java

@ -0,0 +1,168 @@
package com.yihu.wlyy.web.doctor.health;
import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
import com.yihu.wlyy.entity.patient.PatientHealthStandard;
import com.yihu.wlyy.health.entity.DevicePatientHealthIndex;
import com.yihu.wlyy.service.app.health.PatientHealthIndexService;
import com.yihu.wlyy.service.app.team.AdminTeamService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.SystemConf;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
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.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.*;
/**
 * 医生端、后端团队指导模板控制类
 */
@Controller
@RequestMapping(value = "/doctor/team/guidance", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "医生端&后端团队指导模板")
public class DoctorTeamGuidanceController extends BaseController {
    @Autowired
    private AdminTeamService adminTeamService;
    /**
     * 获取医生所属的所有团队
     *
     * @return
     */
    @RequestMapping(value = "/getDoctorTeams", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("获取医生所属的所有团队")
    public String getHealthIndexHistory() {
        try {
            String doctorCode = getUID();
            List<AdminTeam> doctorTeams = adminTeamService.getDoctorTeams(doctorCode);
            List teamList = new ArrayList();
            for (AdminTeam AdminTeam : doctorTeams) {
                Map map = new HashMap();
                String teamName = AdminTeam.getName();
                Long teamId = AdminTeam.getId();
                map.put("teamName", teamName);
                map.put("teamId", teamId);
                teamList.add(map);
            }
            return write(200, "获取医生所属团队成功!", "teamList", teamList);
        } catch (Exception e) {
            return invalidUserException(e, -1, e.getMessage());
        }
    }
    /**
     * 根据医生所属的单个团队获取团队模板列表
     * @param teamId
     * @return
     */
    @RequestMapping(value = "/getTeamGuidanceList", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("获取单个团队模板列表")
    public String getTeamGuidanceList(@RequestParam Long teamId,
                                      @RequestParam int pageNo,
                                      @RequestParam int pageSize) {
        try {
            String doctorCode = getUID();
            List<AdminTeam> doctorTeams = adminTeamService.getDoctorTeams(doctorCode);
            return write(200, "获取团队模板列表成功!", "templateList", "");
        } catch (Exception e) {
            return invalidUserException(e, -1, e.getMessage());
        }
    }
    /**
     * 获取医生所属的所有团队
     *
     * @return
     */
    @RequestMapping(value = "/getTeamGuidanceDetail", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("获取医生所属的所有团队")
    public String getTeamGuidanceDetail() {
        try {
            String doctorCode = getUID();
            List<AdminTeam> doctorTeams = adminTeamService.getDoctorTeams(doctorCode);
            List teamList = new ArrayList();
            for (AdminTeam AdminTeam : doctorTeams) {
                Map map = new HashMap();
                String teamName = AdminTeam.getName();
                Long teamId = AdminTeam.getId();
                map.put("teamName", teamName);
                map.put("teamId", teamId);
                teamList.add(map);
            }
            return write(200, "获取医生所属成功!", "teamList", teamList);
        } catch (Exception e) {
            return invalidUserException(e, -1, e.getMessage());
        }
    }
    /**
     * 获取医生所属的所有团队
     *
     * @return
     */
    @RequestMapping(value = "/saveOrModifyTeamGuidance", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("获取医生所属的所有团队")
    public String saveOrModifyTeamGuidance() {
        try {
            String doctorCode = getUID();
            List<AdminTeam> doctorTeams = adminTeamService.getDoctorTeams(doctorCode);
            List teamList = new ArrayList();
            for (AdminTeam AdminTeam : doctorTeams) {
                Map map = new HashMap();
                String teamName = AdminTeam.getName();
                Long teamId = AdminTeam.getId();
                map.put("teamName", teamName);
                map.put("teamId", teamId);
                teamList.add(map);
            }
            return write(200, "获取医生所属成功!", "teamList", teamList);
        } catch (Exception e) {
            return invalidUserException(e, -1, e.getMessage());
        }
    }
    /**
     * 获取医生所属的所有团队
     *
     * @return
     */
    @RequestMapping(value = "/deleteTeamGuidance", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("获取医生所属的所有团队")
    public String deleteTeamGuidance() {
        try {
            String doctorCode = getUID();
            List<AdminTeam> doctorTeams = adminTeamService.getDoctorTeams(doctorCode);
            List teamList = new ArrayList();
            for (AdminTeam AdminTeam : doctorTeams) {
                Map map = new HashMap();
                String teamName = AdminTeam.getName();
                Long teamId = AdminTeam.getId();
                map.put("teamName", teamName);
                map.put("teamId", teamId);
                teamList.add(map);
            }
            return write(200, "获取医生所属成功!", "teamList", teamList);
        } catch (Exception e) {
            return invalidUserException(e, -1, e.getMessage());
        }
    }
}