package com.kcim.web;

import com.kcim.common.util.Result;
import com.kcim.service.StandardReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 相关导入导出操作
 */
@Slf4j
@Api(tags = "标准成本报表")
@RestController
@RequestMapping("standardReport")
@AllArgsConstructor
public class StandardReportController extends AbstractController {

    private StandardReportService standardReportService;

    @ApiOperation("医院科室直接成本表（医疗成本）")
    @GetMapping("/getDeptDirectMedicalCost")
    public Result getDeptDirectMedicalCost(@RequestParam String computeDate){
        return Result.ok(standardReportService.getDeptDirectMedicalCost(computeDate));
    }
    @ApiOperation("医院科室直接成本表（全成本）")
    @GetMapping("/getDeptFullDirectCost")
    public Result getDeptFullDirectCost(@RequestParam String computeDate){
        return Result.ok(standardReportService.getDeptFullDirectCost(computeDate));
    }

    @ApiOperation("获取临床服务类科室全成本（医疗成本）")
    @GetMapping("/getClinicalDeptMedicalCost")
    public Result getClinicalDeptMedicalCost(@RequestParam String computeDate) {
        return Result.ok(standardReportService.getClinicalDeptMedicalCost(computeDate));
    }

    @ApiOperation("获取临床服务类科室全成本（全成本）")
    @GetMapping("/getClinicalDeptFullCost")
    public Result getClinicalDeptFullCost(@RequestParam String computeDate) {
        return Result.ok(standardReportService.getClinicalDeptFullCost(computeDate));
    }

    @ApiOperation("获取临床服务类科室全成本构成分析表")
    @GetMapping("/getClinicalDeptFullCostAnalysis")
    public Result getClinicalDeptFullCostAnalysis(@RequestParam String computeDate) {
        return Result.ok(standardReportService.getClinicalDeptFullCostAnalysis(computeDate));
    }

    @ApiOperation("获取医院科室成本分摊汇总表")
    @GetMapping("/getHospitalDeptCostAllocation")
    public Result getHospitalDeptCostAllocation(@RequestParam String computeDate) {
        return Result.ok(standardReportService.getHospitalDeptCostAllocation(computeDate));
    }

    @ApiOperation("获取医院诊次成本构成表")
    @GetMapping("/getHospitalVisitCostComposition")
    public Result getHospitalVisitCostComposition(@RequestParam String computeDate) {
        return Result.ok(standardReportService.getHospitalVisitCostComposition(computeDate));
    }


}
