package com.goafanti.cognizance.service;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.goafanti.cognizance.bo.BusinessCountBo;
import com.goafanti.cognizance.bo.CognizanceBo;
import com.goafanti.cognizance.bo.CognizanceCatagoryBo;
import com.goafanti.cognizance.bo.CognizanceContractBo;
import com.goafanti.cognizance.bo.CognizanceDetailBo;
import com.goafanti.cognizance.bo.CognizanceManageCostBo;
import com.goafanti.cognizance.bo.CognizanceOrgInfoBo;
import com.goafanti.cognizance.bo.CognizanceResearchCostBo;
import com.goafanti.cognizance.bo.CultivationListBo;
import com.goafanti.common.model.Contract;
import com.goafanti.common.model.OrgCognizance;
import com.goafanti.common.model.OrgCognizanceLog;
import com.goafanti.core.mybatis.page.Pagination;

public interface OrgCognizanceService {

	OrgCognizance insert(OrgCognizance c);

	Pagination<CognizanceBo> listCognizance(String contractId, String uid, String unitName, Integer locationProvince, Integer pNo, Integer pSize);

	CognizanceOrgInfoBo selectCognizanceOrgInfoBoByUidAndCid(String uid, String cid);

	CognizanceResearchCostBo selectCognizanceResearchCostBoByUidAndYear(Integer year,String uid);

	CognizanceManageCostBo selectCognizanceManageCostBoByUidAndYear(Integer year, String uid);

	CognizanceCatagoryBo selectCognizanceCatagoryBoByUidAndYear(Integer year, String uid);

	BigDecimal selectLastYearRevenueByUidAndYear(Integer year, String uid);

	int updateByPrimaryKeySelective(OrgCognizance cog);

	OrgCognizance selectCognizanceByUidAndYear(Integer year, String uid);

	int deleteByPrimaryKey(List<String> id);

	CognizanceDetailBo selectCognizanceDetailBo(String uid, String cid, Integer year);

	void updateCognizance(OrgCognizance cog, OrgCognizanceLog log, Date recordTime, String aid);

	OrgCognizance insertCognizance(OrgCognizance cog, String aid);

	Pagination<CultivationListBo> listCultivation(String uid, Integer province, String unitName, Integer pNo, Integer pSize);

	OrgCognizance selectByPrimaryKey(String id);

	Integer selectLatelyRecordYear(String uid);

	BusinessCountBo countBusiness(String uid, Integer year);

	OrgCognizance saveCognizance(OrgCognizance oc, String salesman);

	List<CognizanceContractBo> selectContractCognizanceByContractId(String contractId);

	void insertContractRecord(Contract c);


}
