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

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

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

import lombok.extern.slf4j.Slf4j;

/**
 * 药品用量结算 controller
 *
 * @author yuxj
 * @date 2025-09-09
 */
@RestController
@RequestMapping("/report-manage/drug-dosage-settlement")
@Slf4j
public class DrugDosageSettlementController {

    @Autowired
    private IDrugDosageSettlementAppService drugDosageSettlementAppService;

    /**
     * 药品用量明细列表
     *
     * @param drugDosageSettlementSearchParam 药品用量明细查询条件
     * @param pageNo 当前页码
     * @param pageSize 查询条数
     * @param searchKey 模糊查询关键字
     * @param request 请求数据
     * @return 药品用量明细
     */
    @GetMapping(value = "/report-drug-dosage-page")
    public R<?> getPage(DrugDosageSettlementSearchParam drugDosageSettlementSearchParam,
        @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
        @RequestParam(name = "searchKey", required = false) String searchKey,
        @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
        return drugDosageSettlementAppService.getPage(drugDosageSettlementSearchParam, pageNo, pageSize, searchKey, request);
    }
}
