package com.finance.web.controller.api.screen; import com.finance.common.core.domain.R; import com.finance.common.core.domain.entity.SysUser; import com.finance.common.utils.BeanUtils; import com.finance.system.query.CalculateDetailQuery; import com.finance.system.query.DeptCalculateDetailQuery; import com.finance.system.service.ISysUserService; import com.finance.system.service.TbScoreService; import com.finance.system.vo.CurrentFieldsDetailVO; import com.finance.system.vo.DataAnalysisVO; import com.finance.system.vo.DeptCalculateDetailVO; import com.finance.system.vo.DeptVO; import com.finance.system.vo.QuestionVO; import com.finance.system.vo.ScoreCalculateDetailVO; import com.finance.web.controller.service.ScreenService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; /** * @author mitao * @date 2024/4/15 */ @Slf4j @RestController @RequestMapping("/screen") @RequiredArgsConstructor @Api(tags = "大屏分析评估系统接口") public class ScreenInnerController { private final ISysUserService sysUserService; private final ScreenService screenService; private final TbScoreService tbScoreService; @ApiOperation("部门列表-区县下拉框") @GetMapping("/dept-list") @ApiImplicitParam(name = "areaCode", value = "市级区划代码", dataType = "String", dataTypeClass = String.class) public R> deptList(String areaCode) { List list = screenService.getCountyList(areaCode); return R.ok(BeanUtils.copyList(list, DeptVO.class)); } // @ApiOperation(value = "监管发现问题") @GetMapping("/questions") public R> queryQuestions() { try { return R.ok(screenService.queryQuestions()); } catch (Exception e) { throw new RuntimeException(e); } } @ApiOperation("数据分析系统页面数据") @GetMapping("/data") public R getDataAnalysis(@RequestParam("areaCode") String areaCode) { try { return R.ok(screenService.getDataAnalysis(areaCode)); } catch (Exception e) { throw new RuntimeException(e); } } @ApiOperation("获取点击字段弹窗数据") @PostMapping("/fields-detail") public R fieldsDetail( @Validated @RequestBody CalculateDetailQuery query) { return R.ok(screenService.fieldsDetail(query)); } @ApiOperation("获取点击部门得分弹窗数据") @PostMapping("/dept-detail") public R> deptDetail( @Validated @RequestBody DeptCalculateDetailQuery query) { try { return R.ok(screenService.deptCalculateDetail(query)); } catch (Exception e) { throw new RuntimeException(e); } } @ApiOperation("查看原始数据") @GetMapping("/view-raw-data") public R viewRawData(@RequestParam("areaCode") String areaCode) { try { return R.ok(screenService.viewRawData(areaCode)); } catch (Exception e) { throw new RuntimeException(e); } } }