|
@ -99,7 +99,8 @@ public class PadDeviceController extends BaseController {
|
|
|
@RequestMapping(value = "SavePatientDevice", method = RequestMethod.POST)
|
|
|
public String saveDevice(@ApiParam(name = "json", value = "设备数据json", defaultValue = "{ \"deviceId\":\"3\", \"deviceName\":\"血压计-优瑞恩\", \"deviceSn\":\"7052169111\", \"categoryCode\":\"7\", \"userType\":\"-1\", \"sosAddress\":\"福建省厦门市思明区望海路55号之1\" }")
|
|
|
@RequestParam(value = "json", required = true) String json,
|
|
|
@ApiParam(name = "patient", value = "居民code") @RequestParam(value = "patient", required = false) String patientCode
|
|
|
@ApiParam(name = "patient", value = "居民code") @RequestParam(value = "patient", required = false) String patientCode,
|
|
|
@ApiParam(name = "doctorCode", value = "管理员code") @RequestParam(value = "doctorCode", required = false) String doctorCode
|
|
|
) {
|
|
|
try {
|
|
|
DevicePatientDevice device = objectMapper.readValue(json, DevicePatientDevice.class);
|
|
@ -113,8 +114,8 @@ public class PadDeviceController extends BaseController {
|
|
|
return write(-1,"设备不存在或者数据存在错误!");
|
|
|
}
|
|
|
|
|
|
BaseDoctorDO doctor = baseDoctorDao.findById(getUID());
|
|
|
device.setAgent(getUID());
|
|
|
BaseDoctorDO doctor = baseDoctorDao.findById(doctorCode);
|
|
|
device.setAgent(doctorCode);
|
|
|
device.setAgentName(doctor.getName());
|
|
|
String sn = device.getDeviceSn();
|
|
|
synchronized (sn.intern()){
|