|
@ -1,12 +1,14 @@
|
|
|
package com.yihu.wlyy.service.specialist.rehabilitation;
|
|
|
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
|
import com.yihu.wlyy.entity.message.Message;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
|
import com.yihu.wlyy.repository.doctor.DoctorDao;
|
|
|
import com.yihu.wlyy.repository.patient.PatientDao;
|
|
|
import com.yihu.wlyy.repository.patient.SignFamilyDao;
|
|
|
import com.yihu.wlyy.service.BaseService;
|
|
|
import com.yihu.wlyy.service.specialist.SpecialistEvaluateSevice;
|
|
|
import com.yihu.wlyy.util.IdCardUtil;
|
|
|
import com.yihu.wlyy.util.http.HttpResponse;
|
|
|
import com.yihu.wlyy.util.http.HttpUtils;
|
|
@ -38,6 +40,8 @@ public class RehabilitationManageService extends BaseService {
|
|
|
private SignFamilyDao signFamilyDao;
|
|
|
@Autowired
|
|
|
private PatientDao patientDao;
|
|
|
@Autowired
|
|
|
private SpecialistEvaluateSevice specialistEvaluateSevice;
|
|
|
|
|
|
/************************************************************* start ************************************************************************/
|
|
|
private String findRehabilitationPlanList = "/svr-specialist/findRehabilitationPlanList";//康复管理-康复计划列表
|
|
@ -451,4 +455,45 @@ public class RehabilitationManageService extends BaseService {
|
|
|
JSONObject result = new JSONObject(response.getContent());
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 每天8点,16点的job
|
|
|
* @param startTime
|
|
|
* @param endTime
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public void dailyJobSendMessage(String startTime,String endTime,Integer type) throws Exception{
|
|
|
JSONArray jsonArray = dailyJob(startTime,endTime);
|
|
|
JSONObject jsonObject = null;
|
|
|
String doctor = "";
|
|
|
String patient ="";
|
|
|
Integer num = null;
|
|
|
for(int i=0;i<jsonArray.length();i++){
|
|
|
jsonObject = jsonArray.getJSONObject(i);
|
|
|
doctor = jsonObject.get("doctor")+"";//执行的医生(接收的医生)
|
|
|
patient = jsonObject.get("patient")+"";//执行的居民
|
|
|
num = (Integer)jsonObject.get("num");//需要今日需要执行的项目数
|
|
|
Message message1 = new Message();
|
|
|
message1.setSender(null);
|
|
|
message1.setType(type);
|
|
|
message1.setReceiver(doctor);
|
|
|
specialistEvaluateSevice.sendMessage(message1,null,patient,num);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 每天十六点的job
|
|
|
* @param startTime
|
|
|
* @param endTime
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public void sixteenDailyJob(String startTime,String endTime) throws Exception{
|
|
|
JSONArray jsonArray = dailyJob(startTime,endTime);
|
|
|
JSONObject jsonObject = null;
|
|
|
for(int i=0;i<jsonArray.length();i++){
|
|
|
jsonObject = jsonArray.getJSONObject(i);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|