|
@ -996,22 +996,21 @@ public class FamilyContractService extends BaseService {
|
|
|
json.put("date", DateUtil.dateToStrShort(sf.getBegin()));
|
|
|
json.put("content", content);
|
|
|
json.put("remark", ""); //您好,您成功签约家庭医生
|
|
|
|
|
|
if(StringUtils.isNotBlank(sf.getOpenid())){
|
|
|
// 添加到发送队列
|
|
|
PushMsgTask.getInstance().putWxMsg(access_token, 1, sf.getOpenid(), sf.getName(), json);
|
|
|
}else{
|
|
|
JSONObject j = weiXinOpenIdUtils.getFamilyOpenId(patient.getCode());
|
|
|
Patient member = (Patient)j.get("member");
|
|
|
if(StringUtils.isNotBlank(member.getOpenid())){
|
|
|
String first = (String)json.get("first");
|
|
|
json.remove("first");
|
|
|
json.put("first",weiXinOpenIdUtils.getTitleMes(patient,j.getInt("relation"),member.getName()));
|
|
|
PushMsgTask.getInstance().putWxMsg(access_token, 1, member.getOpenid(), member.getName(), json);
|
|
|
if(j!=null){
|
|
|
Patient member = (Patient)j.get("member");
|
|
|
if(StringUtils.isNotBlank(member.getOpenid())){
|
|
|
String first = (String)json.get("first");
|
|
|
json.remove("first");
|
|
|
json.put("first",weiXinOpenIdUtils.getTitleMes(patient,j.getInt("relation"),member.getName()));
|
|
|
PushMsgTask.getInstance().putWxMsg(access_token, 1, member.getOpenid(), member.getName(), json);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
new Thread(new SignUploadTask(sf.getCode())).start();
|
|
|
JSONObject participants = new JSONObject();
|
|
|
participants.put(sf.getPatient(),0);
|
|
@ -2470,12 +2469,7 @@ public class FamilyContractService extends BaseService {
|
|
|
JSONObject result = new JSONObject();
|
|
|
Map<String, JSONObject> docMap = new HashMap<>();
|
|
|
SignFamily ssSign = signFamilyDao.findSignByPatient(patient, 1);
|
|
|
SignFamily jtSign = null;
|
|
|
if(checkPatient(patient)!=null){
|
|
|
jtSign = signFamilyDao.findSignByPatient(patient, 2);
|
|
|
}else{
|
|
|
jtSign = signFamilyDao.findByTeamCode(infos[1]);
|
|
|
}
|
|
|
SignFamily jtSign = signFamilyDao.findByTeamCode(infos[1]);
|
|
|
if (ssSign != null) {
|
|
|
DoctorTeamMember member = doctorTeamDoctor.findSanshiByTeamAndType(ssSign.getTeamCode(), 1);
|
|
|
if (member != null) {
|
|
@ -2527,7 +2521,6 @@ public class FamilyContractService extends BaseService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (docMap.size() > 0) {
|
|
|
result.put("teamDoctors", new JSONArray(docMap.values()));
|
|
|
} else {
|
|
@ -2538,6 +2531,39 @@ public class FamilyContractService extends BaseService {
|
|
|
}
|
|
|
|
|
|
|
|
|
public JSONObject getPatientSignDoctorsByTeam(String sessionId) {
|
|
|
String infos[] =sessionId.split("_");
|
|
|
JSONObject result = new JSONObject();
|
|
|
Map<String, JSONObject> docMap = new HashMap<>();
|
|
|
SignFamily ssSign = signFamilyDao.findSignByPatient(infos[0], 1);
|
|
|
SignFamily jtSign = signFamilyDao.findByTeamCode(infos[1]);
|
|
|
JSONObject ssArray = new JSONObject();
|
|
|
JSONObject jtArray = new JSONObject();
|
|
|
if (ssSign != null) {
|
|
|
JSONObject qkDoc = new JSONObject();
|
|
|
qkDoc.put("doctor", ssSign.getDoctor());
|
|
|
qkDoc.put("doctorName", ssSign.getDoctorName());
|
|
|
ssArray.put("doctor", qkDoc);
|
|
|
JSONObject jgDoc = new JSONObject();
|
|
|
jgDoc.put("doctor", ssSign.getDoctorHealth());
|
|
|
jgDoc.put("doctorName", ssSign.getDoctorHealthName());
|
|
|
ssArray.put("doctorHealth", jgDoc);
|
|
|
}
|
|
|
if (jtSign != null) {
|
|
|
JSONObject qkDoc = new JSONObject();
|
|
|
qkDoc.put("doctor", jtSign.getDoctor());
|
|
|
qkDoc.put("doctorName", jtSign.getDoctorName());
|
|
|
jtArray.put("doctor", qkDoc);
|
|
|
JSONObject jgDoc = new JSONObject();
|
|
|
jgDoc.put("doctor", jtSign.getDoctorHealth());
|
|
|
jgDoc.put("doctorName", jtSign.getDoctorHealthName());
|
|
|
jtArray.put("doctorHealth", jgDoc);
|
|
|
}
|
|
|
result.put("ssSign", ssArray);
|
|
|
result.put("jtSign", jtArray);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 查询患者对应医生
|