|
@ -28,6 +28,7 @@ import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* 异步方法,减少体征数据接收主线程压力
|
|
@ -144,9 +145,9 @@ public class AsyncService extends BaseService{
|
|
|
} else { //餐前
|
|
|
if (!checkHealthIndex(NumberUtils.toDouble(value1), maxValueBefore, minValueBefore)) {
|
|
|
msgContentTemp += patient.getName() + "血糖异常(" + value1 + "mmol/L),请处理";
|
|
|
if(checkHealthIndexDetail(NumberUtils.toDouble(value1), maxValueAfter ,minValueAfter)==1){
|
|
|
if(checkHealthIndexDetail(NumberUtils.toDouble(value1), maxValueBefore ,minValueBefore)==1){
|
|
|
msgContent = "<a>"+patient.getName()+"</a><span style=\"color: #FF4C4C;\">血糖偏高</span>";
|
|
|
}else if(checkHealthIndexDetail(NumberUtils.toDouble(value1), maxValueAfter ,minValueAfter)==2){
|
|
|
}else if(checkHealthIndexDetail(NumberUtils.toDouble(value1), maxValueBefore ,minValueBefore)==2){
|
|
|
msgContent = "<a>"+patient.getName()+"</a><span style=\"color: #FF4C4C;\">血糖偏低</span>";
|
|
|
}
|
|
|
//体征异常,更新体征数据状态
|
|
@ -271,18 +272,18 @@ public class AsyncService extends BaseService{
|
|
|
}*/
|
|
|
}
|
|
|
// 查询病人三师签约中的健康管理师
|
|
|
SignFamily signFamilySS = signFamilyDao.findBySanshiPatientYes(patientCode);
|
|
|
if (signFamilySS != null) {
|
|
|
String healthDoctorTeam = signFamilySS.getDoctorHealth();
|
|
|
// 判断是否是否是同一个健康管理师
|
|
|
if (StringUtils.isNotEmpty(healthDoctorTeam) && !StringUtils.equals(healthDoctorFamily, healthDoctorTeam)) {
|
|
|
// 添加到消息接收人列表
|
|
|
receivers.add(healthDoctorTeam);
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(signFamilySS.getDoctor())&& !StringUtils.equals(doctorFamily, signFamilySS.getDoctor())){
|
|
|
receivers.add(signFamilySS.getDoctor());
|
|
|
}
|
|
|
}
|
|
|
// SignFamily signFamilySS = signFamilyDao.findBySanshiPatientYes(patientCode);
|
|
|
// if (signFamilySS != null) {
|
|
|
// String healthDoctorTeam = signFamilySS.getDoctorHealth();
|
|
|
// // 判断是否是否是同一个健康管理师
|
|
|
// if (StringUtils.isNotEmpty(healthDoctorTeam) && !StringUtils.equals(healthDoctorFamily, healthDoctorTeam)) {
|
|
|
// // 添加到消息接收人列表
|
|
|
// receivers.add(healthDoctorTeam);
|
|
|
// }
|
|
|
// if (StringUtils.isNotEmpty(signFamilySS.getDoctor())&& !StringUtils.equals(doctorFamily, signFamilySS.getDoctor())){
|
|
|
// receivers.add(signFamilySS.getDoctor());
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
List<Message> messages = new ArrayList<Message>();
|
|
|
JSONArray array = new JSONArray();
|