| | |
| | | // 直接从已有聚合结果推算total,避免去掉分页后再全量查一遍大表 |
| | | long total = 0L; |
| | | try { |
| | | // * wzx: 未执行数量 |
| | | // * ysf: 已随访数量 |
| | | // * fssb: 发送失败数量 |
| | | // * yfs: 已发送数量 |
| | | // * dsf: 待随访数量 |
| | | |
| | | // long wzx = map.get("wzx") != null ? ((Number) map.get("wzx")).longValue() : 0L; |
| | | // long ysf = map.get("ysf") != null ? ((Number) map.get("ysf")).longValue() : 0L; |
| | | // long dsf = map.get("dsf") != null ? ((Number) map.get("dsf")).longValue() : 0L; |
| | | // long fssb = map.get("fssb") != null ? ((Number) map.get("fssb")).longValue() : 0L; |
| | | total = map.get("total") != null ? ((Number) map.get("total")).longValue() : 0L; |
| | | |
| | | } catch (Exception e) { |
| | |
| | | if (ObjectUtils.isNotEmpty(oldCondition) && isSameCondition(oldCondition, serviceSubtaskEntity)) { |
| | | redisFlag = true; |
| | | map = redisMap; |
| | | redisCache.setCacheObject(userId + "patItemCount", map, 120, TimeUnit.MINUTES); |
| | | redisCache.setCacheObject(userId + "patItemCount", map, 60, TimeUnit.MINUTES); |
| | | } |
| | | } |
| | | if (!redisFlag) { |
| | |
| | | @ApiOperation("获取随访统计比例") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/getSfStatistics") |
| | | public AjaxResult getSfStatistics(@RequestBody ServiceSubtaskCountReq serviceSubtaskCountReq) { |
| | | public Map<String, Object> getSfStatistics(@RequestBody ServiceSubtaskCountReq serviceSubtaskCountReq) { |
| | | if (CollectionUtils.isEmpty(serviceSubtaskCountReq.getServiceType())) { |
| | | return error("服务类型不能为空"); |
| | | } |
| | | Integer offset = PageUtils.getOffset(serviceSubtaskCountReq.getPageNum(), serviceSubtaskCountReq.getPageSize()); |
| | | serviceSubtaskCountReq.setPageNum(offset); |
| | | |
| | | String followUpCountStyle = configService.selectConfigByKey("followUpCountStyle", serviceSubtaskCountReq.getOrgid()); |
| | | if (ObjectUtils.isNotEmpty(followUpCountStyle)) { |
| | | serviceSubtaskCountReq.setFollowUpCountStyle(followUpCountStyle); |
| | | } else { |
| | | serviceSubtaskCountReq.setFollowUpCountStyle("1"); |
| | | } |
| | | return success(serviceSubtaskService.getSfStatistics(serviceSubtaskCountReq)); |
| | | serviceSubtaskCountReq.setPageNum(null); |
| | | serviceSubtaskCountReq.setPageSize(null); |
| | | List<ServiceSubtaskStatistic> sfStatistics = serviceSubtaskService.getSfStatistics(serviceSubtaskCountReq); |
| | | return getDataTable4(CollectionUtils.isEmpty(sfStatistics) ? sfStatistics.size() : 0, serviceSubtaskService.getSfStatistics(serviceSubtaskCountReq)); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 延续护理统计 |
| | | */ |
| | |
| | | } |
| | | return success(serviceSubtaskService.getContinueNurseCount(serviceSubtaskCotinueCountVO)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | |
| | | } |