package com.ruoyi.syzy.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.syzy.mapper.BBusiWishUniversitySubmitRecruitPlanMapper;
import com.ruoyi.syzy.domain.BBusiWishUniversitySubmitRecruitPlan;
import com.ruoyi.syzy.service.IBBusiWishUniversitySubmitRecruitPlanService;

/**
 * 院校招生计划Service业务层处理
 *
 * @author mingxue
 * @date 2022-06-29
 */
@Service
public class BBusiWishUniversitySubmitRecruitPlanServiceImpl implements IBBusiWishUniversitySubmitRecruitPlanService
{
    @Autowired
    private BBusiWishUniversitySubmitRecruitPlanMapper bBusiWishUniversitySubmitRecruitPlanMapper;

    /**
     * 查询院校招生计划
     *
     * @param id 院校招生计划ID
     * @return 院校招生计划
     */
    @Override
    public BBusiWishUniversitySubmitRecruitPlan selectBBusiWishUniversitySubmitRecruitPlanById(Long id)
    {
        return bBusiWishUniversitySubmitRecruitPlanMapper.selectBBusiWishUniversitySubmitRecruitPlanById(id);
    }

    /**
     * 查询院校招生计划列表
     *
     * @param bBusiWishUniversitySubmitRecruitPlan 院校招生计划
     * @return 院校招生计划
     */
    @Override
    public List<BBusiWishUniversitySubmitRecruitPlan> selectBBusiWishUniversitySubmitRecruitPlanList(BBusiWishUniversitySubmitRecruitPlan bBusiWishUniversitySubmitRecruitPlan)
    {
        return bBusiWishUniversitySubmitRecruitPlanMapper.selectBBusiWishUniversitySubmitRecruitPlanList(bBusiWishUniversitySubmitRecruitPlan);
    }

    @Override
    public List<String> levels(String location, Integer year) {
        return bBusiWishUniversitySubmitRecruitPlanMapper.levels( location,  year);
    }

    @Override
    public Integer selectSubmitRecruitsMaxYearByLocation(String location) {
        return bBusiWishUniversitySubmitRecruitPlanMapper.selectSubmitRecruitsMaxYearByLocation(location);
    }

    @Override
    public List<String> types(String location, Integer year) {
        return bBusiWishUniversitySubmitRecruitPlanMapper.types( location,  year);
    }

    @Override
    public List<String> selectSubmitRecruitsData(String location, Integer year) {
        return bBusiWishUniversitySubmitRecruitPlanMapper.selectSubmitRecruitsData(location,year);
    }

    @Override
    public List<String> years(String location, String type, String level) {
        return bBusiWishUniversitySubmitRecruitPlanMapper.years( location,  type,  level);
    }

    @Override
    public List<String> getUniversityNameText(String universityCode,String location, Integer year, String type, String level) {
        return bBusiWishUniversitySubmitRecruitPlanMapper.getUniversityNameText(universityCode, location,  year,  type,  level);
    }

    /**
     * 新增院校招生计划
     *
     * @param bBusiWishUniversitySubmitRecruitPlan 院校招生计划
     * @return 结果
     */
    @Override
    public int insertBBusiWishUniversitySubmitRecruitPlan(BBusiWishUniversitySubmitRecruitPlan bBusiWishUniversitySubmitRecruitPlan)
    {
        bBusiWishUniversitySubmitRecruitPlan.setCreateTime(DateUtils.getNowDate());
        return bBusiWishUniversitySubmitRecruitPlanMapper.insertBBusiWishUniversitySubmitRecruitPlan(bBusiWishUniversitySubmitRecruitPlan);
    }

    /**
     * 修改院校招生计划
     *
     * @param bBusiWishUniversitySubmitRecruitPlan 院校招生计划
     * @return 结果
     */
    @Override
    public int updateBBusiWishUniversitySubmitRecruitPlan(BBusiWishUniversitySubmitRecruitPlan bBusiWishUniversitySubmitRecruitPlan)
    {
        return bBusiWishUniversitySubmitRecruitPlanMapper.updateBBusiWishUniversitySubmitRecruitPlan(bBusiWishUniversitySubmitRecruitPlan);
    }

    /**
     * 批量删除院校招生计划
     *
     * @param ids 需要删除的院校招生计划ID
     * @return 结果
     */
    @Override
    public int deleteBBusiWishUniversitySubmitRecruitPlanByIds(Long[] ids)
    {
        return bBusiWishUniversitySubmitRecruitPlanMapper.deleteBBusiWishUniversitySubmitRecruitPlanByIds(ids);
    }

    /**
     * 删除院校招生计划信息
     *
     * @param id 院校招生计划ID
     * @return 结果
     */
    @Override
    public int deleteBBusiWishUniversitySubmitRecruitPlanById(Long id)
    {
        return bBusiWishUniversitySubmitRecruitPlanMapper.deleteBBusiWishUniversitySubmitRecruitPlanById(id);
    }
}
