| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | |
| | | */ |
| | | @GetMapping("/getData") |
| | | public R<IPage<BraceletUserDataDO>> getData(@RequestParam("pageNum") Integer pageNum, |
| | | @RequestParam("pageSize") Integer pageSize, |
| | | @RequestParam("communityId") String communityId, |
| | | @RequestParam("userName") String userName, |
| | | @RequestParam("phone") String phone) |
| | | @RequestParam("pageSize") Integer pageSize, |
| | | @RequestParam(value = "communityId",required = false) String communityId, |
| | | @RequestParam(value = "userName",required = false) String userName, |
| | | @RequestParam(value = "phone",required = false) String phone) |
| | | |
| | | |
| | | { |
| | |
| | | @GetMapping("/getEarlyWarningList") |
| | | public R<IPage<BraceletEarlyWarningDO>> getList(@RequestParam("pageNum") Integer pageNum, |
| | | @RequestParam("pageSize") Integer pageSize, |
| | | @RequestParam("communityId") String communityId, |
| | | @RequestParam("equipmentNumber") String equipmentNumber, |
| | | @RequestParam("disposeUserId") String disposeUserId, |
| | | @RequestParam("type") String type, |
| | | @RequestParam("userName") String userName, |
| | | @RequestParam("phone") String phone) |
| | | @RequestParam(value = "communityId",required = false) String communityId, |
| | | @RequestParam(value = "equipmentNumber",required = false) String equipmentNumber, |
| | | @RequestParam(value = "disposeUserId",required = false) String disposeUserId, |
| | | @RequestParam(value = "type",required = false) String type, |
| | | @RequestParam(value = "userName",required = false) String userName, |
| | | @RequestParam(value = "phone",required = false) String phone) |
| | | { |
| | | Page page=new Page(); |
| | | page.setSize(pageSize); |
| | |
| | | return R.fail("id不能为空"); |
| | | } |
| | | |
| | | //忽略 |
| | | if(StringUtils.equals(braceletEarlyWarningDO.getDisposeType(),"4")) |
| | | { |
| | | BraceletEarlyWarningDO da=new BraceletEarlyWarningDO(); |
| | |
| | | |
| | | |
| | | |
| | | /********************************************************************************************************************************************** |
| | | * |
| | | * 大屏居家养老 |
| | | * |
| | | **********************************************************************************************************************************************/ |
| | | |
| | | /** |
| | | * 手环人数 |
| | | * @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); |
| | | } |
| | | |
| | | |
| | | |
| | | } |