|
@ -962,6 +962,28 @@ public class ImService {
|
|
return -1;
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
String name = "";
|
|
|
|
String returnJson = "";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 发送评价消息
|
|
|
|
*/
|
|
|
|
BaseDoctorDO doctor = baseDoctorDao.findById(consultTeam.getDoctor());
|
|
|
|
BasePatientDO patient = basePatientDao.findById(consultTeam.getPatient());
|
|
|
|
JSONObject evalueContent = new JSONObject();
|
|
|
|
evalueContent.put("patientCode",consultTeam.getPatient());
|
|
|
|
evalueContent.put("patientName",patient.getName());
|
|
|
|
evalueContent.put("doctorCode",consultTeam.getDoctor());
|
|
|
|
evalueContent.put("doctorName",doctor.getName());
|
|
|
|
evalueContent.put("doctorPhoto",doctor.getPhoto());
|
|
|
|
evalueContent.put("consultCode",consult);
|
|
|
|
|
|
|
|
// returnJson = imUtil.sendIM(consultTeam.getDoctor(), consultTeam.getPatient(), "28", evalueContent.toString());
|
|
|
|
String response = imUtil.sendTopicIM(consultTeam.getDoctor(), doctor.getName(), consult, "28", evalueContent.toString(),null);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String endName = "";
|
|
String endName = "";
|
|
String endId = "";
|
|
String endId = "";
|
|
JSONObject obj = new JSONObject();
|
|
JSONObject obj = new JSONObject();
|
|
@ -992,21 +1014,7 @@ public class ImService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
String name = "";
|
|
|
|
String returnJson = "";
|
|
|
|
|
|
|
|
BasePatientDO p = basePatientDao.findById(endOperator);
|
|
|
|
BaseDoctorDO d = baseDoctorDao.findById(endOperator);
|
|
|
|
name = d.getName();
|
|
|
|
|
|
|
|
JSONObject evalueContent = new JSONObject();
|
|
|
|
evalueContent.put("patientCode",p.getId());
|
|
|
|
evalueContent.put("patientName",p.getName());
|
|
|
|
evalueContent.put("doctorCode",d.getId());
|
|
|
|
evalueContent.put("doctorName",d.getName());
|
|
|
|
evalueContent.put("consultCode",consult);
|
|
|
|
|
|
|
|
returnJson = imUtil.sendIM(consultTeam.getDoctor(), consultTeam.getPatient(), "28", name + "结束了本次咨询");
|
|
|
|
|
|
|
|
// //推送给IM文字消息
|
|
// //推送给IM文字消息
|
|
// if (endType == 1) {
|
|
// if (endType == 1) {
|
|
// BasePatientDO p = basePatientDao.findById(endOperator);
|
|
// BasePatientDO p = basePatientDao.findById(endOperator);
|
|
@ -1065,7 +1073,7 @@ public class ImService {
|
|
|
|
|
|
JSONObject object = imUtil.getTopic(consult);
|
|
JSONObject object = imUtil.getTopic(consult);
|
|
|
|
|
|
ConsultTeamDo consultTeamDo = consultTeamDao.findOne(consult);
|
|
|
|
|
|
ConsultTeamDo consultTeamDo = consultTeamDao.findByConsult(consult);
|
|
|
|
|
|
object.put("doctorCode",consultTeamDo.getDoctor());
|
|
object.put("doctorCode",consultTeamDo.getDoctor());
|
|
|
|
|
|
@ -1186,9 +1194,15 @@ public class ImService {
|
|
consultTeamDo.setEvaluateTime(new Date());
|
|
consultTeamDo.setEvaluateTime(new Date());
|
|
consultTeamDao.save(consultTeamDo);
|
|
consultTeamDao.save(consultTeamDo);
|
|
|
|
|
|
/**
|
|
|
|
* todo 保存就诊记录表已评价标识
|
|
|
|
*/
|
|
|
|
|
|
ConsultDo consultDo = consultDao.findOne(consult);
|
|
|
|
|
|
|
|
//如果是复诊咨询,则修改成已评价
|
|
|
|
if("9".equals(consultDo.getType())){
|
|
|
|
WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findOne(consultTeamDo.getRelationCode());
|
|
|
|
wlyyOutpatientDO.setEvaluateStatus("1");
|
|
|
|
outpatientDao.save(wlyyOutpatientDO);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@ -1204,4 +1218,29 @@ public class ImService {
|
|
baseDoctorDO.setConsultStatus(consultStatus);
|
|
baseDoctorDO.setConsultStatus(consultStatus);
|
|
baseDoctorDao.save(baseDoctorDO);
|
|
baseDoctorDao.save(baseDoctorDO);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public List<Map<String,Object>> getEvaluationByConsultCode(String consult) {
|
|
|
|
//查询评价明细
|
|
|
|
String sqlScoreList = "SELECT " +
|
|
|
|
"a.score as score," +
|
|
|
|
"a.score_type as score_type," +
|
|
|
|
"a.content as content," +
|
|
|
|
"b.create_time as create_time," +
|
|
|
|
"c.type as type," +
|
|
|
|
"c.name as patientname," +
|
|
|
|
"b.id as id," +
|
|
|
|
"c.photo as patientphoto," +
|
|
|
|
"b.type as niming " +
|
|
|
|
"FROM " +
|
|
|
|
"base_evaluate a " +
|
|
|
|
"LEFT JOIN base_evaluate_score b ON b.id=a.relation_code " +
|
|
|
|
"LEFT JOIN wlyy_consult_team c ON c.consult=b.relation_code AND c.consult='"+consult+"' " +
|
|
|
|
"WHERE a.relation_code=b.id ";
|
|
|
|
List<Map<String,Object>> scoreList = jdbcTemplate.queryForList(sqlScoreList);
|
|
|
|
if(scoreList.isEmpty()){
|
|
|
|
return null;
|
|
|
|
}else{
|
|
|
|
return scoreList;
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|