|
@ -1,5 +1,6 @@
|
|
|
package com.yihu.wlyy.service.app.sign;
|
|
|
|
|
|
import com.yihu.wlyy.entity.concern.ConcernDO;
|
|
|
import com.yihu.wlyy.entity.consult.Consult;
|
|
|
import com.yihu.wlyy.entity.consult.ConsultTeam;
|
|
|
import com.yihu.wlyy.entity.doctor.OperatorLog;
|
|
@ -16,6 +17,7 @@ import com.yihu.wlyy.entity.organization.Hospital;
|
|
|
import com.yihu.wlyy.entity.patient.*;
|
|
|
import com.yihu.wlyy.entity.wechat.WechatTemplateConfig;
|
|
|
import com.yihu.wlyy.logs.BusinessLogs;
|
|
|
import com.yihu.wlyy.repository.concern.ConcernDao;
|
|
|
import com.yihu.wlyy.repository.consult.ConsultDao;
|
|
|
import com.yihu.wlyy.repository.consult.ConsultTeamDao;
|
|
|
import com.yihu.wlyy.repository.dict.SystemDictDao;
|
|
@ -167,6 +169,8 @@ public class FamilyContractService extends BaseService {
|
|
|
private TrackPatientDao trackPatientDao;
|
|
|
@Autowired
|
|
|
private WechatTemplateConfigDao templateConfigDao;
|
|
|
@Autowired
|
|
|
private ConcernDao concernDao;
|
|
|
|
|
|
|
|
|
public SignFamily findSignFamilyByCode(String code) {
|
|
@ -324,28 +328,27 @@ public class FamilyContractService extends BaseService {
|
|
|
json.put("name", d.getName());
|
|
|
json.put("photo", d.getPhoto());
|
|
|
json.put("sex", d.getSex());
|
|
|
json.put("job", d.getJob());
|
|
|
json.put("jobName", d.getJobName());
|
|
|
json.put("job", d.getJob()==null?"":d.getJob());
|
|
|
json.put("jobName", d.getJobName()==null?"":d.getJobName());
|
|
|
json.put("hospital", d.getHospitalName());
|
|
|
json.put("dept", d.getDeptName());
|
|
|
json.put("intro", d.getIntroduce());
|
|
|
json.put("expertise", d.getExpertise());
|
|
|
json.put("level", d.getLevel());
|
|
|
// 查询与当前医生的签约状态
|
|
|
SignFamily sf = null;
|
|
|
if (d.getLevel() == 2) {
|
|
|
sf = signFamilyDao.findByDoctorPatient(doctor, patient);
|
|
|
} else if (d.getLevel() == 3) {
|
|
|
sf = signFamilyDao.findByDoctorHealthPatient(doctor, patient);
|
|
|
}
|
|
|
ConcernDO concernDO = concernDao.findByPatientAndDoctor(patient,doctor);
|
|
|
|
|
|
if (sf == null) {
|
|
|
// 没有签约信息
|
|
|
if (concernDO == null) {
|
|
|
// 没有关注信息
|
|
|
json.put("sign", -1);
|
|
|
} else {
|
|
|
// 有签约信息
|
|
|
json.put("sign", sf.getStatus());
|
|
|
json.put("sign", 1);
|
|
|
}
|
|
|
//关注数
|
|
|
Integer concernTotal = concernDao.countPatientsByDoctorCode(doctor);
|
|
|
json.put("concernCount",concernTotal);
|
|
|
|
|
|
//设置查看病人所在分组
|
|
|
List<DoctorPatientGroupInfo> dctorPatientGroupInfo = doctorPatientGroupInfoDao.findByMorenPatient(patient);
|
|
|
if (dctorPatientGroupInfo != null && dctorPatientGroupInfo.size() > 0) {
|
|
@ -369,11 +372,6 @@ public class FamilyContractService extends BaseService {
|
|
|
}
|
|
|
json.put("services", services);
|
|
|
|
|
|
//是否签约上限
|
|
|
JSONObject signLimit = signWebService.getSickFamilyDoctorSignLimit(doctor);
|
|
|
json.put("signTotal", signLimit.getInt("signTotal"));//签约总数
|
|
|
json.put("limitTotal", signLimit.getInt("limitTotal"));//限制总数
|
|
|
|
|
|
return json;
|
|
|
}
|
|
|
|