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

import javax.servlet.http.HttpServletRequest;

import com.openhis.web.reportmanage.appservice.IDepartmentRevenueStatisticsAppService;
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.IDrugDosageSettlementAppService;
import com.openhis.web.reportmanage.dto.DrugDosageSettlementSearchParam;

import lombok.extern.slf4j.Slf4j;

/**
 * 科室收入统计 controller
 *
 * @author yuxj
 * @date 2025-09-23
 */
@RestController
@RequestMapping("/report-manage/department-revenue-statistics")
@Slf4j
public class DepartmentRevenueStatisticsController {

    @Autowired
    private IDepartmentRevenueStatisticsAppService departmentRevenueStatisticsAppService;

    /**
     * 收入明细明细列表 todo 还没写
     *
     * @param pageNo 当前页码
     * @param pageSize 查询条数
     * @param searchKey 模糊查询关键字
     * @param request 请求数据
     * @return
     */
    @GetMapping(value = "/page")
    public R<?> getPage(
        @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
        @RequestParam(name = "searchKey", required = false) String searchKey,
        @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
        return departmentRevenueStatisticsAppService.getPage(pageNo, pageSize, searchKey, request);
    }
}
