package com.goafanti.common.dao;

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

import org.apache.ibatis.annotations.Param;

import com.goafanti.cognizance.bo.CognizanceCatagoryBo;
import com.goafanti.cognizance.bo.CognizanceContractBo;
import com.goafanti.cognizance.bo.CognizanceManageCostBo;
import com.goafanti.cognizance.bo.CognizanceOrgInfoBo;
import com.goafanti.cognizance.bo.CognizanceResearchCostBo;
import com.goafanti.common.model.OrgCognizance;
import com.goafanti.common.model.OrgHumanResource;

public interface OrgCognizanceMapper {
    int deleteByPrimaryKey(String id);

    int insert(OrgCognizance record);

    int insertSelective(OrgCognizance record);

    OrgCognizance selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(OrgCognizance record);

    int updateByPrimaryKey(OrgCognizance record);

	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);

	OrgCognizance selectCognizanceByUidAndYear(Integer year, String uid);

	int batchDeleteByPrimaryKey(List<String> id);

	Integer selectLatelyRecordYear(String uid);

	List<CognizanceContractBo> selectContractCognizanceByContractId(String contractId);

	int batchDeleteByContractId(List<String> id);

	Integer findFirstCatagory(@Param("year")Integer year, @Param("uid")String uid);

	Integer findSecondCatagory(@Param("year")Integer year, @Param("uid")String uid);

	OrgHumanResource findFirmAndTechTotal(@Param("year")Integer year, @Param("uid")String uid);

	BigDecimal findTotalRevenue(@Param("year")Integer year, @Param("uid")String uid);

}