| | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.dromara.common.core.domain.R; |
| | | import org.dromara.common.mybatis.core.page.PageQuery; |
| | | import org.dromara.common.mybatis.core.page.TableDataInfo; |
| | | import org.dromara.demo.domain.bo.RsDangerTotalBo; |
| | | import org.dromara.demo.domain.vo.*; |
| | | import org.dromara.demo.service.IDataDashboardService; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ghl |
| | |
| | | * 安全隐患统计 |
| | | */ |
| | | @SaCheckPermission("demo:dangerTotal:list") |
| | | @GetMapping("/dangerTotal") |
| | | public R<RsDangerTotalDashboardVo> getDangerTotal() { |
| | | return R.ok(service.getDangerTotal()); |
| | | @GetMapping("/dangerTotal/{period}") |
| | | public R<RsDangerTotalDashboardVo> getDangerTotal(@PathVariable String period) { |
| | | return R.ok(service.getDangerTotal(period)); |
| | | } |
| | | |
| | | /** |
| | | * 交通宣传 |
| | | */ |
| | | @SaCheckPermission("demo:trafficPropaganda:list") |
| | | @GetMapping("/trafficPropaganda") |
| | | public TableDataInfo<RsTrafficPropagandaVo> getTrafficPropaganda() { |
| | | return TableDataInfo.build(service.getTrafficPropaganda()); |
| | | } |
| | | |
| | | /** |
| | | * 交通事故 |
| | | */ |
| | | @SaCheckPermission("demo:trafficAccident:list") |
| | | @GetMapping("/trafficAccident") |
| | | public TableDataInfo<RsTrafficAccidentVo> getTrafficAccident() { |
| | | return TableDataInfo.build(service.getTrafficAccident()); |
| | | } |
| | | |
| | | /** |
| | | * 数据上图 |
| | | */ |
| | | @SaCheckPermission("demo:geographyData:list") |
| | | @GetMapping("/geographyData") |
| | | public R<List<Map<String, Object>>> getGeographyData() { |
| | | return R.ok(service.getGeographyData()); |
| | | } |
| | | |
| | | |
| | | } |