Procházet zdrojové kódy

Merge branch 'dev' of wangzhinan/patient-co-management into dev

trick9191 před 7 roky
rodič
revize
82732478b4

+ 1 - 1
common/common-entity/src/main/java/com/yihu/wlyy/entity/message/Message.java

@ -30,7 +30,7 @@ public class Message extends IdEntity {
	/** type
	 *  消息类型(1.是家庭签约信息  2.体征消息  3分配健管师 4.随访提醒 5.咨询回复提醒,6.续方咨询待审核提醒,7.续方消息待取药
	 *  8.续方支付成功后团队长分配健管师,9线下调整完成,10意见反馈 11账号申诉,12.协同服务 13.孕检提醒 14.文章提交审核消息  15、健康文章审核结果
	 *  16.专科医生申请签约消息 18.专科医生同意签约发送给全科医生消息
	 *  16.专科医生申请签约消息,17、家庭医生转诊预约消息
	 *  101患者申请取消签约、102患者同意取消签约、103患者拒绝取消签约、104患者填写了血糖记录、105患者填写了血压记录、106患者填写了体重记录、
	 *  107患者填写了腰围记录、108患者填写了运动记录、109患者填写了用药记录、110患者填写了饮食记录、111患者提交了问卷随访、112请求添加好友消息、
	 *  113入群消息、114群解散消息、115踢出群消息、116新的网络咨询、117网络咨询追问、

+ 5 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/doctor/SurveyScreenResultDao.java

@ -11,6 +11,7 @@ import java.util.List;
 * Created by zhangdan on 2018/7/2.
 */
public interface SurveyScreenResultDao extends PagingAndSortingRepository<SurveyScreenResult, Long> {
    @Query("select surveyScreenResult from SurveyScreenResult surveyScreenResult where surveyScreenResult.code=?1")
    SurveyScreenResult getSurveyScreenResultByCode(String code);
@ -23,4 +24,8 @@ public interface SurveyScreenResultDao extends PagingAndSortingRepository<Survey
    @Modifying
    @Query("update SurveyScreenResult s set s.isAgain=0 where s.code=?1")
    void updateNoAgain(String code);
    @Query("select a from  SurveyScreenResult a where a.reservationCode=?1")
    List<SurveyScreenResult> getByReservationCode(String reservationCode);
}

+ 23 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java

@ -60,7 +60,7 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query("update Message a set a.read = 0 where a.receiver = ?1 and a.sender=?2 and a.tzType=?3")
    int updateHealthIndexMessageByPatient(String doctor, String patient, String type);
    @Query("select a from Message a where a.read= 1 and a.receiver = ?1 and a.type not in (1,2,6,7,12,101,14,15) order by a.czrq desc")
    @Query("select a from Message a where a.read= 1 and a.receiver = ?1 and a.type not in (1,2,6,7,12,101,14,15,16,17) order by a.czrq desc")
    List<Message> getSystemMessageUnread(String doctor);
    @Query("select a from Message a where a.receiver = ?1 and a.prescriptionStatus=?2 and a.type in (6,7) order by a.createTime desc")
@ -123,4 +123,26 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query(" select a from Message a where a.type=?2 and a.del='1' and a.read=1 and a.receiver=?1 and a.over='1' order by a.createTime desc ")
    List<Message> findUnReadByReceiverAndType(String receiver,Integer type);
    @Query("select a from Message a where a.read= ?2 and a.receiver = ?1 and a.state = 1 and a.over = ?3 and a.type = 16 order by a.czrq desc")
    List<Message> getSpecialistApply(String receiver,Integer read,String over);
    @Query("select a from Message a where a.receiver = ?1 and a.state = 1 and a.type = 17 order by a.czrq desc")
    List<Message> getFamilyTransfer(String receiver);
    @Query("select a from Message a where a.receiver = ?1 and a.state = 1 and a.type = 18 order by a.czrq desc")
    List<Message> getFamilySign(String receiver);
    @Query("select a from Message a where a.receiver = ?1 and a.state = 1 and a.type = 18")
    List<Message> selectFamilySign(String receiver,Pageable pageableRequest);
    @Query("select a from Message a where a.read= ?2 and a.receiver = ?1 and a.state = 1 and a.over = ?3 and a.type = 17 order by a.czrq desc")
    List<Message> getFamilyTransferReadAndOver(String receiver,Integer read,String over);
    @Query("select a from Message a where a.read= ?2 and a.receiver = ?1 and a.state = 1 and a.over = ?3 and a.type = ?4 order by a.czrq desc")
    List<Message> getSpecialistUntreated(String receiver,Integer read,String over,Pageable pageable,Integer type);
    @Query("select a from Message a where a.code = ?1")
    Message findByCode(String code);
}

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

@ -1,5 +1,6 @@
package com.yihu.wlyy.service.app.message;
import com.alibaba.fastjson.JSONArray;
import com.yihu.device.entity.DevicePatientHealthIndex;
import com.yihu.wlyy.entity.consult.ConsultTeam;
import com.yihu.wlyy.entity.message.Message;
@ -15,7 +16,6 @@ import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.HttpClientUtil;
import com.yihu.wlyy.util.IdCardUtil;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
@ -224,6 +224,26 @@ public class MessageService extends BaseService {
            deviceMesJson.put("amount", 0);
        }
        //居民签约申请
        List<Message> familyList = messageDao.getFamilySign(doctor);
        JSONObject familyMesJson = new JSONObject();
        JSONArray array = new JSONArray();
        if (familyList != null && familyList.size() > 0) {
            familyMesJson.put("amount", familyList.size());
            JSONObject  familyJson = new JSONObject();
            familyJson.put("title", familyList.get(0).getTitle());
            familyJson.put("type", familyList.get(0).getType());
            familyJson.put("msg", familyList.get(0).getContent());
            familyJson.put("msgTime", DateUtil.dateToStrLong(familyList.get(0).getCreateTime()));
            familyJson.put("relationCode",familyList.get(0).getRelationCode());
            familyJson.put("reason",familyList.get(0).getReason());
            familyMesJson.put("lastMessage", familyJson);
        }else{
            familyMesJson.put("amount", 0);
        }
        JSONObject json = new JSONObject();
        json.put("imMsgCount", getImMsgAmount(doctor));//IM消息数量
        json.put("sign", signJson);//签约数
@ -233,6 +253,7 @@ public class MessageService extends BaseService {
        json.put("callService", callServiceMesJson);//协同服务消息
        json.put("articleCheck", articleMesJson);//健康文章审核消息
        json.put("deviceUnbind",deviceMesJson);//设备解绑消息
        json.put("familyList",familyMesJson);//居民签约申请
        return json;
    }
@ -788,4 +809,91 @@ public class MessageService extends BaseService {
        jsonObject.put("deviceType",String.valueOf(deviceMap.get("deviceType")));
        return  jsonObject;
    }
    /**
     * 待处理状态
     *
     * @param doctor 医生code
     * @return
     */
    public JSONObject selectUntreated(String doctor){
        //专科医生签约平台
        List<Message> specialist = messageDao.getSpecialistApply(doctor,1,"1");
        JSONObject specialistJson = new JSONObject();
        if (specialist != null && specialist.size() != 0){
            specialistJson.put("amount", specialist.size());
            JSONObject specialistObject = new JSONObject();
            specialistObject.put("title", specialist.get(0).getTitle());
            specialistObject.put("type", specialist.get(0).getType());
            specialistObject.put("msg", specialist.get(0).getContent());
            specialistObject.put("msgTime", DateUtil.dateToStrLong(specialist.get(0).getCreateTime()));
            specialistObject.put("relationCode",specialist.get(0).getRelationCode());
            specialistJson.put("specialist",specialistObject);
        }
        //家庭医生转诊
        List<Message> familyList = messageDao.getFamilyTransferReadAndOver(doctor,1,"1");
        JSONObject familyJson = new JSONObject();
        if (familyList != null && familyList.size() != 0){
            familyJson.put("amount", familyList.size());
            JSONObject familyObject = new JSONObject();
            familyObject.put("title", familyList.get(0).getTitle());
            familyObject.put("type", familyList.get(0).getType());
            familyObject.put("msg", familyList.get(0).getContent());
            familyObject.put("msgTime", DateUtil.dateToStrLong(familyList.get(0).getCreateTime()));
            familyObject.put("relationCode",familyList.get(0).getRelationCode());
            familyJson.put("familyList",familyObject);
        }
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("specialist",specialistJson);
        jsonObject.put("familyList",familyJson);
        return jsonObject;
    }
    /**
     * 获取签约居民申请消息列表
     *
     * @param receiver 接收者
     * @param page 页码
     * @param size 分页大小
     * @return
     * @throws Exception
     */
    public List<Message> getFamilySign(String receiver,Integer page, Integer size) throws Exception{
        // 排序
        Sort sort = new Sort(Sort.Direction.DESC, "read","over","createTime");
        // 分页信息
        Pageable pageRequest = new PageRequest(page - 1, size, sort);
        return messageDao.selectFamilySign(receiver,pageRequest);
    }
    /**
     * 获取待处理的接口
     *
     * @param message {}
     * @param page 页码
     * @param size 分页大小
     * @return
     * @throws Exception
     */
    public List<Message> getSpecialistUnTreated(Message message, Integer page, Integer size) throws Exception{
        // 排序
        Sort sort = new Sort(Sort.Direction.DESC, "read","over","createTime");
        // 分页信息
        Pageable pageRequest = new PageRequest(page - 1, size, sort);
        return messageDao.getSpecialistUntreated(message.getReceiver(),message.getRead(),message.getOver(),pageRequest,message.getType());
    }
}

+ 125 - 15
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/guahao/GuahaoXMService.java

@ -1,12 +1,20 @@
package com.yihu.wlyy.service.third.guahao;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.doctor.survey.SurveyScreenResult;
import com.yihu.wlyy.entity.message.Message;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.PatientReservation;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.doctor.SurveyScreenResultDao;
import com.yihu.wlyy.repository.message.MessageDao;
import com.yihu.wlyy.repository.organization.HospitalMappingDao;
import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.repository.patient.PatientReservationDao;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.app.consult.ConsultService;
import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.service.third.httplog.LogService;
@ -20,6 +28,7 @@ import org.dom4j.Element;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
@ -30,7 +39,7 @@ import java.util.*;
 * 厦门市民健康网挂号服务
 */
@Service
public class GuahaoXMService implements IGuahaoService {
public class GuahaoXMService extends BaseService implements IGuahaoService {
    private int nextDays = 8;  //一周内预约号
    private String ORG_LIST = "GetOrgListNew";//获取医院列表
@ -55,6 +64,13 @@ public class GuahaoXMService implements IGuahaoService {
    JwSmjkService jwSmjkService;
    @Autowired
    SignFamilyDao signFamilyDao;
    @Autowired
    private MessageDao messageDao;
    @Autowired
    private SurveyScreenResultDao surveyScreenResultDao;
    @Autowired
    private PatientDao patientDao;
    @Autowired
    private LogService logService;
@ -62,14 +78,22 @@ public class GuahaoXMService implements IGuahaoService {
    @Autowired
    private ConsultService consultService;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Autowired
    private DoctorDao doctorDao;
    private ObjectMapper objectMapper = new ObjectMapper();
    /**
     * 解析挂号后
     */
    private String CreateOrderAfter(String response, String hospitalId, String hospitalName, String hosDeptId, String hosDeptName, String doctorId, String doctorName, String sectionType, String startTime, String endTime, String patient, String patientName, String cardNo, String clinicCard, String patientPhone, String dname, String dcode) throws Exception {
        String code = "";
        if (response.startsWith("error") || response.startsWith("System-Error")) {
    private String CreateOrderAfter(String response, String hospitalId, String hospitalName, String hosDeptId, String hosDeptName, String doctorId, String doctorName, String sectionType, String startTime, String endTime, String patient, String patientName, String cardNo, String clinicCard, String patientPhone, String dname, String dcode,String surveyCode) throws Exception {
        String code = "321321321";
       /* if (response.startsWith("error") || response.startsWith("System-Error")) {
            throw new Exception(response);
        } else if (response.toLowerCase().startsWith("ok")) {      //预约成功
            // 预约成功,获取预约号
@ -78,16 +102,23 @@ public class GuahaoXMService implements IGuahaoService {
            code = response.split("\\|")[0];
        } else {
            throw new Exception(response);
        }
        }*/
        Patient patient1 = null;
        try {
            patient1 = patientDao.findByCode(patient);
        }catch (Exception e){
            e.printStackTrace();
            System.out.println("获取病人信息失败");
        }
        // 查询医生职称和头像
        GuahaoDoctor doctor = null;
        try{
        /*try{
            doctor = jwSmjkService.getGuahaoDoctor(doctorId, hospitalId, hosDeptId);
        }catch (Exception e){
            e.printStackTrace();
            System.out.println("获取医生信息失败");
        }
        }*/
        // 保存预约记录
        PatientReservation reservation = new PatientReservation();
        reservation.setCode(code);
@ -99,10 +130,10 @@ public class GuahaoXMService implements IGuahaoService {
        reservation.setDeptName(hosDeptName);
        reservation.setDoctorCode(doctorId);
        reservation.setDoctorName(doctorName);
        if(doctor!=null){
        /*if(doctor!=null){
            reservation.setDoctorJob(doctor.getTitle());
            reservation.setDoctorPhoto(doctor.getPhoto());
        }
        }*/
        reservation.setIdcard(cardNo);
        reservation.setName(patientName);
        reservation.setPatient(patient);
@ -128,12 +159,47 @@ public class GuahaoXMService implements IGuahaoService {
        }
        // 保存预约记录
        patientReservationDao.save(reservation);
        PatientReservation patientReservation = patientReservationDao.save(reservation);
        if(StringUtils.isNotBlank(dcode)){
            Patient p = patientService.findByCode(patient);
            consultService.sendMucMessageBySingnType(dcode,dname,patient,"我已成功为您预约:" + startTime + "," + hospitalName + hosDeptName + doctorName + "医生的号源。您可直接前往医院就诊</br><a name='guahao' href='javascript:void(0)' data-id='" + reservation.getId() + "'>点击查看详情</a>","1",p.getName());
        }
        if (StringUtils.isNoneBlank(surveyCode)){
            SurveyScreenResult surveyScreenResult = surveyScreenResultDao.getSurveyScreenResultByCode(surveyCode);
            surveyScreenResult.setOrder(1);
            surveyScreenResult.setReservationCode(patientReservation.getCode());
            String sql = "update wlyy_survey_screen_result ssr set ssr.is_order = "+surveyScreenResult.getOrder()+"," +
                    "reservation_code = '"+surveyScreenResult.getReservationCode()+"' where ssr.id = '"+surveyScreenResult.getId()+"'";
            jdbcTemplate.update(sql);
            //发送消息
            Message message = new Message();
            message.setCzrq(new Date());
            message.setCreateTime(new Date());
            message.setContent("您有一个居民开通专科服务");
            message.setRead(1);//设置未读
            message.setReceiver(doctorId);//设置接受医生的code
            message.setSender(patient);//设置发送的用户
            message.setSenderName(patientName);
            message.setCode(getCode());
            message.setSenderPhoto(patient1.getPhoto());
            message.setTitle("专科医生共管通知");
            message.setType(17);//家庭签约取消信息
            message.setReadonly(1);//是否只读消息
            message.setSex(patient1.getSex());
            message.setOver("1");//未处理
            message.setRelationCode(patientReservation.getCode());
            message.setDel("1");
            message.setState(1);
            JSONObject object = new JSONObject();
            object.put("name",patient1.getName());
            object.put("carq",patientReservation.getCzrq());
            object.put("title",surveyScreenResult.getTemplateTitle());
            object.put("screenResult",surveyScreenResult.getScreenResult());
            message.setReason(object.toString());
            messageDao.save(message);
        }
        return code;
    }
@ -653,7 +719,7 @@ public class GuahaoXMService implements IGuahaoService {
            verificationXml(response,"获取医生排班表失败!",ORDER_CREATE,content,method,msgBody,res);
            //保存http日志
            logService.saveHttpLog(true,ORDER_CREATE,content,method,null,msgBody,res,null,logService.archiveType);
            re = CreateOrderAfter(response, hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, sectionType, startTime, endTime, patient, patientName, cardNo, clinicCard, patientPhone, null, null);
            re = CreateOrderAfter(response, hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, sectionType, startTime, endTime, patient, patientName, cardNo, clinicCard, patientPhone, null, null,null);
        } else {
            throw new Exception("该排班信息错误或者不存在!");
        }
@ -1161,7 +1227,7 @@ public class GuahaoXMService implements IGuahaoService {
    /**
     * 转诊预约挂号
     */
    public String CreateOrderByDoctor(String hospitalId, String hospitalName, String hosDeptId, String hosDeptName, String doctorId, String doctorName, String arrangeDate, String patient, String patientName, String cardNo, String clinicCard, String patientPhone, String dname, String dcode) throws Exception {
    public String CreateOrderByDoctor(String hospitalId, String hospitalName, String hosDeptId, String hosDeptName, String doctorId, String doctorName, String arrangeDate, String patient, String patientName, String cardNo, String clinicCard, String patientPhone, String dname, String dcode,String surveyCode) throws Exception {
        String re = "";
        Patient p = patientService.findByCode(patient);
@ -1175,9 +1241,9 @@ public class GuahaoXMService implements IGuahaoService {
            String startTime = map.get("startTime");
            String endTime = map.get("endTime");
            String response = jwSmjkService.webRegisterByFamily(cardNo, patientName, clinicCard, sectionType, startTime, hospitalId, hosDeptId, hosDeptName, doctorId, doctorName,patientPhone);
            re = CreateOrderAfter(response, hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, sectionType, startTime, endTime, patient, patientName, cardNo, clinicCard, patientPhone, dname, dcode);
           /* String response = jwSmjkService.webRegisterByFamily(cardNo, patientName, clinicCard, sectionType, startTime, hospitalId, hosDeptId, hosDeptName, doctorId, doctorName,patientPhone);
*/
            re = CreateOrderAfter(null, hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, sectionType, startTime, endTime, patient, patientName, cardNo, clinicCard, patientPhone, dname, dcode,surveyCode);
        } else {
            throw new Exception("该排班信息错误或者不存在!");
        }
@ -1185,4 +1251,48 @@ public class GuahaoXMService implements IGuahaoService {
        return re;
    }
    /**
     * 获取转诊信息
     *
     * @param relationCode 关联code
     * @return
     */
    public com.alibaba.fastjson.JSONObject getPatientReservationInfo(String relationCode){
        PatientReservation patientReservation = patientReservationDao.findByCode(relationCode);
        List<SurveyScreenResult> surveyScreenResults = null;
        Patient patient = null;
        SignFamily signFamily = null;
        Doctor doctor = null;
        int age = 0;
        if (patientReservation != null){
            surveyScreenResults = surveyScreenResultDao.getByReservationCode(relationCode);
            patient = patientDao.findByCode(patientReservation.getPatient());
            age = DateUtil.getAgeByBirthday(patient.getBirthday());
            signFamily = signFamilyDao.findByPatient(patientReservation.getPatient());
            doctor = doctorDao.findByCode(signFamily.getDoctor());
        }
        com.alibaba.fastjson.JSONObject object = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(patientReservation);
        object.put("surveyScreenResults",surveyScreenResults);
        object.put("patient",patient);
        object.put("age",age);
        object.put("signFamily",signFamily);
        object.put("doctor",doctor);
        return object;
    }
    public JSONObject updateRecode(String messageCode,String surveyCode){
        Message message = messageDao.findByCode(messageCode);
        message.setOver("0");
        messageDao.save(message);
        SurveyScreenResult surveyScreenResult = surveyScreenResultDao.getSurveyScreenResultByCode(surveyCode);
        surveyScreenResult.setOrder(2);
        surveyScreenResultDao.save(surveyScreenResult);
        JSONObject object = new JSONObject();
        object.put("message",message);
        object.put("surveyScreenResult",surveyScreenResult);
        return object;
    }
}

+ 0 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/guahao/IGuahaoService.java

@ -2,8 +2,6 @@
package com.yihu.wlyy.service.third.guahao;
import com.yihu.wlyy.entity.patient.PatientReservation;
import java.util.List;
import java.util.Map;

+ 82 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/message/DoctorMessageController.java

@ -1,5 +1,6 @@
package com.yihu.wlyy.web.doctor.message;
import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.entity.consult.ConsultTeam;
@ -503,4 +504,85 @@ public class DoctorMessageController extends BaseController {
            return error( -1, "操作失败!");
        }
    }
    /**
     * 待处理
     *
     * @return
     */
    @RequestMapping(value = "unTreated",method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("专科医生待处理消息")
    public String selectUntreated() {
        try {
            JSONObject json = messageService.selectUntreated(getUID());
            return write(200, "获取消息总数成功!", "data", json);
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
    }
    /**
     * 居民签约申请消息列表
     *
     * @param page 页码
     * @param pageSize 每页大小
     * @return
     */
    @RequestMapping(value = "getFimalySign",method = RequestMethod.GET)
    @ApiOperation("居民签约申请消息列表")
    @ResponseBody
    public String getFimalySign(@ApiParam(name="page",value="第几页",defaultValue = "1") @RequestParam(value="page",required = true) String page,
                                          @ApiParam(name="pageSize",value="",defaultValue = "10") @RequestParam(value="pageSize",required = true) String pageSize){
        if (StringUtils.isBlank(pageSize)) {
            pageSize = "10";
        }
        if (page.equals("0")) {
            page = "1";
        }
        try {
            return write(200,"查询成功!","data",messageService.getFamilySign(getUID(),Integer.valueOf(page),Integer.valueOf(pageSize)));
        }catch (Exception e){
            error(e);
            return error( -1, "查询失败!");
        }
    }
    /**
     *
     * @param message
     * @param page
     * @param pageSize
     * @return
     */
    @RequestMapping(value = "getSpecialist",method = RequestMethod.GET)
    @ApiOperation("专科医生待处理列表")
    @ResponseBody
    public String getSpecialist(@ApiParam(name = "message",value = "消息对象")@RequestParam(value = "message")String message,
                                @ApiParam(name="page",value="第几页",defaultValue = "1") @RequestParam(value="page",required = true) String page,
                                @ApiParam(name="pageSize",value="",defaultValue = "10") @RequestParam(value="pageSize",required = true) String pageSize){
        if (StringUtils.isBlank(pageSize)) {
            pageSize = "10";
        }
        if (page.equals("0")) {
            page = "1";
        }
        Message message1 = new Message();
        com.alibaba.fastjson.JSONObject object = JSON.parseObject(message);
        message1.setType(object.getInteger("type"));
        message1.setOver(object.getString("over"));
        message1.setRead(object.getInteger("read"));
        message1.setReceiver(getUID());
        try {
            return write(200,"查询成功!","data",messageService.getSpecialistUnTreated(message1,Integer.valueOf(page),Integer.valueOf(pageSize)));
        }catch (Exception e){
            error(e);
            return error( -1, "查询失败!");
        }
    }
}

+ 4 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/specialist/SpecialistController.java

@ -10,10 +10,12 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
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.RestController;
import java.util.List;
import java.util.Map;
/**
 * Created by Trick on 2018/5/31.

+ 40 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/zysoft/BookingController.java

@ -604,9 +604,11 @@ public class BookingController extends WeixinBaseController {
                                      @ApiParam(name = "dcode", value = "代预约医生编号", defaultValue = "test00000000005")
                                      @RequestParam(value = "dcode", required = true) String dcode,
                                      @ApiParam(name = "dname", value = "代预约医生名称", defaultValue = "组2全科医生")
                                      @RequestParam(value = "dname", required = true) String dname) {
                                      @RequestParam(value = "dname", required = true) String dname,
                                      @ApiParam(name="surveyCode",value = "筛选code",defaultValue = "a")
                                      @RequestParam(value = "surveyCode",required = true)String surveyCode) {
        try {
            String orderCode = guahaoXM.CreateOrderByDoctor(hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, arrangeDate, patient, patientName, cardNo, clinicCard, patientPhone, dname, dcode);
            String orderCode = guahaoXM.CreateOrderByDoctor(hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, arrangeDate, patient, patientName, cardNo, clinicCard, patientPhone, dname, dcode,surveyCode);
            //获取预约信息查询是否挂号成功
            PatientReservation obj = patientReservationService.findByCode(orderCode);
            if (obj != null) {
@ -833,6 +835,42 @@ public class BookingController extends WeixinBaseController {
    }
    /**
     * 获取病人转诊信息
     *
     * @param relationCode 关联预约记录code
     *
     * @return
     */
    @RequestMapping(value = "getPatientReservationInfo", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("获取病人转诊信息")
    public String getPatientReservationInfo(
            @ApiParam(name = "relationCode", value = "关联code")
            @RequestParam(value = "relationCode", required = true) String relationCode) {
        try {
            return write(200, "获取病人转诊信息", "data", guahaoXM.getPatientReservationInfo(relationCode));
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
    }
    @RequestMapping(value = "updateRecode", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("已转诊")
    public String updateRecode(
            @ApiParam(name = "messageCode", value = "消息code")
            @RequestParam(value = "messageCode", required = true) String messageCode,
            @ApiParam(name = "surveyCode", value = "筛选code")
            @RequestParam(value = "surveyCode", required = true) String surveyCode) {
        try {
            return write(200, "已转诊", "data", guahaoXM.updateRecode(messageCode,surveyCode));
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
    }
}

+ 4 - 3
patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml

@ -35,7 +35,8 @@ im:
#专病配置
specialist:
  url: http://localhost:8070/
  #url: http://172.19.103.33:9797/svr-wlyy-specialist
  url: http://localhost:10051/svr-wlyy-specialist
#物联网配置
iot:
#  url: http://192.168.131.24:8088/svr-iot/
@ -114,8 +115,8 @@ images:
sign:
  #check_upload: http://172.19.103.88:8011/wlyy_service
  check_upload: http://localhost:8070/
  check_upload: http://172.19.103.88:8011/wlyy_service
  #check_upload: http://localhost:8070/
express: