Browse Source

Merge branch 'dev' of wujunjie/patient-management into dev

chenweida 8 years ago
parent
commit
e292a1a871

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/consult/ConsultDao.java

@ -35,6 +35,6 @@ public interface ConsultDao extends PagingAndSortingRepository<Consult, Long>, J
    Page<Object> findByPatientAndTeam(String patient, Long team, Pageable pageRequest);
    Page<Object> findByPatientAndTeam(String patient, Long team, Pageable pageRequest);
    //获取咨询的状态
    //获取咨询的状态
    @Query("select a.type from Consult a,ConsultTeam b where a.code = b.consult and a.code = ?1 ")
    int findTypeByCode(String code);
    @Query("select a from Consult a,ConsultTeam b where a.code = b.consult and a.code = ?1 ")
    Consult findTypeByCode(String code);
}
}

+ 1 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/WeixinBaseController.java

@ -43,6 +43,7 @@ public class WeixinBaseController extends BaseController {
			String token_url = "https://api.weixin.qq.com/sns/oauth2/access_token";
			String token_url = "https://api.weixin.qq.com/sns/oauth2/access_token";
			String params = "appid=" + SystemConf.getInstance().getAppId() + "&secret=" + SystemConf.getInstance().getAppSecret() + "&code=" + code + "&grant_type=authorization_code";
			String params = "appid=" + SystemConf.getInstance().getAppId() + "&secret=" + SystemConf.getInstance().getAppSecret() + "&code=" + code + "&grant_type=authorization_code";
			String result = HttpUtil.sendGet(token_url, params);
			String result = HttpUtil.sendGet(token_url, params);
			System.out.println("getOpenidByCode:"+result);
			JSONObject json = new JSONObject(result);
			JSONObject json = new JSONObject(result);
			if (json.has("openid")) {
			if (json.has("openid")) {
				return json.get("openid").toString();
				return json.get("openid").toString();

+ 4 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/im/imController.java

@ -1,6 +1,7 @@
package com.yihu.wlyy.web.common.im;
package com.yihu.wlyy.web.common.im;
import com.yihu.wlyy.entity.consult.Consult;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.repository.consult.ConsultDao;
import com.yihu.wlyy.repository.consult.ConsultDao;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.doctor.DoctorDao;
@ -87,7 +88,7 @@ public class imController extends BaseController {
                String sex = ob.get("sex").toString();
                String sex = ob.get("sex").toString();
                String startId = ob.get("start_message_id").toString();
                String startId = ob.get("start_message_id").toString();
                String endId = ob.get("end_message_id").toString();
                String endId = ob.get("end_message_id").toString();
                int type = consultDao.findTypeByCode(id);
                Consult con = consultDao.findTypeByCode(id);
                if (StringUtils.isNotEmpty(createTime)){
                if (StringUtils.isNotEmpty(createTime)){
                    Date date = sdf.parse(createTime);
                    Date date = sdf.parse(createTime);
                    map.put("create_time",sdf.format(date));
                    map.put("create_time",sdf.format(date));
@ -97,12 +98,13 @@ public class imController extends BaseController {
                map.put("session_id", session_id);
                map.put("session_id", session_id);
                map.put("photo", avatar);
                map.put("photo", avatar);
                map.put("patientName", name);
                map.put("patientName", name);
                map.put("patient", con.getPatient());
                map.put("sex", sex);
                map.put("sex", sex);
                map.put("description", description);
                map.put("description", description);
                map.put("start_message_id", startId);
                map.put("start_message_id", startId);
                map.put("end_message_id", endId);
                map.put("end_message_id", endId);
//                咨询类型:1三师咨询,2家庭医生咨询,3图文咨询,4公共咨询,5病友圈
//                咨询类型:1三师咨询,2家庭医生咨询,3图文咨询,4公共咨询,5病友圈
                map.put("type", type);
                map.put("type", con.getType());
                list.add(map);
                list.add(map);
            }
            }

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

@ -1806,7 +1806,7 @@ public class DoctorController extends BaseController {
            @RequestParam(required = false) String patients,
            @RequestParam(required = false) String patients,
            @RequestParam(required = false) String group,
            @RequestParam(required = false) String group,
            @RequestParam(required = false) Integer sendCount,
            @RequestParam(required = false) Integer sendCount,
            @RequestParam(required = false) String teamId,
            @RequestParam String teamId,
            @RequestParam(required = false) String typeId) {
            @RequestParam(required = false) String typeId) {
        try {
        try {
            Long teamCode = Long.parseLong(teamId);
            Long teamCode = Long.parseLong(teamId);