|
@ -996,6 +996,20 @@ public class FamilyContractService extends BaseService {
|
|
|
// 添加到发送队列
|
|
|
PushMsgTask.getInstance().putWxMsg(access_token, 1, sf.getOpenid(), sf.getName(), json);
|
|
|
new Thread(new SignUploadTask(sf.getCode())).start();
|
|
|
JSONObject participants = new JSONObject();
|
|
|
participants.put(sf.getPatient(),0);
|
|
|
if(StringUtils.equals(sf.getDoctor(),sf.getDoctorHealth())){//全科和建管同一个人
|
|
|
participants.put(sf.getDoctor(),0);
|
|
|
}else{//全科和建管不同一个人
|
|
|
participants.put(sf.getDoctorHealth(),0);
|
|
|
participants.put(sf.getDoctor(),1);
|
|
|
}
|
|
|
//创建医生会话讨论组
|
|
|
JSONObject sessionObj = ImUtill.createSession(participants,ImUtill.SESSION_TYPE_MUC,patient.getName(),patient.getCode()+"_"+sf.getTeamCode()+"_"+2);
|
|
|
if(sessionObj.getInt("status")==-1){
|
|
|
throw new RuntimeException(sessionObj.getString("message"));
|
|
|
}
|
|
|
|
|
|
}
|
|
|
BusinessLogs.info(BusinessLogs.BusinessType.sign, signDoctorCode, sf.getPatient(), new JSONObject(sf));
|
|
|
return temp;
|
|
@ -1045,6 +1059,7 @@ public class FamilyContractService extends BaseService {
|
|
|
result.put("status", 0);
|
|
|
return result;
|
|
|
}
|
|
|
String doctorTeamCode =null;//服务团队的CODE;
|
|
|
if (type == 1) {
|
|
|
//判断是否有三师签约 并且判断全科医生一致
|
|
|
SignFamily sssignFamily = signFamilyDao.findSSByIdcard(p.getIdcard());
|
|
@ -1143,7 +1158,7 @@ public class FamilyContractService extends BaseService {
|
|
|
//sf.setFamilyCode(createSignCode(sf.getDoctor(), doc.getHospital()));
|
|
|
//建立团队
|
|
|
DoctorTeam doctorTeam = new DoctorTeam();
|
|
|
String doctorTeamCode = getCode();
|
|
|
doctorTeamCode = getCode();
|
|
|
doctorTeam.setName("三师签约团队患者:" + p.getName());
|
|
|
doctorTeam.setCode(doctorTeamCode);
|
|
|
doctorTeam.setCzrq(new Date());
|
|
@ -1232,6 +1247,20 @@ public class FamilyContractService extends BaseService {
|
|
|
// 添加到发送队列
|
|
|
PushMsgTask.getInstance().putWxMsg(access_token, 1, sf.getOpenid(), sf.getName(), json);
|
|
|
new Thread(new SignUploadTask(sf.getCode())).start();
|
|
|
JSONObject participants = new JSONObject();
|
|
|
participants.put(sf.getPatient(),0);
|
|
|
if(StringUtils.equals(sf.getDoctor(),sf.getDoctorHealth())){//全科和建管同一个人
|
|
|
participants.put(sf.getDoctor(),0);
|
|
|
}else{//全科和建管不同一个人
|
|
|
participants.put(sf.getDoctorHealth(),0);
|
|
|
participants.put(sf.getDoctor(),1);
|
|
|
}
|
|
|
Patient patient = patientDao.findByCode(sf.getPatient());
|
|
|
//创建医生会话讨论组
|
|
|
JSONObject sessionObj = ImUtill.createSession(participants,ImUtill.SESSION_TYPE_MUC,patient.getName(),patient.getCode()+"_"+sf.getTeamCode()+"_"+2);
|
|
|
if(sessionObj.getInt("status")==-1){
|
|
|
throw new RuntimeException(sessionObj.getString("message"));
|
|
|
}
|
|
|
}
|
|
|
result.put("status", 1);
|
|
|
BusinessLogs.info(BusinessLogs.BusinessType.sign, caller, sf.getPatient(), new JSONObject(sf));
|