From e53c6fa62a9a9802ab5990a61c67f028c5c07b3c Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期五, 22 三月 2024 16:01:52 +0800 Subject: [PATCH] 金汇社区 大屏手环接口 --- springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/java/com/panzhihua/service_bracelet/api/BraceletUserDataApi.java | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 56 insertions(+), 0 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/java/com/panzhihua/service_bracelet/api/BraceletUserDataApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/java/com/panzhihua/service_bracelet/api/BraceletUserDataApi.java index ef31902..0d0d2a6 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/java/com/panzhihua/service_bracelet/api/BraceletUserDataApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/java/com/panzhihua/service_bracelet/api/BraceletUserDataApi.java @@ -13,7 +13,9 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.util.HashMap; import java.util.List; +import java.util.Map; @Slf4j @RestController @@ -390,5 +392,59 @@ + /********************************************************************************************************************************************** + * + * 大屏居家养老 + * + **********************************************************************************************************************************************/ + + /** + * 手环人数 + * @return + */ + @GetMapping("/getUserNum") + public R getUserNum(@RequestParam("communityId") String communityId) + { + return R.ok(braceletUserDataService.getUserNum(communityId)); + } + + + /** + * 手环定位数据 + */ + @GetMapping("/getUserList") + public R getUserList(@RequestParam("communityId") String communityId) + { + return R.ok(braceletUserDataService.getUserList(communityId)); + } + + + /** + * 获取手环预警次数 + * @return + */ + @GetMapping("/getWarningNum") + public R getWarningNum(@RequestParam("communityId") String communityId, + @RequestParam(value = "disposeType",required = false) String disposeType) + { + //未处理 + Integer num1=braceletEarlyWarningService.getWarningNum(communityId,"1"); + //已处理 + Integer num2=braceletEarlyWarningService.getWarningNum(communityId,"2"); + //处理中 + Integer num4=braceletEarlyWarningService.getWarningNum(communityId,"3"); + //忽略 + Integer num3=braceletEarlyWarningService.getWarningNum(communityId,"4"); + + Map<String,Integer> map=new HashMap<>(); + map.put("untreatedNum",num1); + map.put("processedNum",num2); + map.put("ignoreNum",num3); + map.put("beingProcessedNum",num4); + + return R.ok(map); + } + + } -- Gitblit v1.7.1