|
@ -88,7 +88,9 @@ public class DoctorDeviceController extends BaseController {
|
|
|
@ApiOperation("设备保存接口--医生端")
|
|
|
@RequestMapping(value = "SavePatientDevice",method = RequestMethod.POST)
|
|
|
public String saveDevice(@ApiParam(name="data",value="设备数据json",defaultValue = "{\"user\":\"915cca0a-5b1d-11e6-8344-fa163e8aee56\",\"deviceId\": \"3\",\"deviceName\": \"血压计-优瑞恩\",\"deviceSn\": \"16C000337\",\"categoryCode\": \"1\",\"userType\": \"-1\"}")
|
|
|
@RequestParam(value="data",required = true) String data) {
|
|
|
@RequestParam(value="data",required = true) String data,
|
|
|
@ApiParam(name="isScan",value="是否扫一扫 1是0否,默认否",required = false)
|
|
|
@RequestParam(value="isScan",required = false) String isScan) {
|
|
|
try {
|
|
|
DevicePatientDevice device = objectMapper.readValue(data,DevicePatientDevice.class);
|
|
|
if(StringUtils.isBlank(device.getDeviceSn())){
|
|
@ -104,7 +106,7 @@ public class DoctorDeviceController extends BaseController {
|
|
|
Map<String,Object> checkMap = patientDeviceService.checkBindingFirstAndType(device);
|
|
|
boolean flag = (Boolean)checkMap.get("flag");
|
|
|
//绑定
|
|
|
patientDeviceService.saveDevice(device);
|
|
|
patientDeviceService.saveDevice(device,isScan);
|
|
|
patientDeviceLogService.savePatientDeviceLog(device,device.getDeviceSn(),1,1);
|
|
|
|
|
|
//修改设备表中{"1":"0", "2":"0"}绑定次数 和其他绑定信息,
|
|
@ -141,7 +143,7 @@ public class DoctorDeviceController extends BaseController {
|
|
|
boolean flag = (Boolean)checkMap.get("flag");
|
|
|
|
|
|
//绑定
|
|
|
patientDeviceService.saveDevice(device);
|
|
|
patientDeviceService.saveDevice(device,null);
|
|
|
patientDeviceLogService.savePatientDeviceLog(device,device.getDeviceSn(),1,1);
|
|
|
|
|
|
//修改设备表中{"1":"0", "2":"0"}绑定次数 和其他绑定信息,
|