feiyu02
2022-11-15 23bd719cebe5feeff4e48fde925b0b39755eea93
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationController.kt
@@ -53,8 +53,9 @@
        @ApiParam(value = "用户id") @PathVariable("userId") userId: String,
        @ApiParam(value = "页码") @RequestParam(value = "page") page: Int,
        @ApiParam(value = "单页数据量") @RequestParam(value = "per_page") perPage: Int,
        @ApiParam(value = "前端平台") @RequestParam("platform", required = false) platform:String?,
        response: HttpServletResponse
    ) = evaluationService.getHistoryPoint(userId, page, perPage, response)
    ) = evaluationService.getHistoryPoint(userId, page, perPage, platform, response)
    @ApiOperation(value = "获取信用评估结果")
    @GetMapping("/creditInfo")
@@ -78,4 +79,21 @@
            @RequestParam("sceneType") sceneType: Int,
            response: HttpServletResponse
    ) = evaluationService.autoScore(year, month, sceneType, response)
    @ApiOperation(value = "上传自评得分")
    @PostMapping("/upload")
    fun uploadScore(
        @ApiParam(value = "用户id") @RequestParam("userId") userId: String,
        @ApiParam(value = "评分周期") @RequestParam("period") period: String,
        @ApiParam(value = "评分规则id") @RequestParam(value = "ruleId", required = false) ruleId: String?,
        @ApiParam(value = "具体扣分条目(只传最小级别的评估项)") @RequestBody itemList: List<Pair<String, String>>,
    ) = evaluationService.uploadScore(userId, period, ruleId, itemList)
    @ApiOperation(value = "获取测评详情")
    @GetMapping("/detail")
    fun getDetail(
            @ApiParam(value = "用户id") @RequestParam("userId") userId: String,
            @ApiParam(value = "评分周期") @RequestParam("period") period: String,
    ) = evaluationService.getDetail(userId, period)
}