|
@ -785,9 +785,11 @@ public class ConsultTeamService extends ConsultService {
|
|
* @return
|
|
* @return
|
|
* @throws Exception
|
|
* @throws Exception
|
|
*/
|
|
*/
|
|
public int addTeamConsult(ConsultTeam ct, String patient,String agent) throws Exception {
|
|
|
|
|
|
public JSONObject addTeamConsult(ConsultTeam ct, String patient,String agent) throws Exception {
|
|
|
|
JSONObject re = new JSONObject();
|
|
if (exist(patient, ct.getType())) {//判断是否有未结束的咨询移到同步方法中
|
|
if (exist(patient, ct.getType())) {//判断是否有未结束的咨询移到同步方法中
|
|
return -3;
|
|
|
|
|
|
re.put("status",-3);
|
|
|
|
return re;
|
|
}
|
|
}
|
|
|
|
|
|
JSONObject users = new JSONObject();
|
|
JSONObject users = new JSONObject();
|
|
@ -802,7 +804,8 @@ public class ConsultTeamService extends ConsultService {
|
|
SignFamily sc = signFamilyDao.findBySanshiPatientYes(patient);
|
|
SignFamily sc = signFamilyDao.findBySanshiPatientYes(patient);
|
|
if (sc == null) {
|
|
if (sc == null) {
|
|
// 不存在三师签约
|
|
// 不存在三师签约
|
|
return -2;
|
|
|
|
|
|
re.put("status",-2);
|
|
|
|
return re;
|
|
}
|
|
}
|
|
ct.setTeam(sc.getTeamCode());
|
|
ct.setTeam(sc.getTeamCode());
|
|
// 设置健康管理师,三师咨询默认给健康管理师处理
|
|
// 设置健康管理师,三师咨询默认给健康管理师处理
|
|
@ -832,7 +835,8 @@ public class ConsultTeamService extends ConsultService {
|
|
|
|
|
|
if (sf == null) {
|
|
if (sf == null) {
|
|
// 不存在家庭签约
|
|
// 不存在家庭签约
|
|
return -1;
|
|
|
|
|
|
re.put("status",-1);
|
|
|
|
return re;
|
|
}
|
|
}
|
|
ct.setTeam(sf.getTeamCode());
|
|
ct.setTeam(sf.getTeamCode());
|
|
// 设置健康管理师,家庭医生咨询默认给健康管理师处理
|
|
// 设置健康管理师,家庭医生咨询默认给健康管理师处理
|
|
@ -913,10 +917,13 @@ public class ConsultTeamService extends ConsultService {
|
|
ct.setStartMsgId(obj.get("start_msg_id").toString());
|
|
ct.setStartMsgId(obj.get("start_msg_id").toString());
|
|
consultTeamDao.save(ct);
|
|
consultTeamDao.save(ct);
|
|
consultDao.save(consult);
|
|
consultDao.save(consult);
|
|
|
|
|
|
|
|
JSONArray doctor = new JSONArray();
|
|
for (String key : users.keySet()) {
|
|
for (String key : users.keySet()) {
|
|
if (patient.equals(key)) {
|
|
if (patient.equals(key)) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
doctor.put(key);
|
|
//记录咨询的医生详情误删
|
|
//记录咨询的医生详情误删
|
|
ConsultTeamDoctor cd = new ConsultTeamDoctor();
|
|
ConsultTeamDoctor cd = new ConsultTeamDoctor();
|
|
cd.setConsult(consult.getCode());
|
|
cd.setConsult(consult.getCode());
|
|
@ -930,8 +937,10 @@ public class ConsultTeamService extends ConsultService {
|
|
// 添加咨询转发记录
|
|
// 添加咨询转发记录
|
|
// 添加医生咨询日志
|
|
// 添加医生咨询日志
|
|
String content = addLogs(ct);
|
|
String content = addLogs(ct);
|
|
|
|
re.put("doctor",doctor);
|
|
|
|
re.put("status",1);
|
|
|
|
return re;
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|