|
@ -106,6 +106,8 @@ public class ConsultController extends WeixinBaseController {
|
|
|
private MessageService messageService;
|
|
|
@Autowired
|
|
|
private JdbcTemplate jdbcTemplate;
|
|
|
@Value("${im.data_base_name}")
|
|
|
private String im;
|
|
|
|
|
|
/**
|
|
|
* 患者咨询记录查询
|
|
@ -889,9 +891,21 @@ public class ConsultController extends WeixinBaseController {
|
|
|
}
|
|
|
}*/
|
|
|
|
|
|
String sql = "SELECT t.participant_id FROM im_new.participants t where t.session_id = '" +
|
|
|
patient.getCode() + "_" + consultModel.getTeam() + "_" + consultModel.getType() +
|
|
|
"' and t.participant_role = 0";
|
|
|
String sql = "";
|
|
|
if (consultModel.getType() == 2){
|
|
|
//家庭咨询
|
|
|
sql = "SELECT t.participant_id FROM " + im +
|
|
|
".participants t where t.session_id = '" +
|
|
|
patient.getCode() + "_" + consultModel.getTeam() + "_" + consultModel.getType() +
|
|
|
"' and t.participant_role = 0";
|
|
|
}else if (consultModel.getType() == 8){
|
|
|
//续方咨询
|
|
|
sql = "SELECT t.participant_id FROM " + im +
|
|
|
".participants t where t.session_id = '" +
|
|
|
patient.getCode() + "_" + consultModel.getConsult() + "_" + consultModel.getType() +
|
|
|
"' and t.participant_role = 0";
|
|
|
}
|
|
|
|
|
|
List<Map<String, Object>> participants = jdbcTemplate.queryForList(sql);
|
|
|
|
|
|
for (Map<String, Object> participant : participants) {
|