package cn.com.countrygarden.bi.main.service.bii.impl;

import java.util.List;

import cn.com.countrygarden.bi.main.dao.bii.BiIncomeMonthMapper;
import cn.com.countrygarden.bi.main.model.bii.BiIncomeMonth;
import cn.com.countrygarden.bi.main.service.bii.BiIncomeMonthService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by Leo on 2018/6/4
 */
@Service
@Transactional
public class BiIncomeMonthServiceImpl implements BiIncomeMonthService {
	@Autowired
	private BiIncomeMonthMapper biIncomeMonthMapper;

	/* 
	 * <p>zhaolie: getToMonthIncome</p>  
	 * <p>Description:总体收入累计查询_本月 </p>  
	 * @param bim
	 * @return  	
	 * @see cn.com.countrygarden.bi.main.service.bii.BiIncomeMonthService#getToMonthIncome(cn.com.countrygarden.bi.main.model.bii.BiIncomeMonth)  
	 */
	@Override
	public List<BiIncomeMonth> getToMonthIncome(BiIncomeMonth bim) {
		// TODO Auto-generated method stub
		/*return this.biIncomeMonthMapper.getToMonthIncome(bim);*/
		return this.biIncomeMonthMapper.select(bim);
	}

	/* 	
	 * @author zhaolie 房产经营收入查询_每月</p>  	 
	 * @param bim
	 * @return  	
	 */
	@Override
	public List<BiIncomeMonth> getHouAllMonthIncome(BiIncomeMonth bim) {
		// TODO Auto-generated method stub
		return this.biIncomeMonthMapper.select(bim);
	}

	/* (non-Javadoc)  
	
	 * <p>@author zhaolie Title: getHouAllMonthIncomeone</p>  
	
	 * <p>Description: </p>  
	
	 * @param bim
	 * @return  
	
	 * @see cn.com.countrygarden.bi.main.service.bii.BiIncomeMonthService#getHouAllMonthIncomeone(cn.com.countrygarden.bi.main.model.bii.BiIncomeMonth)  
	
	 */
	@Override
	public List<BiIncomeMonth> getToMonthIncomeJuZheLe(BiIncomeMonth bim) {
		// TODO Auto-generated method stub
		return this.biIncomeMonthMapper.select(bim);
	}

	/* (non-Javadoc)  
	
	 * <p>@author zhaolie 插入居者乐数据</p>  
	
	 * <p>Description: </p>  
	
	 * @param bim
	 * @return  
	
	 * @see cn.com.countrygarden.bi.main.service.bii.BiIncomeMonthService#getToMonthIncomeJuZheLeone(cn.com.countrygarden.bi.main.model.bii.BiIncomeMonth)  
	
	 */
	@Override
	public BiIncomeMonth getToMonthIncomeJuZheLeone(BiIncomeMonth bim) {
		// TODO Auto-generated method stub
		return this.biIncomeMonthMapper.getToMonthIncomeJuZheLeone(bim);
	}

	/* (non-Javadoc)  
	
	 * <p>@author zhaolie 更新居者乐数据</p>  
	
	 * <p>Description: </p>  
	
	 * @param bim  
	
	 * @see cn.com.countrygarden.bi.main.service.bii.BiIncomeMonthService#updateToMonthIncomeJuZheLe(cn.com.countrygarden.bi.main.model.bii.BiIncomeMonth)  
	
	 */
	@Override
	@Transactional
	public void updateToMonthIncomeJuZheLe(BiIncomeMonth bim) {
		// TODO Auto-generated method stub
		this.biIncomeMonthMapper.updateToMonthIncomeJuZheLe(bim);
	}

	/* (non-Javadoc)  
	
	 * <p>@author zhaolie Title: insertToMonthIncomeJuZheLe</p>  
	
	 * <p>Description: </p>  
	
	 * @param bim  
	
	 * @see cn.com.countrygarden.bi.main.service.bii.BiIncomeMonthService#insertToMonthIncomeJuZheLe(cn.com.countrygarden.bi.main.model.bii.BiIncomeMonth)  
	
	 */
	@Override
	@Transactional
	public void insertToMonthIncomeJuZheLe(BiIncomeMonth bim) {
		// TODO Auto-generated method stub
		this.biIncomeMonthMapper.insertToMonthIncomeJuZheLe(bim);
	}

	/* (non-Javadoc)  
	
	 * <p>@author zhaolie 居者乐调用存储过程</p>  
	
	 * <p>Description: </p>  
	  
	
	 * @see cn.com.countrygarden.bi.main.service.bii.BiIncomeMonthService#getcall()  
	
	 */
	@Override
	@Transactional
	public void getcall() {
		// TODO Auto-generated method stub
		this.biIncomeMonthMapper.getcall();
	}

	@Override
	@Transactional
	public void insertToMonthIncomeHZJuZheLe(int year,int month){
		this.biIncomeMonthMapper.insertToMonthIncomeHZJuZheLe(year, month);
	}
}
