|
@ -26,6 +26,7 @@ import com.yihu.wlyy.service.app.health.PatientHealthGuidanceService;
|
|
|
import com.yihu.wlyy.service.app.talk.TalkGroupService;
|
|
|
import com.yihu.wlyy.task.PushMsgTask;
|
|
|
import com.yihu.wlyy.util.*;
|
|
|
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.http.NameValuePair;
|
|
|
import org.apache.http.message.BasicNameValuePair;
|
|
@ -46,6 +47,7 @@ import org.springside.modules.persistence.SearchFilter;
|
|
|
import org.springside.modules.persistence.SearchFilter.Operator;
|
|
|
import org.springside.modules.utils.Clock;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
@ -84,6 +86,9 @@ public class ConsultTeamService extends ConsultService {
|
|
|
@Autowired
|
|
|
private com.yihu.wlyy.service.common.account.DoctorService doctorService;
|
|
|
|
|
|
@Autowired
|
|
|
WeiXinAccessTokenUtils accessTokenUtils;
|
|
|
|
|
|
/**
|
|
|
* 查询患者是否还有未结束的三师咨询
|
|
|
*
|
|
@ -1624,6 +1629,17 @@ public class ConsultTeamService extends ConsultService {
|
|
|
endId = d.getCode();
|
|
|
endName = d.getName();
|
|
|
}
|
|
|
if(consultTeam.getType()==2){
|
|
|
Patient p = patientDao.findByCode(consultTeam.getPatient());
|
|
|
String name = p.getName();
|
|
|
String openId = p.getOpenid();
|
|
|
JSONObject json = new JSONObject();
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
json.put("keyword1", sdf.format(new Date()));
|
|
|
json.put("toUser", p.getCode());
|
|
|
json.put("first", name +",您好!您有1条咨询已结束,请及时对咨询医生进行满意度评价。待办事项:满意度评价");
|
|
|
PushMsgTask.getInstance().putWxMsg(accessTokenUtils.getAccessToken(), 10, openId, p.getName(), json);
|
|
|
}
|
|
|
}
|
|
|
JSONObject obj = ImUtill.endTopics(consultTeam.getPatient(), endId, endName, consultTeam.getConsult());
|
|
|
if (obj == null) {
|