package com.ruoyi.app.service.impl;

import com.ruoyi.app.DTO.EntranceReportDTO;
import com.ruoyi.app.DTO.PurchaserProduceTotalDTO;
import com.ruoyi.app.DTO.SlaughterReportDTO;
import com.ruoyi.app.model.request.ReqEntranceReport;
import com.ruoyi.app.model.request.ReqGetPorkSideProduceRecord;
import com.ruoyi.app.model.request.ReqSlaughterReport;
import com.ruoyi.app.mapper.EntranceBatchMapper;
import com.ruoyi.app.mapper.PorkSideProduceRecordMapper;
import com.ruoyi.app.mapper.SlaughterBatchMapper;
import com.ruoyi.app.service.IDataReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 数据报表Service业务层处理
 *
 * @author ruoyi
 * @date 2025-03-31
 */
@Service
public class DataReportServiceImpl implements IDataReportService {

    @Autowired
    private EntranceBatchMapper entranceBatchMapper;
    @Autowired
    private SlaughterBatchMapper slaughterBatchMapper;

    @Autowired
    private PorkSideProduceRecordMapper porkSideProduceRecordMapper;

    /**
     * 入场统计报表
     * @return 结果
     */
    @Override
    public List<EntranceReportDTO> selectEntranceReport(ReqEntranceReport reqEntranceReport){
        return entranceBatchMapper.selectEntranceReport(reqEntranceReport);
    }

    /**
     * 生产统计报表
     * @return 结果
     */
    @Override
    public List<SlaughterReportDTO> selectSlaughterReport(ReqSlaughterReport reqSlaughterReport){
        return slaughterBatchMapper.selectSlaughterReport(reqSlaughterReport);
    }

    /**
     * 称重统计报表
     * @return 结果
     */
    @Override
    public List<PurchaserProduceTotalDTO> selectPurchaserProduceTotal(ReqGetPorkSideProduceRecord req){
        return porkSideProduceRecordMapper.selectPurchaserProduceTotal(req);
    }
}
