| | |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import com.ltkj.common.core.domain.entity.SysDept; |
| | | import com.ltkj.common.core.domain.entity.SysUser; |
| | | import com.ltkj.common.core.redis.RedisCache; |
| | | import com.ltkj.common.utils.DateUtils; |
| | | import com.ltkj.hosp.domain.*; |
| | | import com.ltkj.hosp.service.*; |
| | |
| | | private ITjCustomerService customerService; |
| | | @Resource |
| | | private ITjProjectService projectService; |
| | | @Resource |
| | | private RedisCache redisCache; |
| | | @Resource |
| | | private TjAsyncService asyncService; |
| | | @Resource |
| | | private ISysDeptService deptService; |
| | | @Resource |
| | |
| | | @GetMapping("/getLineChart") |
| | | @ApiOperation(value = "首页折线图数据") |
| | | public AjaxResult getLineChart() { |
| | | List<Map<Object, Object>> line = orderService.getLine(); |
| | | asyncService.getLineChart(); |
| | | if(redisCache.hasKey("getLineChart")){ |
| | | return redisCache.getCacheObject("getLineChart"); |
| | | } |
| | | return getResult(); |
| | | } |
| | | |
| | | private AjaxResult getResult() { |
| | | // List<Map<Object, Object>> line = orderService.getLine(); |
| | | List<LineChartsVo> line = orderService.getLine(); |
| | | Collections.reverse(line); |
| | | return AjaxResult.success("折线图数据", line); |
| | | } |
| | |
| | | @GetMapping("/getPieChart") |
| | | @ApiOperation(value = "首页饼状图登记人数接口") |
| | | public AjaxResult getPieChart() { |
| | | asyncService.getPieChart(); |
| | | if(redisCache.hasKey("getPieChart")){ |
| | | return redisCache.getCacheObject("getPieChart"); |
| | | } |
| | | return getAjaxResult(); |
| | | } |
| | | |
| | | private AjaxResult getAjaxResult() { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | | //获取体检登记数 |
| | |
| | | } else { |
| | | map.put("tjyc", 0); |
| | | } |
| | | |
| | | return AjaxResult.success(map); |
| | | } |
| | | |