feiyu02
2025-09-18 baf2cc2ce3dfd1235c012a3750132769fcd9ad2f
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationController.kt
@@ -5,7 +5,11 @@
import cn.flightfeather.supervision.lightshare.vo.AreaVo
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.*
import org.springframework.web.multipart.MultipartFile
import springfox.documentation.annotations.ApiIgnore
import javax.servlet.http.HttpServletResponse
@Api(tags = ["EvaluationController"], description = "评估总分API接口")
@RestController
@@ -65,4 +69,26 @@
    @ApiOperation(value = "根据区域范围获取自动评估历史记录")
    @PostMapping("/auto/record")
    fun findAutoEvaluation(@RequestBody areaVo: AreaVo) = resPack { evaluationService.findAutoEvaluation(areaVo) }
    @ApiOperation(value = "下载自动评估结果")
    @PostMapping("/auto/record/download")
    fun downloadAutoEvaluation(
        @ApiParam("区域条件信息") @RequestBody areaVo: AreaVo,
        @ApiParam("是否强制生成新的报告") @RequestParam forceUpdate: Boolean,
        @ApiIgnore response: HttpServletResponse,
    ) = resPack { evaluationService.downloadAutoEvaluation(areaVo, forceUpdate, response) }
    @ApiOperation(value = "下载自动评估结果导入模板")
    @PostMapping("/auto/record/template")
    fun downloadAutoEvaTemplate(
        @ApiParam("区域条件信息") @RequestBody areaVo: AreaVo,
        @ApiIgnore response: HttpServletResponse,
    ) = resPack { evaluationService.downloadAutoEvaTemplate(areaVo, response) }
    @ApiOperation(value = "上传自动评估结果")
    @PutMapping("/auto/record/upload")
    fun uploadAutoEvaluation(
        @ApiParam("区域条件信息") @RequestBody areaVo: AreaVo,
        @ApiParam("excel文件") @RequestPart("excel") file: MultipartFile,
    ) = resPack { evaluationService.uploadAutoEvaluation(areaVo, file) }
}