package com.finance.web.controller.api.screen; import com.finance.common.basic.PageDTO; import com.finance.common.core.domain.R; import com.finance.system.query.TransferPaymentScaleQuery; import com.finance.system.service.ISysUserService; import com.finance.system.vo.BasicDataVO; import com.finance.system.vo.ProvinceStaticsVO; import com.finance.system.vo.RiskAndTransferVO; import com.finance.system.vo.RiskRankingVO; import com.finance.system.vo.TransferPaymentScaleVO; import com.finance.web.controller.service.ScreenService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import java.util.List; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @author mitao * @date 2024/4/15 */ @Slf4j @RestController @RequestMapping("/screen") @RequiredArgsConstructor @Api(tags = "大屏财政运行总体接口") public class ScreenGeneralController { private final ISysUserService sysUserService; private final ScreenService screenService; @ApiOperation("全省统计数") @GetMapping("/province-statics") public R provinceStatics() { ProvinceStaticsVO vo = screenService.provinceStatics(); return R.ok(vo); } @ApiOperation(value = "风险等级分布占比/得分分布/转移支付规模") @GetMapping("/risk-and-payment-scale") public R getRiskAndTransfer() { RiskAndTransferVO vo = null; try { vo = screenService.getRiskAndTransfer(); } catch (Exception e) { throw new RuntimeException(e); } return R.ok(vo); } @ApiOperation("转移支付规模季度列表") @GetMapping("/quarter-list") public R> quarterList() { return R.ok(screenService.quarterList()); } @ApiOperation("转移支付规模分页查询") @PostMapping("/transfer-payment-scale-page") public R> transferPaymentScalePage(@Validated @RequestBody TransferPaymentScaleQuery query) { PageDTO page = screenService.transferPaymentScalePage(query); return R.ok(page); } @ApiOperation("区/县风险排名前十") @GetMapping("/risk-ranking") public R> riskRanking() { try { return R.ok(screenService.riskRanking()); } catch (Exception e) { throw new RuntimeException(e); } } }