|
@ -23,6 +23,7 @@ import com.yihu.wlyy.repository.specialist.SpecialDiseaseDao;
|
|
import com.yihu.wlyy.repository.specialist.TeamDiseaseRelationDao;
|
|
import com.yihu.wlyy.repository.specialist.TeamDiseaseRelationDao;
|
|
import com.yihu.wlyy.repository.wechat.WechatTemplateConfigDao;
|
|
import com.yihu.wlyy.repository.wechat.WechatTemplateConfigDao;
|
|
import com.yihu.wlyy.service.BaseService;
|
|
import com.yihu.wlyy.service.BaseService;
|
|
|
|
import com.yihu.wlyy.service.app.account.DoctorInfoService;
|
|
import com.yihu.wlyy.service.app.disease.PatientDiseaseService;
|
|
import com.yihu.wlyy.service.app.disease.PatientDiseaseService;
|
|
import com.yihu.wlyy.service.app.label.SignPatientLabelService;
|
|
import com.yihu.wlyy.service.app.label.SignPatientLabelService;
|
|
import com.yihu.wlyy.service.app.team.AdminTeamService;
|
|
import com.yihu.wlyy.service.app.team.AdminTeamService;
|
|
@ -546,11 +547,18 @@ public class SpecialistService extends BaseService {
|
|
return mes;
|
|
return mes;
|
|
}
|
|
}
|
|
|
|
|
|
public String agreeSpecialistTeam(String token, String state, String relationCode, String remark, Long mesId) throws Exception {
|
|
|
|
|
|
public String agreeSpecialistTeam(String token, String state, String relationCode, String remark, Long mesId, String labelcode, String doctorcode) throws Exception {
|
|
Map<String, Object> param = new HashedMap();
|
|
Map<String, Object> param = new HashedMap();
|
|
param.put("state", state);
|
|
param.put("state", state);
|
|
param.put("relationCode", relationCode);
|
|
param.put("relationCode", relationCode);
|
|
param.put("remark", remark);
|
|
param.put("remark", remark);
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(doctorcode)){
|
|
|
|
Doctor doctor = doctorDao.findByCode(doctorcode);
|
|
|
|
param.put("health_assistant", doctorcode);//计管医生
|
|
|
|
param.put("health_assistant_name", doctor.getName());//计管医生名称
|
|
|
|
}
|
|
|
|
|
|
HttpResponse response = HttpUtils.doPost(specialistUrl + "svr-specialist/agreeSpecialistTeam", param);
|
|
HttpResponse response = HttpUtils.doPost(specialistUrl + "svr-specialist/agreeSpecialistTeam", param);
|
|
JSONObject rs = new JSONObject(response.getContent());
|
|
JSONObject rs = new JSONObject(response.getContent());
|
|
if ("succes".equals(rs.getString("message"))) {
|
|
if ("succes".equals(rs.getString("message"))) {
|
|
@ -577,6 +585,26 @@ public class SpecialistService extends BaseService {
|
|
//推送给居民模板消息
|
|
//推送给居民模板消息
|
|
pushWeiTemp(token, "0", remark, p, d);
|
|
pushWeiTemp(token, "0", remark, p, d);
|
|
} else {
|
|
} else {
|
|
|
|
|
|
|
|
//保存居民健康情况标签
|
|
|
|
if(StringUtils.isNotBlank(labelcode)){
|
|
|
|
SignPatientLabel signPatientLabel = labelService.getLabelByCodeAndType(labelcode,"8");
|
|
|
|
//先删除已有健康情况标签
|
|
|
|
signPatientLabelInfoDao.deleteByPatientAndLabelTypeAndStatus(p.getCode(),"8",1);
|
|
|
|
SignPatientLabelInfo signPatientLabelInfo = new SignPatientLabelInfo();
|
|
|
|
signPatientLabelInfo.setLabel(signPatientLabel.getLabelCode());
|
|
|
|
signPatientLabelInfo.setLabelType(signPatientLabel.getLabelType());
|
|
|
|
signPatientLabelInfo.setLabelName(signPatientLabel.getLabelName());
|
|
|
|
signPatientLabelInfo.setCzrq(new Date());
|
|
|
|
signPatientLabelInfo.setPatient(p.getCode());
|
|
|
|
signPatientLabelInfo.setPname(p.getName());
|
|
|
|
signPatientLabelInfo.setStatus(1);
|
|
|
|
//添加新的健康情况标签
|
|
|
|
signPatientLabelInfoDao.save(signPatientLabelInfo);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//推送给居民模板消息
|
|
//推送给居民模板消息
|
|
pushWeiTemp(token, "1", "", p, d);
|
|
pushWeiTemp(token, "1", "", p, d);
|
|
|
|
|