# ParseHFNextMonthExcelByPepServiceImpl.java

    package cloud.wconnect.rateshop.service.revenue.report.historyandforecast.nextmonth;

    import cloud.wconnect.commonlib.cons.SystemPlatformEnum;
    import cloud.wconnect.commonlib.pojo.dto.PropertyDTO;
    import cloud.wconnect.rateshop.pojo.bo.revenue.OtbAndTransientGroupBO;
    import cloud.wconnect.rateshop.service.revenue.report.IParseRevenueExcelService;
    import com.baomidou.dynamic.datasource.annotation.DS;
    import lombok.RequiredArgsConstructor;
    import org.springframework.stereotype.Service;
    import org.springframework.web.multipart.MultipartFile;

    import java.io.IOException;
    import java.io.InputStream;

    /**
     * @author: yyt
     * 2025-07-05
     */
    @RequiredArgsConstructor
    @Service
    @DS("rate_shop")
    public class ParseHFNextMonthExcelByPepServiceImpl implements IParseHFNextMonthExcelService {

        private final IParseRevenueExcelService parseRevenueExcelService;

        @Override
        public boolean supports(String source) {
            return source.equals(SystemPlatformEnum.PEP.getDesc());
        }

        /**
         * 检查报告
         *
         * @param propertyDTO 资产
         * @param file        文件
         * @author yyt
         * @date 2026/3/6
         **/
        @Override
        public void checkFile(PropertyDTO propertyDTO, MultipartFile file) {
            parseRevenueExcelService.checkHistoryAndForecastForMonth(propertyDTO, file);
        }

        /**
         * 处理报告
         *
         * @param propertyDTO 资产
         * @param inputStream 文件
         * @param startDate   开始日期
         * @param endDate     结束日期
         * @return 报告数据
         * @author yyt
         * @date 2026/3/6
         **/
        @Override
        public OtbAndTransientGroupBO handleFile(PropertyDTO propertyDTO, InputStream inputStream, Long startDate, Long endDate) throws IOException {
           return parseRevenueExcelService.parseHistoryAndForecastForMonth(propertyDTO, inputStream, startDate, endDate);
        }

    }