springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/bracelet/CommunityBraceletService.java
@@ -101,4 +101,33 @@ */ @GetMapping("/braceletApi/conductorList") R conductorList(@RequestParam("communityId") String communityId); /****************************************************************************************************************************** * * 大屏居家养老 * *****************************************************************************************************************************/ /** * 手环人数 * @return */ @GetMapping("/braceletApi/getUserNum") public R getUserNum(@RequestParam("communityId") String communityId); /** * 手环定位数据 */ @GetMapping("/braceletApi/getUserList") public R getUserList(@RequestParam("communityId") String communityId); /** * 获取手环预警次数 * @return */ @GetMapping("/braceletApi/getWarningNum") public R getWarningNum(@RequestParam("communityId") String communityId, @RequestParam(value = "disposeType",required = false) String disposeType); } springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BraceletApi.java
@@ -321,4 +321,56 @@ return communityBraceletService.conductorList(communityId); } /********************************************************************************************************************************************** * * 大屏居家养老 * **********************************************************************************************************************************************/ /** * 手环人数 * @return */ @ApiOperation(value = "手环人数") @GetMapping("/getUserNum") public R getUserNum(@RequestParam("communityId") String communityId) { return communityBraceletService.getUserNum(communityId); } /** * 手环定位数据 */ @ApiOperation(value = "手环定位数据") @GetMapping("/getUserList") public R getUserList(@RequestParam("communityId") String communityId) { return communityBraceletService.getUserList(communityId); } /** * 获取手环预警次数 * @return */ @ApiOperation(value = "获取手环预警次数") @GetMapping("/getWarningNum") public R getWarningNum(@RequestParam("communityId") String communityId, @RequestParam(value = "disposeType",required = false) String disposeType) { return communityBraceletService.getWarningNum(communityId,disposeType); } } 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); } } springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/java/com/panzhihua/service_bracelet/dao/BraceletEarlyWarningDao.java
@@ -67,4 +67,11 @@ */ BraceletEarlyWarningDO getDetails(@Param("id") String id); /** * 获取手环预警次数 * @return */ Integer getWarningNum(@Param("communityId") String communityId,@Param("disposeType") String disposeType); } springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/java/com/panzhihua/service_bracelet/dao/BraceletUserDataDao.java
@@ -65,4 +65,17 @@ */ List<SysUser> conductorList(@Param("communityId") String communityId); /** * 手环定位数据 */ List<BraceletUserDataDO> getUserList(@Param("communityId") String communityId); /** * 手环人数 * @return */ Integer getUserNum(@Param("communityId") String communityId); } springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/java/com/panzhihua/service_bracelet/service/BraceletEarlyWarningService.java
@@ -48,4 +48,11 @@ */ Integer WXdispose(BraceletEarlyWarningDO braceletEarlyWarningDO); /** * 获取手环预警次数 * @return */ Integer getWarningNum(String communityId, String disposeType); } springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/java/com/panzhihua/service_bracelet/service/BraceletUserDataService.java
@@ -54,4 +54,17 @@ */ List<SysUser> conductorList(String communityId); /** * 手环人数 * @return */ Integer getUserNum(String communityId); /** * 手环定位数据 */ List<BraceletUserDataDO> getUserList(String communityId); } springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/java/com/panzhihua/service_bracelet/service/impl/BraceletEarlyWarningImpl.java
@@ -46,4 +46,9 @@ public Integer WXdispose(BraceletEarlyWarningDO braceletEarlyWarningDO) { return baseMapper.WXdispose(braceletEarlyWarningDO); } @Override public Integer getWarningNum(String communityId, String disposeType) { return baseMapper.getWarningNum(communityId,disposeType); } } springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/java/com/panzhihua/service_bracelet/service/impl/BraceletUserDataImpl.java
@@ -51,4 +51,15 @@ public List<SysUser> conductorList(String communityId) { return braceletUserDataDao.conductorList(communityId); } @Override public Integer getUserNum(String communityId) { return braceletUserDataDao.getUserNum(communityId); } @Override public List<BraceletUserDataDO> getUserList(String communityId) { return braceletUserDataDao.getUserList(communityId); } } springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/resources/mapper/BraceletEarlyWarning.xml
@@ -226,4 +226,25 @@ delete from bracelet_early_warning where id = #{id} </delete> <select id="getWarningNum" resultType="Integer"> select count(id) from bracelet_early_warning <where> 1=1 <if test=" communityId != null and communityId!='' "> and community_id=#{communityId} </if> <if test=" disposeType != null and disposeType!='' "> and dispose_type=#{disposeType} </if> </where> </select> </mapper> springcloud_k8s_panzhihuazhihuishequ/service_bracelet/src/main/resources/mapper/BraceletUserDataMapper.xml
@@ -603,4 +603,39 @@ <select id="getUserList" resultMap="itemMap" > select id, device_id, lng, lat, community_id, user_name, age_num, sex, address, add_lng, add_lat, bin_phone, detail_address from bracelet_user_data <where> 1=1 <if test="communityId != null and communityId != '' "> and community_id=#{communityId} </if> </where> </select> <select id="getUserNum" resultType="Integer"> select count(id) from bracelet_user_data where community_id=#{communityId} </select> </mapper>