|
@@ -5,6 +5,9 @@ import com.care.client.service.PassportService;
|
|
|
import com.care.client.service.PinanbaoService;
|
|
|
import com.care.client.vo.DeviceMonitorVO;
|
|
|
import com.care.client.vo.MemberInfoVO;
|
|
|
+import com.care.common.entity.CareBedroomInbedHourSta;
|
|
|
+import com.care.common.entity.CareToiletInoutHourSta;
|
|
|
+import com.care.common.entity.CareWalkingDistanceHourSta;
|
|
|
import com.care.common.exception.BDException;
|
|
|
import com.care.common.util.PageResult;
|
|
|
import com.care.common.util.Result;
|
|
@@ -58,19 +61,21 @@ public class HouseApiController {
|
|
|
}
|
|
|
|
|
|
@GetMapping("/device/monitor")
|
|
|
- @ApiOperation(tags = {"首页"},value = "设备的监测信息")
|
|
|
- public Result<DeviceMonitorVO> listNotHandle(@RequestHeader(value = "token") String token, @RequestParam("devId") Long devId){
|
|
|
+ @ApiOperation(tags = {"首页"},value = "设备的监测信息 --三期修改")
|
|
|
+ public Result<DeviceMonitorVO> getMonitor(@RequestHeader(value = "token") String token, @RequestParam("devId") Long devId){
|
|
|
try {
|
|
|
return Result.success(this.pinanbaoService.devMonitorData(devId));
|
|
|
}catch (BDException e) {
|
|
|
- log.error("未处理事件查询-分页列表出现异常",e);
|
|
|
+ log.error("首页设备的监测信息-查询监测信息出现异常",e);
|
|
|
return PageResult.error(e.getMessage());
|
|
|
} catch (Exception e) {
|
|
|
- log.error("事件处理: 未处理事件查询出现异常",e);
|
|
|
- return PageResult.error( "获取列表失败");
|
|
|
+ log.error("首页设备的监测信息: 查询监测信息出现异常",e);
|
|
|
+ return PageResult.error( "获取信息失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
@PostMapping(value = "/sos" ,consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
|
|
@ApiOperation(tags = {"首页"},value = "SOS呼叫",httpMethod ="POST" ,response = Result.class)
|
|
|
public Result<Object> sos(@RequestHeader("token") String token, @RequestParam(value = "file") MultipartFile file){
|
|
@@ -114,4 +119,66 @@ public class HouseApiController {
|
|
|
return Result.error("查询失败!");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ *卧室在床时间图表
|
|
|
+ * @param token
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/device/getInbedTimeChartList")
|
|
|
+ @ApiOperation(tags = {"首页"},value = "卧室在床时间统计图表 --三期新增")
|
|
|
+ public Result<List<CareBedroomInbedHourSta>> getInbedTimeChartList(@RequestHeader(value = "token") String token, @RequestParam("devId") Long devId){
|
|
|
+ try {
|
|
|
+ List<CareBedroomInbedHourSta> datas = pinanbaoService.getInbedTimeChartList(devId);
|
|
|
+ return Result.success(datas);
|
|
|
+ }catch (BDException e) {
|
|
|
+ log.error("首页-在床时间图表查询出现异常",e);
|
|
|
+ return PageResult.error(e.getMessage());
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("首页: 在床时间图表查询出现异常",e);
|
|
|
+ return PageResult.error( "获取在床时间图表失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *卫生间进出统计图表
|
|
|
+ * @param token
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/device/getToiletInoutChartList")
|
|
|
+ @ApiOperation(tags = {"首页"},value = "卫生间进出统计图表 --三期新增")
|
|
|
+ public Result<List<CareToiletInoutHourSta>> getToiletInoutChartList(@RequestHeader(value = "token") String token, @RequestParam("devId") Long devId){
|
|
|
+ try {
|
|
|
+ List<CareToiletInoutHourSta> datas = pinanbaoService.getToiletInoutChartList(devId);
|
|
|
+ return Result.success(datas);
|
|
|
+ }catch (BDException e) {
|
|
|
+ log.error("首页-卫生间进出图表查询出现异常",e);
|
|
|
+ return PageResult.error(e.getMessage());
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("首页: 卫生间进出图表查询出现异常",e);
|
|
|
+ return PageResult.error( "获取卫生间进出图表失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *活动统计图表
|
|
|
+ * @param token
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/device/getActivityChartList")
|
|
|
+ @ApiOperation(tags = {"首页"},value = "活动统计图表 --三期新增")
|
|
|
+ public Result<List<CareWalkingDistanceHourSta>> getActivityChartList(@RequestHeader(value = "token") String token, @RequestParam("devId") Long devId){
|
|
|
+ try {
|
|
|
+ List<CareWalkingDistanceHourSta> datas = pinanbaoService.getActivityChartList(devId);
|
|
|
+ return Result.success(datas);
|
|
|
+ }catch (BDException e) {
|
|
|
+ log.error("首页-卫生间进出图表查询出现异常",e);
|
|
|
+ return PageResult.error(e.getMessage());
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("首页: 卫生间进出图表查询出现异常",e);
|
|
|
+ return PageResult.error( "获取卫生间进出图表失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|