package com.hz.pm.api.projectdeclared.service.impl;

import com.hz.pm.api.projectdeclared.mapper.DeclaredStatisticsMapper;
import com.hz.pm.api.projectdeclared.model.po.DeclaredProjectStatisticsPO;
import com.hz.pm.api.projectdeclared.service.IDeclaredStatisticsService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author zpf
 * @since 2023-02-05
 */
@Service
@AllArgsConstructor
public class DeclaredStatisticsServiceImpl implements IDeclaredStatisticsService {

    private final DeclaredStatisticsMapper declaredStatisticsMapper;

    /**
     * 根据userId 去查询 申报项目统计 根据单位
     *
     * @param orgCode
     * @return
     */
    @Override
    public DeclaredProjectStatisticsPO getOrgStatistics(String orgCode, Integer year) {
        return declaredStatisticsMapper.getOrgStatistics(orgCode, year);
    }

    /**
     * 根据userId 去查询 申报项目统计 根据区域
     *
     * @param regionCode
     * @return
     */
    @Override
    public DeclaredProjectStatisticsPO getRegionStatistics(String regionCode, Integer year) {
        return declaredStatisticsMapper.getRegionStatistics(year);
    }
}
