|
@ -136,6 +136,20 @@ public class DoctorDeviceController extends BaseController {
|
|
//修改设备表中{"1":"0", "2":"0"}绑定次数 和其他绑定信息,
|
|
//修改设备表中{"1":"0", "2":"0"}绑定次数 和其他绑定信息,
|
|
deviceDetailService.updateAfterBinding(device,new Date(),flag);
|
|
deviceDetailService.updateAfterBinding(device,new Date(),flag);
|
|
|
|
|
|
|
|
String flagStr ="";
|
|
|
|
if ("1".equals(device.getCategoryCode())){
|
|
|
|
flagStr="GLU_BIND";
|
|
|
|
}else if ("2".equals(device.getCategoryCode())){
|
|
|
|
flagStr="BP_BIND";
|
|
|
|
}
|
|
|
|
Patient patient = patientDao.findByCode(device.getUser());
|
|
|
|
//活动的活跃度
|
|
|
|
if (flag){
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
jsonObject.put("patientId",patient.getCode());
|
|
|
|
jsonObject.put("taskCode",flagStr);
|
|
|
|
taskService.createActiveRecord(jsonObject);
|
|
|
|
}
|
|
return success("设备保存成功!");
|
|
return success("设备保存成功!");
|
|
}
|
|
}
|
|
catch (Exception ex) {
|
|
catch (Exception ex) {
|
|
@ -178,12 +192,12 @@ public class DoctorDeviceController extends BaseController {
|
|
SignFamily signFamily = signFamilyDao.findSignByPatient(patient.getCode(),2);
|
|
SignFamily signFamily = signFamilyDao.findSignByPatient(patient.getCode(),2);
|
|
//调用增加积分接口 海沧区的居民才能添加积分
|
|
//调用增加积分接口 海沧区的居民才能添加积分
|
|
String flagStr ="";
|
|
String flagStr ="";
|
|
|
|
if ("1".equals(device.getCategoryCode())){
|
|
|
|
flagStr="GLU_BIND";
|
|
|
|
}else if ("2".equals(device.getCategoryCode())){
|
|
|
|
flagStr="BP_BIND";
|
|
|
|
}
|
|
if (flag && "350205".equals(signFamily.getHospital().substring(0,6))){
|
|
if (flag && "350205".equals(signFamily.getHospital().substring(0,6))){
|
|
if ("1".equals(device.getCategoryCode())){
|
|
|
|
flagStr="GLU_BIND";
|
|
|
|
}else if ("2".equals(device.getCategoryCode())){
|
|
|
|
flagStr="BP_BIND";
|
|
|
|
}
|
|
|
|
String creditDetail = "{\"tradeType\":\"ACTIVITY_TASK\",\"flag\":\""+flagStr+"\",\"tradeDirection\":1,\"status\":1,\"patientId\":\""+device.getUser()+"\",\"hospital\":\""+patient.getTown()+"\"}";
|
|
String creditDetail = "{\"tradeType\":\"ACTIVITY_TASK\",\"flag\":\""+flagStr+"\",\"tradeDirection\":1,\"status\":1,\"patientId\":\""+device.getUser()+"\",\"hospital\":\""+patient.getTown()+"\"}";
|
|
JSONObject jsonObject = JSONObject.parseObject(creditDetail);
|
|
JSONObject jsonObject = JSONObject.parseObject(creditDetail);
|
|
JSONObject response = creditLogService.insert(jsonObject);
|
|
JSONObject response = creditLogService.insert(jsonObject);
|