|
@ -580,4 +580,32 @@ public class PatientDeviceController extends BaseController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("获取患者手表步数数据(居民端)")
|
|
|
|
@RequestMapping(value = "getPatientStep", method = RequestMethod.GET)
|
|
|
|
public String getPatientStep(@ApiParam(name = "patient") @RequestParam(value = "patient", required = false) String patient,
|
|
|
|
@ApiParam(name = "deviceSn") @RequestParam(value = "deviceSn", required = false) String deviceSn,
|
|
|
|
@ApiParam(name = "day") @RequestParam(value = "day", required = false) String day) {
|
|
|
|
try {
|
|
|
|
//居民端登录鉴权
|
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = new com.alibaba.fastjson.JSONObject();
|
|
|
|
jsonObject.put("patient",permissionService.getUID());
|
|
|
|
if (permissionService.noPermission(1, jsonObject)) {
|
|
|
|
return write(-1,"该操作没有权限");
|
|
|
|
}
|
|
|
|
if (StringUtils.isBlank(patient) && StringUtils.isBlank(deviceSn)) {
|
|
|
|
return write(-1,"请求参数");
|
|
|
|
}
|
|
|
|
org.json.JSONObject result = patientDeviceService.getPatientStep(patient, deviceSn, day);
|
|
|
|
if (ResponseContant.success == result.getInt(ResponseContant.resultFlag)) {
|
|
|
|
return write(200,"获取成功","data", result.get(ResponseContant.resultMsg));
|
|
|
|
} else {
|
|
|
|
return write(-1,result.getString(ResponseContant.resultMsg));
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
return errorResult(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
}
|