/*
 * Copyright ©2023 CJB-CNIT Team. All rights reserved
 */
package com.openhis.web.reportmanage.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
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;

import com.core.common.core.domain.R;
import com.openhis.web.reportmanage.appservice.IReportStatisticsAppService;

import lombok.extern.slf4j.Slf4j;

/**
 * 报表统计 controller
 *
 * @author yuxj
 * @date 2025-09-23
 */
@RestController
@RequestMapping("/report-manage/report-statistics")
@Slf4j
public class ReportStatisticsController {

    @Autowired
    private IReportStatisticsAppService reportStatisticsAppService;

    /**
     * 月报明细列表
     *
     * @param startTime 开始日期
     * @param endTime 结束日期
     * @return
     */
    @GetMapping(value = "/daily-report")
    public R<?> getDailyReport(@RequestParam String startTime, @RequestParam String endTime) {
        return reportStatisticsAppService.getDailyReport(startTime,endTime);
    }

    /**
     * 年报明细列表
     *
     * @param startTime 开始日期
     * @param endTime 结束日期
     * @return
     */
    @GetMapping(value = "/annual-report")
    public R<?> getAnnualRreport(@RequestParam String startTime, @RequestParam String endTime) {
        return reportStatisticsAppService.getAnnualRreport(startTime,endTime);
    }
}
