|
@ -19,6 +19,7 @@ import com.yihu.wlyy.service.app.device.PatientDeviceLogService;
|
|
import com.yihu.wlyy.service.app.device.PatientDeviceService;
|
|
import com.yihu.wlyy.service.app.device.PatientDeviceService;
|
|
import com.yihu.wlyy.service.app.health.PatientHealthIndexService;
|
|
import com.yihu.wlyy.service.app.health.PatientHealthIndexService;
|
|
import com.yihu.wlyy.service.app.health.bank.CreditLogService;
|
|
import com.yihu.wlyy.service.app.health.bank.CreditLogService;
|
|
|
|
import com.yihu.wlyy.service.app.health.bank.TaskService;
|
|
import com.yihu.wlyy.service.common.account.PatientService;
|
|
import com.yihu.wlyy.service.common.account.PatientService;
|
|
import com.yihu.wlyy.task.PushMsgTask;
|
|
import com.yihu.wlyy.task.PushMsgTask;
|
|
import com.yihu.wlyy.util.DateUtil;
|
|
import com.yihu.wlyy.util.DateUtil;
|
|
@ -86,6 +87,8 @@ public class PatientDeviceController extends BaseController {
|
|
private SystemDictDao systemDictDao;
|
|
private SystemDictDao systemDictDao;
|
|
@Autowired
|
|
@Autowired
|
|
private HttpClientUtil httpClientUtil;
|
|
private HttpClientUtil httpClientUtil;
|
|
|
|
@Autowired
|
|
|
|
private TaskService taskService;
|
|
|
|
|
|
@Value("${yihu.yihu_OpenPlatform_url}")
|
|
@Value("${yihu.yihu_OpenPlatform_url}")
|
|
private String url;
|
|
private String url;
|
|
@ -246,8 +249,8 @@ public class PatientDeviceController extends BaseController {
|
|
//修改设备表中{"1":"0", "2":"0"}的绑定次数 和其他绑定信息
|
|
//修改设备表中{"1":"0", "2":"0"}的绑定次数 和其他绑定信息
|
|
deviceDetailService.updateAfterBinding(device,new Date(),flag);
|
|
deviceDetailService.updateAfterBinding(device,new Date(),flag);
|
|
SignFamily signFamily = signFamilyDao.findSignByPatient(patient.getCode());
|
|
SignFamily signFamily = signFamilyDao.findSignByPatient(patient.getCode());
|
|
|
|
String flagStr ="";
|
|
if (flag && "350205".equals(signFamily.getHospital().substring(0,6))){
|
|
if (flag && "350205".equals(signFamily.getHospital().substring(0,6))){
|
|
String flagStr ="";
|
|
|
|
if ("1".equals(device.getCategoryCode())){
|
|
if ("1".equals(device.getCategoryCode())){
|
|
flagStr="GLU_BIND";
|
|
flagStr="GLU_BIND";
|
|
}else if ("2".equals(device.getCategoryCode())){
|
|
}else if ("2".equals(device.getCategoryCode())){
|
|
@ -273,19 +276,9 @@ public class PatientDeviceController extends BaseController {
|
|
}
|
|
}
|
|
//活动的活跃度
|
|
//活动的活跃度
|
|
if (flag){
|
|
if (flag){
|
|
String url1 = systemDictDao.findByDictNameAndCode("HEALTH_BANK_URL","HEALTH_BANK_URL");
|
|
|
|
String url = url1 + "/createActiveRecord";
|
|
|
|
List<NameValuePair> params = new ArrayList<>();
|
|
|
|
params.add(new BasicNameValuePair("originalStatus", "0"));
|
|
|
|
params.add(new BasicNameValuePair("currentStatus","1"));
|
|
|
|
params.add(new BasicNameValuePair("patientId",patient.getCode()));
|
|
|
|
String response = httpClientUtil.post(url,params,"UTF-8");
|
|
|
|
if (StringUtils.isNotEmpty(response)){
|
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(response);
|
|
|
|
if (!"200".equals(jsonObject.getString("status"))){
|
|
|
|
logger.info("添加活跃度失败!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = new com.alibaba.fastjson.JSONObject();
|
|
|
|
jsonObject.put("patientId",patient.getCode());
|
|
|
|
jsonObject.put("taskCode",flagStr);
|
|
}
|
|
}
|
|
try {
|
|
try {
|
|
String openId = patient.getOpenid();
|
|
String openId = patient.getOpenid();
|