|
@ -209,7 +209,7 @@ public class PatientDeviceService extends BaseService {
|
|
// }
|
|
// }
|
|
if(checkDeviceSn(sn)){
|
|
if(checkDeviceSn(sn)){
|
|
// patientDeviceDao.save(patientDevice);
|
|
// patientDeviceDao.save(patientDevice);
|
|
savePatientDevice(patientDevice,patient.getAddress(),patient.getName());
|
|
|
|
|
|
savePatientDevice(patientDevice,patient.getAddress(),patient.getName(),patient.getDiseaseCondition());
|
|
}else {
|
|
}else {
|
|
String message = "设备不存在";
|
|
String message = "设备不存在";
|
|
throw new Exception(message);
|
|
throw new Exception(message);
|
|
@ -222,9 +222,9 @@ public class PatientDeviceService extends BaseService {
|
|
* 设备绑定
|
|
* 设备绑定
|
|
* @param patientDevice
|
|
* @param patientDevice
|
|
*/
|
|
*/
|
|
public void savePatientDevice(PatientDevice patientDevice,String address,String patientName){
|
|
|
|
|
|
public void savePatientDevice(PatientDevice patientDevice,String address,String patientName,Integer diseaseCondition){
|
|
if(iotDeviceService.isUploadIot()){
|
|
if(iotDeviceService.isUploadIot()){
|
|
iotDeviceService.saveDevice(patientDevice,address,patientName);
|
|
|
|
|
|
iotDeviceService.saveDevice(patientDevice,address,patientName,diseaseCondition);
|
|
}else {
|
|
}else {
|
|
patientDeviceDao.save(patientDevice);
|
|
patientDeviceDao.save(patientDevice);
|
|
}
|
|
}
|