пре 8 година
родитељ
комит
520e23356f

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

@ -1458,25 +1458,25 @@ public class ConsultTeamService extends ConsultService {
            ct.setTeam(oldConsultCode);
            ConsultTeam oldConsult =  consultTeamDao.findByConsult(oldConsultCode);
            if(oldConsult!=null&&isSend==1){
                ImUtill.sendImMsg(ct.getPatient(), ct.getDoctor(), session.getString("id"),"1","居民问题:" +oldConsult.getSymptoms());
                ImUtill.sendImMsg(ct.getPatient(), ct.getDoctor(), session.getString("id"),"1","居民问题:" +oldConsult.getSymptoms(),"1");
                //推送给IM图片
                if (StringUtils.isNotEmpty(oldConsult.getImages())) {
                    String[] images = oldConsult.getImages().split(",");
                    for (String image : images) {
                        if (StringUtils.isNoneEmpty(image)) {
                            ImUtill.sendImMsg(ct.getPatient(), ct.getDoctor(), session.getString("id"), "2",image);
                            ImUtill.sendImMsg(ct.getPatient(), ct.getDoctor(), session.getString("id"), "2",image,"1");
                        }
                    }
                }
            }
        }
        ImUtill.sendImMsg(ct.getPatient(), ct.getDoctor(), session.getString("id"),"1","咨询问题:"+ ct.getSymptoms());
        ImUtill.sendImMsg(ct.getPatient(), ct.getDoctor(), session.getString("id"),"1","咨询问题:"+ ct.getSymptoms(),"1");
        //推送给IM图片
        if (StringUtils.isNotEmpty(ct.getImages())) {
            String[] images = ct.getImages().split(",");
            for (String image : images) {
                if (StringUtils.isNoneEmpty(image)) {
                    ImUtill.sendImMsg(ct.getPatient(), ct.getDoctor(), session.getString("id"), "2",image);
                    ImUtill.sendImMsg(ct.getPatient(), ct.getDoctor(), session.getString("id"), "2",image,"1");
                }
            }
        }

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/util/HttpUtil.java

@ -141,7 +141,7 @@ public class HttpUtil {
				throw  new RuntimeException(sessionObj.getString("message"));
			}
			JSONObject session = sessionObj.getJSONObject("data");
			ImUtill.sendImMsg("system","系统",session.getString("id"),msgType, msg);
			ImUtill.sendImMsg("system","系统",session.getString("id"),"1", msg,msgType);
			return true;
		}catch (Exception e){
			e.printStackTrace();

+ 3 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/util/ImUtill.java

@ -14,14 +14,15 @@ public class ImUtill {
     * @param contentType 1文字 2图片消息
     * @param content     内容
     */
    public static String sendImMsg(String from,String fromName, String sessionId, String contentType, String content) {
    public static String sendImMsg(String from,String fromName, String sessionId, String contentType, String content,String businessType) {
        String imAddr = SystemConf.getInstance().getImListGet() + "/api/v2/sessions/"+sessionId+"/messages";
        JSONObject params = new JSONObject();
        params.put("sender_id", from);
        params.put("sender_name", fromName);
        params.put("content_type", contentType);
        params.put("content", content);
        params.put("session_id", sessionId);;
        params.put("session_id", sessionId);
        params.put("business_type", businessType);
        String response = HttpClientUtil.postBody(imAddr, params);
        return response;
    }

+ 0 - 3
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/BookingController.java

@ -1,6 +1,5 @@
package com.yihu.wlyy.web.third;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.PatientReservation;
import com.yihu.wlyy.service.app.reservation.PatientReservationService;
@ -24,14 +23,12 @@ import org.apache.http.message.BasicNameValuePair;
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.lang.reflect.Field;
import java.text.SimpleDateFormat;
import java.util.*;