|
@ -32,6 +32,7 @@ import com.yihu.wlyy.service.third.jw.JwArchivesService;
|
|
|
import com.yihu.wlyy.task.PushMsgTask;
|
|
|
import com.yihu.wlyy.task.SignUploadTask;
|
|
|
import com.yihu.wlyy.util.*;
|
|
|
import com.yihu.wlyy.web.third.gateway.controller.doctor.GcDoctorController;
|
|
|
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
|
|
|
import com.yihu.wlyy.wechat.util.WeiXinOpenIdUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@ -39,6 +40,8 @@ import org.apache.http.NameValuePair;
|
|
|
import org.apache.http.message.BasicNameValuePair;
|
|
|
import org.json.JSONArray;
|
|
|
import org.json.JSONObject;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.data.domain.Page;
|
|
@ -66,6 +69,7 @@ import java.util.*;
|
|
|
@Transactional
|
|
|
public class FamilyContractService extends BaseService {
|
|
|
|
|
|
private Logger logger = LoggerFactory.getLogger(FamilyContractService.class);
|
|
|
@Autowired
|
|
|
private DoctorPatientDao doctorPatientDao;
|
|
|
@Autowired
|
|
@ -680,12 +684,18 @@ public class FamilyContractService extends BaseService {
|
|
|
message.setOver("1");//未处理
|
|
|
message.setData(temp.getCode());
|
|
|
messageDao.save(message);
|
|
|
// 发送消息给医生
|
|
|
JSONObject jsonObject = doctorWorkTimeService.isDoctorWorking(doctor);
|
|
|
if (jsonObject.getString("status").equals("1")) {
|
|
|
//如果在工作时间内就推送
|
|
|
pushMsgTask.put(doctor, MessageType.MESSAGE_TYPE_DOCTOR_NEW_SIGN_WEB.D_SW_01.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_SIGN_WEB.家庭签约.name(), "您有一条新的家庭签约申请!", patient);
|
|
|
|
|
|
try {
|
|
|
// 发送消息给医生
|
|
|
JSONObject jsonObject = doctorWorkTimeService.isDoctorWorking(doctor);
|
|
|
if (jsonObject.getString("status").equals("1")) {
|
|
|
//如果在工作时间内就推送
|
|
|
pushMsgTask.put(doctor, MessageType.MESSAGE_TYPE_DOCTOR_NEW_SIGN_WEB.D_SW_01.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_SIGN_WEB.家庭签约.name(), "您有一条新的家庭签约申请!", patient);
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
logger.info("发送医生消息失败:"+e.getMessage());
|
|
|
}
|
|
|
|
|
|
// 新增发送医生助手模板消息 v1.4.0 by wujunjie
|
|
|
if (StringUtils.isNotEmpty(d.getOpenid())){
|
|
|
String url = doctorAssistant + "/doctor/feldsher/sendDoctorTemplates";
|